Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  2.6.22: ERROR: "__ucmpdi2" [drivers/net/s2io.ko] undefined!
  cxgb3 - fix register to stop bc/mc traffic
  au1000_eth: Fix warnings.
This commit is contained in:
Linus Torvalds 2007-06-27 09:59:52 -07:00
commit 7af5f532a2
3 changed files with 15 additions and 11 deletions

View File

@ -34,7 +34,7 @@
* *
* *
*/ */
#include <linux/dma-mapping.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/string.h> #include <linux/string.h>

View File

@ -335,11 +335,11 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
hwm = min(hwm, MAC_RXFIFO_SIZE - 8192); hwm = min(hwm, MAC_RXFIFO_SIZE - 8192);
lwm = min(3 * (int)mtu, MAC_RXFIFO_SIZE / 4); lwm = min(3 * (int)mtu, MAC_RXFIFO_SIZE / 4);
v = t3_read_reg(adap, A_XGM_RXFIFO_CFG + mac->offset);
if (adap->params.rev == T3_REV_B2 && if (adap->params.rev == T3_REV_B2 &&
(t3_read_reg(adap, A_XGM_RX_CTRL + mac->offset) & F_RXEN)) { (t3_read_reg(adap, A_XGM_RX_CTRL + mac->offset) & F_RXEN)) {
disable_exact_filters(mac); disable_exact_filters(mac);
t3_set_reg_field(adap, A_XGM_RXFIFO_CFG + mac->offset, v = t3_read_reg(adap, A_XGM_RX_CFG + mac->offset);
t3_set_reg_field(adap, A_XGM_RX_CFG + mac->offset,
F_ENHASHMCAST | F_COPYALLFRAMES, F_DISBCAST); F_ENHASHMCAST | F_COPYALLFRAMES, F_DISBCAST);
/* drain rx FIFO */ /* drain rx FIFO */
@ -347,11 +347,12 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
A_XGM_RX_MAX_PKT_SIZE_ERR_CNT + A_XGM_RX_MAX_PKT_SIZE_ERR_CNT +
mac->offset, mac->offset,
1 << 31, 1, 20, 5)) { 1 << 31, 1, 20, 5)) {
t3_write_reg(adap, A_XGM_RXFIFO_CFG + mac->offset, v); t3_write_reg(adap, A_XGM_RX_CFG + mac->offset, v);
enable_exact_filters(mac); enable_exact_filters(mac);
return -EIO; return -EIO;
} }
t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu); t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu);
t3_write_reg(adap, A_XGM_RX_CFG + mac->offset, v);
enable_exact_filters(mac); enable_exact_filters(mac);
} else } else
t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu); t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu);
@ -362,6 +363,7 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
*/ */
hwm = rx_fifo_hwm(mtu); hwm = rx_fifo_hwm(mtu);
lwm = min(3 * (int)mtu, MAC_RXFIFO_SIZE / 4); lwm = min(3 * (int)mtu, MAC_RXFIFO_SIZE / 4);
v = t3_read_reg(adap, A_XGM_RXFIFO_CFG + mac->offset);
v &= ~V_RXFIFOPAUSELWM(M_RXFIFOPAUSELWM); v &= ~V_RXFIFOPAUSELWM(M_RXFIFOPAUSELWM);
v |= V_RXFIFOPAUSELWM(lwm / 8); v |= V_RXFIFOPAUSELWM(lwm / 8);
if (G_RXFIFOPAUSEHWM(v)) if (G_RXFIFOPAUSEHWM(v))

View File

@ -2868,6 +2868,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
struct tx_curr_get_info get_info, put_info; struct tx_curr_get_info get_info, put_info;
struct sk_buff *skb; struct sk_buff *skb;
struct TxD *txdlp; struct TxD *txdlp;
u8 err_mask;
get_info = fifo_data->tx_curr_get_info; get_info = fifo_data->tx_curr_get_info;
memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info)); memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info));
@ -2886,8 +2887,8 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
} }
/* update t_code statistics */ /* update t_code statistics */
err >>= 48; err_mask = err >> 48;
switch(err) { switch(err_mask) {
case 2: case 2:
nic->mac_control.stats_info->sw_stat. nic->mac_control.stats_info->sw_stat.
tx_buf_abort_cnt++; tx_buf_abort_cnt++;
@ -6805,6 +6806,7 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
u16 l3_csum, l4_csum; u16 l3_csum, l4_csum;
unsigned long long err = rxdp->Control_1 & RXD_T_CODE; unsigned long long err = rxdp->Control_1 & RXD_T_CODE;
struct lro *lro; struct lro *lro;
u8 err_mask;
skb->dev = dev; skb->dev = dev;
@ -6813,8 +6815,8 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
if (err & 0x1) { if (err & 0x1) {
sp->mac_control.stats_info->sw_stat.parity_err_cnt++; sp->mac_control.stats_info->sw_stat.parity_err_cnt++;
} }
err >>= 48; err_mask = err >> 48;
switch(err) { switch(err_mask) {
case 1: case 1:
sp->mac_control.stats_info->sw_stat. sp->mac_control.stats_info->sw_stat.
rx_parity_err_cnt++; rx_parity_err_cnt++;
@ -6867,9 +6869,9 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
* Note that in this case, since checksum will be incorrect, * Note that in this case, since checksum will be incorrect,
* stack will validate the same. * stack will validate the same.
*/ */
if (err != 0x5) { if (err_mask != 0x5) {
DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%x\n",
dev->name, err); dev->name, err_mask);
sp->stats.rx_crc_errors++; sp->stats.rx_crc_errors++;
sp->mac_control.stats_info->sw_stat.mem_freed sp->mac_control.stats_info->sw_stat.mem_freed
+= skb->truesize; += skb->truesize;