From 77e1e438cbb1b8f9b7a3bb2d4f0264d1dd952d75 Mon Sep 17 00:00:00 2001 From: Cesar Eduardo Barros Date: Sat, 7 Jan 2012 05:13:17 +0000 Subject: r6040: fix typo in use of MCR0 register bits Commit 4e16d6ebd65b4f2c4e3f780b4c5704beef64019c (r6040: define more MCR0 register bits) added #define values for MCR0 register bits and converted uses of hardcoded magic values to uses of these defines. However, one of the conversions looks suspicious: #define MCR0 0x00 /* Control register 0 */ +#define MCR0_RCVEN 0x0002 /* Receive enable */ +#define MCR0_XMTEN 0x1000 /* Transmission enable */ /* Init RDC private data */ - lp->mcr0 = 0x1002; + lp->mcr0 = MCR0_XMTEN | MCR0; I believe what was meant here was MCR0_XMTEN | MCR0_RCVEN, which makes sense and matches the original values. Signed-off-by: Cesar Eduardo Barros Signed-off-by: David S. Miller --- drivers/net/ethernet/rdc/r6040.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ethernet') diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c index 87aa4393507..cb0eca80785 100644 --- a/drivers/net/ethernet/rdc/r6040.c +++ b/drivers/net/ethernet/rdc/r6040.c @@ -1160,7 +1160,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev, lp->dev = dev; /* Init RDC private data */ - lp->mcr0 = MCR0_XMTEN | MCR0; + lp->mcr0 = MCR0_XMTEN | MCR0_RCVEN; /* The RDC-specific entries in the device structure. */ dev->netdev_ops = &r6040_netdev_ops; -- cgit v1.2.3-70-g09d2 From 96dab45fc3eb732de7b7fe03d2250d3815af8929 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sat, 7 Jan 2012 12:22:11 -0800 Subject: smsc911x: Unconditionally include linux/smscphy.h in smsc911x.h The energy detect enable/disable code in the driver uses some register defines in this header unconditionally, so guarding the smscphy.h header include with CONFIG_SMSC_PHY leads to build failures in some configurations. Reported-by: Shawn Guo Signed-off-by: David S. Miller --- drivers/net/ethernet/smsc/smsc911x.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/net/ethernet') diff --git a/drivers/net/ethernet/smsc/smsc911x.h b/drivers/net/ethernet/smsc/smsc911x.h index 938ecf29081..9ad5e5d39a0 100644 --- a/drivers/net/ethernet/smsc/smsc911x.h +++ b/drivers/net/ethernet/smsc/smsc911x.h @@ -401,8 +401,6 @@ #include #endif -#ifdef CONFIG_SMSC_PHY #include -#endif #endif /* __SMSC911X_H__ */ -- cgit v1.2.3-70-g09d2 From b189e810619a676e6b931a942a3e8387f3d39c21 Mon Sep 17 00:00:00 2001 From: françois romieu Date: Sun, 8 Jan 2012 13:41:33 +0000 Subject: 8139cp: fix missing napi_gro_flush. The driver uses __napi_complete and napi_gro_receive. Without it, the driver hits the BUG_ON(n->gro_list) assertion hard in __napi_complete. Signed-off-by: Francois Romieu Tested-by: Marin Glibic Signed-off-by: David S. Miller --- drivers/net/ethernet/realtek/8139cp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/ethernet') diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c index cc6b391479c..abc79076f86 100644 --- a/drivers/net/ethernet/realtek/8139cp.c +++ b/drivers/net/ethernet/realtek/8139cp.c @@ -563,6 +563,7 @@ rx_next: if (cpr16(IntrStatus) & cp_rx_intr_mask) goto rx_status_loop; + napi_gro_flush(napi); spin_lock_irqsave(&cp->lock, flags); __napi_complete(napi); cpw16_f(IntrMask, cp_intr_mask); -- cgit v1.2.3-70-g09d2 From 1aff0cbe9d51236efba2e721a34e2c15779f95f3 Mon Sep 17 00:00:00 2001 From: stephen hemminger Date: Thu, 5 Jan 2012 19:10:24 +0000 Subject: bcm63xx: make ethtool_ops const Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ethernet') diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index a11a8ad9422..d44331eb07f 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -1469,7 +1469,7 @@ static int bcm_enet_set_pauseparam(struct net_device *dev, return 0; } -static struct ethtool_ops bcm_enet_ethtool_ops = { +static const struct ethtool_ops bcm_enet_ethtool_ops = { .get_strings = bcm_enet_get_strings, .get_sset_count = bcm_enet_get_sset_count, .get_ethtool_stats = bcm_enet_get_ethtool_stats, -- cgit v1.2.3-70-g09d2 From e5686ad82ca2aeed7a8f24ffca115c0b7478dec9 Mon Sep 17 00:00:00 2001 From: stephen hemminger Date: Thu, 5 Jan 2012 19:10:25 +0000 Subject: netdev: make net_device_ops const More drivers where net_device_ops should be const. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/ethernet/emulex/benet/be_main.c | 2 +- drivers/net/ethernet/tile/tilepro.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/net/ethernet') diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index 6c46753aeb4..a6bcdb5cd2b 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -3080,7 +3080,7 @@ fw_exit: return status; } -static struct net_device_ops be_netdev_ops = { +static const struct net_device_ops be_netdev_ops = { .ndo_open = be_open, .ndo_stop = be_close, .ndo_start_xmit = be_xmit, diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c index 6b75063988e..d9951afb926 100644 --- a/drivers/net/ethernet/tile/tilepro.c +++ b/drivers/net/ethernet/tile/tilepro.c @@ -2260,8 +2260,7 @@ static int tile_net_get_mac(struct net_device *dev) return 0; } - -static struct net_device_ops tile_net_ops = { +static const struct net_device_ops tile_net_ops = { .ndo_open = tile_net_open, .ndo_stop = tile_net_stop, .ndo_start_xmit = tile_net_tx, -- cgit v1.2.3-70-g09d2