Re: kernel panic on 2.6.24 with esfq patch applied
Denys Fedoryshchenko wrote, On 02/01/2008 02:25 PM: Hi Probably bug related to ESFQ, now i will unload module and will test more. But probably not related, so if not difficult, please take a look. Hi, The main break seems to take place in HTB. Do you use HTB on IFB, BTW? If not, maybe some exemplary rules from your script? (There are quite a few modules loaded...) Thanks, Jarek P. -- 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] IPROUTE2: Add addrlabel subsystem.
YOSHIFUJI Hideaki / 吉藤英明 wrote, On 01/31/2008 08:57 PM: Signed-off-by: YOSHIFUJI Hideaki [EMAIL PROTECTED] --- include/linux/if_addrlabel.h | 32 + ip/Makefile |2 +- ip/ip.c |5 +- ip/ip_common.h |4 + ip/ipaddrlabel.c | 260 ++ ip/ipmonitor.c |4 + 6 files changed, 304 insertions(+), 3 deletions(-) diff --git a/include/linux/if_addrlabel.h b/include/linux/if_addrlabel.h new file mode 100644 index 000..9fe79c9 --- /dev/null +++ b/include/linux/if_addrlabel.h @@ -0,0 +1,32 @@ +/* + * if_addrlabel.h - netlink interface for address labels + * + * Copyright (C)2007 USAGI/WIDE Project, All Rights Reserved. + * Hi, Is this statement GPL compatible? And, maybe you could add a few words about this to man ip too? Regards, Jarek P. -- 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: Still oopsing in nf_nat_move_storage()
Chuck Ebbert wrote: On 01/31/2008 01:03 PM, Chuck Ebbert wrote: On 01/29/2008 12:18 PM, Patrick McHardy wrote: Chuck Ebbert wrote: nf_nat_move_storage(): /usr/src/debug/kernel-2.6.23/linux-2.6.23.i686/net/ipv4/netfilter/nf_nat_core.c:612 87: f7 47 64 80 01 00 00testl $0x180,0x64(%edi) 8e: 74 39 je c9 nf_nat_move_storage+0x65 line 612: if (!(ct-status IPS_NAT_DONE_MASK)) return; ct is NULL The current kernel (and 2.6.23-stable) have: if (!ct || !(ct-status IPS_NAT_DONE_MASK)) return; so it seems you're using an old version. So, it is now oopsing after the test for NULL and only x86_64 is catching the invalid address because it is non-canonical. Checking for NULL is obviously not enough... The addresses passed to -move seems to be bogus, we're doing: t-move(ct, ct-ext + ct-ext-offset[i]); without assigning the new ct-ext first, which is wrong for two reasons: - the new ext hasn't been assigned to the conntrack yet, so its moving within the same extension - ct-ext + ct-ext-offset[i] should be (void *)ct-ext + ... I'll fix it and send a patch after some testing. Still wondering why this wasn't noticed before. -- 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: kernel panic on 2.6.24 with esfq patch applied
Denys Fedoryshchenko wrote: Hi Probably bug related to ESFQ, now i will unload module and will test more. But probably not related, so if not difficult, please take a look. Feb 1 09:08:50 SERVER [12380.067104] BUG: unable to handle kernel NULL pointer dereference Feb 1 09:08:50 SERVER at virtual address 0008 Feb 1 09:08:50 SERVER [12380.067140] printing eip: c01f10ed Feb 1 09:08:50 SERVER *pde = Feb 1 09:08:50 SERVER Feb 1 09:08:50 SERVER [12380.067162] Oops: [#1] Feb 1 09:08:50 SERVER SMP Feb 1 09:08:50 SERVER Feb 1 09:08:50 SERVER [12380.067181] Modules linked in: Feb 1 09:08:50 SERVER netconsole Feb 1 09:08:50 SERVER configfs Feb 1 09:08:50 SERVER iTCO_wdt Feb 1 09:08:50 SERVER nf_nat_pptp Feb 1 09:08:50 SERVER nf_conntrack_pptp Feb 1 09:08:50 SERVER nf_conntrack_proto_gre Feb 1 09:08:50 SERVER nf_nat_proto_gre Feb 1 09:08:50 SERVER sch_esfq I'd rather you were using my recent patches to SFQ instead of ESFQ. I was able to crash a 2.6.24 user-mode Linux with ESFQ as well; I don't know if that's what you encountered, but the SFQ patches should be better anyway. http://fatooh.org/esfq-2.6/sfq-2.6.24.tar.bz2 http://fatooh.org/esfq-2.6/ -Corey -- 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: [PATCHv2 2.6.24] fib: fix route replacement, fib_info is shared
Hello, On Tue, 29 Jan 2008, Jarek Poplawski wrote: ...On the other hand, I wonder how bad would be switching these two to avoid this error? After all replace with this add or change meaning looks quite permissive, and after all it was used before with no such errors, so, even if correct, it could still break some scripts... Agreed, what could break are scripts that add 2 equal alternative routes and checking for errors. BTW, I tried to add more information and that is what I have finally: http://www.ssi.bg/~ja/fib.txt Regards -- Julian Anastasov [EMAIL PROTECTED] -- 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: Still oopsing in nf_nat_move_storage()
Chuck Ebbert wrote: On 01/31/2008 01:03 PM, Chuck Ebbert wrote: On 01/29/2008 12:18 PM, Patrick McHardy wrote: Chuck Ebbert wrote: nf_nat_move_storage(): /usr/src/debug/kernel-2.6.23/linux-2.6.23.i686/net/ipv4/netfilter/nf_nat_core.c:612 87: f7 47 64 80 01 00 00testl $0x180,0x64(%edi) 8e: 74 39 je c9 nf_nat_move_storage+0x65 line 612: if (!(ct-status IPS_NAT_DONE_MASK)) return; ct is NULL The current kernel (and 2.6.23-stable) have: if (!ct || !(ct-status IPS_NAT_DONE_MASK)) return; so it seems you're using an old version. So, it is now oopsing after the test for NULL and only x86_64 is catching the invalid address because it is non-canonical. Checking for NULL is obviously not enough... Could you try whether this patch fixes it please? commit 6953954cc566c19a84b7ca9647c16dabe4646c03 Author: Patrick McHardy [EMAIL PROTECTED] Date: Sat Feb 2 12:01:03 2008 +0100 [NETFILTER]: nf_conntrack: fix ct_extend -move operation The -move operation has two bugs: - It is called with the same extension as source and destination, so it doesn't update the new extension. - The address of the old extension is calculated incorrectly, instead of (void *)ct-ext + ct-ext-offset[i] it uses ct-ext + ct-ext-offset[i]. Should fix a crash on x86_64 reported by Chuck Ebbert [EMAIL PROTECTED] and Thomas Woerner [EMAIL PROTECTED]. Signed-off-by: Patrick McHardy [EMAIL PROTECTED] diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index 73b5711..49aac63 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h @@ -67,7 +67,7 @@ struct nf_ct_ext_type void (*destroy)(struct nf_conn *ct); /* Called when realloacted (can be NULL). Contents has already been moved. */ - void (*move)(struct nf_conn *ct, void *old); + void (*move)(void *new, void *old); enum nf_ct_ext_id id; diff --git a/net/ipv4/netfilter/nf_nat_core.c b/net/ipv4/netfilter/nf_nat_core.c index dd07362..0d5fa3a 100644 --- a/net/ipv4/netfilter/nf_nat_core.c +++ b/net/ipv4/netfilter/nf_nat_core.c @@ -600,10 +600,10 @@ static void nf_nat_cleanup_conntrack(struct nf_conn *ct) spin_unlock_bh(nf_nat_lock); } -static void nf_nat_move_storage(struct nf_conn *conntrack, void *old) +static void nf_nat_move_storage(void *new, void *old) { - struct nf_conn_nat *new_nat = nf_ct_ext_find(conntrack, NF_CT_EXT_NAT); - struct nf_conn_nat *old_nat = (struct nf_conn_nat *)old; + struct nf_conn_nat *new_nat = new; + struct nf_conn_nat *old_nat = old; struct nf_conn *ct = old_nat-ct; if (!ct || !(ct-status IPS_NAT_DONE_MASK)) diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c index cf6ba66..8b9be1e 100644 --- a/net/netfilter/nf_conntrack_extend.c +++ b/net/netfilter/nf_conntrack_extend.c @@ -109,7 +109,8 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) rcu_read_lock(); t = rcu_dereference(nf_ct_ext_types[i]); if (t t-move) - t-move(ct, ct-ext + ct-ext-offset[i]); + t-move((void *)new + new-offset[i], + (void *)ct-ext + ct-ext-offset[i]); rcu_read_unlock(); } kfree(ct-ext);
[PATCH] Unbreak sky2 on 88E8039 with current git
Hello, since I synced my tree to Linus's one two days ago, sky2's packet receiption dies almost instantly. Device still transmits packets, but no receive. Fortunately fix is simple, unfortunately I do not know why fix works... Commit f03b865491c2f30f2a4d77cdafc69c978ceb38a0 (sky2: align IP header on Rx if possible) stopped aligning receive buffers on devices which do not need HANG_CHECK. Unfortunately there is at least one device (mine, Yukon FE, rev 3) which is not happy if receive buffer is not aligned. I have no idea which other chips/revisions are affected as well. Without patch 'ping -f -b 192.168.101.255' RX count stops incrementing in less than 50 packets. With patch in place it can run like before, for hours... Box is an AMD rev F processor, with nVidia's MCP61 chipset. Petr gwy:/home/petr# lspci -vv -s 4:0.0 04:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8039 PCI-E Fast Ethernet Controller (rev 14) Subsystem: Elitegroup Computer Systems Unknown device 8039 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast TAbort- TAbort- MAbort- SERR- PERR- INTx- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 377 Region 0: Memory at fdcfc000 (64-bit, non-prefetchable) [size=16K] Region 2: I/O ports at 8c00 [size=256] Capabilities: [48] Power Management version 2 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=1 PME- Capabilities: [50] Vital Product Data ? Capabilities: [5c] Message Signalled Interrupts: Mask- 64bit+ Queue=0/1 Enable+ Address: fee0300c Data: 41c9 Capabilities: [e0] Express (v1) Legacy Endpoint, MSI 00 DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset- DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported- RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr+ UncorrErr+ FatalErr- UnsuppReq+ AuxPwr+ TransPend- LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s, Latency L0 256ns, L1 unlimited ClockPM- Suprise- LLActRep- BwNot- LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- Retrain- CommClk+ ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt- Capabilities: [100] Advanced Error Reporting ? Kernel driver in use: sky2 Kernel modules: sky2 Yukon FE, rev 3 needs receive buffers aligned, otherwise receiver hangs almost instantly. They were aligned before, so let's start aligning them again - a bit suboptimal networking is much better than no networking at all. Signed-off-by: Petr Vandrovec [EMAIL PROTECTED] diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1192,7 +1192,7 @@ static struct sk_buff *sky2_rx_alloc(struct sky2_port *sky2) struct sk_buff *skb; int i; - if (sky2-hw-flags SKY2_HW_FIFO_HANG_CHECK) { + if (sky2-hw-flags SKY2_HW_FIFO_RX_ALIGN) { unsigned char *start; /* * Workaround for a bug in FIFO that cause hang @@ -2718,7 +2718,7 @@ static int __devinit sky2_init(struct sky2_hw *hw) hw-flags = SKY2_HW_GIGABIT | SKY2_HW_NEWER_PHY; if (hw-chip_rev 3) - hw-flags |= SKY2_HW_FIFO_HANG_CHECK; + hw-flags |= SKY2_HW_FIFO_HANG_CHECK | SKY2_HW_FIFO_RX_ALIGN; break; @@ -2745,10 +2745,12 @@ static int __devinit sky2_init(struct sky2_hw *hw) dev_err(hw-pdev-dev, unsupported revision Yukon-EC rev A1\n); return -EOPNOTSUPP; } - hw-flags = SKY2_HW_GIGABIT | SKY2_HW_FIFO_HANG_CHECK; + hw-flags = SKY2_HW_GIGABIT | SKY2_HW_FIFO_HANG_CHECK | SKY2_HW_FIFO_RX_ALIGN; break; case CHIP_ID_YUKON_FE: + if (hw-chip_rev == 3) + hw-flags |= SKY2_HW_FIFO_RX_ALIGN; break; case CHIP_ID_YUKON_FE_P: diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h index 2bced1a..b5c1457 100644 --- a/drivers/net/sky2.h +++ b/drivers/net/sky2.h @@ -2049,6 +2049,7 @@ struct sky2_hw { #define SKY2_HW_NEW_LE 0x0020 /* new LSOv2 format */ #define SKY2_HW_AUTO_TX_SUM0x0040 /* new IP decode for Tx */ #define
[PATCH] NOTRACK only untracked
There are modification of NOTRACK netfilter target to avoid creating new connection entries for packets, unrelated to any existing connection. Best way to make new target (clone NOTRACK to NOTRACK-NEW and fix - to mix both), but I have enough motivation to this work ;) PS There are not same patch with [EMAIL PROTECTED] Verifyed and fixed. ( net-2.6.25) PPS Idea about u32 was bad. Sorry. -- WBR, Denis Kaganovich, [EMAIL PROTECTED] http://mahatma.bspu.unibel.by diff -pruN net-2.6.orig/net/netfilter/Kconfig net-2.6.fixed/net/netfilter/Kconfig --- net-2.6.orig/net/netfilter/Kconfig 2008-01-30 20:17:08.0 +0200 +++ net-2.6.fixed/net/netfilter/Kconfig 2008-02-02 14:37:22.0 +0200 @@ -375,6 +375,12 @@ config NETFILTER_XT_TARGET_NOTRACK If you want to compile it as a module, say M here and read file:Documentation/kbuild/modules.txt. If unsure, say `N'. +config NETFILTER_XT_TARGET_NOTRACK_NEW + bool NOTRACK safe (only new) + depends on NETFILTER_XT_TARGET_NOTRACK + help + Slow but safe way to NOTRACK only new/untracked connections. + config NETFILTER_XT_TARGET_RATEEST tristate 'RATEEST target support' depends on NETFILTER_XTABLES diff -pruN net-2.6.orig/net/netfilter/nf_conntrack_core.c net-2.6.fixed/net/netfilter/nf_conntrack_core.c --- net-2.6.orig/net/netfilter/nf_conntrack_core.c 2008-01-30 20:17:08.0 +0200 +++ net-2.6.fixed/net/netfilter/nf_conntrack_core.c 2008-02-02 14:22:53.0 +0200 @@ -587,6 +587,9 @@ resolve_normal_ct(struct sk_buff *skb, struct nf_conntrack_tuple tuple; struct nf_conntrack_tuple_hash *h; struct nf_conn *ct; +#ifdef CONFIG_NETFILTER_XT_TARGET_NOTRACK_NEW + struct nf_conntrack_expect *exp; +#endif if (!nf_ct_get_tuple(skb, skb_network_offset(skb), dataoff, l3num, protonum, tuple, l3proto, @@ -598,6 +601,17 @@ resolve_normal_ct(struct sk_buff *skb, /* look for tuple match */ h = nf_conntrack_find_get(tuple); if (!h) { +#ifdef CONFIG_NETFILTER_XT_TARGET_NOTRACK_NEW + if(skb-nfctinfo == IP_CT_NEW) { + exp = nf_ct_expect_find_get(tuple); + if(!exp){ + skb-nfct = nf_conntrack_untracked.ct_general; + nf_conntrack_get(skb-nfct); + return NULL; + } + nf_ct_expect_put(exp); + } +#endif h = init_conntrack(tuple, l3proto, l4proto, skb, dataoff); if (!h) return NULL; @@ -675,6 +689,12 @@ nf_conntrack_in(int pf, unsigned int hoo ct = resolve_normal_ct(skb, dataoff, pf, protonum, l3proto, l4proto, set_reply, ctinfo); if (!ct) { +#ifdef CONFIG_NETFILTER_XT_TARGET_NOTRACK_NEW + if(skb-nfct == nf_conntrack_untracked.ct_general){ + NF_CT_STAT_INC_ATOMIC(ignore); + return NF_ACCEPT; + } +#endif /* Not valid part of a connection */ NF_CT_STAT_INC_ATOMIC(invalid); return NF_ACCEPT; diff -pruN net-2.6.orig/net/netfilter/xt_NOTRACK.c net-2.6.fixed/net/netfilter/xt_NOTRACK.c --- net-2.6.orig/net/netfilter/xt_NOTRACK.c 2008-01-30 20:17:08.0 +0200 +++ net-2.6.fixed/net/netfilter/xt_NOTRACK.c2008-02-02 14:22:02.0 +0200 @@ -21,6 +21,9 @@ notrack_tg(struct sk_buff *skb, const st if (skb-nfct != NULL) return XT_CONTINUE; +#ifdef CONFIG_NETFILTER_XT_TARGET_NOTRACK_NEW + skb-nfctinfo = IP_CT_NEW; +#else /* Attach fake conntrack entry. If there is a real ct entry correspondig to this packet, it'll hang aroun till timing out. We don't deal with it @@ -28,6 +31,7 @@ notrack_tg(struct sk_buff *skb, const st skb-nfct = nf_conntrack_untracked.ct_general; skb-nfctinfo = IP_CT_NEW; nf_conntrack_get(skb-nfct); +#endif return XT_CONTINUE; }
Re: [PATCH] sis190: fix compile error section type conflict
Li Zefan [EMAIL PROTECTED] : Fix the following compile error: I am not sure that it is the right fix. Please read the archive of this week on l-k. I'll submit the patch below to Jeff once I have tested it with real hardware (sunday evening entertainment). Sam, is it ok to add your s-o-b to it ? Subject: [PATCH] sis190: fix section type conflict The driver already contains __devinitdata which is not const. Signed-off-by: Sam Ravnborg [EMAIL PROTECTED] Signed-off-by: Francois Romieu [EMAIL PROTECTED] Cc: Michael D. Setzer II [EMAIL PROTECTED] Cc: Gabriel C [EMAIL PROTECTED] Cc: Jonas Bonn [EMAIL PROTECTED] Cc: Jan Engelhardt [EMAIL PROTECTED] Cc: Li Zefan [EMAIL PROTECTED] --- drivers/net/sis190.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c index b570402..0a5e024 100644 --- a/drivers/net/sis190.c +++ b/drivers/net/sis190.c @@ -1556,7 +1556,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev, static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev, struct net_device *dev) { - static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 }; + static const u16 __devinitconst ids[] = { 0x0965, 0x0966, 0x0968 }; struct sis190_private *tp = netdev_priv(dev); struct pci_dev *isa_bridge; u8 reg, tmp8; -- 1.5.3.3 -- 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] sis190: fix compile error section type conflict
On Sat, Feb 02, 2008 at 03:34:58PM +0100, Francois Romieu wrote: Li Zefan [EMAIL PROTECTED] : Fix the following compile error: I am not sure that it is the right fix. Please read the archive of this week on l-k. I'll submit the patch below to Jeff once I have tested it with real hardware (sunday evening entertainment). Sam, is it ok to add your s-o-b to it ? No - a s-o-b document the path of the patch. And it will not hit Jeff via me. Although I know I said ths was to way to do it. But you can add my: Acked-by: Sam Ravnborg [EMAIL PROTECTED] If I posted the patch myself I do not remember - but then the s-o-b would be correct. Sam -- 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
FW: r8169 auto-negotiation problem
Hello I already posted my problem and what I did to solve it on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=461429 . In essence the 6.004.00-NAPI version from the Realtek site fixed it until now. My request is only that you try to get this version included in the kernel. _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/-- 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] [RFC] 3c509: convert to isa_driver and pnp_driver v2
Hello, this is second version of the patch. Autoloading using udev works fine with PnP card. Hibernation now works both in PnP and ISA modes. The I/O address used for non-pnp ISA card detection is now not released as it's needed to wake up the card. Manual irq and transceiver settings aren't implemented yet. Operation with multiple cards is not tested - I'll try 3 cards in both PnP and ISA modes. There is some code that is the same in each of the 4 probe functions (isa, pnp, eisa and mca), which should be probably separated into a function. I have no EISA or MCA machine so I hope that I didn't break them. --- linux-2.6.24-orig/drivers/net/3c509.c 2008-01-27 19:48:19.0 +0100 +++ linux-2.6.24-pentium/drivers/net/3c509.c2008-02-02 14:01:04.0 +0100 @@ -69,10 +69,9 @@ static int max_interrupt_work = 10; #include linux/module.h -#ifdef CONFIG_MCA #include linux/mca.h -#endif -#include linux/isapnp.h +#include linux/isa.h +#include linux/pnp.h #include linux/string.h #include linux/interrupt.h #include linux/errno.h @@ -97,20 +96,17 @@ static char version[] __initdata = DRV_NAME .c: DRV_VERSION DRV_RELDATE [EMAIL PROTECTED]; -#if defined(CONFIG_PM) (defined(CONFIG_MCA) || defined(CONFIG_EISA)) -#define EL3_SUSPEND -#endif - #ifdef EL3_DEBUG static int el3_debug = EL3_DEBUG; #else -static int el3_debug = 2; +static int el3_debug = 20; #endif /* Used to do a global count of all the cards in the system. Must be * a global variable so that the mca/eisa probe routines can increment * it */ static int el3_cards = 0; +#define EL3_MAX_CARDS 8 /* To minimize the size of the driver source I only define operating constants if they are used several times. You'll need the manual @@ -119,7 +115,7 @@ #define EL3_DATA 0x00 #define EL3_CMD 0x0e #define EL3_STATUS 0x0e -#define EEPROM_READ 0x80 +#defineEEPROM_READ 0x80 #define EL3_IO_EXTENT 16 @@ -170,7 +166,6 @@ struct el3_private { struct net_device_stats stats; - struct net_device *next_dev; spinlock_t lock; /* skb send-queue */ int head, size; @@ -179,12 +174,29 @@ EL3_MCA, EL3_PNP, EL3_EISA, + EL3_ISA, } type; /* type of device */ struct device *dev; }; -static int id_port __initdata = 0x110; /* Start with 0x110 to avoid new sound cards.*/ -static struct net_device *el3_root_dev; +static int id_port; +static struct net_device *el3_devs[EL3_MAX_CARDS]; +//static __be16 el3_phys_addr[EL3_MAX_CARDS][3]; + +static int isa_registered; +#ifdef CONFIG_PNP +static int pnp_registered; +static int nopnp; +#endif +#ifdef CONFIG_EISA +static int eisa_registered; +#endif +#ifdef CONFIG_MCA +static int mca_registered; +#endif + +static int __init el3_common_init(struct net_device *dev); +static void el3_common_remove (struct net_device *dev); static ushort id_read_eeprom(int index); static ushort read_eeprom(int ioaddr, int index); static int el3_open(struct net_device *dev); @@ -199,23 +211,301 @@ static void el3_down(struct net_device *dev); static void el3_up(struct net_device *dev); static const struct ethtool_ops ethtool_ops; -#ifdef EL3_SUSPEND +#ifdef CONFIG_PM static int el3_suspend(struct device *, pm_message_t); static int el3_resume(struct device *); -#else -#define el3_suspend NULL -#define el3_resume NULL #endif /* generic device remove for all device types */ -#if defined(CONFIG_EISA) || defined(CONFIG_MCA) static int el3_device_remove (struct device *device); -#endif #ifdef CONFIG_NET_POLL_CONTROLLER static void el3_poll_controller(struct net_device *dev); #endif +#ifdef CONFIG_ISA +static int __devinit el3_isa_match(struct device *pdev, + unsigned int ndev) +{ + struct net_device *dev; + struct el3_private *lp; + short lrs_state = 0xff, i; + int ioaddr, irq, if_port; + __be16 phys_addr[3]; + static int current_tag; + + if (!id_port) { + /* Select an open I/O location at 0x1*0 to do contention select. */ + /* Start with 0x110 to avoid new sound cards.*/ + for (id_port = 0x110 ; id_port 0x200; id_port += 0x10) { + if (!request_region(id_port, 1, 3c509-control)) + continue; + outb(0x00, id_port); + outb(0xff, id_port); + if (inb(id_port) 0x01) + break; + else + release_region(id_port, 1); + } + if (id_port = 0x200) { + id_port = 0; + printk( WARNING: No I/O port available for 3c509 activation.\n); + return 0; + } + } +again: + /* Next check for all ISA bus boards
Re: [PATCHv2 2.6.24] fib: fix route replacement, fib_info is shared
On Sat, Feb 02, 2008 at 12:56:08PM +0200, Julian Anastasov wrote: Hello, Hi! On Tue, 29 Jan 2008, Jarek Poplawski wrote: ...On the other hand, I wonder how bad would be switching these two to avoid this error? After all replace with this add or change meaning looks quite permissive, and after all it was used before with no such errors, so, even if correct, it could still break some scripts... Agreed, what could break are scripts that add 2 equal alternative routes and checking for errors. BTW, I would be glad if you could use this in some patch (unless you have no time - then let me know)... BTW, I tried to add more information and that is what I have finally: http://www.ssi.bg/~ja/fib.txt Great! But, I hope more people will know about this if you send it as a patch with a new thread. BTW#2: I've thought it maybe needs a bit of cosmetcs like more uniform TOS or tos and . or no . after paragraphs, or more consistent wrapping, but then I've exagerated with this for sure. Anyway, below are some suggestions, but feel free to skip them all! Thanks, Jarek P. --- fib.txt.orig2008-02-02 15:44:09.0 +0100 +++ fib.txt 2008-02-02 18:57:56.0 +0100 @@ -1,42 +1,55 @@ FIB - Forwarding Information Base -- Routes are organized in routing tables +- Routes are organized in routing tables. + - For fib_hash algorithm routing tables have 33 zones (for prefix -lengths 0..32), routing lookup walks them from 32 to 0 to find a -node containing all routing information -- Zones are implemented as hash tables where nodes are hashed by -key (prefix=network) because there can be lots of prefixes in a zone. +lengths 0..32), routing lookup walks them from 32 to 0 to find a node +containing all routing information. + +- Zones are implemented as hash tables where nodes are hashed by key +(prefix = network) because there can be lots of prefixes in a zone. + - Nodes can be stored with other methods, eg. trie, where nodes are -searched (we hope faster) by prefix and length, no zones are used -in this case -- Nodes have a list of aliases (tos+type+scope+fib_info ptr) sorted by -decreasing TOS because TOS=0 must be a last hit when looking for route, -TOS 0 matches packet with any TOS. type is unicast, local, prohibit, etc. -scope is host, link, etc. Additionally, aliases with same TOS are -sorted by fib_info priority (ascending). -- fib_info is a structure containing protocol (kernel, boot, zebra, etc), -prefsrc, priority (metric), metrics, nexthop(s). Fallback routes have -higher value for priority, they are used if more priority routes -disappear or their nexthops are dead. -- fib_info structures are organized in 2 global hash tables, one -keyed by prefsrc and another by nexthop_count+protocol+prefsrc+priority -- fib_info is a shared structure, different aliases can point to same -fib_info, even aliases from different prefixes, from different routing -tables. By this way if fib_info contains multipath route then many -aliases share same route path scheduling context. -- Nexthop contains gateway, output device, scope and weight. Weight +searched (we hope faster) by prefix and length; no zones are used in +this case. + +- Nodes have a list of aliases (tos + type + scope + fib_info ptr) +sorted by decreasing tos because tos = 0 must be the last hit when +looking for a route (tos = 0 matches packet with any tos); type is: +unicast, local, prohibit, etc.; scope is: host, link, etc. +Additionally, aliases with the same tos are sorted by fib_info +priority (ascending). + +- fib_info is a structure containing: protocol (kernel, boot, zebra, +etc.), prefsrc, priority (metric), metrics, nexthop(s). Fallback +routes have higher value for priority; they are used if routes with +more priority disappear or their nexthops are dead. + +- fib_info structures are organized in 2 global hash tables, one keyed +by prefsrc, and another by: nexthop_count + protocol + prefsrc + +priority. + +- fib_info structure is shared: different aliases can point at the +same fib_info, even aliases with different prefixes or from different +routing tables. This way if fib_info contains multipath route, then +many aliases share the same route path scheduling context. + +- Nexthop contains: gateway, output device, scope and weight; weight is used for path scheduling where nexthops have relative priority -compared to other nexthops in multipath route. -- There can be many aliases with same tos, there can be alternative -routes (aliases) with same tos and priority (metric) but only one alias -with particular tos, type, scope and fib_info can exist to avoid duplicate -alternative routes. -- The operation to replace route includes replacing of alias. The alias -in node (table - prefix/len) is matched by tos and fib_info priority and -they can not be changed. The parameters that are changed are type, scope -and fib_info (except priority). -- The 'ip' tool maps route operations to NLM_F_*
Re: linux-2.6.24 compile error in drivers/net/b44.c
Li Zefan wrote: Add CCs: CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Li Zefan wrote: drivers/net/b44.c: In function 'b44_remove_one': drivers/net/b44.c:2231: error: implicit declaration of function 'ssb_pcihost_set_power_state' make[2]: *** [drivers/net/b44.o] Error 1 make[1]: *** [drivers/net] Error 2 I think it is caused by: CONFIG_SSB_PCIHOST=n CONFIG_B44=y -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ This patch should fix b44 errors when 'SSB_PCIHOST' is not enabled. Signed-off-by: Miguel Botón [EMAIL PROTECTED] diff --git a/drivers/net/b44.c b/drivers/net/b44.c index ea2a2b5..d081234 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -2228,7 +2228,9 @@ static void __devexit b44_remove_one(struct ssb_device *sdev) unregister_netdev(dev); ssb_bus_may_powerdown(sdev-bus); free_netdev(dev); +#ifdef B44_PCI ssb_pcihost_set_power_state(sdev, PCI_D3hot); +#endif ssb_set_drvdata(sdev, NULL); } @@ -2257,7 +2259,9 @@ static int b44_suspend(struct ssb_device *sdev, pm_message_t state) b44_setup_wol(bp); } +#ifdef B44_PCI ssb_pcihost_set_power_state(sdev, PCI_D3hot); +#endif return 0; } -- Miguel Botó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] Unbreak sky2 on 88E8039 with current git
On Sat, 2 Feb 2008 11:52:43 +0100 Petr Vandrovec [EMAIL PROTECTED] wrote: Hello, since I synced my tree to Linus's one two days ago, sky2's packet receiption dies almost instantly. Device still transmits packets, but no receive. Fortunately fix is simple, unfortunately I do not know why fix works... Commit f03b865491c2f30f2a4d77cdafc69c978ceb38a0 (sky2: align IP header on Rx if possible) stopped aligning receive buffers on devices which do not need HANG_CHECK. Unfortunately there is at least one device (mine, Yukon FE, rev 3) which is not happy if receive buffer is not aligned. I have no idea which other chips/revisions are affected as well. Without patch 'ping -f -b 192.168.101.255' RX count stops incrementing in less than 50 packets. With patch in place it can run like before, for hours... Box is an AMD rev F processor, with nVidia's MCP61 chipset. Petr I don't have a Yukon FE, but I believe that the Yukon FE does have a ram buffer, so you HANG_CHECK should be enabled for that device. You can check by running: ethtool -d eth0 | grep 'Ram Buffer' With ram buffer (like XL, EC) # ethtool -d eth0 | grep 'Ram Buffer' Ram Buffer 0x18 No ram buffer (like EC-U, FE+, ...) # ethtool -d eth0 | grep 'Ram Buffer' Ram Buffer 0x00 -- Stephen Hemminger [EMAIL PROTECTED] -- 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] [RFC] 3c509: convert to isa_driver and pnp_driver v2
Ondrej Zary wrote: Hello, this is second version of the patch. Autoloading using udev works fine with PnP card. Hibernation now works both in PnP and ISA modes. The I/O address used for non-pnp ISA card detection is now not released as it's needed to wake up the card. Manual irq and transceiver settings aren't implemented yet. Operation with multiple cards is not tested - I'll try 3 cards in both PnP and ISA modes. There is some code that is the same in each of the 4 probe functions (isa, pnp, eisa and mca), which should be probably separated into a function. I have no EISA or MCA machine so I hope that I didn't break them. Looks pretty good at first glance... I'll throw it in my queue. Want to add a signed-off-by: ? 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] [RFC] 3c509: convert to isa_driver and pnp_driver v2
Hi, On Feb 2, 2008 8:25 PM, Ondrej Zary [EMAIL PROTECTED] wrote: +//static __be16 el3_phys_addr[EL3_MAX_CARDS][3]; [snip] +//#if defined(CONFIG_MCA) || defined(CONFIG_EISA) [snip] +// while (el3_probe(el3_cards) == 0) { +// if (irq[el3_cards] 1) +// el3_root_dev-irq = irq[el3_cards]; +// if (xcvr[el3_cards] = 0) +// el3_root_dev-if_port = xcvr[el3_cards]; +// el3_cards++; +// } You might want to consider dropping these hunks... -- 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] [RFC] 3c509: convert to isa_driver and pnp_driver v2
On Saturday 02 February 2008 21:50:25 Jeff Garzik wrote: Ondrej Zary wrote: Hello, this is second version of the patch. Autoloading using udev works fine with PnP card. Hibernation now works both in PnP and ISA modes. The I/O address used for non-pnp ISA card detection is now not released as it's needed to wake up the card. Manual irq and transceiver settings aren't implemented yet. Operation with multiple cards is not tested - I'll try 3 cards in both PnP and ISA modes. There is some code that is the same in each of the 4 probe functions (isa, pnp, eisa and mca), which should be probably separated into a function. I have no EISA or MCA machine so I hope that I didn't break them. Looks pretty good at first glance... I'll throw it in my queue. Want to add a signed-off-by: ? Jeff I think that the ISA resume will not work with more than 1 card. I'll fix that first and test with 3 cards. So the next version can include signed-off-by. I also wonder about the old el3_cleanup_module() function - it called el3_common_remove for all cards. With isa_driver and pnp_driver, it oopsed - I think that's because the remove() functions were called by driver core on isa_unregister_driver (and pnp_unregister_driver) - but what about MCA and EISA? -- Ondrej Zary -- 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 patch] net/phy/fixed.c: fix a use-after-free
This patch fixes a use-after-free introduced by commit a79d8e93d300adb8438ac396cfb118c238ad and spotted by the Coverity checker. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- 20c51455b2faed63c3026fd4d7139e5a6a917d31 diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 73b6d39..ca9b040 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c @@ -236,12 +236,12 @@ module_init(fixed_mdio_bus_init); static void __exit fixed_mdio_bus_exit(void) { struct fixed_mdio_bus *fmb = platform_fmb; - struct fixed_phy *fp; + struct fixed_phy *fp, *tmp; mdiobus_unregister(fmb-mii_bus); platform_device_unregister(pdev); - list_for_each_entry(fp, fmb-phys, node) { + list_for_each_entry_safe(fp, tmp, fmb-phys, node) { list_del(fp-node); kfree(fp); } -- 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
inet6_hash_connect() no longer uses secure_ipv6_port_ephemeral()
I do not claim to understand this code, but it doesn't seem to be intentional that after commit 5ee31fc1ecdcbc234c8c56dcacef87c8e09909d8 inet6_hash_connect() now uses secure_ipv4_port_ephemeral() instead of secure_ipv6_port_ephemeral() (inet6_sk_port_offset() is no longer used and __inet_hash_connect() uses secure_ipv4_port_ephemeral() through inet_sk_port_offset())? cu Adrian -- Is there not promise of rain? Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. Only a promise, Lao Er said. Pearl S. Buck - Dragon Seed -- 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 patch] xfrm4_beet_input(): fix an if()
A bug every C programmer makes at some point in time... Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- 3125760a05c6e97097882a810dc1c5342296aae9 diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index e093a7b..b47030b 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c @@ -102,7 +102,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) XFRM_MODE_SKB_CB(skb)-protocol = ph-nexthdr; - if (!pskb_may_pull(skb, phlen)); + if (!pskb_may_pull(skb, phlen)) goto out; __skb_pull(skb, phlen); } -- 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] [RFC] 3c509: convert to isa_driver and pnp_driver v2
On Saturday 02 February 2008 22:07:20 Pekka Enberg wrote: Hi, On Feb 2, 2008 8:25 PM, Ondrej Zary [EMAIL PROTECTED] wrote: +//static __be16 el3_phys_addr[EL3_MAX_CARDS][3]; [snip] +//#if defined(CONFIG_MCA) || defined(CONFIG_EISA) [snip] +// while (el3_probe(el3_cards) == 0) { +// if (irq[el3_cards] 1) +// el3_root_dev-irq = irq[el3_cards]; +// if (xcvr[el3_cards] = 0) +// el3_root_dev-if_port = xcvr[el3_cards]; +// el3_cards++; +// } You might want to consider dropping these hunks... Yes, they're going away. The last one is there just as a reminder that the irq and xcvr parameters should be used in the ISA code. -- Ondrej Zary -- 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] [XFRM] BEET: Remove extra semicolon after if
Once again, one of this kind tries to creep in. Signed-off-by: Ilpo Järvinen [EMAIL PROTECTED] --- net/ipv4/xfrm4_mode_beet.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c index e093a7b..b47030b 100644 --- a/net/ipv4/xfrm4_mode_beet.c +++ b/net/ipv4/xfrm4_mode_beet.c @@ -102,7 +102,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct sk_buff *skb) XFRM_MODE_SKB_CB(skb)-protocol = ph-nexthdr; - if (!pskb_may_pull(skb, phlen)); + if (!pskb_may_pull(skb, phlen)) goto out; __skb_pull(skb, phlen); } -- 1.5.2.2
Re: kernel panic on 2.6.24 with esfq patch applied
Corey Hickey wrote, On 02/02/2008 11:23 AM: ... I'd rather you were using my recent patches to SFQ instead of ESFQ. I was able to crash a 2.6.24 user-mode Linux with ESFQ as well; I don't know if that's what you encountered, but the SFQ patches should be better anyway. http://fatooh.org/esfq-2.6/sfq-2.6.24.tar.bz2 http://fatooh.org/esfq-2.6/ Hi Corey! I've just had a look at your site, and see you're a bit disappointed about the reception of your patches here. I don't use nor know about your work (maybe some time...), and wish you better public here, but maybe you'll find this story interesting: a few years ago, when I didn't even think of reading netdev, I quite often visited pages of such projects as HTB (not in every distro yet), IMQ or Julian Anastasov's. They were quite popular subjects on admins lists, and I really admired people around these projects, while the main kernel was something big and anonymous (no idea e.g. about D. Miller). For the same reason I knew more about people from iptables project - only because there was a need to visit this for some non standard modules, and about A. Kuznetsov - only because of patching iproute for HTB!!! (Only later I found that Alexey did more than needed for several such HTBs.) So, it seems there could be good side of such unofficial status too - if you only have something really useful for others... Cheers, Jarek P. -- 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 patch] xfrm4_beet_input(): fix an if()
On Sat, Feb 02, 2008 at 11:16:35PM +0200, Adrian Bunk wrote: A bug every C programmer makes at some point in time... Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Good catch! Acked-by: Herbert Xu [EMAIL PROTECTED] Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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] BEET: Remove extra semicolon after if
On Sat, Feb 02, 2008 at 11:53:29PM +0200, Ilpo Järvinen wrote: Once again, one of this kind tries to creep in. Signed-off-by: Ilpo Järvinen [EMAIL PROTECTED] Heh, Adrian got there first :) Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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: kernel panic on 2.6.24 with esfq patch applied
Jarek Poplawski wrote: Hi Corey! I've just had a look at your site, and see you're a bit disappointed about the reception of your patches here. I don't use nor know about your work (maybe some time...), and wish you better public here, but maybe you'll find this story interesting: a few years ago, when I didn't even think of reading netdev, I quite often visited pages of such projects as HTB (not in every distro yet), IMQ or Julian Anastasov's. They were quite popular subjects on admins lists, and I really admired people around these projects, while the main kernel was something big and anonymous (no idea e.g. about D. Miller). For the same reason I knew more about people from iptables project - only because there was a need to visit this for some non standard modules, and about A. Kuznetsov - only because of patching iproute for HTB!!! (Only later I found that Alexey did more than needed for several such HTBs.) So, it seems there could be good side of such unofficial status too - if you only have something really useful for others... Thank you for the words of encouragement, but don't worry: I'm not going to run away and hide just yet. :) I was a bit discouraged about not getting reviews for the more recent patch submissions, though, and I hope I don't come across as bitter about that. Patch review is a lot of work, and I definitely appreciate the comments I received earlier--I was able to make many improvements as a result. In any case, kernel development progresses, and I now have to update my patches so they can apply to current git. The ball has rolled back into my court of its own accord; perhaps the playing field isn't level. ;) -Corey -- 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] Disable TSO for non standard qdiscs
Andi Kleen [EMAIL PROTECTED] wrote: Then change TBF to use skb_gso_segment? Be careful, the fact that That doesn't help because it wants to interleave packets from different streams to get everything fair and smooth. The only good way to handle that is to split it up and the simplest way to do this is to just tell TCP to not do GSO in the first place. Actually if we're going to do this I'd prefer you to call skb_gso_segment instead because that lets us at least bypass netfilter which is one of the key benefits of software GSO. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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] Disable TSO for non standard qdiscs
Andi Kleen [EMAIL PROTECTED] wrote: Hmm, that would probably be possible for TBF, but I'm not sure this can be really done in a useful way for the more complicated qdiscs. Especially since they would likely need to turn on/off GSO regularly when dynamic circumstances change and there is not really a good way to affect a socket after it was created. You don't need to change the socket if you just call skb_gso_segment when necessary. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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_SCHED 00/04]: External SFQ classifiers/flow classifier
Patrick McHardy wrote: These patches add support for external classifiers to SFQ and add a new flow classifier, which can do hashing based on user-specified keys or deterministic mapping of keys to classes. Additionally there is a patch to make the SFQ queues visisble as classes to verify that the hash is indeed doing something useful and a patch to consifiy struct tcf_ext_map, which I had queued in the same tree. Excellent! I'm glad this is applied. I'm having trouble figuring out how it works, though. As a test, I'm trying to set up SFQ equivalent to ESFQ's hash dst. Here's what I do, and this is what I get: # ./tc qdisc add dev eth0 root handle 1: sfq # ./tc filter add dev eth0 parent 1: flow hash keys dst RTNETLINK answers: Invalid argument We have an error talking to the kernel I've tried a few different keys with the same results. I don't know what I'm doing wrong, or even where to start figuring it out. Can you point me in the right direction? Here are some details that may be pertinent: - current net-2.6 git (I double-checked) - CONFIG_NET_CLS_FLOW=y - current iproute2 git - running on amd64 user-mode Linux Thanks, Corey -- 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: xfrm_input() and -seq oddities
On Sat, Feb 02, 2008 at 11:58:27PM +, Al Viro wrote: What's going on with XFRM_SKB_CB(skb)-seq? Almost all users expect it to be u32 (feeding it to htonl()), except xfrm_input(). That one expects __be32 in there - check what it does to seq and you'll see. Moreover, it updates the sucker in a way that makes sense only for __be32. My bad. a) are we just missing ntohl() and htonl() in obvious places in xfrm_input()? It's semantically correct. However, my mistake that I'm mixing the input sequence number which is network endian with the output sequence number which is host endian (and 64-bit). b) WTF is it declared as 64bit, anyway? For extended sequence numbers which we'll support soon (I hope). [IPSEC]: Fix bogus usage of u64 on input sequence number Al Viro spotted a bogus use of u64 on the input sequence number which is big-endian. This patch fixes it by giving the input sequence number its own member in the xfrm_skb_cb structure. Signed-off-by: Herbert Xu [EMAIL PROTECTED] Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- diff --git a/include/net/xfrm.h b/include/net/xfrm.h index ac72116..eea7785 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -508,7 +508,10 @@ struct xfrm_skb_cb { } header; /* Sequence number for replay protection. */ -u64 seq; + union { + u64 output; + __be32 input; + } seq; }; #define XFRM_SKB_CB(__skb) ((struct xfrm_skb_cb *)((__skb)-cb[0])) diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index 9d4555e..8219b7e 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c @@ -96,7 +96,7 @@ static int ah_output(struct xfrm_state *x, struct sk_buff *skb) ah-reserved = 0; ah-spi = x-id.spi; - ah-seq_no = htonl(XFRM_SKB_CB(skb)-seq); + ah-seq_no = htonl(XFRM_SKB_CB(skb)-seq.output); spin_lock_bh(x-lock); err = ah_mac_digest(ahp, skb, ah-auth_data); diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 258d176..091e670 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -199,7 +199,7 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) } esph-spi = x-id.spi; - esph-seq_no = htonl(XFRM_SKB_CB(skb)-seq); + esph-seq_no = htonl(XFRM_SKB_CB(skb)-seq.output); sg_init_table(sg, nfrags); skb_to_sgvec(skb, sg, @@ -210,7 +210,8 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb) aead_givcrypt_set_callback(req, 0, esp_output_done, skb); aead_givcrypt_set_crypt(req, sg, sg, clen, iv); aead_givcrypt_set_assoc(req, asg, sizeof(*esph)); - aead_givcrypt_set_giv(req, esph-enc_data, XFRM_SKB_CB(skb)-seq); + aead_givcrypt_set_giv(req, esph-enc_data, + XFRM_SKB_CB(skb)-seq.output); ESP_SKB_CB(skb)-tmp = tmp; err = crypto_aead_givencrypt(req); diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 379c8e0..2ff0c82 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c @@ -283,7 +283,7 @@ static int ah6_output(struct xfrm_state *x, struct sk_buff *skb) ah-reserved = 0; ah-spi = x-id.spi; - ah-seq_no = htonl(XFRM_SKB_CB(skb)-seq); + ah-seq_no = htonl(XFRM_SKB_CB(skb)-seq.output); spin_lock_bh(x-lock); err = ah_mac_digest(ahp, skb, ah-auth_data); diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 8e0f142..0ec1402 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -188,7 +188,7 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb) *skb_mac_header(skb) = IPPROTO_ESP; esph-spi = x-id.spi; - esph-seq_no = htonl(XFRM_SKB_CB(skb)-seq); + esph-seq_no = htonl(XFRM_SKB_CB(skb)-seq.output); sg_init_table(sg, nfrags); skb_to_sgvec(skb, sg, @@ -199,7 +199,8 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb) aead_givcrypt_set_callback(req, 0, esp_output_done, skb); aead_givcrypt_set_crypt(req, sg, sg, clen, iv); aead_givcrypt_set_assoc(req, asg, sizeof(*esph)); - aead_givcrypt_set_giv(req, esph-enc_data, XFRM_SKB_CB(skb)-seq); + aead_givcrypt_set_giv(req, esph-enc_data, + XFRM_SKB_CB(skb)-seq.output); ESP_SKB_CB(skb)-tmp = tmp; err = crypto_aead_givencrypt(req); diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c index 4d6ebc6..62188c6 100644 --- a/net/xfrm/xfrm_input.c +++ b/net/xfrm/xfrm_input.c @@ -109,7 +109,7 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type) if (encap_type 0) { async = 1; x = xfrm_input_state(skb); - seq = XFRM_SKB_CB(skb)-seq; + seq = XFRM_SKB_CB(skb)-seq.input; goto resume; } @@ -175,7 +175,7
Re: xfrm_input() and -seq oddities
On Sun, Feb 03, 2008 at 11:20:19AM +1100, Herbert Xu wrote: Al Viro spotted a bogus use of u64 on the input sequence number which is big-endian. This patch fixes it by giving the input sequence number its own member in the xfrm_skb_cb structure. This is still very odd... Where do you initialize -seq.input? What guarantees that async call of xfrm_input() will be always preceded by at least one non-async one? -- 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] Unbreak sky2 on 88E8039 with current git
Stephen Hemminger wrote: On Sat, 2 Feb 2008 11:52:43 +0100 Petr Vandrovec [EMAIL PROTECTED] wrote: Hello, since I synced my tree to Linus's one two days ago, sky2's packet receiption dies almost instantly. Device still transmits packets, but no receive. Fortunately fix is simple, unfortunately I do not know why fix works... Commit f03b865491c2f30f2a4d77cdafc69c978ceb38a0 (sky2: align IP header on Rx if possible) stopped aligning receive buffers on devices which do not need HANG_CHECK. Unfortunately there is at least one device (mine, Yukon FE, rev 3) which is not happy if receive buffer is not aligned. I have no idea which other chips/revisions are affected as well. Without patch 'ping -f -b 192.168.101.255' RX count stops incrementing in less than 50 packets. With patch in place it can run like before, for hours... Box is an AMD rev F processor, with nVidia's MCP61 chipset. Petr I don't have a Yukon FE, but I believe that the Yukon FE does have a ram buffer, so you HANG_CHECK should be enabled for that device. You can check by running: ethtool -d eth0 | grep 'Ram Buffer' With ram buffer (like XL, EC) # ethtool -d eth0 | grep 'Ram Buffer' Ram Buffer 0x18 No ram buffer (like EC-U, FE+, ...) # ethtool -d eth0 | grep 'Ram Buffer' Ram Buffer 0x00 Some small one (if it is size): gwy:~# ethtool -d eth0 | grep 'Ram' Ram Buffer 0x01 I've never observed hang on that device, and I have it for over year. I stress it sufficiently to kill EC rev 2 I have in the notebook when I copy some data between these two boxes, but this FE never hung. Petr -- 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
latest git compile error in net/sched/cls_flow.c
I made a randconfig, and got the following error: net/sched/cls_flow.c: In function 'flow_dump': net/sched/cls_flow.c:598: error: 'struct tcf_ematch_tree' has no member named 'hdr' make[2]: *** [net/sched/cls_flow.o] Error 1 make[1]: *** [net/sched] Error 2 make: *** [net] Error 2 seems it's caused by the following config options: CONFIG_NET_EMATCH=n CONFIG_NET_CLS_FLOW=y -- 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 03/10] atl1: fix broken TSO
The L1 tx packet descriptor expects TCP Header Length to be expressed as a number of 32-bit dwords. The atl1 driver uses tcp_hdrlen() to populate the field, but tcp_hdrlen() returns the header length in bytes, not in dwords. Add a shift to convert tcp_hdrlen() to dwords when we write it to the tpd. Also, some of our bit assignments are made to the wrong tpd words. Change those to the correct words. Finally, since all this fixes TSO, enable TSO by default. Signed-off-by: Jay Cliburn [EMAIL PROTECTED] Acked-by: Chris Snook [EMAIL PROTECTED] --- drivers/net/atlx/atl1.c | 29 +++-- 1 files changed, 11 insertions(+), 18 deletions(-) diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index a84c97c..8a26dad 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -36,7 +36,6 @@ * A very incomplete list of things that need to be dealt with: * * TODO: - * Fix TSO; tx performance is horrible with TSO enabled. * Wake on LAN. * Add more ethtool functions. * Fix abstruse irq enable/disable condition described here: @@ -1308,8 +1307,8 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, tso-tsopl |= 1 TSO_PARAM_ETHTYPE_SHIFT; tso-tsopl |= (iph-ihl - CSUM_PARAM_IPHL_MASK) CSUM_PARAM_IPHL_SHIFT; - tso-tsopl |= (tcp_hdrlen(skb) + TSO_PARAM_IPHL_MASK) TSO_PARAM_IPHL_SHIFT; + tso-tsopl |= ((tcp_hdrlen(skb) 2) TSO_PARAM_TCPHDRLEN_MASK) TSO_PARAM_TCPHDRLEN_SHIFT; tso-tsopl |= (skb_shinfo(skb)-gso_size @@ -1472,8 +1471,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, int count, tpd-desc.tso.tsopl = descr-tso.tsopl; tpd-buffer_addr = cpu_to_le64(buffer_info-dma); tpd-desc.data = descr-data; - tpd-desc.csum.csumpu |= (cpu_to_le16(buffer_info-length) - CSUM_PARAM_BUFLEN_MASK) CSUM_PARAM_BUFLEN_SHIFT; + tpd-desc.tso.tsopu |= (cpu_to_le16(buffer_info-length) + TSO_PARAM_BUFLEN_MASK) TSO_PARAM_BUFLEN_SHIFT; val = (descr-tso.tsopl TSO_PARAM_SEGMENT_SHIFT) TSO_PARAM_SEGMENT_MASK; @@ -1481,7 +1480,7 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, int count, tpd-desc.tso.tsopl |= 1 TSO_PARAM_HDRFLAG_SHIFT; if (j == (count - 1)) - tpd-desc.csum.csumpl |= 1 CSUM_PARAM_EOP_SHIFT; + tpd-desc.tso.tsopl |= 1 TSO_PARAM_EOP_SHIFT; if (++tpd_next_to_use == tpd_ring-count) tpd_next_to_use = 0; @@ -1574,9 +1573,9 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) vlan_tag = vlan_tx_tag_get(skb); vlan_tag = (vlan_tag 4) | (vlan_tag 13) | ((vlan_tag 9) 0x8); - param.csum.csumpl |= 1 CSUM_PARAM_INSVLAG_SHIFT; - param.csum.csumpu |= (vlan_tag CSUM_PARAM_VALANTAG_MASK) - CSUM_PARAM_VALAN_SHIFT; + param.tso.tsopl |= 1 TSO_PARAM_INSVLAG_SHIFT; + param.tso.tsopu |= (vlan_tag TSO_PARAM_VLANTAG_MASK) + TSO_PARAM_VLAN_SHIFT; } tso = atl1_tso(adapter, skb, param.tso); @@ -1595,8 +1594,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) } } - val = (param.csum.csumpl CSUM_PARAM_SEGMENT_SHIFT) - CSUM_PARAM_SEGMENT_MASK; + val = (param.tso.tsopl TSO_PARAM_SEGMENT_SHIFT) + TSO_PARAM_SEGMENT_MASK; atl1_tx_map(adapter, skb, 1 == val); atl1_tx_queue(adapter, count, param); netdev-trans_start = jiffies; @@ -2091,13 +2090,7 @@ static int __devinit atl1_probe(struct pci_dev *pdev, netdev-features = NETIF_F_HW_CSUM; netdev-features |= NETIF_F_SG; netdev-features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); - - /* -* FIXME - Until tso performance gets fixed, disable the feature. -* Enable it with ethtool -K if desired. -*/ - /* netdev-features |= NETIF_F_TSO; */ - + netdev-features |= NETIF_F_TSO; netdev-features |= NETIF_F_LLTX; /* -- 1.5.3.8 -- 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 04/10] atl1: add ethtool register dump
Add the ethtool register dump option to the atl1 driver. Signed-off-by: Jay Cliburn [EMAIL PROTECTED] Acked-by: Chris Snook [EMAIL PROTECTED] --- drivers/net/atlx/atl1.c | 53 +++ drivers/net/atlx/atl1.h |1 + 2 files changed, 54 insertions(+), 0 deletions(-) diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 8a26dad..1f564f0 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -2513,6 +2513,57 @@ static int atl1_set_wol(struct net_device *netdev, return 0; } +static int atl1_get_regs_len(struct net_device *netdev) +{ + return ATL1_REG_COUNT * sizeof(u32); +} + +static void atl1_get_regs(struct net_device *netdev, struct ethtool_regs *regs, + void *p) +{ + struct atl1_adapter *adapter = netdev_priv(netdev); + struct atl1_hw *hw = adapter-hw; + unsigned int i; + u32 *regbuf = p; + + for (i = 0; i ATL1_REG_COUNT; i++) { + /* +* This switch statement avoids reserved regions +* of register space. +*/ + switch (i) { + case 6 ... 9: + case 14: + case 29 ... 31: + case 34 ... 63: + case 75 ... 127: + case 136 ... 1023: + case 1027 ... 1087: + case 1091 ... 1151: + case 1194 ... 1195: + case 1200 ... 1201: + case 1206 ... 1213: + case 1216 ... 1279: + case 1290 ... 1311: + case 1323 ... 1343: + case 1358 ... 1359: + case 1368 ... 1375: + case 1378 ... 1383: + case 1388 ... 1391: + case 1393 ... 1395: + case 1402 ... 1403: + case 1410 ... 1471: + case 1522 ... 1535: + /* reserved region; don't read it */ + regbuf[i] = 0; + break; + default: + /* unreserved region */ + regbuf[i] = ioread32(hw-hw_addr + (i * sizeof(u32))); + } + } +} + static void atl1_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring) { @@ -2703,6 +2754,8 @@ const struct ethtool_ops atl1_ethtool_ops = { .get_drvinfo= atl1_get_drvinfo, .get_wol= atl1_get_wol, .set_wol= atl1_set_wol, + .get_regs_len = atl1_get_regs_len, + .get_regs = atl1_get_regs, .get_ringparam = atl1_get_ringparam, .set_ringparam = atl1_set_ringparam, .get_pauseparam = atl1_get_pauseparam, diff --git a/drivers/net/atlx/atl1.h b/drivers/net/atlx/atl1.h index 538948d..30c5a8d 100644 --- a/drivers/net/atlx/atl1.h +++ b/drivers/net/atlx/atl1.h @@ -584,6 +584,7 @@ enum atl1_dma_req_block { #define ATL1_DEFAULT_RFD 512 #define ATL1_MIN_RFD 128 #define ATL1_MAX_RFD 2048 +#define ATL1_REG_COUNT 1538 #define ATL1_GET_DESC(R, i, type) type *)((R)-desc))[i])) #define ATL1_RFD_DESC(R, i)ATL1_GET_DESC(R, i, struct rx_free_desc) -- 1.5.3.8 -- 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 01/10] atl1: relocate atl1 driver to /drivers/net/atlx
In preparation for a future Atheros L2 NIC driver (called atl2), relocate the atl1 driver into a new /drivers/net/atlx directory that will ultimately be shared with the future atl2 driver. Signed-off-by: Chris Snook [EMAIL PROTECTED] Signed-off-by: Jay Cliburn [EMAIL PROTECTED] --- drivers/net/Makefile |2 +- drivers/net/{atl1 = atlx}/Makefile |0 drivers/net/{atl1 = atlx}/atl1.h |0 drivers/net/{atl1 = atlx}/atl1_ethtool.c |0 drivers/net/{atl1 = atlx}/atl1_hw.c |0 drivers/net/{atl1 = atlx}/atl1_hw.h |0 drivers/net/{atl1 = atlx}/atl1_main.c|0 drivers/net/{atl1 = atlx}/atl1_param.c |0 8 files changed, 1 insertions(+), 1 deletions(-) rename drivers/net/{atl1 = atlx}/Makefile (100%) rename drivers/net/{atl1 = atlx}/atl1.h (100%) rename drivers/net/{atl1 = atlx}/atl1_ethtool.c (100%) rename drivers/net/{atl1 = atlx}/atl1_hw.c (100%) rename drivers/net/{atl1 = atlx}/atl1_hw.h (100%) rename drivers/net/{atl1 = atlx}/atl1_main.c (100%) rename drivers/net/{atl1 = atlx}/atl1_param.c (100%) diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 9fc7794..ae11d5e 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -15,7 +15,7 @@ obj-$(CONFIG_CHELSIO_T3) += cxgb3/ obj-$(CONFIG_EHEA) += ehea/ obj-$(CONFIG_CAN) += can/ obj-$(CONFIG_BONDING) += bonding/ -obj-$(CONFIG_ATL1) += atl1/ +obj-$(CONFIG_ATL1) += atlx/ obj-$(CONFIG_GIANFAR) += gianfar_driver.o obj-$(CONFIG_TEHUTI) += tehuti.o diff --git a/drivers/net/atl1/Makefile b/drivers/net/atlx/Makefile similarity index 100% rename from drivers/net/atl1/Makefile rename to drivers/net/atlx/Makefile diff --git a/drivers/net/atl1/atl1.h b/drivers/net/atlx/atl1.h similarity index 100% rename from drivers/net/atl1/atl1.h rename to drivers/net/atlx/atl1.h diff --git a/drivers/net/atl1/atl1_ethtool.c b/drivers/net/atlx/atl1_ethtool.c similarity index 100% rename from drivers/net/atl1/atl1_ethtool.c rename to drivers/net/atlx/atl1_ethtool.c diff --git a/drivers/net/atl1/atl1_hw.c b/drivers/net/atlx/atl1_hw.c similarity index 100% rename from drivers/net/atl1/atl1_hw.c rename to drivers/net/atlx/atl1_hw.c diff --git a/drivers/net/atl1/atl1_hw.h b/drivers/net/atlx/atl1_hw.h similarity index 100% rename from drivers/net/atl1/atl1_hw.h rename to drivers/net/atlx/atl1_hw.h diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atlx/atl1_main.c similarity index 100% rename from drivers/net/atl1/atl1_main.c rename to drivers/net/atlx/atl1_main.c diff --git a/drivers/net/atl1/atl1_param.c b/drivers/net/atlx/atl1_param.c similarity index 100% rename from drivers/net/atl1/atl1_param.c rename to drivers/net/atlx/atl1_param.c -- 1.5.3.8 -- 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 05/10] atl1: simplify tx packet descriptor
The transmit packet descriptor consists of four 32-bit words, with word 3 upper bits overloaded depending upon the condition of its bits 3 and 4. The driver currently duplicates all word 2 and some word 3 register bit definitions unnecessarily and also uses a set of nested structures in its definition of the TPD without good cause. This patch adds a lengthy comment describing the TPD, eliminates duplicate TPD bit definitions, and simplifies the TPD structure itself. It also expands the TSO check to correctly handle custom checksum versus TSO processing using the revised TPD definitions. Finally, shorten some variable names in the transmit processing path to reduce line lengths, rename some variables to better describe their purpose (e.g., nseg versus m), and add a comment or two to better describe what the code is doing. Signed-off-by: Jay Cliburn [EMAIL PROTECTED] Acked-by: Chris Snook [EMAIL PROTECTED] --- drivers/net/atlx/atl1.c | 265 +-- drivers/net/atlx/atl1.h | 201 +++- 2 files changed, 246 insertions(+), 220 deletions(-) diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 1f564f0..f4add3c 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -1259,8 +1259,6 @@ static void atl1_intr_tx(struct atl1_adapter *adapter) dev_kfree_skb_irq(buffer_info-skb); buffer_info-skb = NULL; } - tpd-buffer_addr = 0; - tpd-desc.data = 0; if (++sw_tpd_next_to_clean == tpd_ring-count) sw_tpd_next_to_clean = 0; @@ -1282,48 +1280,69 @@ static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring) } static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, -struct tso_param *tso) + struct tx_packet_desc *ptpd) { - /* We enter this function holding a spinlock. */ - u8 ipofst; + /* spinlock held */ + u8 hdr_len, ip_off; + u32 real_len; int err; if (skb_shinfo(skb)-gso_size) { if (skb_header_cloned(skb)) { err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); if (unlikely(err)) - return err; + return -1; } if (skb-protocol == ntohs(ETH_P_IP)) { struct iphdr *iph = ip_hdr(skb); - iph-tot_len = 0; + real_len = (((unsigned char *)iph - skb-data) + + ntohs(iph-tot_len)); + if (real_len skb-len) + pskb_trim(skb, real_len); + hdr_len = (skb_transport_offset(skb) + tcp_hdrlen(skb)); + if (skb-len == hdr_len) { + iph-check = 0; + tcp_hdr(skb)-check = + ~csum_tcpudp_magic(iph-saddr, + iph-daddr, tcp_hdrlen(skb), + IPPROTO_TCP, 0); + ptpd-word3 |= (iph-ihl TPD_IPHL_MASK) + TPD_IPHL_SHIFT; + ptpd-word3 |= ((tcp_hdrlen(skb) 2) + TPD_TCPHDRLEN_MASK) + TPD_TCPHDRLEN_SHIFT; + ptpd-word3 |= 1 TPD_IP_CSUM_SHIFT; + ptpd-word3 |= 1 TPD_TCP_CSUM_SHIFT; + return 1; + } + iph-check = 0; tcp_hdr(skb)-check = ~csum_tcpudp_magic(iph-saddr, - iph-daddr, 0, IPPROTO_TCP, 0); - ipofst = skb_network_offset(skb); - if (ipofst != ETH_HLEN) /* 802.3 frame */ - tso-tsopl |= 1 TSO_PARAM_ETHTYPE_SHIFT; - - tso-tsopl |= (iph-ihl - TSO_PARAM_IPHL_MASK) TSO_PARAM_IPHL_SHIFT; - tso-tsopl |= ((tcp_hdrlen(skb) 2) - TSO_PARAM_TCPHDRLEN_MASK) - TSO_PARAM_TCPHDRLEN_SHIFT; - tso-tsopl |= (skb_shinfo(skb)-gso_size - TSO_PARAM_MSS_MASK) TSO_PARAM_MSS_SHIFT; - tso-tsopl |= 1 TSO_PARAM_IPCKSUM_SHIFT; - tso-tsopl |= 1 TSO_PARAM_TCPCKSUM_SHIFT; - tso-tsopl |= 1 TSO_PARAM_SEGMENT_SHIFT; - return true; + iph-daddr, 0, IPPROTO_TCP, 0); + ip_off = (unsigned char *)iph - + (unsigned char *) skb_network_header(skb); +
[PATCH 08/10] atl1: print debug info if rrd error
Add some debug printks if we encounter a potentially bad receive return descriptor. Signed-off-by: Jay Cliburn [EMAIL PROTECTED] Acked-by: Chris Snook [EMAIL PROTECTED] --- drivers/net/atlx/atl1.c | 26 ++ 1 files changed, 22 insertions(+), 4 deletions(-) diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 51eca23..4e4cb23 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -1144,14 +1144,32 @@ chk_rrd: /* check rrd status */ if (likely(rrd-num_buf == 1)) goto rrd_ok; + else if (netif_msg_rx_err(adapter)) { + dev_printk(KERN_DEBUG, adapter-pdev-dev, + unexpected RRD buffer count\n); + dev_printk(KERN_DEBUG, adapter-pdev-dev, + rx_buf_len = %d\n, + adapter-rx_buffer_len); + dev_printk(KERN_DEBUG, adapter-pdev-dev, + RRD num_buf = %d\n, + rrd-num_buf); + dev_printk(KERN_DEBUG, adapter-pdev-dev, + RRD pkt_len = %d\n, + rrd-xsz.xsum_sz.pkt_size); + dev_printk(KERN_DEBUG, adapter-pdev-dev, + RRD pkt_flg = 0x%08X\n, + rrd-pkt_flg); + dev_printk(KERN_DEBUG, adapter-pdev-dev, + RRD err_flg = 0x%08X\n, + rrd-err_flg); + dev_printk(KERN_DEBUG, adapter-pdev-dev, + RRD vlan_tag = 0x%08X\n, + rrd-vlan_tag); + } /* rrd seems to be bad */ if (unlikely(i-- 0)) { /* rrd may not be DMAed completely */ - if (netif_msg_rx_err(adapter)) - dev_printk(KERN_DEBUG, - adapter-pdev-dev, - unexpected RRD count\n); udelay(1); goto chk_rrd; } -- 1.5.3.8 -- 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 06/10] atl1: use csum_start
Use skb-csum_start for tx checksum offload preparation. Also swap the variables css and cso so they hold the intended values of csum start and offset, respectively. Signed-off-by: Jay Cliburn [EMAIL PROTECTED] Acked-by: Chris Snook [EMAIL PROTECTED] --- drivers/net/atlx/atl1.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index f4add3c..9929822 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -1347,16 +1347,17 @@ static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb, u8 css, cso; if (likely(skb-ip_summed == CHECKSUM_PARTIAL)) { - cso = skb_transport_offset(skb); - css = cso + skb-csum_offset; - if (unlikely(cso 0x1)) { + css = (u8) (skb-csum_start - skb_headroom(skb)); + cso = css + (u8) skb-csum_offset; + if (unlikely(css 0x1)) { + /* L1 hardware requires an even number here */ dev_printk(KERN_DEBUG, adapter-pdev-dev, payload offset not an even number\n); return -1; } - ptpd-word3 |= (cso TPD_PLOADOFFSET_MASK) + ptpd-word3 |= (css TPD_PLOADOFFSET_MASK) TPD_PLOADOFFSET_SHIFT; - ptpd-word3 |= (css TPD_CCSUMOFFSET_MASK) + ptpd-word3 |= (cso TPD_CCSUMOFFSET_MASK) TPD_CCSUMOFFSET_SHIFT; ptpd-word3 |= 1 TPD_CUST_CSUM_EN_SHIFT; return true; -- 1.5.3.8 -- 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 10/10] atl1: reduce forward declarations
Rearrange functions to allow removal of some forward declarations. Make certain global functions static along the way. Signed-off-by: Jay Cliburn [EMAIL PROTECTED] Acked-by: Chris Snook [EMAIL PROTECTED] --- drivers/net/atlx/atl1.c | 1406 +++--- drivers/net/atlx/atl1.h | 10 - 2 files changed, 703 insertions(+), 713 deletions(-) diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 6f4a1d5..240db84 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -108,6 +108,709 @@ module_param(debug, int, 0); MODULE_PARM_DESC(debug, Message level (0=none,...,16=all)); /* + * Reset the transmit and receive units; mask and clear all interrupts. + * hw - Struct containing variables accessed by shared code + * return : 0 or idle status (if error) + */ +static s32 atl1_reset_hw(struct atl1_hw *hw) +{ + struct pci_dev *pdev = hw-back-pdev; + struct atl1_adapter *adapter = hw-back; + u32 icr; + int i; + + /* +* Clear Interrupt mask to stop board from generating +* interrupts Clear any pending interrupt events +*/ + /* +* iowrite32(0, hw-hw_addr + REG_IMR); +* iowrite32(0x, hw-hw_addr + REG_ISR); +*/ + + /* +* Issue Soft Reset to the MAC. This will reset the chip's +* transmit, receive, DMA. It will not effect +* the current PCI configuration. The global reset bit is self- +* clearing, and should clear within a microsecond. +*/ + iowrite32(MASTER_CTRL_SOFT_RST, hw-hw_addr + REG_MASTER_CTRL); + ioread32(hw-hw_addr + REG_MASTER_CTRL); + + iowrite16(1, hw-hw_addr + REG_PHY_ENABLE); + ioread16(hw-hw_addr + REG_PHY_ENABLE); + + /* delay about 1ms */ + msleep(1); + + /* Wait at least 10ms for All module to be Idle */ + for (i = 0; i 10; i++) { + icr = ioread32(hw-hw_addr + REG_IDLE_STATUS); + if (!icr) + break; + /* delay 1 ms */ + msleep(1); + /* FIXME: still the right way to do this? */ + cpu_relax(); + } + + if (icr) { + if (netif_msg_hw(adapter)) + dev_dbg(pdev-dev, ICR = 0x%x\n, icr); + return icr; + } + + return 0; +} + +/* function about EEPROM + * + * check_eeprom_exist + * return 0 if eeprom exist + */ +static int atl1_check_eeprom_exist(struct atl1_hw *hw) +{ + u32 value; + value = ioread32(hw-hw_addr + REG_SPI_FLASH_CTRL); + if (value SPI_FLASH_CTRL_EN_VPD) { + value = ~SPI_FLASH_CTRL_EN_VPD; + iowrite32(value, hw-hw_addr + REG_SPI_FLASH_CTRL); + } + + value = ioread16(hw-hw_addr + REG_PCIE_CAP_LIST); + return ((value 0xFF00) == 0x6C00) ? 0 : 1; +} + +static bool atl1_read_eeprom(struct atl1_hw *hw, u32 offset, u32 *p_value) +{ + int i; + u32 control; + + if (offset 3) + /* address do not align */ + return false; + + iowrite32(0, hw-hw_addr + REG_VPD_DATA); + control = (offset VPD_CAP_VPD_ADDR_MASK) VPD_CAP_VPD_ADDR_SHIFT; + iowrite32(control, hw-hw_addr + REG_VPD_CAP); + ioread32(hw-hw_addr + REG_VPD_CAP); + + for (i = 0; i 10; i++) { + msleep(2); + control = ioread32(hw-hw_addr + REG_VPD_CAP); + if (control VPD_CAP_VPD_FLAG) + break; + } + if (control VPD_CAP_VPD_FLAG) { + *p_value = ioread32(hw-hw_addr + REG_VPD_DATA); + return true; + } + /* timeout */ + return false; +} + +/* + * Reads the value from a PHY register + * hw - Struct containing variables accessed by shared code + * reg_addr - address of the PHY register to read + */ +s32 atl1_read_phy_reg(struct atl1_hw *hw, u16 reg_addr, u16 *phy_data) +{ + u32 val; + int i; + + val = ((u32) (reg_addr MDIO_REG_ADDR_MASK)) MDIO_REG_ADDR_SHIFT | + MDIO_START | MDIO_SUP_PREAMBLE | MDIO_RW | MDIO_CLK_25_4 + MDIO_CLK_SEL_SHIFT; + iowrite32(val, hw-hw_addr + REG_MDIO_CTRL); + ioread32(hw-hw_addr + REG_MDIO_CTRL); + + for (i = 0; i MDIO_WAIT_TIMES; i++) { + udelay(2); + val = ioread32(hw-hw_addr + REG_MDIO_CTRL); + if (!(val (MDIO_START | MDIO_BUSY))) + break; + } + if (!(val (MDIO_START | MDIO_BUSY))) { + *phy_data = (u16) val; + return 0; + } + return ATLX_ERR_PHY; +} + +#define CUSTOM_SPI_CS_SETUP2 +#define CUSTOM_SPI_CLK_HI 2 +#define CUSTOM_SPI_CLK_LO 2 +#define CUSTOM_SPI_CS_HOLD 2 +#define CUSTOM_SPI_CS_HI 3 + +static bool atl1_spi_read(struct atl1_hw *hw, u32 addr, u32 *buf) +{ + int i; + u32 value; + + iowrite32(0, hw-hw_addr +
[PATCH 07/10] atl1: use netif_msg
Use netif_msg_* for console messages emitted by the driver. Add a parameter to allow control of messaging at driver startup, and also add the ability to control it with ethtool. Signed-off-by: Jay Cliburn [EMAIL PROTECTED] Acked-by: Chris Snook [EMAIL PROTECTED] --- drivers/net/atlx/atl1.c | 155 +-- drivers/net/atlx/atl1.h |2 +- 2 files changed, 111 insertions(+), 46 deletions(-) diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 9929822..51eca23 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -100,6 +100,13 @@ static const struct pci_device_id atl1_pci_tbl[] = { }; MODULE_DEVICE_TABLE(pci, atl1_pci_tbl); +static const u32 atl1_default_msg = NETIF_MSG_DRV | NETIF_MSG_PROBE | + NETIF_MSG_LINK | NETIF_MSG_TIMER | NETIF_MSG_IFDOWN | NETIF_MSG_IFUP; + +static int debug = -1; +module_param(debug, int, 0); +MODULE_PARM_DESC(debug, Message level (0=none,...,16=all)); + /* * atl1_sw_init - Initialize general software structures (struct atl1_adapter) * @adapter: board private structure to initialize @@ -217,7 +224,9 @@ s32 atl1_setup_ring_resources(struct atl1_adapter *adapter) size = sizeof(struct atl1_buffer) * (tpd_ring-count + rfd_ring-count); tpd_ring-buffer_info = kzalloc(size, GFP_KERNEL); if (unlikely(!tpd_ring-buffer_info)) { - dev_err(pdev-dev, kzalloc failed , size = D%d\n, size); + if (netif_msg_drv(adapter)) + dev_err(pdev-dev, kzalloc failed , size = D%d\n, + size); goto err_nomem; } rfd_ring-buffer_info = @@ -239,7 +248,8 @@ s32 atl1_setup_ring_resources(struct atl1_adapter *adapter) ring_header-desc = pci_alloc_consistent(pdev, ring_header-size, ring_header-dma); if (unlikely(!ring_header-desc)) { - dev_err(pdev-dev, pci_alloc_consistent failed\n); + if (netif_msg_drv(adapter)) + dev_err(pdev-dev, pci_alloc_consistent failed\n); goto err_nomem; } @@ -472,7 +482,8 @@ static u32 atl1_check_link(struct atl1_adapter *adapter) /* link down */ if (netif_carrier_ok(netdev)) { /* old link state: Up */ - dev_info(adapter-pdev-dev, link is down\n); + if (netif_msg_link(adapter)) + dev_info(adapter-pdev-dev, link is down\n); adapter-link_speed = SPEED_0; netif_carrier_off(netdev); netif_stop_queue(netdev); @@ -515,11 +526,12 @@ static u32 atl1_check_link(struct atl1_adapter *adapter) adapter-link_speed = speed; adapter-link_duplex = duplex; atl1_setup_mac_ctrl(adapter); - dev_info(adapter-pdev-dev, - %s link is up %d Mbps %s\n, - netdev-name, adapter-link_speed, - adapter-link_duplex == FULL_DUPLEX ? - full duplex : half duplex); + if (netif_msg_link(adapter)) + dev_info(adapter-pdev-dev, + %s link is up %d Mbps %s\n, + netdev-name, adapter-link_speed, + adapter-link_duplex == FULL_DUPLEX ? + full duplex : half duplex); } if (!netif_carrier_ok(netdev)) { /* Link down - Up */ @@ -583,7 +595,8 @@ static int atl1_change_mtu(struct net_device *netdev, int new_mtu) if ((max_frame ETH_ZLEN + ETH_FCS_LEN) || (max_frame MAX_JUMBO_FRAME_SIZE)) { - dev_warn(adapter-pdev-dev, invalid MTU setting\n); + if (netif_msg_link(adapter)) + dev_warn(adapter-pdev-dev, invalid MTU setting\n); return -EINVAL; } @@ -997,8 +1010,9 @@ static void atl1_rx_checksum(struct atl1_adapter *adapter, if (rrd-err_flg (ERR_FLAG_CRC | ERR_FLAG_TRUNC | ERR_FLAG_CODE | ERR_FLAG_OV)) { adapter-hw_csum_err++; - dev_printk(KERN_DEBUG, pdev-dev, - rx checksum error\n); + if (netif_msg_rx_err(adapter)) + dev_printk(KERN_DEBUG, pdev-dev, + rx checksum error\n); return; } } @@ -1017,9 +1031,10 @@ static void atl1_rx_checksum(struct atl1_adapter *adapter, } /* IPv4, but hardware thinks its checksum is wrong */ - dev_printk(KERN_DEBUG, pdev-dev, -
[PATCH 09/10] atl1: make functions static
Make needlessly global functions static. In a couple of cases this requires removing forward declarations and reordering functions. Signed-off-by: Jay Cliburn [EMAIL PROTECTED] Acked-by: Chris Snook [EMAIL PROTECTED] --- drivers/net/atlx/atl1.c | 101 --- drivers/net/atlx/atl1.h |3 - 2 files changed, 51 insertions(+), 53 deletions(-) diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 4e4cb23..6f4a1d5 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -211,7 +211,7 @@ static int atl1_mii_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) * * Return 0 on success, negative on failure */ -s32 atl1_setup_ring_resources(struct atl1_adapter *adapter) +static s32 atl1_setup_ring_resources(struct atl1_adapter *adapter) { struct atl1_tpd_ring *tpd_ring = adapter-tpd_ring; struct atl1_rfd_ring *rfd_ring = adapter-rfd_ring; @@ -402,7 +402,7 @@ static void atl1_clean_tx_ring(struct atl1_adapter *adapter) * * Free all transmit software resources */ -void atl1_free_ring_resources(struct atl1_adapter *adapter) +static void atl1_free_ring_resources(struct atl1_adapter *adapter) { struct pci_dev *pdev = adapter-pdev; struct atl1_tpd_ring *tpd_ring = adapter-tpd_ring; @@ -580,40 +580,6 @@ static u32 atl1_check_link(struct atl1_adapter *adapter) return 0; } -/* - * atl1_change_mtu - Change the Maximum Transfer Unit - * @netdev: network interface device structure - * @new_mtu: new value for maximum frame size - * - * Returns 0 on success, negative on failure - */ -static int atl1_change_mtu(struct net_device *netdev, int new_mtu) -{ - struct atl1_adapter *adapter = netdev_priv(netdev); - int old_mtu = netdev-mtu; - int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; - - if ((max_frame ETH_ZLEN + ETH_FCS_LEN) || - (max_frame MAX_JUMBO_FRAME_SIZE)) { - if (netif_msg_link(adapter)) - dev_warn(adapter-pdev-dev, invalid MTU setting\n); - return -EINVAL; - } - - adapter-hw.max_frame_size = max_frame; - adapter-hw.tx_jumbo_task_th = (max_frame + 7) 3; - adapter-rx_buffer_len = (max_frame + 7) ~7; - adapter-hw.rx_jumbo_th = adapter-rx_buffer_len / 8; - - netdev-mtu = new_mtu; - if ((old_mtu != new_mtu) netif_running(netdev)) { - atl1_down(adapter); - atl1_up(adapter); - } - - return 0; -} - static void set_flow_ctrl_old(struct atl1_adapter *adapter) { u32 hi, lo, value; @@ -1794,19 +1760,8 @@ static void atl1_phy_config(unsigned long data) * assert again and again. * /vendor comment */ -static void atl1_tx_timeout_task(struct work_struct *work) -{ - struct atl1_adapter *adapter = - container_of(work, struct atl1_adapter, tx_timeout_task); - struct net_device *netdev = adapter-netdev; - netif_device_detach(netdev); - atl1_down(adapter); - atl1_up(adapter); - netif_device_attach(netdev); -} - -int atl1_reset(struct atl1_adapter *adapter) +static int atl1_reset(struct atl1_adapter *adapter) { int ret; ret = atl1_reset_hw(adapter-hw); @@ -1815,7 +1770,7 @@ int atl1_reset(struct atl1_adapter *adapter) return atl1_init_hw(adapter-hw); } -s32 atl1_up(struct atl1_adapter *adapter) +static s32 atl1_up(struct atl1_adapter *adapter) { struct net_device *netdev = adapter-netdev; int err; @@ -1860,7 +1815,7 @@ err_up: return err; } -void atl1_down(struct atl1_adapter *adapter) +static void atl1_down(struct atl1_adapter *adapter) { struct net_device *netdev = adapter-netdev; @@ -1883,6 +1838,52 @@ void atl1_down(struct atl1_adapter *adapter) atl1_clean_rx_ring(adapter); } +static void atl1_tx_timeout_task(struct work_struct *work) +{ + struct atl1_adapter *adapter = + container_of(work, struct atl1_adapter, tx_timeout_task); + struct net_device *netdev = adapter-netdev; + + netif_device_detach(netdev); + atl1_down(adapter); + atl1_up(adapter); + netif_device_attach(netdev); +} + +/* + * atl1_change_mtu - Change the Maximum Transfer Unit + * @netdev: network interface device structure + * @new_mtu: new value for maximum frame size + * + * Returns 0 on success, negative on failure + */ +static int atl1_change_mtu(struct net_device *netdev, int new_mtu) +{ + struct atl1_adapter *adapter = netdev_priv(netdev); + int old_mtu = netdev-mtu; + int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN; + + if ((max_frame ETH_ZLEN + ETH_FCS_LEN) || + (max_frame MAX_JUMBO_FRAME_SIZE)) { + if (netif_msg_link(adapter)) + dev_warn(adapter-pdev-dev, invalid MTU setting\n); + return -EINVAL; + } + + adapter-hw.max_frame_size = max_frame;
[PATCH 00/10] atl1: move to atlx and update for 2.6.25
In preparation for a future atl2 driver for the Atheros L2 10/100 chip, we propose to move the existing atl1 driver to a new directory (drivers/net/atlx), then split out functions and definitions that both atl1 and atl2 can share. The final structure will look like this: drivers/net/atl1deleted drivers/net/atlxnew drivers/net/atlx/atl1.c atl1-specific functions drivers/net/atlx/atl1.h atl1-specific definitions drivers/net/atlx/atlx.c atl1-atl2 shared functions drivers/net/atlx/atlx.h atl1-atl2 shared definitions The first two patches submitted in this patchset accomplish the relocation by moving the atl1 driver over to drivers/net/atlx, then splitting out shareable functions and definitions. Some transitory hackery will be present until the atl2 merge. Please overlook it for now. The remaining 8 patches provide some cleanup and minor functionality changes, the most important of which is a fix to our long-broken TSO capability. The conform to vendor driver patches submitted on 31 December 2007 have been dropped. Table of contents: --- 0001-atl1-relocate-atl1-driver-to-drivers-net-atlx.patch 0002-atl1-move-common-functions-to-atlx-files.patch 0003-atl1-fix-broken-TSO.patch 0004-atl1-add-ethtool-register-dump.patch 0005-atl1-simplify-tx-packet-descriptor.patch 0006-atl1-use-csum_start.patch 0007-atl1-use-netif_msg.patch 0008-atl1-print-debug-info-if-rrd-error.patch 0009-atl1-make-functions-static.patch 0010-atl1-reduce-forward-declarations.patch Summary diffstat: --- drivers/net/Makefile |2 +- drivers/net/atl1/Makefile |2 - drivers/net/atl1/atl1.h | 286 drivers/net/atl1/atl1_ethtool.c | 505 -- drivers/net/atl1/atl1_hw.c| 720 - drivers/net/atl1/atl1_hw.h| 946 --- drivers/net/atl1/atl1_param.c | 203 --- drivers/net/atlx/Makefile |1 + drivers/net/{atl1/atl1_main.c = atlx/atl1.c} | 2118 +++-- drivers/net/atlx/atl1.h | 796 ++ drivers/net/atlx/atlx.c | 433 + drivers/net/atlx/atlx.h | 506 ++ 12 files changed, 3352 insertions(+), 3166 deletions(-) delete mode 100644 drivers/net/atl1/Makefile delete mode 100644 drivers/net/atl1/atl1.h delete mode 100644 drivers/net/atl1/atl1_ethtool.c delete mode 100644 drivers/net/atl1/atl1_hw.c delete mode 100644 drivers/net/atl1/atl1_hw.h delete mode 100644 drivers/net/atl1/atl1_param.c create mode 100644 drivers/net/atlx/Makefile rename drivers/net/{atl1/atl1_main.c = atlx/atl1.c} (57%) create mode 100644 drivers/net/atlx/atl1.h create mode 100644 drivers/net/atlx/atlx.c create mode 100644 drivers/net/atlx/atlx.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: linux-2.6.24 compile error in drivers/net/b44.c
Miguel Botón 写道: Li Zefan wrote: Add CCs: CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Li Zefan wrote: drivers/net/b44.c: In function 'b44_remove_one': drivers/net/b44.c:2231: error: implicit declaration of function 'ssb_pcihost_set_power_state' make[2]: *** [drivers/net/b44.o] Error 1 make[1]: *** [drivers/net] Error 2 I think it is caused by: CONFIG_SSB_PCIHOST=n CONFIG_B44=y This patch should fix b44 errors when 'SSB_PCIHOST' is not enabled. I tried the patch, but it does't work, same compile error. :( If .config is needed, tell me and I will attach it. Signed-off-by: Miguel Botón [EMAIL PROTECTED] diff --git a/drivers/net/b44.c b/drivers/net/b44.c index ea2a2b5..d081234 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -2228,7 +2228,9 @@ static void __devexit b44_remove_one(struct ssb_device *sdev) unregister_netdev(dev); ssb_bus_may_powerdown(sdev-bus); free_netdev(dev); +#ifdef B44_PCI ssb_pcihost_set_power_state(sdev, PCI_D3hot); +#endif ssb_set_drvdata(sdev, NULL); } @@ -2257,7 +2259,9 @@ static int b44_suspend(struct ssb_device *sdev, pm_message_t state) b44_setup_wol(bp); } +#ifdef B44_PCI ssb_pcihost_set_power_state(sdev, PCI_D3hot); +#endif return 0; } -- Miguel Botó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: linux-2.6.24 compile error in drivers/net/b44.c
Li Zefan wrote: Miguel Botón 写道: Li Zefan wrote: Add CCs: CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Li Zefan wrote: drivers/net/b44.c: In function 'b44_remove_one': drivers/net/b44.c:2231: error: implicit declaration of function 'ssb_pcihost_set_power_state' make[2]: *** [drivers/net/b44.o] Error 1 make[1]: *** [drivers/net] Error 2 I think it is caused by: CONFIG_SSB_PCIHOST=n CONFIG_B44=y This patch should fix b44 errors when 'SSB_PCIHOST' is not enabled. I tried the patch, but it does't work, same compile error. :( If .config is needed, tell me and I will attach it. Sorry, I just made a mistake, actually the patch works. Thanks! Signed-off-by: Miguel Botón [EMAIL PROTECTED] diff --git a/drivers/net/b44.c b/drivers/net/b44.c index ea2a2b5..d081234 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -2228,7 +2228,9 @@ static void __devexit b44_remove_one(struct ssb_device *sdev) unregister_netdev(dev); ssb_bus_may_powerdown(sdev-bus); free_netdev(dev); +#ifdef B44_PCI ssb_pcihost_set_power_state(sdev, PCI_D3hot); +#endif ssb_set_drvdata(sdev, NULL); } @@ -2257,7 +2259,9 @@ static int b44_suspend(struct ssb_device *sdev, pm_message_t state) b44_setup_wol(bp); } +#ifdef B44_PCI ssb_pcihost_set_power_state(sdev, PCI_D3hot); +#endif return 0; } -- Miguel Botó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: xfrm_input() and -seq oddities
On Sun, Feb 03, 2008 at 12:37:19AM +, Al Viro wrote: This is still very odd... Where do you initialize -seq.input? What In xfrm_input. guarantees that async call of xfrm_input() will be always preceded by at least one non-async one? OK I admit it isn't pretty. But the encap_type argument is reused to indicate async resumption. That is, if we enter with encap_type 0, it means that we're resuming a previous operation and seq.input has therefore been set by the previous xfrm_input call. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmVHI~} [EMAIL PROTECTED] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- 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] request_irq() always returns -EINVAL with a NULL handler.
On Thu, 17 Jan 2008 17:57:58 +1100 Rusty Russell [EMAIL PROTECTED] wrote: I assume that these ancient network drivers were trying to find out if an irq is available. eepro.c expecting +EBUSY was doubly wrong. I'm not sure that can_request_irq() is the right thing, but these drivers are definitely wrong. request_irq should BUG() on bad input, and these would have been found earlier. This breaks non-CONFIG_GENERIC_HARDIRQS architectures. alpha: drivers/net/3c503.c: In function 'el2_open': drivers/net/3c503.c:382: error: implicit declaration of function 'can_request_irq' -- 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