From 7fab06c0ca89d99442a4baeddf417add585e2672 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 28 Oct 2007 17:10:08 +0100 Subject: r8169: napi config Don't call napi_disable if not configured and make sure that any misuse of napi_xxx in future fails with a compile error. Signed-off-by: Stephen Hemminger Signed-off-by: Francois Romieu Cc: Edward Hsu --- drivers/net/r8169.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/net') diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index e8960f294a6..c5eaf4931a9 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -392,7 +392,9 @@ struct rtl8169_private { void __iomem *mmio_addr; /* memory map physical address */ struct pci_dev *pci_dev; /* Index of PCI device */ struct net_device *dev; +#ifdef CONFIG_R8169_NAPI struct napi_struct napi; +#endif spinlock_t lock; /* spin lock flag */ u32 msg_enable; int chipset; @@ -3010,7 +3012,9 @@ core_down: synchronize_irq(dev->irq); if (!poll_locked) { +#ifdef CONFIG_R8169_NAPI napi_disable(&tp->napi); +#endif poll_locked++; } -- cgit v1.2.3 From 93dd79e87bbc98ef02610d54fe72d4a1931ee15e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Sun, 28 Oct 2007 17:14:06 +0100 Subject: r8169: remove poll_locked logic Disabling napi polling early is well enough. Signed-off-by: Stephen Hemminger Signed-off-by: Francois Romieu Cc: Edward Hsu --- drivers/net/r8169.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index c5eaf4931a9..b94fa7ef195 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2991,13 +2991,16 @@ static void rtl8169_down(struct net_device *dev) { struct rtl8169_private *tp = netdev_priv(dev); void __iomem *ioaddr = tp->mmio_addr; - unsigned int poll_locked = 0; unsigned int intrmask; rtl8169_delete_timer(dev); netif_stop_queue(dev); +#ifdef CONFIG_R8169_NAPI + napi_disable(&tp->napi); +#endif + core_down: spin_lock_irq(&tp->lock); @@ -3011,13 +3014,6 @@ core_down: synchronize_irq(dev->irq); - if (!poll_locked) { -#ifdef CONFIG_R8169_NAPI - napi_disable(&tp->napi); -#endif - poll_locked++; - } - /* Give a racing hard_start_xmit a few cycles to complete. */ synchronize_sched(); /* FIXME: should this be synchronize_irq()? */ -- cgit v1.2.3 From bbd82f956e0db6190b16a8a00d3ed5d979f488e8 Mon Sep 17 00:00:00 2001 From: Francois Romieu Date: Sun, 21 Oct 2007 12:17:51 +0200 Subject: ipg: missing Kconfig dependency Fix for the error below while linking vmlinux: [...] drivers/built-in.o: In function `ipg_ioctl': drivers/net/ipg.c:2148: undefined reference to `generic_mii_ioctl' drivers/built-in.o: In function `ipg_get_settings': drivers/net/ipg.c:2181: undefined reference to `mii_ethtool_gset' drivers/built-in.o: In function `ipg_set_settings': drivers/net/ipg.c:2193: undefined reference to `mii_ethtool_sset' drivers/built-in.o: In function `ipg_nway_reset': drivers/net/ipg.c:2205: undefined reference to `mii_nway_restart' make: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Francois Romieu Cc: Avuton Olrich Cc: Jesse Huang Cc: Sorbica Shieh --- drivers/net/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net') diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 86b8641b466..9f7ec7df475 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -168,6 +168,7 @@ config NET_SB1000 config IP1000 tristate "IP1000 Gigabit Ethernet support" depends on PCI && EXPERIMENTAL + select MII ---help--- This driver supports IP1000 gigabit Ethernet cards. -- cgit v1.2.3 From d1417862d7355f0b395d83f2884afd614b086695 Mon Sep 17 00:00:00 2001 From: Francois Romieu Date: Sun, 21 Oct 2007 12:19:27 +0200 Subject: ipg: Kconfig whitepaces/tab damages Signed-off-by: Francois Romieu Cc: Avuton Olrich Cc: Jesse Huang Cc: Sorbica Shieh --- drivers/net/Kconfig | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/net') diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 9f7ec7df475..72d3447fb99 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -166,14 +166,14 @@ config NET_SB1000 If you don't have this card, of course say N. config IP1000 - tristate "IP1000 Gigabit Ethernet support" - depends on PCI && EXPERIMENTAL + tristate "IP1000 Gigabit Ethernet support" + depends on PCI && EXPERIMENTAL select MII - ---help--- - This driver supports IP1000 gigabit Ethernet cards. + ---help--- + This driver supports IP1000 gigabit Ethernet cards. - To compile this driver as a module, choose M here: the module - will be called ipg. This is recommended. + To compile this driver as a module, choose M here: the module + will be called ipg. This is recommended. source "drivers/net/arcnet/Kconfig" -- cgit v1.2.3