Re: [ofa-general] Re: IPoIB forwarding
On Fri, 27 Apr 2007, Rick Jones wrote: Bryan Lawver wrote: I had so much debugging turned on that it was not the slowing of the traffic but the non-coelescencing that was the remedy. The NIC is a MyriCom NIC and these are easy options to set. As chance would have it, I've played with some Myricom myri10ge NICs recently, and even disabled large receive offload during some netperf tests :) It is a modprobe option. Going back now to the driver source and the README I see :-) excerpt Troubleshooting === Large Receive Offload (LRO) is enabled by default. This will interfere with forwarding TCP traffic. If you plan to forward TCP traffic (using the host with the Myri10GE NIC as a router or bridge), you must disable LRO. To disable LRO, load the myri10ge driver with myri10ge_lro set to 0: # modprobe myri10ge myri10ge_lro=0 Alternatively, you can disable LRO at runtime by disabling receive checksum offloading via ethtool: # ethtool -K eth2 rx off /excerpt rick jones What version of the myri10ge driver is this? With the 1.2.0 version that comes with the 2.6.20.7 kernel, there is no myri10ge_lro module parameter. [EMAIL PROTECTED] ~]# modinfo myri10ge | grep -i lro [EMAIL PROTECTED] ~]# And I've been testing IP forwarding using two Myricom 10-GigE NICs without setting any special modprobe parameters. -Bill - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] ne: Add platform_driver
On Wed, 25 Apr 2007 01:54:50 +0900 (JST) Atsushi Nemoto [EMAIL PROTECTED] wrote: @@ -880,4 +964,7 @@ void __exit cleanup_module(void) } } } +#else /* MODULE */ +module_init(ne_init); +module_exit(ne_exit); #endif /* MODULE */ Are we sure about this part? It is unusual to have special treatment dependent upon MODULE. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ne: MIPS: Use platform_driver for ne on RBTX49XX
On Wed, 25 Apr 2007 01:55:49 +0900 (JST) Atsushi Nemoto [EMAIL PROTECTED] wrote: +static int __init rbtx4938_ne_init(void) +{ + struct resource res[] = { + { + .start = RBTX4938_RTL_8019_BASE, + .end= RBTX4938_RTL_8019_BASE + 0x20 - 1, + .flags = IORESOURCE_IO, + }, { + .start = RBTX4938_RTL_8019_IRQ, + .flags = IORESOURCE_IRQ, + } + }; + struct platform_device *dev = + platform_device_register_simple(ne, -1, + res, ARRAY_SIZE(res)); + return IS_ERR(dev) ? PTR_ERR(dev) : 0; +} platform_device_register_simple() copies *res by value, so I believe we can make res[] static __initdata. This way we don't need to evaluate the array on the stack at runtime, and the data gets discarded after initcalls have run. Can you please review and test the below? I had a go but wasn't able to fumble my way to a suitable config (I hope): stdin:1176:2: warning: #warning syscall fadvise64_64 not implemented arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c: In function `toshiba_rbtx4927_time_init': arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c:1026: error: `tx4927_cpu_clock' undeclared (first use in this function) arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c:1026: error: (Each undeclared identifier is reported only once arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c:1026: error: for each function it appears in.) make[1]: *** [arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.o] Error 1 make: *** [arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.o] Error 2 make: *** Waiting for unfinished jobs arch/mips/tx4938/toshiba_rbtx4938/setup.c:41: warning: 'tx4938_report_pcic_status1' declared `static' but never defined arch/mips/tx4938/toshiba_rbtx4938/setup.c:56: warning: 'tx4938_pcic_trdyto' defined but not used arch/mips/tx4938/toshiba_rbtx4938/setup.c:57: warning: 'tx4938_pcic_retryto' defined but not used From: Andrew Morton [EMAIL PROTECTED] Cc: Atsushi Nemoto [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Cc: Ralf Baechle [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c~ne-mips-use-platform_driver-for-ne-on-rbtx49xx-fix arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c~ne-mips-use-platform_driver-for-ne-on-rbtx49xx-fix +++ a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c @@ -1039,7 +1039,7 @@ void __init toshiba_rbtx4927_timer_setup static int __init toshiba_rbtx4927_rtc_init(void) { - struct resource res = { + static struct resource __initdata res = { .start = 0x1c01, .end= 0x1c01 + 0x800 - 1, .flags = IORESOURCE_MEM, @@ -1052,7 +1052,7 @@ device_initcall(toshiba_rbtx4927_rtc_ini static int __init rbtx4927_ne_init(void) { - struct resource res[] = { + static struct resource __initdata res[] = { { .start = RBTX4927_RTL_8019_BASE, .end= RBTX4927_RTL_8019_BASE + 0x20 - 1, _ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
via-rhine probe failed
Hello, I recently received a D-Link DFE-530TX that I put in a debian box, but it's not working. lspci -nn shows the card as : 00:0d.0 Ethernet controller [0200]: VIA Technologies, Inc. VT6105 [Rhine-III] [1106:3106] (rev 86) and in dmesg, I see : via-rhine.c:v1.10-LK1.4.3 2007-03-06 Written by Donald Becker via-rhine: Broken BIOS detected, avoid_D3 enabled. -- Invalid MAC address via-rhine: probe of :00:0d.0 failed with error -5 I'm using the 2.6.21.1 kernel, and was previously using debian kernel 2.6.18-4, where I had the same errors, except the Broken BIOS bit. I also found this : http://lkml.org/lkml/2004/7/11/154 but I'm not sure if it's the same problem. I'm attaching output of dmesg and lspci -nn, but I would be glad to provide any additional informations. Thanks, XC dmesg.log Description: Binary data lspci.log Description: Binary data
Re: [PATCH repost] netpoll: trapping fix/cleanup
Hello. Matt Mackall wrote: CONFIG_NETPOLL_TRAP causes the TX queue controls to be completely bypassed in the netpoll's trapped mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). Make this option more sensible by only bypassing TX softirq wakeup and remove CONFIG_NETPOLL_RX option completely since there is *no* code depending on it. You've got two unrelated patches here, so that's an automatic NAK. Come on, killing a long ago no-op option doesn't worth the sepearte patch. :-) I suppose we can kill the config option. I've even posted the refs to the commits introducing and killing the #ifdef's. What did you test the NETPOLL_TRAP test with? KGDBoE (and maybe also netconsole -- don't remember already). WBR, Sergei - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH repost] netpoll: trapping fix/cleanup
On Sat, Apr 28, 2007 at 04:56:23PM +0400, Sergei Shtylyov wrote: Hello. Matt Mackall wrote: CONFIG_NETPOLL_TRAP causes the TX queue controls to be completely bypassed in the netpoll's trapped mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). Make this option more sensible by only bypassing TX softirq wakeup and remove CONFIG_NETPOLL_RX option completely since there is *no* code depending on it. You've got two unrelated patches here, so that's an automatic NAK. Come on, killing a long ago no-op option doesn't worth the sepearte patch. :-) I suppose we can kill the config option. I've even posted the refs to the commits introducing and killing the #ifdef's. What did you test the NETPOLL_TRAP test with? KGDBoE (and maybe also netconsole -- don't remember already). Ok, KGDBoE is a pretty good test here. Netconsole isn't. Please resend as two separate patches and add: Acked-by: Matt Mackall [EMAIL PROTECTED] -- Mathematics is the supreme nostalgia of our time. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ne: MIPS: Use platform_driver for ne on RBTX49XX
Atsushi Nemoto wrote: On Wed, 25 Apr 2007 01:55:49 +0900 (JST), Atsushi Nemoto [EMAIL PROTECTED] wrote: This patch lets RBTX49XX boards use generic platform_driver interface for the ne driver. This patch obsolates a patch I send on 1 Mar. Subject: [PATCH] Fix broken RBTX4927 support in ne.c Message-Id: [EMAIL PROTECTED] Date: Thu, 01 Mar 2007 01:22:23 +0900 (JST) I revoke this old patch if new patch was acceptable. I do not see the old patch in my queue (my apologies!), so all is well. Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ne: MIPS: Use platform_driver for ne on RBTX49XX
Atsushi Nemoto wrote: This patch lets RBTX49XX boards use generic platform_driver interface for the ne driver. * Use platform_device to pass ioaddr and irq to the ne driver. * Remove unnecessary ifdefs for RBTX49XX from the ne driver. * Make the ne driver selectable on these boards regardless of CONFIG_ISA * Add an ifdef for netcard_portlist[] to avoid unnecessary auto-probe. (I'm not sure M32R needs auto-probe but it is current behavior) Signed-off-by: Atsushi Nemoto [EMAIL PROTECTED] --- .../toshiba_rbtx4927/toshiba_rbtx4927_setup.c | 19 +++ arch/mips/tx4938/toshiba_rbtx4938/setup.c | 20 drivers/net/Kconfig|2 +- drivers/net/ne.c | 13 - 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c index 0f7576d..7d2c9d0 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c @@ -1049,3 +1049,22 @@ static int __init toshiba_rbtx4927_rtc_init(void) return IS_ERR(dev) ? PTR_ERR(dev) : 0; } device_initcall(toshiba_rbtx4927_rtc_init); + +static int __init rbtx4927_ne_init(void) +{ + struct resource res[] = { + { + .start = RBTX4927_RTL_8019_BASE, + .end= RBTX4927_RTL_8019_BASE + 0x20 - 1, + .flags = IORESOURCE_IO, + }, { + .start = RBTX4927_RTL_8019_IRQ, + .flags = IORESOURCE_IRQ, + } + }; + struct platform_device *dev = + platform_device_register_simple(ne, -1, + res, ARRAY_SIZE(res)); + return IS_ERR(dev) ? PTR_ERR(dev) : 0; +} +device_initcall(rbtx4927_ne_init); diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c index 66163ba..f5d1ce7 100644 --- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c +++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c @@ -20,6 +20,7 @@ #include linux/console.h #include linux/pci.h #include linux/pm.h +#include linux/platform_device.h #include asm/wbflush.h #include asm/reboot.h @@ -1037,3 +1038,22 @@ static int __init tx4938_spi_proc_setup(void) __initcall(tx4938_spi_proc_setup); #endif + +static int __init rbtx4938_ne_init(void) +{ + struct resource res[] = { + { + .start = RBTX4938_RTL_8019_BASE, + .end= RBTX4938_RTL_8019_BASE + 0x20 - 1, + .flags = IORESOURCE_IO, + }, { + .start = RBTX4938_RTL_8019_IRQ, + .flags = IORESOURCE_IRQ, + } + }; + struct platform_device *dev = + platform_device_register_simple(ne, -1, + res, ARRAY_SIZE(res)); + return IS_ERR(dev) ? PTR_ERR(dev) : 0; +} +device_initcall(rbtx4938_ne_init); diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index aba0d39..a80e8ce 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -1088,7 +1088,7 @@ config ETH16I config NE2000 tristate NE2000/NE1000 support - depends on NET_ISA || (Q40 m) || M32R + depends on NET_ISA || (Q40 m) || M32R || TOSHIBA_RBTX4927 || TOSHIBA_RBTX4938 select CRC32 ---help--- If you have a network (Ethernet) card of this type, say Y and read diff --git a/drivers/net/ne.c b/drivers/net/ne.c index b8a181f..4e99e7a 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c @@ -56,10 +56,6 @@ static const char version2[] = #include asm/system.h #include asm/io.h -#if defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938) -#include asm/tx4938/rbtx4938.h -#endif - #include 8390.h #define DRV_NAME ne @@ -81,7 +77,10 @@ static const char version2[] = /* A zero-terminated list of I/O addresses to be probed at boot. */ #ifndef MODULE static unsigned int netcard_portlist[] __initdata = { - 0x300, 0x280, 0x320, 0x340, 0x360, 0x380, 0 +#if defined(CONFIG_ISA) || defined(CONFIG_M32R) + 0x300, 0x280, 0x320, 0x340, 0x360, 0x380, +#endif + 0 This looks a bit strange, and perhaps more difficult to maintain long term. I would suggest creating a NEEDS_PORTLIST cpp macro at the top of ne.c, to be defined or undefined based on CONFIG_xxx symbols. Then, down in the code itself, conditionally include or exclude all portlist related data tables and code. Sound sane? Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND] [PATCH v2] [1/5] pasemi_mac: minor bugfixes
Olof Johansson wrote: Ethernet bugfixes: * Move the was_full/wake_queue logic from tx_intr to clean_tx * Fix polarity in checks in pasemi_mac_close Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: linux-2.6/drivers/net/pasemi_mac.c === --- linux-2.6.orig/drivers/net/pasemi_mac.c +++ linux-2.6/drivers/net/pasemi_mac.c @@ -451,9 +451,12 @@ static int pasemi_mac_clean_tx(struct pa struct pas_dma_xct_descr *dp; int start, count; int flags; + int was_full; spin_lock_irqsave(mac-tx-lock, flags); + was_full = mac-tx-next_to_clean - mac-tx-next_to_use == TX_RING_SIZE; + start = mac-tx-next_to_clean; count = 0; @@ -478,6 +481,9 @@ static int pasemi_mac_clean_tx(struct pa mac-tx-next_to_clean += count; spin_unlock_irqrestore(mac-tx-lock, flags); + if (was_full) + netif_wake_queue(mac-netdev); + Isn't this was_full check redundant? Using standard test-and-clear atomic logic, netif_wake_queue() will not issue spurious wakeups. Take a look at its implementation in include/linux/netdevice.h. Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND] [PATCH v2] [3/5] pasemi_mac: cleanups and rx performance improvements
Olof Johansson wrote: NAPI fixes and cleanups for pasemi_mac: * Timer changes/fixes * Abstract out the rx intr restart to a separate function * Similar function for tx intr to reset to a known clear state even if firmware used the same interface * Add a copy-break and recycle the SKB in the driver for small packets * Other minor changes to rx path Split out the abstract out function foo style changes into a separate patch. This creates a smaller and much more reviewable second patch as a result. Doing so also creates a nice, clean git-bisect point that can be used to guarantee the validity of the first patch. Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND] [PATCH v2] [4/5] pasemi_mac: phy support
Olof Johansson wrote: PHY support for pasemi_mac. Also add msg_enable flags for future disablement of the link messages. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: powerpc/drivers/net/pasemi_mac.c === --- powerpc.orig/drivers/net/pasemi_mac.c +++ powerpc/drivers/net/pasemi_mac.c @@ -594,6 +592,110 @@ static irqreturn_t pasemi_mac_tx_intr(in return IRQ_HANDLED; } +static void pasemi_adjust_link(struct net_device *dev) +{ + struct pasemi_mac *mac = netdev_priv(dev); + int msg; + unsigned int flags; + unsigned int new_flags; + + if (!mac-phydev-link) { + /* If no link, MAC speed settings don't matter. Just report +* link down and return. +*/ + if (mac-link netif_msg_link(mac)) + printk(KERN_INFO %s: Link is down.\n, dev-name); + + netif_carrier_off(dev); + mac-link = 0; + + return; + } else + netif_carrier_on(dev); + + pci_read_config_dword(mac-pdev, PAS_MAC_CFG_PCFG, flags); + new_flags = flags ~(PAS_MAC_CFG_PCFG_HD | PAS_MAC_CFG_PCFG_SPD_M); + + if (!mac-phydev-duplex) + new_flags |= PAS_MAC_CFG_PCFG_HD; + + switch (mac-phydev-speed) { + case 1000: + new_flags |= PAS_MAC_CFG_PCFG_SPD_1G; + break; + case 100: + new_flags |= PAS_MAC_CFG_PCFG_SPD_100M; + break; + case 10: + new_flags |= PAS_MAC_CFG_PCFG_SPD_10M; + break; + default: + printk(Unsupported speed %d\n, mac-phydev-speed); + } + + /* Print on link or speed/duplex change */ + msg = mac-link != mac-phydev-link || flags != new_flags; + + mac-duplex = mac-phydev-duplex; + mac-speed = mac-phydev-speed; + mac-link = mac-phydev-link; + + if (new_flags != flags) + pci_write_config_dword(mac-pdev, PAS_MAC_CFG_PCFG, new_flags); + + if (msg netif_msg_link(mac)) + printk(KERN_INFO %s: Link is up at %d Mbps, %s duplex.\n, + dev-name, mac-speed, mac-duplex ? full : half); +} + +static int pasemi_mac_phy_init(struct net_device *dev) +{ + struct pasemi_mac *mac = netdev_priv(dev); + struct device_node *dn, *phy_dn; + struct phy_device *phydev; + unsigned int phy_id; + const phandle *ph; + const unsigned int *prop; + struct resource r; + int ret; + + dn = pci_device_to_OF_node(mac-pdev); + ph = get_property(dn, phy-handle, NULL); + if (!ph) + return -ENODEV; + phy_dn = of_find_node_by_phandle(*ph); + + prop = get_property(phy_dn, reg, NULL); + ret = of_address_to_resource(phy_dn-parent, 0, r); + if (ret) + goto err; + + phy_id = *prop; + snprintf(mac-phy_id, BUS_ID_SIZE, PHY_ID_FMT, (int)r.start, phy_id); + + of_node_put(phy_dn); + + mac-link = 0; + mac-speed = 0; + mac-duplex = -1; + + phydev = phy_connect(dev, mac-phy_id, pasemi_adjust_link, 0, PHY_INTERFACE_MODE_SGMII); + + if (IS_ERR(phydev)) { + printk(KERN_ERR %s: Could not attach to phy\n, dev-name); + return PTR_ERR(phydev); + } + + mac-phydev = phydev; + + return 0; + +err: + of_node_put(phy_dn); + return -ENODEV; +} + + static int pasemi_mac_open(struct net_device *dev) { struct pasemi_mac *mac = netdev_priv(dev); @@ -667,6 +769,13 @@ static int pasemi_mac_open(struct net_de pasemi_mac_replenish_rx_ring(dev); + ret = pasemi_mac_phy_init(dev); + /* Some configs don't have PHYs (XAUI etc), so don't complain about +* failed init due to -ENODEV. +*/ + if (ret ret != -ENODEV) + dev_warn(mac-pdev-dev, phy init failed: %d\n, ret); + netif_start_queue(dev); netif_poll_enable(dev); @@ -697,6 +806,9 @@ static int pasemi_mac_open(struct net_de goto out_rx_int; } + if (mac-phydev) + phy_start(mac-phydev); + return 0; out_rx_int: @@ -720,6 +832,11 @@ static int pasemi_mac_close(struct net_d unsigned int stat; int retries; + if (mac-phydev) { + phy_stop(mac-phydev); + phy_disconnect(mac-phydev); + } + netif_stop_queue(dev); /* Clean out any pending buffers */ @@ -1013,6 +1130,9 @@ pasemi_mac_probe(struct pci_dev *pdev, c mac-rx_status = dma_status-rx_sta[mac-dma_rxch]; mac-tx_status = dma_status-tx_sta[mac-dma_txch]; + /* Enable most messages by default */ + mac-msg_enable = (NETIF_MSG_IFUP 1 ) - 1; msg_enable should be initialized in a standard fashion, from your debug module parameter. grep for 'msg_enable' in other drivers. Jeff - To
Re: [PATCH 2/2] Rename get_property to of_get_property: drivers/net
Stephen Rothwell wrote: This is part of the consolidation of the OpenFirmware code ebtween PowerPC and Sparc. Signed-off-by: Stephen Rothwell [EMAIL PROTECTED] --- drivers/net/bmac.c |5 +++-- drivers/net/ehea/ehea_main.c |6 +++--- drivers/net/mace.c |4 ++-- drivers/net/pasemi_mac.c |2 +- drivers/net/spider_net.c |4 ++-- drivers/net/sungem.c |2 +- drivers/net/sungem_phy.c |2 +- drivers/net/ucc_geth.c | 18 +- drivers/net/ucc_geth_mii.c |4 ++-- 9 files changed, 24 insertions(+), 23 deletions(-) Jeff, This patch is based on a merge between Paulus' for-2.6.22 tree and your upstream tree. As such it depends on changes in Paulus' tree to be merged first. This patch was originally in Paulus' tree but has been reverted from there. Sorry for your being a football here. AFAICS, looking at the two patches, it seems clear they should go in via Paulus's tree. There are clear dependencies, and it is clearly arch-specific code. If anything, it sounds like I should drop a ucc_geth patch or two from my tree. Is that the case? Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] fix smc911x compilation breakage
Vitaly Wool wrote: Hi Jeff, currently (with 2.6.21) compilation of smc911x driver fails in the following way: CC drivers/net/smc911x.o /sandbox/vital/opensource/linux-2.6/drivers/net/smc911x.c: In function `smc911x_probe': /sandbox/vital/opensource/linux-2.6/drivers/net/smc911x.c:2125: warning: implicit declaration of function `set_irq_type' /sandbox/vital/opensource/linux-2.6/drivers/net/smc911x.c:2125: error: `IRQ_TYPE_EDGE_FALLING' undeclared (first use in this function) /sandbox/vital/opensource/linux-2.6/drivers/net/smc911x.c:2125: error: (Each undeclared identifier is reported only once /sandbox/vital/opensource/linux-2.6/drivers/net/smc911x.c:2125: error: for each function it appears in.) make[3]: *** [drivers/net/smc911x.o] Error 1 make[2]: *** [drivers/net] Error 2 make[1]: *** [drivers] Error 2 make: *** [zImage] Error 2 The patch inlined below fixes the problem. smc911x.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Vitaly Wool [EMAIL PROTECTED] Index: linux-2.6/drivers/net/smc911x.c === --- linux-2.6.orig/drivers/net/smc911x.c +++ linux-2.6/drivers/net/smc911x.c @@ -75,9 +75,9 @@ static const char version[] = #include linux/netdevice.h #include linux/etherdevice.h #include linux/skbuff.h +#include linux/irq.h #include asm/io.h -#include asm/irq.h #include smc911x.h This seems to clash with rmk's comment at the top of linux/irq.h? Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
What's in netdev-2.6.git? (and, netdev rebased)
This is what is queued for Linus, for sending upstream tomorrow (most likely). Wireless guys, in particular, I would appreciate a quick verify and retest, to make sure a rebase merge went correctly. As of this moment, I just rebased netdev (something I try to do infrequently). There are now only three branches of note at netdev-2.6.git, and only one content branch: upstreamQueued for 2.6.22 upstream master Vanilla upstream ALL Queued for public testing (-mm uses this) Branch 'ALL' is currently equivalent to 'upstream'. (shortlog follows diffstat) Documentation/DocBook/kernel-api.tmpl |6 + Documentation/networking/bcm43xx.txt | 97 +- MAINTAINERS| 20 +- arch/mips/mips-boards/sim/Makefile |3 +- arch/mips/mips-boards/sim/sim_platform.c | 35 + arch/powerpc/sysdev/qe_lib/ucc_fast.c |3 + crypto/michael_mic.c |4 +- drivers/net/3c509.c|1 - drivers/net/Kconfig| 15 +- drivers/net/Makefile |2 +- drivers/net/chelsio/Makefile |4 +- drivers/net/chelsio/common.h |6 +- drivers/net/chelsio/cphy.h | 16 +- drivers/net/chelsio/gmac.h | 10 +- drivers/net/chelsio/ixf1010.c | 505 - drivers/net/chelsio/mac.c |2 +- drivers/net/chelsio/mv88e1xxx.c|8 +- drivers/net/chelsio/mv88x201x.c|8 +- drivers/net/chelsio/my3126.c |8 +- drivers/net/chelsio/pm3393.c |8 +- drivers/net/chelsio/subr.c | 199 ++- drivers/net/chelsio/vsc7326.c |2 +- drivers/net/chelsio/vsc8244.c | 367 drivers/net/chelsio/vsc8244_reg.h | 172 -- drivers/net/e100.c | 159 +- drivers/net/e1000/e1000.h |3 - drivers/net/e1000/e1000_ethtool.c | 34 +- drivers/net/e1000/e1000_main.c | 45 +- drivers/net/e1000/e1000_param.c|4 +- drivers/net/eexpress.c |9 +- drivers/net/ehea/ehea.h| 42 +- drivers/net/ehea/ehea_ethtool.c| 115 +- drivers/net/ehea/ehea_main.c | 940 +--- drivers/net/ehea/ehea_phyp.c |6 +- drivers/net/ehea/ehea_phyp.h |6 +- drivers/net/ehea/ehea_qmr.c| 184 ++- drivers/net/ehea/ehea_qmr.h| 16 +- drivers/net/hamradio/baycom_ser_fdx.c | 13 +- drivers/net/ibmveth.c | 10 +- drivers/net/ixgb/ixgb.h|3 - drivers/net/ixgb/ixgb_ethtool.c|4 +- drivers/net/ixgb/ixgb_main.c |4 +- drivers/net/ixgb/ixgb_param.c |8 +- drivers/net/mii.c | 57 + drivers/net/mipsnet.c | 53 +- drivers/net/mv643xx_eth.c | 59 +- drivers/net/mv643xx_eth.h |4 - drivers/net/netxen/netxen_nic.h| 189 +- drivers/net/netxen/netxen_nic_ethtool.c| 212 ++- drivers/net/netxen/netxen_nic_hdr.h| 12 + drivers/net/netxen/netxen_nic_hw.c | 401 +++- drivers/net/netxen/netxen_nic_hw.h | 85 +- drivers/net/netxen/netxen_nic_init.c | 130 +- drivers/net/netxen/netxen_nic_isr.c| 101 +- drivers/net/netxen/netxen_nic_main.c | 769 --- drivers/net/netxen/netxen_nic_niu.c| 168 +- drivers/net/netxen/netxen_nic_phan_reg.h | 134 +- drivers/net/pcnet32.c | 159 +- drivers/net/phy/mdio_bus.c | 19 +- drivers/net/phy/phy.c | 194 ++- drivers/net/phy/phy_device.c | 114 +- drivers/net/qla3xxx.c | 371 +++- drivers/net/qla3xxx.h | 33 +- drivers/net/s2io-regs.h|2 +- drivers/net/s2io.c | 78 +- drivers/net/s2io.h |8 +- drivers/net/sb1250-mac.c | 294 ++- drivers/net/sgiseeq.c | 28 +- drivers/net/sk98lin/skge.c | 20 +- drivers/net/skfp/h/lnkstat.h | 84 - drivers/net/skge.c | 30 +- drivers/net/skge.h | 10 +- drivers/net/smc911x.c |2 +- drivers/net/tc35815.c | 2554 -- drivers/net/tulip/dmfe.c | 118
Re: [RESEND] [PATCH v2] [1/5] pasemi_mac: minor bugfixes
On Sat, Apr 28, 2007 at 11:20:17AM -0400, Jeff Garzik wrote: +if (was_full) +netif_wake_queue(mac-netdev); + Isn't this was_full check redundant? Using standard test-and-clear atomic logic, netif_wake_queue() will not issue spurious wakeups. Take a look at its implementation in include/linux/netdevice.h. It's not needed to avoid spurious wakeups, but test_and_clear_bit() results in an atomic op even if the bit is already clear. I.e. it's a bit heavy-handed to do if you can already know that it isn't set. Either way it's no big deal, I'll take out the test for now. It can always be added back in if it starts to climb on profiles when benchmarking. -Olof - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
2.6.21 known regressions (v2) (for -stable team)
Hi all, Here is a list of known regressions reported after 2.6.21 release. Feel free to add new regressions/remove fixed etc. http://kernelnewbies.org/known_regressions Subject: kernel crash at boot with maxcpus=1 on quad core kernel BUG at drivers/cpufreq/cpufreq.c:1023 References : http://lkml.org/lkml/2007/4/27/460 Submitter : Brandeburg, Jesse [EMAIL PROTECTED] Status : Unknow Subject: Soft lockup on CPU0 when resuming from suspension to ram, related to acpi processor module References : http://bugzilla.kernel.org/show_bug.cgi?id=8391 Submitter : Giorgio Lando [EMAIL PROTECTED] Status : Unknow Subject: Bad interaction between dynticks and amarok? References : http://lkml.org/lkml/2007/4/26/307 Submitter : Thomas Meyer [EMAIL PROTECTED] Status : Unknow Subject: Long pause initializating usb-storage References : http://bugzilla.kernel.org/show_bug.cgi?id=8380 Submitter : Vincent Frentzel [EMAIL PROTECTED] Status : Unknow Subject: Multpiple problem when thermal is loaded with kernel 2.6.21 References : http://bugzilla.kernel.org/show_bug.cgi?id=8385 Submitter : François Valenduc [EMAIL PROTECTED] Status : Unknow Subject: 2.6.21: sky2 hw csum failure problem References : http://lkml.org/lkml/2007/4/28/105 Submitter : Håkan Lindqvist [EMAIL PROTECTED] Status : unknown Subject: sky2 regression in 2.6.21: Asus P5B-E Plus ethernet adapter no more supported References : http://lkml.org/lkml/2007/4/26/599 Submitter : Francois SIMOND [EMAIL PROTECTED] Handled-By : Stephen Hemminger [EMAIL PROTECTED] Status : unknown Subject: 2.6.21 - BUG: at arch/i386/kernel/smp.c:177 send_IPI_mask_bitmask() References : http://lkml.org/lkml/2007/4/27/621 Submitter : Jeff Chua [EMAIL PROTECTED] Status : unknown Subject: 2.6.21 don't boot, it stops after ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 7 9 10 11 12 14 15). References : http://lkml.org/lkml/2007/4/27/400 Submitter : Riccardo Ricci [EMAIL PROTECTED] Handled-By : Len Brown [EMAIL PROTECTED] Status : unknown Subject: ACPI interpreter errors References : http://lkml.org/lkml/2007/4/27/206 Submitter : Udo A. Steinberg [EMAIL PROTECTED] Handled-By : Len Brown [EMAIL PROTECTED] Status : unknown Subject: reiserfs -- circular locking References : http://lkml.org/lkml/2007/4/26/648 Submitter : David Brownell [EMAIL PROTECTED] Handled-By : Jeff Mahoney [EMAIL PROTECTED] Patch : http://lkml.org/lkml/2007/4/27/332 Status : patch available Regards, Michal -- Michal K. K. Piotrowski Kernel Monkeys (http://kernel.wikidot.com/start) - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] ne: Add platform_driver
On Sat, 28 Apr 2007 00:57:27 -0700, Andrew Morton [EMAIL PROTECTED] wrote: +#else /* MODULE */ +module_init(ne_init); +module_exit(ne_exit); #endif /* MODULE */ Are we sure about this part? It is unusual to have special treatment dependent upon MODULE. Yes, it is unusual now, but ne.c has old-fashioned init_module() which can not be used if it was built into kernel. Also ne.c depends on old-style initialization by Space.c. Rewriting those old-style initialization code could be possible, but it will involve much more changes and might cause compatibility issue (if somebody depends on ethN order of built-in drivers). So I chose least intrusive way. --- Atsushi Nemoto - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.21 known regressions (v2) (for -stable team)
On Saturday 28 April 2007, Michal Piotrowski wrote: Hi all, Here is a list of known regressions reported after 2.6.21 release. Feel free to add new regressions/remove fixed etc. http://kernelnewbies.org/known_regressions I went here, but without a login the page is immutable Therefore I'll add it here Subject :proprietary belkin upsd turns into cpu hog Submitter :[EMAIL PROTECTED] Reference :something changed in how /dev/ttyUSB's handle 1 and 2 byte messages from pl2303 usb-serial adaptors. Also, assignation of ttyUSB#'s is volatile depending on phase of the moon when booted. Subject: kernel crash at boot with maxcpus=1 on quad core kernel BUG at drivers/cpufreq/cpufreq.c:1023 References : http://lkml.org/lkml/2007/4/27/460 Submitter : Brandeburg, Jesse [EMAIL PROTECTED] Status : Unknow Subject: Soft lockup on CPU0 when resuming from suspension to ram, related to acpi processor module References : http://bugzilla.kernel.org/show_bug.cgi?id=8391 Submitter : Giorgio Lando [EMAIL PROTECTED] Status : Unknow Subject: Bad interaction between dynticks and amarok? References : http://lkml.org/lkml/2007/4/26/307 Submitter : Thomas Meyer [EMAIL PROTECTED] Status : Unknow Subject: Long pause initializating usb-storage References : http://bugzilla.kernel.org/show_bug.cgi?id=8380 Submitter : Vincent Frentzel [EMAIL PROTECTED] Status : Unknow Subject: Multpiple problem when thermal is loaded with kernel 2.6.21 References : http://bugzilla.kernel.org/show_bug.cgi?id=8385 Submitter : François Valenduc [EMAIL PROTECTED] Status : Unknow Subject: 2.6.21: sky2 hw csum failure problem References : http://lkml.org/lkml/2007/4/28/105 Submitter : Håkan Lindqvist [EMAIL PROTECTED] Status : unknown Subject: sky2 regression in 2.6.21: Asus P5B-E Plus ethernet adapter no more supported References : http://lkml.org/lkml/2007/4/26/599 Submitter : Francois SIMOND [EMAIL PROTECTED] Handled-By : Stephen Hemminger [EMAIL PROTECTED] Status : unknown Subject: 2.6.21 - BUG: at arch/i386/kernel/smp.c:177 send_IPI_mask_bitmask() References : http://lkml.org/lkml/2007/4/27/621 Submitter : Jeff Chua [EMAIL PROTECTED] Status : unknown Subject: 2.6.21 don't boot, it stops after ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 *5 6 7 9 10 11 12 14 15). References : http://lkml.org/lkml/2007/4/27/400 Submitter : Riccardo Ricci [EMAIL PROTECTED] Handled-By : Len Brown [EMAIL PROTECTED] Status : unknown Subject: ACPI interpreter errors References : http://lkml.org/lkml/2007/4/27/206 Submitter : Udo A. Steinberg [EMAIL PROTECTED] Handled-By : Len Brown [EMAIL PROTECTED] Status : unknown Subject: reiserfs -- circular locking References : http://lkml.org/lkml/2007/4/26/648 Submitter : David Brownell [EMAIL PROTECTED] Handled-By : Jeff Mahoney [EMAIL PROTECTED] Patch : http://lkml.org/lkml/2007/4/27/332 Status : patch available Regards, Michal -- Cheers, Gene There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. -Ed Howdershelt (Author) Love is a grave mental disease. -- Plato - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ne: MIPS: Use platform_driver for ne on RBTX49XX
On Sat, 28 Apr 2007 01:04:14 -0700, Andrew Morton [EMAIL PROTECTED] wrote: platform_device_register_simple() copies *res by value, so I believe we can make res[] static __initdata. This way we don't need to evaluate the array on the stack at runtime, and the data gets discarded after initcalls have run. Can you please review and test the below? I had a go but wasn't able to fumble my way to a suitable config (I hope): It looks OK. I will merge your fix to updated patch. Thank you. And the lack of its defconfig should be fixed anyway, but it should be another story ... --- Atsushi Nemoto - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/3] ne: Add platform_driver
On Sat, 28 Apr 2007 11:07:26 -0400, Jeff Garzik [EMAIL PROTECTED] wrote: * Add platform_driver interface to ne driver. (Existing legacy ports did not covered by this ne_driver for now) * Make ioaddr 'unsigned long'. * Move a printk down to show dev-name assigned in register_netdev. Please split this patch into two patches: one patch does platform_driver conversion, and the other patch is the other two items you describe above. OK, I'll update and split the patch. Thank you. --- Atsushi Nemoto - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.21 known regressions (v2) (for -stable team)
Hi Gene, On 28/04/07, Gene Heskett [EMAIL PROTECTED] wrote: On Saturday 28 April 2007, Michal Piotrowski wrote: Hi all, Here is a list of known regressions reported after 2.6.21 release. Feel free to add new regressions/remove fixed etc. http://kernelnewbies.org/known_regressions I went here, but without a login the page is immutable Therefore I'll add it here Subject :proprietary belkin upsd turns into cpu hog I'm not sure if I understand correctly. Is it a proprietary driver? If so, it's not a task for -stable team. Submitter :[EMAIL PROTECTED] Reference :something changed in how /dev/ttyUSB's handle 1 and 2 byte messages from pl2303 usb-serial adaptors. Also, assignation of ttyUSB#'s is volatile depending on phase of the moon when booted. Regards, Michal -- Michal K. K. Piotrowski Kernel Monkeys (http://kernel.wikidot.com/start) - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ne: MIPS: Use platform_driver for ne on RBTX49XX
On Sat, 28 Apr 2007 11:10:37 -0400, Jeff Garzik [EMAIL PROTECTED] wrote: static unsigned int netcard_portlist[] __initdata = { - 0x300, 0x280, 0x320, 0x340, 0x360, 0x380, 0 +#if defined(CONFIG_ISA) || defined(CONFIG_M32R) + 0x300, 0x280, 0x320, 0x340, 0x360, 0x380, +#endif + 0 This looks a bit strange, and perhaps more difficult to maintain long term. I would suggest creating a NEEDS_PORTLIST cpp macro at the top of ne.c, to be defined or undefined based on CONFIG_xxx symbols. Then, down in the code itself, conditionally include or exclude all portlist related data tables and code. Sound sane? Sure. Do you mean something like this? #if !defined(MODULE) (defined(CONFIG_ISA) || defined(CONFIG_M32R)) #define NEEDS_PORTLIST #endif ... #ifdef NEEDS_PORTLIST static unsigned int netcard_portlist[] __initdata = { 0x300, 0x280, 0x320, 0x340, 0x360, 0x380, 0 }; #endif ... #ifdef NEEDS_PORTLIST int orig_irq = dev-irq; #endif ... #ifdef NEEDS_PORTLIST /* Last resort. The semi-risky ISA auto-probe. */ for (base_addr = 0; netcard_portlist[base_addr] != 0; base_addr++) { int ioaddr = netcard_portlist[base_addr]; dev-irq = orig_irq; if (ne_probe1(dev, ioaddr) == 0) return 0; } #endif --- Atsushi Nemoto - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ne: MIPS: Use platform_driver for ne on RBTX49XX
Atsushi Nemoto wrote: On Sat, 28 Apr 2007 11:10:37 -0400, Jeff Garzik [EMAIL PROTECTED] wrote: static unsigned int netcard_portlist[] __initdata = { - 0x300, 0x280, 0x320, 0x340, 0x360, 0x380, 0 +#if defined(CONFIG_ISA) || defined(CONFIG_M32R) + 0x300, 0x280, 0x320, 0x340, 0x360, 0x380, +#endif + 0 This looks a bit strange, and perhaps more difficult to maintain long term. I would suggest creating a NEEDS_PORTLIST cpp macro at the top of ne.c, to be defined or undefined based on CONFIG_xxx symbols. Then, down in the code itself, conditionally include or exclude all portlist related data tables and code. Sound sane? Sure. Do you mean something like this? Correct. Jeff - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.21 known regressions (v2) (for -stable team)
On Saturday 28 April 2007, Michal Piotrowski wrote: Hi Gene, On 28/04/07, Gene Heskett [EMAIL PROTECTED] wrote: On Saturday 28 April 2007, Michal Piotrowski wrote: Hi all, Here is a list of known regressions reported after 2.6.21 release. Feel free to add new regressions/remove fixed etc. http://kernelnewbies.org/known_regressions I went here, but without a login the page is immutable Therefore I'll add it here Subject :proprietary belkin upsd turns into cpu hog I'm not sure if I understand correctly. Is it a proprietary driver? If so, it's not a task for -stable team. Submitter :[EMAIL PROTECTED] Reference :something changed in how /dev/ttyUSB's handle 1 and 2 byte messages from pl2303 usb-serial adaptors. Also, assignation of ttyUSB#'s is volatile depending on phase of the moon when booted. Regards, Michal I'm not sure if my use of that should be dismissed out of hand because its proprietary, the point being that the pl2303 driver seems to have deteriorated over the last month or so to the point that now neither of my pl2303 cables is working, while the FTDI adaptor I put in the heyu path a month ago is working just fine. I do have another FTDI cable too, but I need to get an extension for it, 10 overall just won't reach the ups so its not yet tested. Up until this boot to 2.6.21-cfs-v7, I could usually make that proprietary upsd driver daemon work if I killed it, reconfigured it to use whatever port it got at this bootup, kill it, restart it etc and eventually it would settle down to 0.0% cpu, and work fine. Today I had to swap ports in both its config and in heyu's after the reboot. heyu is fine now, but the pl2303 is totally, can't even cat the 1 or 2 bytes a second worth of data that should be coming from it, dead. Hence, I'm pointing my personal finger of blame at the pl2303 driver, which I've noted has been touched a couple of times recently. In this case, no other change in the kernel config, just swapped the sd046 patch for the cfs-v7 patch, installed and rebooted. I started having trouble with this in the middle (roughly) of the 2.6.21-rc series. -- Cheers, Gene There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. -Ed Howdershelt (Author) Universe, n.: The problem. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] netpoll: fix TX queue overflow in trapped mode
CONFIG_NETPOLL_TRAP causes the TX queue controls to be completely bypassed in the netpoll's trapped mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). So, make this option more sensible by making it only bypass the TX softirq wakeup. Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED] --- Split this part form the initial patch as request by Matt Mackall. include/linux/netdevice.h |8 +++- 2 files changed, 3 insertions(+), 10 deletions(-) Index: linux-2.6/include/linux/netdevice.h === --- linux-2.6.orig/include/linux/netdevice.h +++ linux-2.6/include/linux/netdevice.h @@ -647,8 +647,10 @@ static inline void netif_start_queue(str static inline void netif_wake_queue(struct net_device *dev) { #ifdef CONFIG_NETPOLL_TRAP - if (netpoll_trap()) + if (netpoll_trap()) { + clear_bit(__LINK_STATE_XOFF, dev-state); return; + } #endif if (test_and_clear_bit(__LINK_STATE_XOFF, dev-state)) __netif_schedule(dev); @@ -656,10 +658,6 @@ static inline void netif_wake_queue(stru static inline void netif_stop_queue(struct net_device *dev) { -#ifdef CONFIG_NETPOLL_TRAP - if (netpoll_trap()) - return; -#endif set_bit(__LINK_STATE_XOFF, dev-state); } - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] fix smc911x compilation breakage
Hello Jeff, Vitaly Wool wrote: Index: linux-2.6/drivers/net/smc911x.c === --- linux-2.6.orig/drivers/net/smc911x.c +++ linux-2.6/drivers/net/smc911x.c @@ -75,9 +75,9 @@ static const char version[] = #include linux/netdevice.h #include linux/etherdevice.h #include linux/skbuff.h +#include linux/irq.h #include asm/io.h -#include asm/irq.h #include smc911x.h This seems to clash with rmk's comment at the top of linux/irq.h? In a way, yes, but I just was fixing the compilation problem, and not changing the logic in any way. The driver currently calls set_irq_type so it has to include linux/irq.h, just as it had to include asm/irq.h before. I'd guess that set_irq_type better be called by generic code and either just make the driver don't even bother or call a callback set by platform part. If you're fine with any of these, and think it's better than the initial patch, please let me know and I'll proceed with that. Thanks, Vitaly - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [stable] 2.6.21 known regressions (v2) (for -stable team)
On Sat, Apr 28, 2007 at 12:52:19PM -0400, Gene Heskett wrote: On Saturday 28 April 2007, Michal Piotrowski wrote: Hi all, Here is a list of known regressions reported after 2.6.21 release. Feel free to add new regressions/remove fixed etc. http://kernelnewbies.org/known_regressions I went here, but without a login the page is immutable Therefore I'll add it here Subject :proprietary belkin upsd turns into cpu hog Submitter :[EMAIL PROTECTED] Reference :something changed in how /dev/ttyUSB's handle 1 and 2 byte messages from pl2303 usb-serial adaptors. Last time this came up, I asked you to enable debugging in the driver to see the data flow through it and find out if it really is the driver at fault here. Did you do this? Did anything happen that was odd? Can you do a 'git bisect' of Linus's tree to try to track down the issue? Also, assignation of ttyUSB#'s is volatile depending on phase of the moon when booted. That's always been the case, ever since the 2.2 kernel releases. Please use udev if you want persistent device names for your tty USB devices. thanks, greg k-h - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.21 known regressions (v2) (for -stable team)
Michal Piotrowski schrieb: Subject: Bad interaction between dynticks and amarok? References : http://lkml.org/lkml/2007/4/26/307 Submitter : Thomas Meyer [EMAIL PROTECTED] Status : Unknow Please remove this from the regression list. This seems to be an userspace only problem and is not related to any kernel driver: amarok and/or audacious seems to repeatedly read/write to the X socket: tail of the strace of audacious: gettimeofday({1177782978, 24491}, NULL) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 581502867}) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 581614815}) = 0 select(4, [3], [3], NULL, NULL) = 1 (out [3]) writev(3, [{[EMAIL PROTECTED]..., 40}], 1) = 40 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 25286}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 9) = 0 gettimeofday({1177782978, 33242}, NULL) = 0 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 33475}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 1) = 0 gettimeofday({1177782978, 36548}, NULL) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 593554129}) = 0 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 36921}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 9) = 0 gettimeofday({1177782978, 46572}, NULL) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 603578038}) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 603689148}) = 0 select(4, [3], [3], NULL, NULL) = 1 (out [3]) writev(3, [{[EMAIL PROTECTED] \0L\0\20\0\23..., 40}], 1) = 40 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 47341}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 9) = 0 gettimeofday({1177782978, 56566}, NULL) = 0 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 56799}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 613921380}) = 0 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 57282}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 9) = 0 gettimeofday({1177782978, 67696}, NULL) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 624704202}) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 624817966}) = 0 select(4, [3], [3], NULL, NULL) = 1 (out [3]) writev(3, [{[EMAIL PROTECTED] \0L\0\20\0\23\0..., 40}], 1) = 40 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 68476}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 9) = 0 gettimeofday({1177782978, 76564}, NULL) = 0 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 76796}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 0) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 633919963}) = 0 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 77280}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 9) = 0 gettimeofday({1177782978, 86898}, NULL) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 643911329}) = 0 clock_gettime(CLOCK_MONOTONIC, {224, 644025581}) = 0 select(4, [3], [3], NULL, NULL) = 1 (out [3]) writev(3, [{[EMAIL PROTECTED] \0L\0\20\0\23..., 40}], 1) = 40 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 87702}, NULL) = 0 poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN, revents=POLLIN}], 2, 9) = 1 read(3, \n\3P\v\4\0\200\2\0\0\0\0\210v\274\277r\300\10\10x\35!..., 4096) = 96 read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) read(3, 0x80da6c8, 4096)= -1 EAGAIN (Resource temporarily unavailable) gettimeofday({1177782978, 90108}, NULL) = 0 gettimeofday({1177782978, 90163}, NULL) = 0 But i didn't have a look at what is going on here. But running amarok and/or audacious (without playing a song!) adds 50-70 more interrupts to the timer interrupt. with kind regards thomas - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] netpoll: remove CONFIG_NETPOLL_RX
Get rid of the CONFIG_NETPOLL_RX option completely since all the dependencies have been removed long ago... Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED] --- See commit e3c265bcf67f21d847e970e71504890f61f37824 in tglx/history.git for the patch that removed the #ifdef's. drivers/net/Kconfig |5 - 1 files changed, 0 insertions(+), 5 deletions(-) Index: linux-2.6/drivers/net/Kconfig === --- linux-2.6.orig/drivers/net/Kconfig +++ linux-2.6/drivers/net/Kconfig @@ -2928,11 +2928,6 @@ endif #NETDEVICES config NETPOLL def_bool NETCONSOLE -config NETPOLL_RX - bool Netpoll support for trapping incoming packets - default n - depends on NETPOLL - config NETPOLL_TRAP bool Netpoll traffic trapping default n - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] netpoll: fix TX queue overflow in trapped mode
On Saturday 28 April 2007 22:12, you wrote: CONFIG_NETPOLL_TRAP causes the TX queue controls to be completely bypassed in the netpoll's trapped mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). So, make this option more sensible by making it only bypass the TX softirq wakeup. Dammit! Finally forgot to add acks earned so far: Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED] Acked-by: Jeff Garzik [EMAIL PROTECTED] Acked-by: Matt Mackall [EMAIL PROTECTED] --- Split this part form the initial patch as request by Matt Mackall. include/linux/netdevice.h |8 +++- 2 files changed, 3 insertions(+), 10 deletions(-) Index: linux-2.6/include/linux/netdevice.h === --- linux-2.6.orig/include/linux/netdevice.h +++ linux-2.6/include/linux/netdevice.h @@ -647,8 +647,10 @@ static inline void netif_start_queue(str static inline void netif_wake_queue(struct net_device *dev) { #ifdef CONFIG_NETPOLL_TRAP - if (netpoll_trap()) + if (netpoll_trap()) { + clear_bit(__LINK_STATE_XOFF, dev-state); return; + } #endif if (test_and_clear_bit(__LINK_STATE_XOFF, dev-state)) __netif_schedule(dev); @@ -656,10 +658,6 @@ static inline void netif_wake_queue(stru static inline void netif_stop_queue(struct net_device *dev) { -#ifdef CONFIG_NETPOLL_TRAP - if (netpoll_trap()) - return; -#endif set_bit(__LINK_STATE_XOFF, dev-state); } - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] netpoll: remove CONFIG_NETPOLL_RX
On Saturday 28 April 2007 22:48, Sergei Shtylyov wrote: Get rid of the CONFIG_NETPOLL_RX option completely since all the dependencies have been removed long ago... Same here: Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED] Acked-by: Jeff Garzik [EMAIL PROTECTED] Acked-by: Matt Mackall [EMAIL PROTECTED] --- See commit e3c265bcf67f21d847e970e71504890f61f37824 in tglx/history.git for the patch that removed the #ifdef's. drivers/net/Kconfig |5 - 1 files changed, 0 insertions(+), 5 deletions(-) Index: linux-2.6/drivers/net/Kconfig === --- linux-2.6.orig/drivers/net/Kconfig +++ linux-2.6/drivers/net/Kconfig @@ -2928,11 +2928,6 @@ endif #NETDEVICES config NETPOLL def_bool NETCONSOLE -config NETPOLL_RX - bool Netpoll support for trapping incoming packets - default n - depends on NETPOLL - config NETPOLL_TRAP bool Netpoll traffic trapping default n - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: 2.6.21 known regressions (v2) (for -stable team)
El Sat, 28 Apr 2007 20:03:07 +0200, Thomas Meyer [EMAIL PROTECTED] escribió: Please remove this from the regression list. This seems to be an userspace only problem and is not related to any kernel driver: amarok and/or audacious seems to repeatedly read/write to the X socket: OK - I added it just to be sure that there wasn't any dynticks regression, it's gone now. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND] [PATCH v2] [3/5] pasemi_mac: cleanups and rx performance improvements
On Sat, Apr 28, 2007 at 11:22:43AM -0400, Jeff Garzik wrote: Olof Johansson wrote: NAPI fixes and cleanups for pasemi_mac: * Timer changes/fixes * Abstract out the rx intr restart to a separate function * Similar function for tx intr to reset to a known clear state even if firmware used the same interface * Add a copy-break and recycle the SKB in the driver for small packets * Other minor changes to rx path Split out the abstract out function foo style changes into a separate patch. This creates a smaller and much more reviewable second patch as a result. Doing so also creates a nice, clean git-bisect point that can be used to guarantee the validity of the first patch. Ok, I was really asking for this one... Even that didn't result in that much of a more readible patch. I've split it up in a total of 5. I'll repost the series shortly. Thanks, -Olof - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RESEND] [PATCH v2] [4/5] pasemi_mac: phy support
On Sat, Apr 28, 2007 at 11:23:42AM -0400, Jeff Garzik wrote: msg_enable should be initialized in a standard fashion, from your debug module parameter. grep for 'msg_enable' in other drivers. Ah, good point. Done, and broken out as a separate patch. Thanks, -Olof - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] netpoll: fix TX queue overflow in trapped mode
On Saturday 28 April 2007 22:52, I wrote: CONFIG_NETPOLL_TRAP causes the TX queue controls to be completely bypassed in the netpoll's trapped mode which easily causes overflows in the drivers with short TX queues (most notably, in 8139too with its 4-deep queue). So, make this option more sensible by making it only bypass the TX softirq wakeup. Dammit! Finally forgot to add acks earned so far: Oh, and there was even another one: Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED] Acked-by: Jeff Garzik [EMAIL PROTECTED] Acked-by: Tom Rini [EMAIL PROTECTED] Acked-by: Matt Mackall [EMAIL PROTECTED] --- Split this part form the initial patch as request by Matt Mackall. include/linux/netdevice.h |8 +++- 2 files changed, 3 insertions(+), 10 deletions(-) Index: linux-2.6/include/linux/netdevice.h === --- linux-2.6.orig/include/linux/netdevice.h +++ linux-2.6/include/linux/netdevice.h @@ -647,8 +647,10 @@ static inline void netif_start_queue(str static inline void netif_wake_queue(struct net_device *dev) { #ifdef CONFIG_NETPOLL_TRAP - if (netpoll_trap()) + if (netpoll_trap()) { + clear_bit(__LINK_STATE_XOFF, dev-state); return; + } #endif if (test_and_clear_bit(__LINK_STATE_XOFF, dev-state)) __netif_schedule(dev); @@ -656,10 +658,6 @@ static inline void netif_wake_queue(stru static inline void netif_stop_queue(struct net_device *dev) { -#ifdef CONFIG_NETPOLL_TRAP - if (netpoll_trap()) - return; -#endif set_bit(__LINK_STATE_XOFF, dev-state); } - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [0/10] pasemi_mac: fixes and enhancements
Hi, The following patch set contains a number of fixes and improvements of the pasemi_mac driver: 1/10: A couple of minor bugfixes. 2/10: Move the IRQ mapping from the PCI layer under our platform, to the driver. 3/10: Abstract and fix up interrupt restart routines 4/10: Timer and interrupt fixes 5/10: Add SKB reuse / copy-break 6/10: Minor cleanup / define fixes 7/10: Logic cleanup / rx performance improvements 8/10: Add msglevel support and pasemi_mac_debug module param 9/10: PHY support 10/10: Use local-mac-address instead of mac-address if available. -Olof - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [1/10] pasemi_mac: A couple of minor bugfixes.
Bugfixes: * Move the wake_queue logic from tx_intr to clean_tx * Always do wake_queue even if queue wasn't full before clean since it's safe to do * Fix polarity in checks in pasemi_mac_close Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -476,6 +476,8 @@ static int pasemi_mac_clean_tx(struct pa mac-tx-next_to_clean += count; spin_unlock_irqrestore(mac-tx-lock, flags); + netif_wake_queue(mac-netdev); + return count; } @@ -510,9 +512,6 @@ static irqreturn_t pasemi_mac_tx_intr(in struct net_device *dev = data; struct pasemi_mac *mac = netdev_priv(dev); unsigned int reg; - int was_full; - - was_full = mac-tx-next_to_clean - mac-tx-next_to_use == TX_RING_SIZE; if (!(*mac-tx_status PAS_STATUS_INT)) return IRQ_NONE; @@ -526,9 +525,6 @@ static irqreturn_t pasemi_mac_tx_intr(in pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_TXCH_RESET(mac-dma_txch), reg); - if (was_full) - netif_wake_queue(dev); - return IRQ_HANDLED; } @@ -660,40 +656,37 @@ static int pasemi_mac_close(struct net_d pci_read_config_dword(mac-dma_pdev, PAS_DMA_TXCHAN_TCMDSTA(mac-dma_txch), stat); - if (stat PAS_DMA_TXCHAN_TCMDSTA_ACT) + if (!(stat PAS_DMA_TXCHAN_TCMDSTA_ACT)) break; cond_resched(); } - if (!(stat PAS_DMA_TXCHAN_TCMDSTA_ACT)) { + if (stat PAS_DMA_TXCHAN_TCMDSTA_ACT) dev_err(mac-dma_pdev-dev, Failed to stop tx channel\n); - } for (retries = 0; retries MAX_RETRIES; retries++) { pci_read_config_dword(mac-dma_pdev, PAS_DMA_RXCHAN_CCMDSTA(mac-dma_rxch), stat); - if (stat PAS_DMA_RXCHAN_CCMDSTA_ACT) + if (!(stat PAS_DMA_RXCHAN_CCMDSTA_ACT)) break; cond_resched(); } - if (!(stat PAS_DMA_RXCHAN_CCMDSTA_ACT)) { + if (stat PAS_DMA_RXCHAN_CCMDSTA_ACT) dev_err(mac-dma_pdev-dev, Failed to stop rx channel\n); - } for (retries = 0; retries MAX_RETRIES; retries++) { pci_read_config_dword(mac-dma_pdev, PAS_DMA_RXINT_RCMDSTA(mac-dma_if), stat); - if (stat PAS_DMA_RXINT_RCMDSTA_ACT) + if (!(stat PAS_DMA_RXINT_RCMDSTA_ACT)) break; cond_resched(); } - if (!(stat PAS_DMA_RXINT_RCMDSTA_ACT)) { + if (stat PAS_DMA_RXINT_RCMDSTA_ACT) dev_err(mac-dma_pdev-dev, Failed to stop rx interface\n); - } /* Then, disable the channel. This must be done separately from * stopping, since you can't disable when active. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [2/10] pasemi_mac: Move the IRQ mapping from the PCI layer to the driver
Fixes for ethernet IRQ mapping, to be done in the driver instead of in the platform setup code. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/arch/powerpc/platforms/pasemi/pci.c === --- netdev-2.6.orig/arch/powerpc/platforms/pasemi/pci.c +++ netdev-2.6/arch/powerpc/platforms/pasemi/pci.c @@ -163,19 +163,6 @@ static void __init pas_fixup_phb_resourc } -void __devinit pas_pci_irq_fixup(struct pci_dev *dev) -{ - /* DMA is special, 84 interrupts (128 - 211), all but 128 -* need to be mapped by hand here. -*/ - if (dev-vendor == 0x1959 dev-device == 0xa007) { - int i; - for (i = 129; i 212; i++) - irq_create_mapping(NULL, i); - } -} - - void __init pas_pci_init(void) { struct device_node *np, *root; Index: netdev-2.6/arch/powerpc/platforms/pasemi/setup.c === --- netdev-2.6.orig/arch/powerpc/platforms/pasemi/setup.c +++ netdev-2.6/arch/powerpc/platforms/pasemi/setup.c @@ -240,5 +240,4 @@ define_machine(pas) { .check_legacy_ioport= pas_check_legacy_ioport, .progress = pas_progress, .machine_check_exception = pas_machine_check_handler, - .pci_irq_fixup = pas_pci_irq_fixup, }; Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -33,6 +33,8 @@ #include linux/tcp.h #include net/checksum.h +#include asm/irq.h + #include pasemi_mac.h @@ -531,6 +533,7 @@ static irqreturn_t pasemi_mac_tx_intr(in static int pasemi_mac_open(struct net_device *dev) { struct pasemi_mac *mac = netdev_priv(dev); + int base_irq; unsigned int flags; int ret; @@ -594,28 +597,37 @@ static int pasemi_mac_open(struct net_de netif_start_queue(dev); netif_poll_enable(dev); - ret = request_irq(mac-dma_pdev-irq + mac-dma_txch, - pasemi_mac_tx_intr, IRQF_DISABLED, + /* Interrupts are a bit different for our DMA controller: While +* it's got one a regular PCI device header, the interrupt there +* is really the base of the range it's using. Each tx and rx +* channel has it's own interrupt source. +*/ + + base_irq = virq_to_hw(mac-dma_pdev-irq); + + mac-tx_irq = irq_create_mapping(NULL, base_irq + mac-dma_txch); + mac-rx_irq = irq_create_mapping(NULL, base_irq + 20 + mac-dma_txch); + + ret = request_irq(mac-tx_irq, pasemi_mac_tx_intr, IRQF_DISABLED, mac-tx-irq_name, dev); if (ret) { dev_err(mac-pdev-dev, request_irq of irq %d failed: %d\n, - mac-dma_pdev-irq + mac-dma_txch, ret); + base_irq + mac-dma_txch, ret); goto out_tx_int; } - ret = request_irq(mac-dma_pdev-irq + 20 + mac-dma_rxch, - pasemi_mac_rx_intr, IRQF_DISABLED, + ret = request_irq(mac-rx_irq, pasemi_mac_rx_intr, IRQF_DISABLED, mac-rx-irq_name, dev); if (ret) { dev_err(mac-pdev-dev, request_irq of irq %d failed: %d\n, - mac-dma_pdev-irq + 20 + mac-dma_rxch, ret); + base_irq + 20 + mac-dma_rxch, ret); goto out_rx_int; } return 0; out_rx_int: - free_irq(mac-dma_pdev-irq + mac-dma_txch, dev); + free_irq(mac-tx_irq, dev); out_tx_int: netif_poll_disable(dev); netif_stop_queue(dev); @@ -699,8 +711,8 @@ static int pasemi_mac_close(struct net_d pci_write_config_dword(mac-dma_pdev, PAS_DMA_RXINT_RCMDSTA(mac-dma_if), 0); - free_irq(mac-dma_pdev-irq + mac-dma_txch, dev); - free_irq(mac-dma_pdev-irq + 20 + mac-dma_rxch, dev); + free_irq(mac-tx_irq, dev); + free_irq(mac-rx_irq, dev); /* Free resources */ pasemi_mac_free_rx_resources(dev); Index: netdev-2.6/drivers/net/pasemi_mac.h === --- netdev-2.6.orig/drivers/net/pasemi_mac.h +++ netdev-2.6/drivers/net/pasemi_mac.h @@ -73,6 +73,8 @@ struct pasemi_mac { struct pasemi_mac_txring *tx; struct pasemi_mac_rxring *rx; + unsigned long tx_irq; + unsigned long rx_irq; }; /* Software status descriptor (desc_info) */ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [3/10] pasemi_mac: Abstract and fix up interrupt restart routines
Abstract out (and fix up) the interrupt restart routines, making sure we start out in a consistent state. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -362,6 +362,42 @@ static void pasemi_mac_replenish_rx_ring mac-rx-next_to_fill += count; } +static void pasemi_mac_restart_rx_intr(struct pasemi_mac *mac) +{ + unsigned int reg, stat; + /* Re-enable packet count interrupts: finally +* ack the packet count interrupt we got in rx_intr. +*/ + + pci_read_config_dword(mac-iob_pdev, + PAS_IOB_DMA_RXCH_STAT(mac-dma_rxch), + stat); + + reg = PAS_IOB_DMA_RXCH_RESET_PCNT(stat PAS_IOB_DMA_RXCH_STAT_CNTDEL_M) + | PAS_IOB_DMA_RXCH_RESET_PINTC; + + pci_write_config_dword(mac-iob_pdev, + PAS_IOB_DMA_RXCH_RESET(mac-dma_rxch), + reg); +} + +static void pasemi_mac_restart_tx_intr(struct pasemi_mac *mac) +{ + unsigned int reg, stat; + + /* Re-enable packet count interrupts */ + pci_read_config_dword(mac-iob_pdev, + PAS_IOB_DMA_TXCH_STAT(mac-dma_txch), stat); + + reg = PAS_IOB_DMA_TXCH_RESET_PCNT(stat PAS_IOB_DMA_TXCH_STAT_CNTDEL_M) + | PAS_IOB_DMA_TXCH_RESET_PINTC; + + pci_write_config_dword(mac-iob_pdev, + PAS_IOB_DMA_TXCH_RESET(mac-dma_txch), reg); +} + + + static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) { unsigned int i; @@ -559,6 +595,10 @@ static int pasemi_mac_open(struct net_de pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_RXCH_CFG(mac-dma_rxch), PAS_IOB_DMA_RXCH_CFG_CNTTH(30)); + /* Clear out any residual packet count state from firmware */ + pasemi_mac_restart_rx_intr(mac); + pasemi_mac_restart_tx_intr(mac); + pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_COM_TIMEOUTCFG, PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(100)); @@ -835,9 +875,7 @@ static int pasemi_mac_poll(struct net_de /* all done, no more packets present */ netif_rx_complete(dev); - /* re-enable receive interrupts */ - pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_COM_TIMEOUTCFG, - PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(100)); + pasemi_mac_restart_rx_intr(mac); return 0; } else { /* used up our quantum, so reschedule */ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [4/10] pasemi_mac: Timer and interrupt fixes
Timer and interrupt fixes: * Be pickier with what kind of interrupts are acked to avoid the device to get out of sync with the driver state * Set RX count threshhold to 1 (for NAPI interrupted mode), TX count threshold to 32. * Set timer thresholds to current max (~16ms). Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -526,18 +526,28 @@ static irqreturn_t pasemi_mac_rx_intr(in struct pasemi_mac *mac = netdev_priv(dev); unsigned int reg; - if (!(*mac-rx_status PAS_STATUS_INT)) + if (!(*mac-rx_status PAS_STATUS_CAUSE_M)) return IRQ_NONE; - netif_rx_schedule(dev); - pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_COM_TIMEOUTCFG, - PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(0)); + if (*mac-rx_status PAS_STATUS_ERROR) + printk(rx_status reported error\n); + + /* Don't reset packet count so it won't fire again but clear +* all others. +*/ + + pci_read_config_dword(mac-dma_pdev, PAS_DMA_RXINT_RCMDSTA(mac-dma_if), reg); - reg = PAS_IOB_DMA_RXCH_RESET_PINTC | PAS_IOB_DMA_RXCH_RESET_SINTC | - PAS_IOB_DMA_RXCH_RESET_DINTC; + reg = 0; + if (*mac-rx_status PAS_STATUS_SOFT) + reg |= PAS_IOB_DMA_RXCH_RESET_SINTC; + if (*mac-rx_status PAS_STATUS_ERROR) + reg |= PAS_IOB_DMA_RXCH_RESET_DINTC; if (*mac-rx_status PAS_STATUS_TIMER) reg |= PAS_IOB_DMA_RXCH_RESET_TINTC; + netif_rx_schedule(dev); + pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_RXCH_RESET(mac-dma_rxch), reg); @@ -551,14 +561,17 @@ static irqreturn_t pasemi_mac_tx_intr(in struct pasemi_mac *mac = netdev_priv(dev); unsigned int reg; - if (!(*mac-tx_status PAS_STATUS_INT)) + if (!(*mac-tx_status PAS_STATUS_CAUSE_M)) return IRQ_NONE; pasemi_mac_clean_tx(mac); - reg = PAS_IOB_DMA_TXCH_RESET_PINTC | PAS_IOB_DMA_TXCH_RESET_SINTC; - if (*mac-tx_status PAS_STATUS_TIMER) - reg |= PAS_IOB_DMA_TXCH_RESET_TINTC; + reg = PAS_IOB_DMA_TXCH_RESET_PINTC; + + if (*mac-tx_status PAS_STATUS_SOFT) + reg |= PAS_IOB_DMA_TXCH_RESET_SINTC; + if (*mac-tx_status PAS_STATUS_ERROR) + reg |= PAS_IOB_DMA_TXCH_RESET_DINTC; pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_TXCH_RESET(mac-dma_txch), reg); @@ -593,14 +606,18 @@ static int pasemi_mac_open(struct net_de flags |= PAS_MAC_CFG_PCFG_TSR_1G | PAS_MAC_CFG_PCFG_SPD_1G; pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_RXCH_CFG(mac-dma_rxch), - PAS_IOB_DMA_RXCH_CFG_CNTTH(30)); + PAS_IOB_DMA_RXCH_CFG_CNTTH(1)); + + pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_TXCH_CFG(mac-dma_txch), + PAS_IOB_DMA_TXCH_CFG_CNTTH(32)); /* Clear out any residual packet count state from firmware */ pasemi_mac_restart_rx_intr(mac); pasemi_mac_restart_tx_intr(mac); + /* 0xff is max value, about 16ms */ pci_write_config_dword(mac-iob_pdev, PAS_IOB_DMA_COM_TIMEOUTCFG, - PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(100)); + PAS_IOB_DMA_COM_TIMEOUTCFG_TCNT(0xff)); pci_write_config_dword(mac-pdev, PAS_MAC_CFG_PCFG, flags); Index: netdev-2.6/drivers/net/pasemi_mac.h === --- netdev-2.6.orig/drivers/net/pasemi_mac.h +++ netdev-2.6/drivers/net/pasemi_mac.h @@ -299,6 +299,7 @@ enum { #definePAS_STATUS_DCNT_S 16 #definePAS_STATUS_BPCNT_M 0xull #definePAS_STATUS_BPCNT_S 32 +#definePAS_STATUS_CAUSE_M 0xf000ull #definePAS_STATUS_TIMER0x1000ull #definePAS_STATUS_ERROR0x2000ull #definePAS_STATUS_SOFT 0x4000ull - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [5/10] pasemi_mac: Add SKB reuse / copy-break
Add a copy-break and recycle the SKB in the driver for small packets. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -279,8 +279,8 @@ static void pasemi_mac_free_rx_resources for (i = 0; i RX_RING_SIZE; i++) { info = RX_DESC_INFO(mac, i); dp = RX_DESC(mac, i); - if (info-dma) { - if (info-skb) { + if (info-skb) { + if (info-dma) { pci_unmap_single(mac-dma_pdev, info-dma, info-skb-len, @@ -329,12 +329,14 @@ static void pasemi_mac_replenish_rx_ring struct sk_buff *skb; dma_addr_t dma; - skb = dev_alloc_skb(BUF_SIZE); + /* skb might still be in there for recycle on short receives */ + if (info-skb) + skb = info-skb; + else + skb = dev_alloc_skb(BUF_SIZE); - if (!skb) { - count = i - start; + if (unlikely(!skb)) break; - } dma = pci_map_single(mac-dma_pdev, skb-data, skb-len, PCI_DMA_FROMDEVICE); @@ -442,13 +444,28 @@ static int pasemi_mac_clean_rx(struct pa BUG_ON(!info); BUG_ON(info-dma != dma); + skb = info-skb; pci_unmap_single(mac-dma_pdev, info-dma, info-skb-len, PCI_DMA_FROMDEVICE); + info-dma = 0; - skb = info-skb; len = (dp-macrx XCT_MACRX_LLEN_M) XCT_MACRX_LLEN_S; + if (len 256) { + struct sk_buff *new_skb = + netdev_alloc_skb(mac-netdev, len + NET_IP_ALIGN); + if (new_skb) { + skb_reserve(new_skb, NET_IP_ALIGN); + memcpy(new_skb-data - NET_IP_ALIGN, + skb-data - NET_IP_ALIGN, + len + NET_IP_ALIGN); + /* save the skb in buffer_info as good */ + skb = new_skb; + } + /* else just continue with the old one */ + } else + info-skb = NULL; skb_put(skb, len); - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [6/10] pasemi_mac: Minor cleanup / define fixes
* Remove some unused defines * Fix a couple of wrong chip register defines, and add a few more fields that might be used in the near future. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -61,12 +61,6 @@ #define BUF_SIZE 1646 /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ -/* XXXOJN these should come out of the device tree some day */ -#define PAS_DMA_CAP_BASE 0xe00d0040 -#define PAS_DMA_CAP_SIZE 0x100 -#define PAS_DMA_COM_BASE 0xe00d0100 -#define PAS_DMA_COM_SIZE 0x100 - static struct pasdma_status *dma_status; static int pasemi_get_mac_addr(struct pasemi_mac *mac) Index: netdev-2.6/drivers/net/pasemi_mac.h === --- netdev-2.6.orig/drivers/net/pasemi_mac.h +++ netdev-2.6/drivers/net/pasemi_mac.h @@ -195,11 +195,15 @@ enum { #define PAS_DMA_RXINT_RCMDSTA(i) (0x200+(i)*_PAS_DMA_RXINT_STRIDE) #definePAS_DMA_RXINT_RCMDSTA_EN0x0001 #definePAS_DMA_RXINT_RCMDSTA_ST0x0002 -#definePAS_DMA_RXINT_RCMDSTA_OO0x0100 -#definePAS_DMA_RXINT_RCMDSTA_BP0x0200 -#definePAS_DMA_RXINT_RCMDSTA_DR0x0400 +#definePAS_DMA_RXINT_RCMDSTA_MBT 0x0008 +#definePAS_DMA_RXINT_RCMDSTA_MDR 0x0010 +#definePAS_DMA_RXINT_RCMDSTA_MOO 0x0020 +#definePAS_DMA_RXINT_RCMDSTA_MBP 0x0040 #definePAS_DMA_RXINT_RCMDSTA_BT0x0800 -#definePAS_DMA_RXINT_RCMDSTA_TB0x1000 +#definePAS_DMA_RXINT_RCMDSTA_DR0x1000 +#definePAS_DMA_RXINT_RCMDSTA_OO0x2000 +#definePAS_DMA_RXINT_RCMDSTA_BP0x4000 +#definePAS_DMA_RXINT_RCMDSTA_TB0x8000 #definePAS_DMA_RXINT_RCMDSTA_ACT 0x0001 #definePAS_DMA_RXINT_RCMDSTA_DROPS_M 0xfffe #definePAS_DMA_RXINT_RCMDSTA_DROPS_S 17 - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [2/10] pasemi_mac: Move the IRQ mapping from the PCI layer to the driver[PATCH v3] [7/10] pasemi_mac: Logic cleanup / rx performance improvements
Logic cleanup and some performance enhancements to the RX path. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -305,19 +305,20 @@ static void pasemi_mac_replenish_rx_ring struct pasemi_mac *mac = netdev_priv(dev); unsigned int i; int start = mac-rx-next_to_fill; - unsigned int count; + unsigned int limit, count; - count = (mac-rx-next_to_clean + RX_RING_SIZE - + limit = (mac-rx-next_to_clean + RX_RING_SIZE - mac-rx-next_to_fill) (RX_RING_SIZE - 1); /* Check to see if we're doing first-time setup */ if (unlikely(mac-rx-next_to_clean == 0 mac-rx-next_to_fill == 0)) - count = RX_RING_SIZE; + limit = RX_RING_SIZE; - if (count = 0) + if (limit = 0) return; - for (i = start; i start + count; i++) { + i = start; + for (count = limit; count; count--) { struct pasemi_mac_buffer *info = RX_DESC_INFO(mac, i); u64 *buff = RX_BUFF(mac, i); struct sk_buff *skb; @@ -335,27 +336,27 @@ static void pasemi_mac_replenish_rx_ring dma = pci_map_single(mac-dma_pdev, skb-data, skb-len, PCI_DMA_FROMDEVICE); - if (dma_mapping_error(dma)) { + if (unlikely(dma_mapping_error(dma))) { dev_kfree_skb_irq(info-skb); - count = i - start; break; } info-skb = skb; info-dma = dma; *buff = XCT_RXB_LEN(BUF_SIZE) | XCT_RXB_ADDR(dma); + i++; } wmb(); pci_write_config_dword(mac-dma_pdev, PAS_DMA_RXCHAN_INCR(mac-dma_rxch), - count); + limit - count); pci_write_config_dword(mac-dma_pdev, PAS_DMA_RXINT_INCR(mac-dma_if), - count); + limit - count); - mac-rx-next_to_fill += count; + mac-rx-next_to_fill += limit - count; } static void pasemi_mac_restart_rx_intr(struct pasemi_mac *mac) @@ -393,32 +394,31 @@ static void pasemi_mac_restart_tx_intr(s } - static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) { - unsigned int i; - int start, count; + unsigned int n; + int count; + struct pas_dma_xct_descr *dp; + struct pasemi_mac_buffer *info; + struct sk_buff *skb; + unsigned int i, len; + u64 macrx; + dma_addr_t dma; spin_lock(mac-rx-lock); - start = mac-rx-next_to_clean; - count = 0; + n = mac-rx-next_to_clean; - for (i = start; i (start + RX_RING_SIZE) count limit; i++) { - struct pas_dma_xct_descr *dp; - struct pasemi_mac_buffer *info; - struct sk_buff *skb; - unsigned int j, len; - dma_addr_t dma; + for (count = limit; count; count--) { rmb(); - dp = RX_DESC(mac, i); + dp = RX_DESC(mac, n); + macrx = dp-macrx; - if (!(dp-macrx XCT_MACRX_O)) + if (!(macrx XCT_MACRX_O)) break; - count++; info = NULL; @@ -430,22 +430,20 @@ static int pasemi_mac_clean_rx(struct pa */ dma = (dp-ptr XCT_PTR_ADDR_M); - for (j = start; j (start + RX_RING_SIZE); j++) { - info = RX_DESC_INFO(mac, j); + for (i = n; i (n + RX_RING_SIZE); i++) { + info = RX_DESC_INFO(mac, i); if (info-dma == dma) break; } - BUG_ON(!info); - BUG_ON(info-dma != dma); skb = info-skb; + info-dma = 0; - pci_unmap_single(mac-dma_pdev, info-dma, info-skb-len, + pci_unmap_single(mac-dma_pdev, dma, skb-len, PCI_DMA_FROMDEVICE); - info-dma = 0; + len = (macrx XCT_MACRX_LLEN_M) XCT_MACRX_LLEN_S; - len = (dp-macrx XCT_MACRX_LLEN_M) XCT_MACRX_LLEN_S; if (len 256) { struct sk_buff *new_skb = netdev_alloc_skb(mac-netdev, len + NET_IP_ALIGN); @@ -465,9 +463,9 @@ static int pasemi_mac_clean_rx(struct pa skb-protocol = eth_type_trans(skb, mac-netdev); - if ((dp-macrx XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK) { + if ((macrx XCT_MACRX_HTY_M) ==
[PATCH v3] [8/10] pasemi_mac: Add msglevel support and pasemi_mac_debug module param
Add msglevel support for pasemi_mac. Move the MODULE_* defines to the top to go together with the variable (similar to tg3). Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -53,6 +53,16 @@ #define RX_RING_SIZE 512 #define TX_RING_SIZE 512 +#define DEFAULT_MSG_ENABLE \ + (NETIF_MSG_DRV | \ +NETIF_MSG_PROBE| \ +NETIF_MSG_LINK | \ +NETIF_MSG_TIMER| \ +NETIF_MSG_IFDOWN | \ +NETIF_MSG_IFUP | \ +NETIF_MSG_RX_ERR | \ +NETIF_MSG_TX_ERR) + #define TX_DESC(mac, num) ((mac)-tx-desc[(num) (TX_RING_SIZE-1)]) #define TX_DESC_INFO(mac, num) ((mac)-tx-desc_info[(num) (TX_RING_SIZE-1)]) #define RX_DESC(mac, num) ((mac)-rx-desc[(num) (RX_RING_SIZE-1)]) @@ -61,6 +71,14 @@ #define BUF_SIZE 1646 /* 1500 MTU + ETH_HLEN + VLAN_HLEN + 2 64B cachelines */ +MODULE_LICENSE(GPL); +MODULE_AUTHOR (Olof Johansson [EMAIL PROTECTED]); +MODULE_DESCRIPTION(PA Semi PWRficient Ethernet driver); + +static int pasemi_mac_debug = -1; /* -1 == use DEFAULT_MSG_ENABLE as value */ +module_param(pasemi_mac_debug, int, 0); +MODULE_PARM_DESC(pasemi_mac_debug, PA Semi MAC bitmapped debugging message enable value); + static struct pasdma_status *dma_status; static int pasemi_get_mac_addr(struct pasemi_mac *mac) @@ -873,6 +891,7 @@ static struct net_device_stats *pasemi_m return mac-stats; } + static void pasemi_mac_set_rx_mode(struct net_device *dev) { struct pasemi_mac *mac = netdev_priv(dev); @@ -1007,6 +1026,12 @@ pasemi_mac_probe(struct pci_dev *pdev, c mac-rx_status = dma_status-rx_sta[mac-dma_rxch]; mac-tx_status = dma_status-tx_sta[mac-dma_txch]; + /* Enable most messages by default */ + if (pasemi_mac_debug 0) + mac-msg_enable = DEFAULT_MSG_ENABLE; + else + mac-msg_enable = pasemi_mac_debug; + err = register_netdev(dev); if (err) { @@ -1081,9 +1106,5 @@ int pasemi_mac_init_module(void) return pci_register_driver(pasemi_mac_driver); } -MODULE_LICENSE(GPL); -MODULE_AUTHOR (Olof Johansson [EMAIL PROTECTED]); -MODULE_DESCRIPTION(PA Semi PWRficient Ethernet driver); - module_init(pasemi_mac_init_module); module_exit(pasemi_mac_cleanup_module); Index: netdev-2.6/drivers/net/pasemi_mac.h === --- netdev-2.6.orig/drivers/net/pasemi_mac.h +++ netdev-2.6/drivers/net/pasemi_mac.h @@ -75,6 +75,8 @@ struct pasemi_mac { struct pasemi_mac_rxring *rx; unsigned long tx_irq; unsigned long rx_irq; + + unsigned intmsg_enable; }; /* Software status descriptor (desc_info) */ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [9/10] pasemi_mac: PHY support
PHY support for pasemi_mac. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -606,6 +606,114 @@ static irqreturn_t pasemi_mac_tx_intr(in return IRQ_HANDLED; } +static void pasemi_adjust_link(struct net_device *dev) +{ + struct pasemi_mac *mac = netdev_priv(dev); + int msg; + unsigned int flags; + unsigned int new_flags; + + if (!mac-phydev-link) { + /* If no link, MAC speed settings don't matter. Just report +* link down and return. +*/ + if (mac-link netif_msg_link(mac)) + printk(KERN_INFO %s: Link is down.\n, dev-name); + + netif_carrier_off(dev); + mac-link = 0; + + return; + } else + netif_carrier_on(dev); + + pci_read_config_dword(mac-pdev, PAS_MAC_CFG_PCFG, flags); + new_flags = flags ~(PAS_MAC_CFG_PCFG_HD | PAS_MAC_CFG_PCFG_SPD_M | + PAS_MAC_CFG_PCFG_TSR_M); + + if (!mac-phydev-duplex) + new_flags |= PAS_MAC_CFG_PCFG_HD; + + switch (mac-phydev-speed) { + case 1000: + new_flags |= PAS_MAC_CFG_PCFG_SPD_1G | +PAS_MAC_CFG_PCFG_TSR_1G; + break; + case 100: + new_flags |= PAS_MAC_CFG_PCFG_SPD_100M | +PAS_MAC_CFG_PCFG_TSR_100M; + break; + case 10: + new_flags |= PAS_MAC_CFG_PCFG_SPD_10M | +PAS_MAC_CFG_PCFG_TSR_10M; + break; + default: + printk(Unsupported speed %d\n, mac-phydev-speed); + } + + /* Print on link or speed/duplex change */ + msg = mac-link != mac-phydev-link || flags != new_flags; + + mac-duplex = mac-phydev-duplex; + mac-speed = mac-phydev-speed; + mac-link = mac-phydev-link; + + if (new_flags != flags) + pci_write_config_dword(mac-pdev, PAS_MAC_CFG_PCFG, new_flags); + + if (msg netif_msg_link(mac)) + printk(KERN_INFO %s: Link is up at %d Mbps, %s duplex.\n, + dev-name, mac-speed, mac-duplex ? full : half); +} + +static int pasemi_mac_phy_init(struct net_device *dev) +{ + struct pasemi_mac *mac = netdev_priv(dev); + struct device_node *dn, *phy_dn; + struct phy_device *phydev; + unsigned int phy_id; + const phandle *ph; + const unsigned int *prop; + struct resource r; + int ret; + + dn = pci_device_to_OF_node(mac-pdev); + ph = get_property(dn, phy-handle, NULL); + if (!ph) + return -ENODEV; + phy_dn = of_find_node_by_phandle(*ph); + + prop = get_property(phy_dn, reg, NULL); + ret = of_address_to_resource(phy_dn-parent, 0, r); + if (ret) + goto err; + + phy_id = *prop; + snprintf(mac-phy_id, BUS_ID_SIZE, PHY_ID_FMT, (int)r.start, phy_id); + + of_node_put(phy_dn); + + mac-link = 0; + mac-speed = 0; + mac-duplex = -1; + + phydev = phy_connect(dev, mac-phy_id, pasemi_adjust_link, 0, PHY_INTERFACE_MODE_SGMII); + + if (IS_ERR(phydev)) { + printk(KERN_ERR %s: Could not attach to phy\n, dev-name); + return PTR_ERR(phydev); + } + + mac-phydev = phydev; + + return 0; + +err: + of_node_put(phy_dn); + return -ENODEV; +} + + static int pasemi_mac_open(struct net_device *dev) { struct pasemi_mac *mac = netdev_priv(dev); @@ -678,6 +786,13 @@ static int pasemi_mac_open(struct net_de pasemi_mac_replenish_rx_ring(dev); + ret = pasemi_mac_phy_init(dev); + /* Some configs don't have PHYs (XAUI etc), so don't complain about +* failed init due to -ENODEV. +*/ + if (ret ret != -ENODEV) + dev_warn(mac-pdev-dev, phy init failed: %d\n, ret); + netif_start_queue(dev); netif_poll_enable(dev); @@ -708,6 +823,9 @@ static int pasemi_mac_open(struct net_de goto out_rx_int; } + if (mac-phydev) + phy_start(mac-phydev); + return 0; out_rx_int: @@ -731,6 +849,11 @@ static int pasemi_mac_close(struct net_d unsigned int stat; int retries; + if (mac-phydev) { + phy_stop(mac-phydev); + phy_disconnect(mac-phydev); + } + netif_stop_queue(dev); /* Clean out any pending buffers */ @@ -1032,6 +1155,9 @@ pasemi_mac_probe(struct pci_dev *pdev, c else mac-msg_enable = pasemi_mac_debug; + /* Enable most messages by default */ + mac-msg_enable = (NETIF_MSG_IFUP 1 ) - 1; + err = register_netdev(dev); if
[PATCH v3] [10/10] pasemi_mac: Use local-mac-address instead of mac-address if available
Use local-mac-address in the device tree instead. Fall back to mac-address for older firmware. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -94,7 +94,12 @@ static int pasemi_get_mac_addr(struct pa return -ENOENT; } - maddr = get_property(dn, mac-address, NULL); + maddr = get_property(dn, local-mac-address, NULL); + + /* Fall back to mac-address for older firmware */ + if (maddr == NULL) + maddr = get_property(dn, mac-address, NULL); + if (maddr == NULL) { dev_warn(pdev-dev, no mac address in device tree, not configuring\n); - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1
Le Saturday 28 April 2007 00:32:37 Andrew Morton, vous avez écrit : On Fri, 27 Apr 2007 22:05:28 +0200 because we thought we'd fixed the rtnl_lock() problems in 2.6.21-rc7-mm2. Are you sure that log is from 2.6.21-rc7-mm2? Yes. I have retested it another time ( for adding the small usb debug message ) and get the same message a new time. Maybe a tiny difference : only eth0 was setup during boot ( bond0 and eth1 was not setup - volontary - to avoid problem that could interfere with usb ). Ony after having done my usb test, i have stopped the eth0, setup bond interface and restart bond interface and got the same problem with the same back trace. Is there anything i can do to get you more precise information ? - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [2/10] [REAL 2/10] pasemi_mac: Move the IRQ mapping from the PCI layer to the driver
Fixes for ethernet IRQ mapping, to be done in the driver instead of in the platform setup code. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/arch/powerpc/platforms/pasemi/pci.c === --- netdev-2.6.orig/arch/powerpc/platforms/pasemi/pci.c +++ netdev-2.6/arch/powerpc/platforms/pasemi/pci.c @@ -163,19 +163,6 @@ static void __init pas_fixup_phb_resourc } -void __devinit pas_pci_irq_fixup(struct pci_dev *dev) -{ - /* DMA is special, 84 interrupts (128 - 211), all but 128 -* need to be mapped by hand here. -*/ - if (dev-vendor == 0x1959 dev-device == 0xa007) { - int i; - for (i = 129; i 212; i++) - irq_create_mapping(NULL, i); - } -} - - void __init pas_pci_init(void) { struct device_node *np, *root; Index: netdev-2.6/arch/powerpc/platforms/pasemi/setup.c === --- netdev-2.6.orig/arch/powerpc/platforms/pasemi/setup.c +++ netdev-2.6/arch/powerpc/platforms/pasemi/setup.c @@ -240,5 +240,4 @@ define_machine(pas) { .check_legacy_ioport= pas_check_legacy_ioport, .progress = pas_progress, .machine_check_exception = pas_machine_check_handler, - .pci_irq_fixup = pas_pci_irq_fixup, }; Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -33,6 +33,8 @@ #include linux/tcp.h #include net/checksum.h +#include asm/irq.h + #include pasemi_mac.h @@ -531,6 +533,7 @@ static irqreturn_t pasemi_mac_tx_intr(in static int pasemi_mac_open(struct net_device *dev) { struct pasemi_mac *mac = netdev_priv(dev); + int base_irq; unsigned int flags; int ret; @@ -594,28 +597,37 @@ static int pasemi_mac_open(struct net_de netif_start_queue(dev); netif_poll_enable(dev); - ret = request_irq(mac-dma_pdev-irq + mac-dma_txch, - pasemi_mac_tx_intr, IRQF_DISABLED, + /* Interrupts are a bit different for our DMA controller: While +* it's got one a regular PCI device header, the interrupt there +* is really the base of the range it's using. Each tx and rx +* channel has it's own interrupt source. +*/ + + base_irq = virq_to_hw(mac-dma_pdev-irq); + + mac-tx_irq = irq_create_mapping(NULL, base_irq + mac-dma_txch); + mac-rx_irq = irq_create_mapping(NULL, base_irq + 20 + mac-dma_txch); + + ret = request_irq(mac-tx_irq, pasemi_mac_tx_intr, IRQF_DISABLED, mac-tx-irq_name, dev); if (ret) { dev_err(mac-pdev-dev, request_irq of irq %d failed: %d\n, - mac-dma_pdev-irq + mac-dma_txch, ret); + base_irq + mac-dma_txch, ret); goto out_tx_int; } - ret = request_irq(mac-dma_pdev-irq + 20 + mac-dma_rxch, - pasemi_mac_rx_intr, IRQF_DISABLED, + ret = request_irq(mac-rx_irq, pasemi_mac_rx_intr, IRQF_DISABLED, mac-rx-irq_name, dev); if (ret) { dev_err(mac-pdev-dev, request_irq of irq %d failed: %d\n, - mac-dma_pdev-irq + 20 + mac-dma_rxch, ret); + base_irq + 20 + mac-dma_rxch, ret); goto out_rx_int; } return 0; out_rx_int: - free_irq(mac-dma_pdev-irq + mac-dma_txch, dev); + free_irq(mac-tx_irq, dev); out_tx_int: netif_poll_disable(dev); netif_stop_queue(dev); @@ -699,8 +711,8 @@ static int pasemi_mac_close(struct net_d pci_write_config_dword(mac-dma_pdev, PAS_DMA_RXINT_RCMDSTA(mac-dma_if), 0); - free_irq(mac-dma_pdev-irq + mac-dma_txch, dev); - free_irq(mac-dma_pdev-irq + 20 + mac-dma_rxch, dev); + free_irq(mac-tx_irq, dev); + free_irq(mac-rx_irq, dev); /* Free resources */ pasemi_mac_free_rx_resources(dev); Index: netdev-2.6/drivers/net/pasemi_mac.h === --- netdev-2.6.orig/drivers/net/pasemi_mac.h +++ netdev-2.6/drivers/net/pasemi_mac.h @@ -73,6 +73,8 @@ struct pasemi_mac { struct pasemi_mac_txring *tx; struct pasemi_mac_rxring *rx; + unsigned long tx_irq; + unsigned long rx_irq; }; /* Software status descriptor (desc_info) */ - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v3] [7/10] pasemi_mac: Logic cleanup / rx performance improvements
Logic cleanup and some performance enhancements to the RX path. Signed-off-by: Olof Johansson [EMAIL PROTECTED] Index: netdev-2.6/drivers/net/pasemi_mac.c === --- netdev-2.6.orig/drivers/net/pasemi_mac.c +++ netdev-2.6/drivers/net/pasemi_mac.c @@ -305,19 +305,20 @@ static void pasemi_mac_replenish_rx_ring struct pasemi_mac *mac = netdev_priv(dev); unsigned int i; int start = mac-rx-next_to_fill; - unsigned int count; + unsigned int limit, count; - count = (mac-rx-next_to_clean + RX_RING_SIZE - + limit = (mac-rx-next_to_clean + RX_RING_SIZE - mac-rx-next_to_fill) (RX_RING_SIZE - 1); /* Check to see if we're doing first-time setup */ if (unlikely(mac-rx-next_to_clean == 0 mac-rx-next_to_fill == 0)) - count = RX_RING_SIZE; + limit = RX_RING_SIZE; - if (count = 0) + if (limit = 0) return; - for (i = start; i start + count; i++) { + i = start; + for (count = limit; count; count--) { struct pasemi_mac_buffer *info = RX_DESC_INFO(mac, i); u64 *buff = RX_BUFF(mac, i); struct sk_buff *skb; @@ -335,27 +336,27 @@ static void pasemi_mac_replenish_rx_ring dma = pci_map_single(mac-dma_pdev, skb-data, skb-len, PCI_DMA_FROMDEVICE); - if (dma_mapping_error(dma)) { + if (unlikely(dma_mapping_error(dma))) { dev_kfree_skb_irq(info-skb); - count = i - start; break; } info-skb = skb; info-dma = dma; *buff = XCT_RXB_LEN(BUF_SIZE) | XCT_RXB_ADDR(dma); + i++; } wmb(); pci_write_config_dword(mac-dma_pdev, PAS_DMA_RXCHAN_INCR(mac-dma_rxch), - count); + limit - count); pci_write_config_dword(mac-dma_pdev, PAS_DMA_RXINT_INCR(mac-dma_if), - count); + limit - count); - mac-rx-next_to_fill += count; + mac-rx-next_to_fill += limit - count; } static void pasemi_mac_restart_rx_intr(struct pasemi_mac *mac) @@ -393,32 +394,31 @@ static void pasemi_mac_restart_tx_intr(s } - static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit) { - unsigned int i; - int start, count; + unsigned int n; + int count; + struct pas_dma_xct_descr *dp; + struct pasemi_mac_buffer *info; + struct sk_buff *skb; + unsigned int i, len; + u64 macrx; + dma_addr_t dma; spin_lock(mac-rx-lock); - start = mac-rx-next_to_clean; - count = 0; + n = mac-rx-next_to_clean; - for (i = start; i (start + RX_RING_SIZE) count limit; i++) { - struct pas_dma_xct_descr *dp; - struct pasemi_mac_buffer *info; - struct sk_buff *skb; - unsigned int j, len; - dma_addr_t dma; + for (count = limit; count; count--) { rmb(); - dp = RX_DESC(mac, i); + dp = RX_DESC(mac, n); + macrx = dp-macrx; - if (!(dp-macrx XCT_MACRX_O)) + if (!(macrx XCT_MACRX_O)) break; - count++; info = NULL; @@ -430,22 +430,20 @@ static int pasemi_mac_clean_rx(struct pa */ dma = (dp-ptr XCT_PTR_ADDR_M); - for (j = start; j (start + RX_RING_SIZE); j++) { - info = RX_DESC_INFO(mac, j); + for (i = n; i (n + RX_RING_SIZE); i++) { + info = RX_DESC_INFO(mac, i); if (info-dma == dma) break; } - BUG_ON(!info); - BUG_ON(info-dma != dma); skb = info-skb; + info-dma = 0; - pci_unmap_single(mac-dma_pdev, info-dma, info-skb-len, + pci_unmap_single(mac-dma_pdev, dma, skb-len, PCI_DMA_FROMDEVICE); - info-dma = 0; + len = (macrx XCT_MACRX_LLEN_M) XCT_MACRX_LLEN_S; - len = (dp-macrx XCT_MACRX_LLEN_M) XCT_MACRX_LLEN_S; if (len 256) { struct sk_buff *new_skb = netdev_alloc_skb(mac-netdev, len + NET_IP_ALIGN); @@ -465,9 +463,9 @@ static int pasemi_mac_clean_rx(struct pa skb-protocol = eth_type_trans(skb, mac-netdev); - if ((dp-macrx XCT_MACRX_HTY_M) == XCT_MACRX_HTY_IPV4_OK) { + if ((macrx XCT_MACRX_HTY_M) ==
Re: [stable] 2.6.21 known regressions (v2) (for -stable team)
Greg KH [EMAIL PROTECTED] writes: Also, assignation of ttyUSB#'s is volatile depending on phase of the moon when booted. That's always been the case, ever since the 2.2 kernel releases. Please use udev if you want persistent device names for your tty USB devices. I don't know how udev (or anything) could help here. AFAIK the converters have no serial numbers and no other means to differentiate. -- Krzysztof Halasa - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1
On Sat, 28 Apr 2007 22:37:42 +0200 Vincent ETIENNE [EMAIL PROTECTED] wrote: Le Saturday 28 April 2007 00:32:37 Andrew Morton, vous avez écrit : On Fri, 27 Apr 2007 22:05:28 +0200 because we thought we'd fixed the rtnl_lock() problems in 2.6.21-rc7-mm2. Are you sure that log is from 2.6.21-rc7-mm2? Yes. I have retested it another time ( for adding the small usb debug message ) and get the same message a new time. Maybe a tiny difference : only eth0 was setup during boot ( bond0 and eth1 was not setup - volontary - to avoid problem that could interfere with usb ). Ony after having done my usb test, i have stopped the eth0, setup bond interface and restart bond interface and got the same problem with the same back trace. OK, thanks. Is there anything i can do to get you more precise information ? I guess if you could provide us with your .config and a step-by-step recipe which developers should use to reproduce the problem then we should be able to fix this pretty easily when someone finds the time to do so. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1
Andrew Morton wrote: On Sat, 28 Apr 2007 22:37:42 +0200 Vincent ETIENNE [EMAIL PROTECTED] wrote: because we thought we'd fixed the rtnl_lock() problems in 2.6.21-rc7-mm2. Are you sure that log is from 2.6.21-rc7-mm2? Yes. I have retested it another time ( for adding the small usb debug message ) and get the same message a new time. Maybe a tiny difference : only eth0 was setup during boot ( bond0 and eth1 was not setup - volontary - to avoid problem that could interfere with usb ). Ony after having done my usb test, i have stopped the eth0, setup bond interface and restart bond interface and got the same problem with the same back trace. OK, thanks. The failed RTNL assertion here is unrelated to the mutex initialization bug in 2.6.1-rc7-mm1. The bonding driver is not holding the rtnl_mutex while calling dev_set_mac_address (and can not since its called from a timer). I believe this is a known problem to the bonding maintainers. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PROBLEM] Bonding driver in linux-2.6.21-rc6-mm1
Le Saturday 28 April 2007 23:31:02 Andrew Morton, vous avez écrit : Is there anything i can do to get you more precise information ? I guess if you could provide us with your .config and a step-by-step recipe which developers should use to reproduce the problem then we should be able to fix this pretty easily when someone finds the time to do so. For the config, i have uploaded it to http://mail1.vetienne.net/linux/config-2.6.21-rc7-mm2. For reproducing the problem, it 's simple (for me at least) : - setup a bonding interface ( IP 192.168.1.5/255.255.255.0 so nothing fancy ) bond (mode 6 : alb ) on two NIC card (in my case E1000 and TG3 ). Don't know if it's important or not but the two cards are connected to the same cheap 100Mb switch ( So no gigabit ) - Reboot : when the bond interface went up ( after the two physical slaves ) the bug is triggered ( for the moment always, but i have only rebooted 2 or 3 times with 2.6.21-rc7-mm2 ). - You could also play with networks cable and put down/up one interface or another during normal work : it would often triggered the same trace ( not always although ). You don't need to have load on the network. The interface that went down or up doesn't seem to be important as far as i can see. - No lockup of the kernel, network still work fine after the problem - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] sis900: Allocate rx replacement buffer before rx operation
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index a6a0f09..7e44939 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c @@ -1754,6 +1754,7 @@ static int sis900_rx(struct net_device *net_dev) sis_priv-rx_ring[entry].cmdsts = RX_BUF_SIZE; } else { struct sk_buff * skb; +struct sk_buff * rx_skb; pci_unmap_single(sis_priv-pci_dev, sis_priv-rx_ring[entry].bufptr, RX_BUF_SIZE, @@ -1787,10 +1788,10 @@ static int sis900_rx(struct net_device *net_dev) } /* give the socket buffer to upper layers */ -skb = sis_priv-rx_skbuff[entry]; -skb_put(skb, rx_size); -skb-protocol = eth_type_trans(skb, net_dev); -netif_rx(skb); +rx_skb = sis_priv-rx_skbuff[entry]; +skb_put(rx_skb, rx_size); +skb-protocol = eth_type_trans(rx_skb, net_dev); applied this, and the one-line fix to this Thanks Jeff, sorry again for the headache. I'll be more careful in the future Neil - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [stable] 2.6.21 known regressions (v2) (for -stable team)
On Sat, Apr 28, 2007 at 11:21:54PM +0200, Krzysztof Halasa wrote: Greg KH [EMAIL PROTECTED] writes: Also, assignation of ttyUSB#'s is volatile depending on phase of the moon when booted. That's always been the case, ever since the 2.2 kernel releases. Please use udev if you want persistent device names for your tty USB devices. I don't know how udev (or anything) could help here. AFAIK the converters have no serial numbers and no other means to differentiate. Some do have serial numbers, and others do not. You can also use hints on which port they are plugged into, which is usually the best way to name these types of things persistently. thanks, greg k-h - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] Rename get_property to of_get_property: drivers/net
On Sat, 28 Apr 2007 11:30:38 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Sorry for your being a football here. That's OK. AFAICS, looking at the two patches, it seems clear they should go in via Paulus's tree. There are clear dependencies, and it is clearly arch-specific code. So can I take this as a future OK for architecture specific network drivers changes to go through the architecture trees (cc'd to you)? If anything, it sounds like I should drop a ucc_geth patch or two from my tree. Is that the case? No, my patches can wait (there are backward compatibility hacks in place) so once you have merged your changes with Linus (I am assuming it won't be to long), we will put these through Paulus' tree. (The ucc_geth stuff was a pain, but the real kicker (as far as I was concered) was the ehea changes - parts of that driver have been completely rewritten in your tree.) -- Cheers, Stephen Rothwell[EMAIL PROTECTED] http://www.canb.auug.org.au/~sfr/ pgpZkJvTxszQr.pgp Description: PGP signature
[PATCH] ibmtr_cs: fix hang on eject
Sent this patch a few weeks ago to the addresses listed for Token Ring maintainers. No response, and the linux-tr@ address bounced. Resent here in case someone wants to pick it up. Perhaps a MAINTAINERS edit might be in order also. - Paul Ejecting a PCMCIA IBM Token Ring card that has not had its dev-open() called will reliably trigger an uninitialized spinlock oops when spinlock debugging is enabled. The system then hangs, occasionally softlockup oopsing. Apparently ibmtr.c:tok_interrupt() doesn't expect to be called before tok_open(), but tok_interrupt() gets called anyway when the card is ejected. So, set an already-existing flag which causes tok_interrupt() to bail out early upon card ejection. Tested by inserting and removing the PCMCIA card several times. Patch against 2.6.21-rc6. Signed-off-by: Paul Walmsley [EMAIL PROTECTED] --- dev/drivers/net/pcmcia/ibmtr_cs.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) Index: linux/dev/drivers/net/pcmcia/ibmtr_cs.c === --- linux.orig/dev/drivers/net/pcmcia/ibmtr_cs.c +++ linux/dev/drivers/net/pcmcia/ibmtr_cs.c @@ -189,16 +189,20 @@ static void ibmtr_detach(struct pcmcia_d { struct ibmtr_dev_t *info = link-priv; struct net_device *dev = info-dev; +struct tok_info *ti = netdev_priv(dev); DEBUG(0, ibmtr_detach(0x%p)\n, link); + +/* + * When the card removal interrupt hits tok_interrupt(), + * bail out early, so we don't crash the machine + */ +ti-sram_phys |= 1; if (link-dev_node) unregister_netdev(dev); -{ - struct tok_info *ti = netdev_priv(dev); - del_timer_sync((ti-tr_timer)); -} +del_timer_sync((ti-tr_timer)); ibmtr_release(link); - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] Rename get_property to of_get_property: drivers/net
From: Stephen Rothwell [EMAIL PROTECTED] Date: Sun, 29 Apr 2007 11:44:46 +1000 So can I take this as a future OK for architecture specific network drivers changes to go through the architecture trees (cc'd to you)? It's been my experience that if I'm just working through some platform or bus specific API changes, people like Jeff tend to not mind if it goes via ARCH trees and the like. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] netpoll: remove CONFIG_NETPOLL_RX
From: Sergei Shtylyov [EMAIL PROTECTED] Date: Sat, 28 Apr 2007 22:52:36 +0400 On Saturday 28 April 2007 22:48, Sergei Shtylyov wrote: Get rid of the CONFIG_NETPOLL_RX option completely since all the dependencies have been removed long ago... Same here: Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED] Acked-by: Jeff Garzik [EMAIL PROTECTED] Acked-by: Matt Mackall [EMAIL PROTECTED] Applied, thanks. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [NET]: Get rid of NETIF_F_INTERNAL_STATS
From: Herbert Xu [EMAIL PROTECTED] Date: Sat, 28 Apr 2007 15:52:46 +1000 == Remove NETIF_F_INTERNAL_STATS: default to internal stats. Herbert Xu conviced me that a new flag was overkill; every driver currently overrides get_stats, so we might as well make the internal one the default. If someone did fail to set get_stats, they would now get all 0 stats instead of No statistics available. Signed-off-by: Rusty Russell [EMAIL PROTECTED] Looks good to me. Applied, thanks everyone. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Bugme-new] [Bug 8342] New: sctp_getsockopt_local_addrs_old() calls copy_to_user() while a spinlock is held
From: Vlad Yasevich [EMAIL PROTECTED] Date: Thu, 26 Apr 2007 09:22:11 -0400 Here is an updated patch. bytes_copied got turned into an int everywhere since that is what the new API expects, so it should be enough for the old api as well. This also makes the code more consistent. Applied, thanks Vlad. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH][XFRM] export SPD info
From: jamal [EMAIL PROTECTED] Date: Fri, 27 Apr 2007 10:29:28 -0400 On Fri, 2007-27-04 at 15:55 +0200, Patrick McHardy wrote: It it really worth the extra code for dumping them conditionally? The attributes are neither large nor will they be sent very often. That thought did cross my mind when i was coding this;- I hate the way netlink filters are done in user space with iproute2 - dumping 50 objects just so i can get to one. So i used that as my guiding principle; i have no qualms with the few extra lines. Actually, I was hoping it would provide motivation for someone else to do a better filtering scheme (which sits in the kernel). I think filtering in the kernel makes sense when the kernel is in a unique place to make the algorithmic complexity of the filtering minimal. The TCP socket dumping is a good example of that. For things like this I think it's really unnecessary. Figure out what the basic information is and just provide it every time. You have a full release cycle to work out what that is, and if we miss anything, afterwards we can still extend with attributes. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH][XFRM] export SPD info
From: jamal [EMAIL PROTECTED] Date: Fri, 27 Apr 2007 09:43:41 -0400 [XFRM] Export SPD info With this patch you can use iproute2 in user space to efficiently see how many policies exist in different directions. Signed-off-by: Jamal Hadi Salim [EMAIL PROTECTED] I've applied this. Please send me something relative when you decide how to handle the filtering situation as we've been discussing. Thanks. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [TCP]: Update references in two old comments
From: Gerrit Renker [EMAIL PROTECTED] Date: Fri, 27 Apr 2007 10:38:08 +0100 [TCP]: Update references in two old comments This updates references to drafts in comments which must be about 10 years old. Internet draft draft-ietf-tcpimpl-prob-03.txt expired in 1998 and was replaced by RFC 2525 in March 1999. Section 3.10 of the draft maps almost identically into section 2.17 of RFC 2525: both are entitled Failure to RST on close with data pending, the differences in text body amount to a typo and minor sentence change. Signed-off-by: Gerrit Renker [EMAIL PROTECTED] Applied, thanks. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [TIPC]: Changed msg_set_bits params type
From: Jon Paul Maloy [EMAIL PROTECTED] Date: Thu, 26 Apr 2007 19:50:42 -0400 David Miller wrote: Did you actually run sparse to see what warnings this change adds or deletes or are you submitting untested changes? I did, and I am aware that sparse shows several warnings for TIPC, which we will have to fix this asap, of course. The patched line did not show up in the warning list, which along with a full regression test made me conclude that we didn't introduce a problem, at least. I see now that it didn't cause a warning before the change either, so I was probably too quick to try to please people. You can can ignore the patch if you want to, but it is safe. Thanks for clarifying, but your email client corrupted the patch by mangling the whitespace and adding newlines to break up long lines. I feel like I write this to somebody every single day, but could you please email patches to yourself and test that they actually apply instead of wasting my time like this? - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: fix-slab-corruption-running-ip6sic.patch
From: Jarek Poplawski [EMAIL PROTECTED] Date: Fri, 27 Apr 2007 09:18:59 +0200 On Thu, Apr 26, 2007 at 02:11:33PM -0700, Andrew Morton wrote: I have this floating about in my tree. Is it of any interest? From: Jarek Poplawski [EMAIL PROTECTED] I know you've more interesting problems, but I'd like to straighten something: this is not my patch! Please, change this to: From: Eric Sesterhenn [EMAIL PROTECTED] Patch applied, thanks everyone. - To unsubscribe from this list: send the line unsubscribe netdev in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html