aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/au1000_eth.c2
-rw-r--r--drivers/net/cxgb3/xgmac.c8
-rw-r--r--drivers/net/irda/smsc-ircc2.c14
-rw-r--r--drivers/net/pcmcia/Kconfig2
-rw-r--r--drivers/net/phy/mdio_bus.c3
-rw-r--r--drivers/net/phy/vitesse.c2
-rw-r--r--drivers/net/s2io.c16
7 files changed, 26 insertions, 21 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index c39ab803c5d8..c27cfcef45fa 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -34,7 +34,7 @@
34 * 34 *
35 * 35 *
36 */ 36 */
37 37#include <linux/dma-mapping.h>
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
40#include <linux/string.h> 40#include <linux/string.h>
diff --git a/drivers/net/cxgb3/xgmac.c b/drivers/net/cxgb3/xgmac.c
index b261be147e7b..c302b1a30cba 100644
--- a/drivers/net/cxgb3/xgmac.c
+++ b/drivers/net/cxgb3/xgmac.c
@@ -335,11 +335,11 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
335 hwm = min(hwm, MAC_RXFIFO_SIZE - 8192); 335 hwm = min(hwm, MAC_RXFIFO_SIZE - 8192);
336 lwm = min(3 * (int)mtu, MAC_RXFIFO_SIZE / 4); 336 lwm = min(3 * (int)mtu, MAC_RXFIFO_SIZE / 4);
337 337
338 v = t3_read_reg(adap, A_XGM_RXFIFO_CFG + mac->offset);
339 if (adap->params.rev == T3_REV_B2 && 338 if (adap->params.rev == T3_REV_B2 &&
340 (t3_read_reg(adap, A_XGM_RX_CTRL + mac->offset) & F_RXEN)) { 339 (t3_read_reg(adap, A_XGM_RX_CTRL + mac->offset) & F_RXEN)) {
341 disable_exact_filters(mac); 340 disable_exact_filters(mac);
342 t3_set_reg_field(adap, A_XGM_RXFIFO_CFG + mac->offset, 341 v = t3_read_reg(adap, A_XGM_RX_CFG + mac->offset);
342 t3_set_reg_field(adap, A_XGM_RX_CFG + mac->offset,
343 F_ENHASHMCAST | F_COPYALLFRAMES, F_DISBCAST); 343 F_ENHASHMCAST | F_COPYALLFRAMES, F_DISBCAST);
344 344
345 /* drain rx FIFO */ 345 /* drain rx FIFO */
@@ -347,11 +347,12 @@ int t3_mac_set_mtu(struct cmac *mac, unsigned int mtu)
347 A_XGM_RX_MAX_PKT_SIZE_ERR_CNT + 347 A_XGM_RX_MAX_PKT_SIZE_ERR_CNT +
348 mac->offset, 348 mac->offset,
349 1 << 31, 1, 20, 5)) { 349 1 << 31, 1, 20, 5)) {
350 t3_write_reg(adap, A_XGM_RXFIFO_CFG + mac->offset, v); 350 t3_write_reg(adap, A_XGM_RX_CFG + mac->offset, v);
351 enable_exact_filters(mac); 351 enable_exact_filters(mac);
352 return -EIO; 352 return -EIO;
353 } 353 }
354 t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu); 354 t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu);
355 t3_write_reg(adap, A_XGM_RX_CFG + mac->offset, v);
355 enable_exact_filters(mac); 356 enable_exact_filters(mac);
356 } else 357 } else
357 t3_write_reg(adap, A_XGM_RX_MAX_PKT_SIZE + mac->offset, mtu); 358 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)
362 */ 363 */
363 hwm = rx_fifo_hwm(mtu); 364 hwm = rx_fifo_hwm(mtu);
364 lwm = min(3 * (int)mtu, MAC_RXFIFO_SIZE / 4); 365 lwm = min(3 * (int)mtu, MAC_RXFIFO_SIZE / 4);
366 v = t3_read_reg(adap, A_XGM_RXFIFO_CFG + mac->offset);
365 v &= ~V_RXFIFOPAUSELWM(M_RXFIFOPAUSELWM); 367 v &= ~V_RXFIFOPAUSELWM(M_RXFIFOPAUSELWM);
366 v |= V_RXFIFOPAUSELWM(lwm / 8); 368 v |= V_RXFIFOPAUSELWM(lwm / 8);
367 if (G_RXFIFOPAUSEHWM(v)) 369 if (G_RXFIFOPAUSEHWM(v))
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index 9043bf4aa49e..2803b370ba01 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -416,6 +416,13 @@ static int __init smsc_ircc_legacy_probe(void)
416{ 416{
417 int ret = 0; 417 int ret = 0;
418 418
419#ifdef CONFIG_PCI
420 if (smsc_ircc_preconfigure_subsystems(ircc_cfg, ircc_fir, ircc_sir, ircc_dma, ircc_irq) < 0) {
421 /* Ignore errors from preconfiguration */
422 IRDA_ERROR("%s, Preconfiguration failed !\n", driver_name);
423 }
424#endif
425
419 if (ircc_fir > 0 && ircc_sir > 0) { 426 if (ircc_fir > 0 && ircc_sir > 0) {
420 IRDA_MESSAGE(" Overriding FIR address 0x%04x\n", ircc_fir); 427 IRDA_MESSAGE(" Overriding FIR address 0x%04x\n", ircc_fir);
421 IRDA_MESSAGE(" Overriding SIR address 0x%04x\n", ircc_sir); 428 IRDA_MESSAGE(" Overriding SIR address 0x%04x\n", ircc_sir);
@@ -459,13 +466,6 @@ static int __init smsc_ircc_init(void)
459 return ret; 466 return ret;
460 } 467 }
461 468
462#ifdef CONFIG_PCI
463 if (smsc_ircc_preconfigure_subsystems(ircc_cfg, ircc_fir, ircc_sir, ircc_dma, ircc_irq) < 0) {
464 /* Ignore errors from preconfiguration */
465 IRDA_ERROR("%s, Preconfiguration failed !\n", driver_name);
466 }
467#endif
468
469 dev_count = 0; 469 dev_count = 0;
470 470
471 if (smsc_nopnp || !pnp_platform_devices || 471 if (smsc_nopnp || !pnp_platform_devices ||
diff --git a/drivers/net/pcmcia/Kconfig b/drivers/net/pcmcia/Kconfig
index 5d658bc9791c..e8f55d8ed7a9 100644
--- a/drivers/net/pcmcia/Kconfig
+++ b/drivers/net/pcmcia/Kconfig
@@ -19,7 +19,7 @@ menuconfig NET_PCMCIA
19 19
20 If unsure, say N. 20 If unsure, say N.
21 21
22if NET_PCMCIA 22if NET_PCMCIA && PCMCIA
23 23
24config PCMCIA_3C589 24config PCMCIA_3C589
25 tristate "3Com 3c589 PCMCIA support" 25 tristate "3Com 3c589 PCMCIA support"
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index fc4aee96cdfd..fc2f0e695a13 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -131,7 +131,8 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv)
131 struct phy_device *phydev = to_phy_device(dev); 131 struct phy_device *phydev = to_phy_device(dev);
132 struct phy_driver *phydrv = to_phy_driver(drv); 132 struct phy_driver *phydrv = to_phy_driver(drv);
133 133
134 return (phydrv->phy_id == (phydev->phy_id & phydrv->phy_id_mask)); 134 return ((phydrv->phy_id & phydrv->phy_id_mask) ==
135 (phydev->phy_id & phydrv->phy_id_mask));
135} 136}
136 137
137/* Suspend and resume. Copied from platform_suspend and 138/* Suspend and resume. Copied from platform_suspend and
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index 792716beb052..596222b260d6 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -84,7 +84,7 @@ static int vsc824x_config_intr(struct phy_device *phydev)
84 84
85/* Vitesse 824x */ 85/* Vitesse 824x */
86static struct phy_driver vsc8244_driver = { 86static struct phy_driver vsc8244_driver = {
87 .phy_id = 0x000fc6c2, 87 .phy_id = 0x000fc6c0,
88 .name = "Vitesse VSC8244", 88 .name = "Vitesse VSC8244",
89 .phy_id_mask = 0x000fffc0, 89 .phy_id_mask = 0x000fffc0,
90 .features = PHY_GBIT_FEATURES, 90 .features = PHY_GBIT_FEATURES,
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index c6ba3dee8ae0..09078ff84cd2 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -2868,6 +2868,7 @@ static void tx_intr_handler(struct fifo_info *fifo_data)
2868 struct tx_curr_get_info get_info, put_info; 2868 struct tx_curr_get_info get_info, put_info;
2869 struct sk_buff *skb; 2869 struct sk_buff *skb;
2870 struct TxD *txdlp; 2870 struct TxD *txdlp;
2871 u8 err_mask;
2871 2872
2872 get_info = fifo_data->tx_curr_get_info; 2873 get_info = fifo_data->tx_curr_get_info;
2873 memcpy(&put_info, &fifo_data->tx_curr_put_info, sizeof(put_info)); 2874 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)
2886 } 2887 }
2887 2888
2888 /* update t_code statistics */ 2889 /* update t_code statistics */
2889 err >>= 48; 2890 err_mask = err >> 48;
2890 switch(err) { 2891 switch(err_mask) {
2891 case 2: 2892 case 2:
2892 nic->mac_control.stats_info->sw_stat. 2893 nic->mac_control.stats_info->sw_stat.
2893 tx_buf_abort_cnt++; 2894 tx_buf_abort_cnt++;
@@ -6805,6 +6806,7 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
6805 u16 l3_csum, l4_csum; 6806 u16 l3_csum, l4_csum;
6806 unsigned long long err = rxdp->Control_1 & RXD_T_CODE; 6807 unsigned long long err = rxdp->Control_1 & RXD_T_CODE;
6807 struct lro *lro; 6808 struct lro *lro;
6809 u8 err_mask;
6808 6810
6809 skb->dev = dev; 6811 skb->dev = dev;
6810 6812
@@ -6813,8 +6815,8 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
6813 if (err & 0x1) { 6815 if (err & 0x1) {
6814 sp->mac_control.stats_info->sw_stat.parity_err_cnt++; 6816 sp->mac_control.stats_info->sw_stat.parity_err_cnt++;
6815 } 6817 }
6816 err >>= 48; 6818 err_mask = err >> 48;
6817 switch(err) { 6819 switch(err_mask) {
6818 case 1: 6820 case 1:
6819 sp->mac_control.stats_info->sw_stat. 6821 sp->mac_control.stats_info->sw_stat.
6820 rx_parity_err_cnt++; 6822 rx_parity_err_cnt++;
@@ -6867,9 +6869,9 @@ static int rx_osm_handler(struct ring_info *ring_data, struct RxD_t * rxdp)
6867 * Note that in this case, since checksum will be incorrect, 6869 * Note that in this case, since checksum will be incorrect,
6868 * stack will validate the same. 6870 * stack will validate the same.
6869 */ 6871 */
6870 if (err != 0x5) { 6872 if (err_mask != 0x5) {
6871 DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%llx\n", 6873 DBG_PRINT(ERR_DBG, "%s: Rx error Value: 0x%x\n",
6872 dev->name, err); 6874 dev->name, err_mask);
6873 sp->stats.rx_crc_errors++; 6875 sp->stats.rx_crc_errors++;
6874 sp->mac_control.stats_info->sw_stat.mem_freed 6876 sp->mac_control.stats_info->sw_stat.mem_freed
6875 += skb->truesize; 6877 += skb->truesize;