2.6.21.5 and forcedeth locks up during boot
Hi, I have a tyan s2912 system that I'm trying to get to boot. It locks up right now just after: forcedeth: using HIGHDMA I did some printk in forcedeth.c, and it seems to be stuck in here: for (i = 0; i 5000; i++) { msleep(1); if (nv_mgmt_acquire_sema(dev)) { /* management unit setup the phy already? */ if ((readl(base + NvRegTransmitterControl) NVREG_XMITCTL_SYNC_MASK) == NVREG_XMITCTL_SYNC_PHY_INIT) { /* phy is inited by mgmt unit */ phyinitialized = 1; dprintk(KERN_INFO %s: Phy already initialized by mgmt unit.\n, pci_name(pci_dev)); } else { /* we need to init the phy */ } break; } } nv_mgmt_acquire_sema never returns true, and also has a 5 second delay in it, so it starts looping 5,000 times with a 5 second delay. The screen blanks out and doesn't come back, so I'm not sure if it ever would finish. I'm able to get it to boot with a knoppix cd, so I'm thinking there must be something wrong in my .config. I've attached the lspci and config for reference. Any tips to what I'm missing or how to debug further would be greatly appreciated. Thanks! Alex config.gz Description: Binary data lspci.gz Description: Binary data
[RFC][PATCH v2 -mm 0/9] netconsole: Multiple targets and dynamic reconfigurability
[0/9] netconsole: Multiple targets and dynamic reconfigurability This patchset is a rework of the original idea and patches posted by Keiichi Kii and Takayoshi Kochi at: http://lkml.org/lkml/2007/6/13/72 This is v2 of the patchset, the previous version is available at: http://lkml.org/lkml/2007/7/4/107 This is diffed against 2.6.22-rc6-mm1 + the earlier netpoll fixlet and the configfs cleanup patches (those are already merged in -mm AFAIK, and hence not reproduced here). [1/9] netconsole: Cleanups, codingstyle, prettyfication [2/9] netconsole: Remove bogus check [3/9] netconsole: Simplify boot/module option setup logic [4/9] netconsole: Add some useful tips to documentation [5/9] netconsole: Introduce netconsole_target [6/9] netconsole: Introduce netconsole_netdev_notifier [7/9] netconsole: Use netif_running() in write_msg() [8/9] netconsole: Support multiple logging targets [9/9] netconsole: Support dynamic reconfiguration using configfs Changes since v1: = * Split / merge various patches in the patchset as suggested in reviews. * Get rid of redundant id and dev_status fields. * Use netif_running() instead of IFF_UP. * Explain the boot/module option setup simplification and the netdev notifier patches in more detail (justify why they're good / required). * Get rid of possible trailing newline from echo(1) in store_dev_name(). * Fix a panic bug -- now, when no boot/module option is specified, we skip only the part that creates and inserts param string-created targets. Rest of the initialization (notifier, configfs subsystem) is done as usual. * Get rid of lock-skipping special-casing where possible. * Use config_item_name() instead of empty_item. * Introduce netpoll_print_options() in netpoll and use it. * Style cleanups (reduce #ifdefs, indentation, whitespace fixes, etc). * Miscellaneous fixes in documentation (as suggested in reviews). About this patchset: What? Support multiple remote logging targets in netconsole. Also, ability to dynamically add or remove targets or modify parameters (IP, port, remote MAC address) of targets at runtime, from userspace, using configfs. Why? From Keiichi Kii's original post: [...] current netconsole is not flexible. For example, if you want to change ip address for logging agent, in the case of built-in netconsole, you can't change config except for changing boot parameter and rebooting your system, or in the case of module netconsole, you need to remove it and reload with different parameters. [...] and we have been losing serial console port with PCs and Servers. (... and especially laptops, I would add.) Kindly review and comment. Satyam - 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 v2 -mm 1/9] netconsole: Cleanups, codingstyle, prettyfication
From: Satyam Sharma [EMAIL PROTECTED] [1/9] netconsole: Cleanups, codingstyle, prettyfication (1) Remove unwanted headers. (2) Mark __init and __exit as appropriate. (3) Various trivial codingstyle and prettification stuff. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] --- drivers/net/netconsole.c | 55 +++ 1 file changed, 27 insertions(+), 28 deletions(-) --- diff -ruNp a/drivers/net/netconsole.c b/drivers/net/netconsole.c --- a/drivers/net/netconsole.c 2007-04-26 08:38:32.0 +0530 +++ b/drivers/net/netconsole.c 2007-07-03 20:27:17.0 +0530 @@ -35,35 +35,32 @@ / #include linux/mm.h -#include linux/tty.h #include linux/init.h #include linux/module.h #include linux/console.h -#include linux/tty_driver.h #include linux/moduleparam.h #include linux/string.h -#include linux/sysrq.h -#include linux/smp.h #include linux/netpoll.h MODULE_AUTHOR(Maintainer: Matt Mackall [EMAIL PROTECTED]); MODULE_DESCRIPTION(Console driver for network interfaces); MODULE_LICENSE(GPL); -static char config[256]; -module_param_string(netconsole, config, 256, 0); +#define MAX_PARAM_LENGTH 256 +#define MAX_PRINT_CHUNK1000 + +static char config[MAX_PARAM_LENGTH]; +module_param_string(netconsole, config, MAX_PARAM_LENGTH, 0); MODULE_PARM_DESC(netconsole, [EMAIL PROTECTED]/[dev],[tgt-port]@tgt-ip/[tgt-macaddr]\n); static struct netpoll np = { - .name = netconsole, - .dev_name = eth0, - .local_port = 6665, - .remote_port = , - .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + .name = netconsole, + .dev_name = eth0, + .local_port = 6665, + .remote_port= , + .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, }; -static int configured = 0; - -#define MAX_PRINT_CHUNK 1000 +static int configured; static void write_msg(struct console *con, const char *msg, unsigned int len) { @@ -75,7 +72,7 @@ static void write_msg(struct console *co local_irq_save(flags); - for(left = len; left; ) { + for (left = len; left;) { frag = min(left, MAX_PRINT_CHUNK); netpoll_send_udp(np, msg, frag); msg += frag; @@ -86,12 +83,12 @@ static void write_msg(struct console *co } static struct console netconsole = { - .name = netcon, - .flags = CON_ENABLED | CON_PRINTBUFFER, - .write = write_msg + .name = netcon, + .flags = CON_ENABLED | CON_PRINTBUFFER, + .write = write_msg, }; -static int option_setup(char *opt) +static int __init option_setup(char *opt) { configured = !netpoll_parse_options(np, opt); return 1; @@ -99,28 +96,30 @@ static int option_setup(char *opt) __setup(netconsole=, option_setup); -static int init_netconsole(void) +static int __init init_netconsole(void) { - int err; + int err = 0; - if(strlen(config)) + if (strnlen(config, MAX_PARAM_LENGTH)) option_setup(config); - if(!configured) { - printk(netconsole: not configured, aborting\n); - return 0; + if (!configured) { + printk(KERN_INFO netconsole: not configured, aborting\n); + goto out; } err = netpoll_setup(np); if (err) - return err; + goto out; register_console(netconsole); printk(KERN_INFO netconsole: network logging started\n); - return 0; + +out: + return err; } -static void cleanup_netconsole(void) +static void __exit cleanup_netconsole(void) { unregister_console(netconsole); netpoll_cleanup(np); - 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 v2 -mm 2/9] netconsole: Remove bogus check
From: Satyam Sharma [EMAIL PROTECTED] [2/9] netconsole: Remove bogus check The (!np.dev) check in write_msg() is bogus (always false), because: np.dev is set by netpoll_setup(), which is called by the target init code in init_netconsole() _before_ register_console() = write_msg() cannot be triggered unless netpoll_setup() returns with success. And that will not happen if netpoll_setup() failed to set np.dev. Also np.dev cannot go from under us while netconsole is loaded. This is because netpoll_setup() grabs a reference for us on that dev. So let's remove the pointless check. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] --- drivers/net/netconsole.c |3 --- 1 file changed, 3 deletions(-) --- diff -ruNp a/drivers/net/netconsole.c b/drivers/net/netconsole.c --- a/drivers/net/netconsole.c 2007-07-10 05:53:42.0 +0530 +++ b/drivers/net/netconsole.c 2007-07-10 05:55:00.0 +0530 @@ -67,9 +67,6 @@ static void write_msg(struct console *co int frag, left; unsigned long flags; - if (!np.dev) - return; - local_irq_save(flags); for (left = len; left;) { - 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 v2 -mm 3/9] netconsole: Simplify boot/module option setup logic
From: Satyam Sharma [EMAIL PROTECTED] [3/9] netconsole: Simplify boot/module option setup logic Presently, for built-in netconsole: __setup(..., option_setup) ensures that the option_setup() function is called at boot-time from obsolete_checksetup() with the string matching netconsole= passed to it from the kernel's command line. We call the netpoll_parse_options() from in there, and populate the netpoll struct with the passed values. Then, when init_netconsole() is called during the initcall phase, strlen(config) fails, thus skipping option_setup(). For modular netconsole: module_param_string() ensures that the string corresponding to the netconsole module parameter passed from the modprobe command line is copied into the config static variable. This time, when the module is being initialized, strlen(config) is true and so option_setup() is called on config from init_netconsole() and the input string is parsed and the netpoll struct populated. Hence, quite different things happen in the copying and parsing of the passed netpoll parameters for the modular / built-in cases. This patch makes both of them similar by doing exactly the equivalent of a module_param_string() in option_setup() also -- just copying the param string passed from the kernel command line into the config static variable. So, init_netconsole() parses (using netpoll_parse_options()) it in both the cases, and makes the logic somewhat simpler. Now, option_setup() is only ever called / used for the built-in case, so we put it inside a #ifndef MODULE, otherwise gcc will complain about option_setup() being defined but not used. Also, the configured variable is redundant with this patch and so removed. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] --- drivers/net/netconsole.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) --- diff -ruNp a/drivers/net/netconsole.c b/drivers/net/netconsole.c --- a/drivers/net/netconsole.c 2007-07-10 06:00:15.0 +0530 +++ b/drivers/net/netconsole.c 2007-07-10 06:28:19.0 +0530 @@ -53,6 +53,15 @@ static char config[MAX_PARAM_LENGTH]; module_param_string(netconsole, config, MAX_PARAM_LENGTH, 0); MODULE_PARM_DESC(netconsole, [EMAIL PROTECTED]/[dev],[tgt-port]@tgt-ip/[tgt-macaddr]\n); +#ifndefMODULE +static int __init option_setup(char *opt) +{ + strlcpy(config, opt, MAX_PARAM_LENGTH); + return 1; +} +__setup(netconsole=, option_setup); +#endif /* MODULE */ + static struct netpoll np = { .name = netconsole, .dev_name = eth0, @@ -60,7 +69,6 @@ static struct netpoll np = { .remote_port= , .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, }; -static int configured; static void write_msg(struct console *con, const char *msg, unsigned int len) { @@ -85,26 +93,19 @@ static struct console netconsole = { .write = write_msg, }; -static int __init option_setup(char *opt) -{ - configured = !netpoll_parse_options(np, opt); - return 1; -} - -__setup(netconsole=, option_setup); - static int __init init_netconsole(void) { int err = 0; - if (strnlen(config, MAX_PARAM_LENGTH)) - option_setup(config); - - if (!configured) { + if (!strnlen(config, MAX_PARAM_LENGTH)) { printk(KERN_INFO netconsole: not configured, aborting\n); goto out; } + err = netpoll_parse_options(np, config); + if (err) + goto out; + err = netpoll_setup(np); if (err) goto out; - 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 v2 -mm 4/9] netconsole: Add some useful tips to documentation
From: Satyam Sharma [EMAIL PROTECTED] [4/9] netconsole: Add some useful tips to documentation Add some useful general-purpose tips. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] --- Documentation/networking/netconsole.txt | 13 + 1 file changed, 13 insertions(+) --- diff -ruNp a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt --- a/Documentation/networking/netconsole.txt 2007-04-26 08:38:32.0 +0530 +++ b/Documentation/networking/netconsole.txt 2007-07-10 07:31:12.0 +0530 @@ -44,6 +44,19 @@ WARNING: the default target ethernet set ethernet address to send packets, which can cause increased load on other systems on the same ethernet segment. +TIP: some LAN switches may be configured to suppress ethernet broadcasts +so it is advised to explicitly specify the remote agents' MAC addresses +from the config parameters passed to netconsole. + +TIP: to find out the MAC address of, say, 10.0.0.2, you may try using: + + ping -c 1 10.0.0.2 ; /sbin/arp -n | grep 10.0.0.2 + +TIP: in case the remote logging agent is on a separate LAN subnet than +the sender, it is suggested to try specifying the MAC address of the +default gateway (you may use /sbin/route -n to find it out) as the +remote MAC address instead. + NOTE: the network device (eth1 in the above case) can run any kind of other network traffic, netconsole is not intrusive. Netconsole might cause slight delays in other traffic if the volume of kernel - 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 v2 -mm 5/9] netconsole: Introduce netconsole_target
From: Satyam Sharma [EMAIL PROTECTED] [5/9] netconsole: Introduce netconsole_target Introduce a wrapper structure over netpoll to represent logging targets configured in netconsole. This will get extended with other members in further patches. The original patchset did this along with (and inside the #ifdef) of CONFIG_NETCONSOLE_DYNAMIC itself. I decided otherwise, and was able to drastically cut down on the #ifdef-complexity of final netconsole.c. Also, struct netconsole_target would be required for multiple targets support also, and not just dynamic reconfigurability. Previously these two things were coupled, but I want to de-link that (more on this later). Note that this patch in itself looks quite redundant / stupid, but it is purposefully made this way, so further patches are more readable. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] --- drivers/net/netconsole.c | 34 -- 1 file changed, 24 insertions(+), 10 deletions(-) --- diff -ruNp a/drivers/net/netconsole.c b/drivers/net/netconsole.c --- a/drivers/net/netconsole.c 2007-07-10 06:42:11.0 +0530 +++ b/drivers/net/netconsole.c 2007-07-10 06:50:46.0 +0530 @@ -62,24 +62,35 @@ static int __init option_setup(char *opt __setup(netconsole=, option_setup); #endif /* MODULE */ -static struct netpoll np = { - .name = netconsole, - .dev_name = eth0, - .local_port = 6665, - .remote_port= , - .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, +/** + * struct netconsole_target - Represents a configured netconsole target. + * @np:The netpoll structure for this target. + */ +struct netconsole_target { + struct netpoll np; +}; + +static struct netconsole_target default_target = { + .np = { + .name = netconsole, + .dev_name = eth0, + .local_port = 6665, + .remote_port= , + .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, + }, }; static void write_msg(struct console *con, const char *msg, unsigned int len) { int frag, left; unsigned long flags; + struct netconsole_target *nt = default_target; local_irq_save(flags); for (left = len; left;) { frag = min(left, MAX_PRINT_CHUNK); - netpoll_send_udp(np, msg, frag); + netpoll_send_udp(nt-np, msg, frag); msg += frag; left -= frag; } @@ -96,17 +107,18 @@ static struct console netconsole = { static int __init init_netconsole(void) { int err = 0; + struct netconsole_target *nt = default_target; if (!strnlen(config, MAX_PARAM_LENGTH)) { printk(KERN_INFO netconsole: not configured, aborting\n); goto out; } - err = netpoll_parse_options(np, config); + err = netpoll_parse_options(nt-np, config); if (err) goto out; - err = netpoll_setup(np); + err = netpoll_setup(nt-np); if (err) goto out; @@ -119,8 +131,10 @@ out: static void __exit cleanup_netconsole(void) { + struct netconsole_target *nt = default_target; + unregister_console(netconsole); - netpoll_cleanup(np); + netpoll_cleanup(nt-np); } module_init(init_netconsole); - 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 v2 -mm 7/9] netconsole: Use netif_running() in write_msg()
From: Satyam Sharma [EMAIL PROTECTED] [7/9] netconsole: Use netif_running() in write_msg() Avoid unnecessarily disabling interrupts and calling netpoll_send_udp() if the corresponding local interface is not up. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] --- drivers/net/netconsole.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) --- diff -ruNp a/drivers/net/netconsole.c b/drivers/net/netconsole.c --- a/drivers/net/netconsole.c 2007-07-10 07:26:47.0 +0530 +++ b/drivers/net/netconsole.c 2007-07-10 07:45:51.0 +0530 @@ -113,16 +113,16 @@ static void write_msg(struct console *co unsigned long flags; struct netconsole_target *nt = default_target; - local_irq_save(flags); - - for (left = len; left;) { - frag = min(left, MAX_PRINT_CHUNK); - netpoll_send_udp(nt-np, msg, frag); - msg += frag; - left -= frag; + if (netif_running(nt-np.dev)) { + local_irq_save(flags); + for (left = len; left;) { + frag = min(left, MAX_PRINT_CHUNK); + netpoll_send_udp(nt-np, msg, frag); + msg += frag; + left -= frag; + } + local_irq_restore(flags); } - - local_irq_restore(flags); } static struct console netconsole = { - 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 v2 -mm 8/9] netconsole: Support multiple logging targets
From: Satyam Sharma [EMAIL PROTECTED] [8/9] netconsole: Support multiple logging targets This patch introduces support for multiple targets: Let's keep this out of CONFIG_NETCONSOLE_DYNAMIC as well -- this is useful even in the default case and (including the infrastructure introduced in previous patches) doesn't really add too many bytes to module text. All the complexity (and size) comes with the dynamic reconfigurability / userspace interface patch, and so it's plausible users may want to keep this enabled but that disabled (say to avoid a dep on CONFIG_CONFIGFS_FS too). Also update documentation to mention the use of ; separator to specify multiple logging targets in the boot/module option string. Brief overview: We maintain a target_list (and corresponding lock). Get rid of the static default_target and introduce allocation and release functions for our netconsole_target objects (but keeping sure to preserve previous behaviour such as default values). During init_netconsole(), ; is used as the separator to identify multiple target specifications in the boot/module option string. The target specifications are parsed and netpolls setup. During exit, the target_list is torn down and all items released. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] --- Documentation/networking/netconsole.txt |6 + drivers/net/netconsole.c| 173 2 files changed, 139 insertions(+), 40 deletions(-) --- diff -ruNp a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt --- a/Documentation/networking/netconsole.txt 2007-07-10 07:35:17.0 +0530 +++ b/Documentation/networking/netconsole.txt 2007-07-10 08:25:17.0 +0530 @@ -34,6 +34,12 @@ Examples: insmod netconsole netconsole=@/,@10.0.0.2/ +It also supports logging to multiple remote agents by specifying +parameters for the multiple agents separated by semicolons and the +complete string enclosed in quotes, thusly: + + modprobe netconsole netconsole=@/,@10.0.0.2/;@/eth1,[EMAIL PROTECTED]/ + Built-in netconsole starts immediately after the TCP stack is initialized and attempts to bring up the supplied dev at the supplied address. diff -ruNp a/drivers/net/netconsole.c b/drivers/net/netconsole.c --- a/drivers/net/netconsole.c 2007-07-10 07:52:44.0 +0530 +++ b/drivers/net/netconsole.c 2007-07-10 08:34:26.0 +0530 @@ -62,44 +62,93 @@ static int __init option_setup(char *opt __setup(netconsole=, option_setup); #endif /* MODULE */ +/* Linked list of all configured targets */ +static LIST_HEAD(target_list); + +/* This needs to be a spinlock because write_msg() cannot sleep */ +static DEFINE_SPINLOCK(target_list_lock); + /** * struct netconsole_target - Represents a configured netconsole target. + * @list: Links this target into the target_list. * @np:The netpoll structure for this target. */ struct netconsole_target { + struct list_headlist; struct netpoll np; }; -static struct netconsole_target default_target = { - .np = { - .name = netconsole, - .dev_name = eth0, - .local_port = 6665, - .remote_port= , - .remote_mac = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - }, -}; +/* Allocate new target and setup netpoll for it */ +static struct netconsole_target *alloc_target(char *target_config) +{ + int err = -ENOMEM; + struct netconsole_target *nt; + + /* Allocate and initialize with defaults */ + nt = kzalloc(sizeof(*nt), GFP_KERNEL); + if (!nt) { + printk(KERN_ERR netconsole: failed to allocate memory\n); + goto fail; + } + + nt-np.name = netconsole; + strlcpy(nt-np.dev_name, eth0, IFNAMSIZ); + nt-np.local_port = 6665; + nt-np.remote_port = ; + memset(nt-np.remote_mac, 0xff, ETH_ALEN); + + /* Parse parameters and setup netpoll */ + err = netpoll_parse_options(nt-np, target_config); + if (err) + goto fail; + + err = netpoll_setup(nt-np); + if (err) + goto fail; + + return nt; + +fail: + kfree(nt); + return ERR_PTR(err); +} + +/* Cleanup netpoll for given target and free it */ +static void free_target(struct netconsole_target *nt) +{ + netpoll_cleanup(nt-np); + kfree(nt); +} /* Handle network interface device notifications */ static int netconsole_netdev_event(struct notifier_block *this, unsigned long event, void *ptr) { + unsigned long flags; + struct netconsole_target *nt; struct net_device *dev = ptr; - struct netconsole_target *nt = default_target; - if (nt-np.dev == dev) { - switch (event) { - case
[PATCH v2 -mm 9/9] netconsole: Support dynamic reconfiguration using configfs
From: Satyam Sharma [EMAIL PROTECTED] [9/9] netconsole: Support dynamic reconfiguration using configfs This patch introduces support for dynamic reconfiguration (adding, removing and/or modifying parameters of netconsole targets at runtime) using a userspace interface exported via configfs. Documentation is also updated accordingly. Issues and brief design overview: (1) Kernel-initiated creation / destruction of kernel objects is not possible with configfs -- the lifetimes of the config items is managed exclusively from userspace. But netconsole must support boot/module params too, and these are parsed in kernel and hence netpolls must be setup from the kernel. Joel Becker suggested to separately manage the lifetimes of the two kinds of netconsole_target objects -- those created via configfs mkdir(2) from userspace and those specified from the boot/module option string. This adds complexity and some redundancy here and also means that boot/module param-created targets are not exposed through the configfs namespace (and hence cannot be updated / destroyed dynamically). However, this saves us from locking / refcounting complexities that would need to be introduced in configfs to support kernel-initiated item creation / destroy there. Also, this is similar to present behaviour in any case so not really a problem. (2) In configfs, item creation takes place in the call chain of the mkdir(2) syscall in the driver subsystem. If we used an ioctl(2) to create / destroy objects from userspace, the special userspace program is able to fill out the structure to be passed into the ioctl and hence specify attributes such as local interface that are required at the time we set up the netpoll. For configfs, this information is not available at the time of mkdir(2). So, we keep all newly-created targets (via configfs) disabled by default. The user is expected to set various attributes appropriately (including the local network interface if required) and then write(2) 1 to the enabled attribute. Thus, netpoll_setup() is then called on the set parameters in the context of _this_ write(2) on the enabled attribute itself. This design enables the user to reconfigure existing netconsole targets at runtime to be attached to newly-come-up interfaces that may not have existed when netconsole was loaded or when the targets were actually created. This all enables us to get rid of custom ioctls. (3) Ultra-paranoid configfs attribute show() and store() operations, with sanity and input range checking, using only safe string primitives, and compliant with the recommendations in Documentation/filesystems/sysfs.txt. (4) A new function netpoll_print_options() is created in the netpoll API, that just prints out the configured parameters for a netpoll structure. netpoll_parse_options() is modified to use that and it is also exported to be used from netconsole. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] --- Documentation/networking/netconsole.txt | 68 +++ drivers/net/Kconfig | 10 drivers/net/netconsole.c| 607 ++-- include/linux/netpoll.h |1 net/core/netpoll.c | 44 +- 5 files changed, 686 insertions(+), 44 deletions(-) --- diff -ruNp a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt --- a/Documentation/networking/netconsole.txt 2007-07-10 08:56:16.0 +0530 +++ b/Documentation/networking/netconsole.txt 2007-07-10 11:07:48.0 +0530 @@ -3,6 +3,10 @@ started by Ingo Molnar [EMAIL PROTECTED] 2.6 port and netpoll api by Matt Mackall [EMAIL PROTECTED], Sep 9 2003 Please send bug reports to Matt Mackall [EMAIL PROTECTED] +and Satyam Sharma [EMAIL PROTECTED] + +Introduction: += This module logs kernel printk messages over UDP allowing debugging of problem where disk logging fails and serial consoles are impractical. @@ -13,6 +17,9 @@ the specified interface as soon as possi capture of early kernel panics, it does capture most of the boot process. +Sender and receiver configuration: +== + It takes a string configuration parameter netconsole in the following format: @@ -46,6 +53,67 @@ address. The remote host can run either 'netcat -u -l -p port' or syslogd. +Dynamic reconfiguration: + + +Dynamic reconfigurability is a useful addition to netconsole that enables +remote logging targets to be dynamically added, removed, or have their +parameters reconfigured at runtime from a configfs-based userspace interface. +[ Note that the parameters of netconsole targets that were specified/created +from the boot/module option are not exposed via this interface, and hence +cannot be modified dynamically. ] + +To include this feature, select CONFIG_NETCONSOLE_DYNAMIC when building the +netconsole module (or kernel, if netconsole is built-in). + +Some examples
Re: [PATCH v2 -mm 1/9] netconsole: Cleanups, codingstyle, prettyfication
On Tue, Jul 10, 2007 at 02:49:25PM +0530, Satyam Sharma wrote: From: Satyam Sharma [EMAIL PROTECTED] [1/9] netconsole: Cleanups, codingstyle, prettyfication (1) Remove unwanted headers. (2) Mark __init and __exit as appropriate. (3) Various trivial codingstyle and prettification stuff. I don't much like what you've done in (3) because I personally think tabs should never appear anywhere but at the beginning of a line. Which is why we consistently ask for people not to mix codingstyle bits with substantive changes. But what the hell.. 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 v2 -mm 2/9] netconsole: Remove bogus check
On Tue, Jul 10, 2007 at 02:49:30PM +0530, Satyam Sharma wrote: From: Satyam Sharma [EMAIL PROTECTED] [2/9] netconsole: Remove bogus check The (!np.dev) check in write_msg() is bogus (always false), because: np.dev is set by netpoll_setup(), which is called by the target init code in init_netconsole() _before_ register_console() = write_msg() cannot be triggered unless netpoll_setup() returns with success. And that will not happen if netpoll_setup() failed to set np.dev. Also np.dev cannot go from under us while netconsole is loaded. This is because netpoll_setup() grabs a reference for us on that dev. So let's remove the pointless check. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] 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: + gen_estimator-fix-locking-and-timer-related-bugs.patch added to -mm tree
On Mon, Jul 09, 2007 at 07:43:40PM +0300, Ranko Zivojnovic wrote: On Mon, 2007-07-09 at 15:52 +0200, Patrick McHardy wrote: Ranko Zivojnovic wrote: Patrick, I've taken liberty to try and implement this myself. Attached is the whole new gen_estimator-fix-locking-and-timer-related-bugs.patch that is RCU lists based. Please be kind to review. ... I've some doubts/suggestions too: --- a/net/core/gen_estimator.c2007-06-25 02:21:48.0 +0300 +++ b/net/core/gen_estimator.c2007-07-09 19:08:06.801544963 +0300 ... @@ -173,20 +172,24 @@ est-last_packets = bstats-packets; est-avpps = rate_est-pps10; - est-next = elist[est-interval].list; - if (est-next == NULL) { - init_timer(elist[est-interval].timer); - elist[est-interval].timer.data = est-interval; - elist[est-interval].timer.expires = jiffies + ((HZest-interval)/4); - elist[est-interval].timer.function = est_timer; - add_timer(elist[est-interval].timer); + if (!elist[idx].timer.function) { + INIT_LIST_HEAD(elist[idx].list); + setup_timer(elist[idx].timer, est_timer, est-interval); s/est-interval/idx/ here and below. } - write_lock_bh(est_lock); - elist[est-interval].list = est; - write_unlock_bh(est_lock); + + if (list_empty(elist[est-interval].list)) + mod_timer(elist[idx].timer, jiffies + ((HZidx)/4)); + + list_add_rcu(est-list, elist[idx].list); return 0; } +static void __gen_kill_estimator(struct rcu_head *head) +{ + struct gen_estimator *e = container_of(head, struct gen_estimator, e_rcu); + kfree(e); +} + /** * gen_kill_estimator - remove a rate estimator * @bstats: basic statistics @@ -199,26 +202,21 @@ struct gnet_stats_rate_est *rate_est) { ... + list_for_each_entry_safe(e, n, elist[idx].list, list) { IMHO, at least for readability list_for_each_entry_rcu() is better here. + if (e-rate_est != rate_est || e-bstats != bstats) + continue; - kfree(est); - killed++; + list_del_rcu(e-list); + call_rcu(e-e_rcu, __gen_kill_estimator); I think a race is possible here: e.g. a timer could be running after return from this function yet, and trying to use *bstats, *rate_est and maybe even stats_lock after their destruction. BTW, I think, rcu_read_lock/unlock are recommended around e.g. rcu lists traversals, even if the current implementation doesn't use them now. 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: [PATCH v2 -mm 3/9] netconsole: Simplify boot/module option setup logic
On Tue, Jul 10, 2007 at 02:49:36PM +0530, Satyam Sharma wrote: From: Satyam Sharma [EMAIL PROTECTED] [3/9] netconsole: Simplify boot/module option setup logic 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 v2 -mm 4/9] netconsole: Add some useful tips to documentation
On Tue, Jul 10, 2007 at 02:49:41PM +0530, Satyam Sharma wrote: From: Satyam Sharma [EMAIL PROTECTED] [4/9] netconsole: Add some useful tips to documentation Add some useful general-purpose tips. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] Acked-by: Matt Mackall [EMAIL PROTECTED] As long as we're on the subject, I've been meaning to add a note telling people to set their console log level to something useful, as having that set too low is the most common problem people encounter. -- 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
[PATCH] PCMCIA: add Socket Ethernet card into pcnet_cs
From: Marcin Juszkiewicz [EMAIL PROTECTED] One card submitted by Ångström user. Signed-off-by: Marcin Juszkiewicz [EMAIL PROTECTED] Index: git/drivers/net/pcmcia/pcnet_cs.c === --- git.orig/drivers/net/pcmcia/pcnet_cs.c 2007-03-07 09:48:53.046502055 +0100 +++ git/drivers/net/pcmcia/pcnet_cs.c 2007-03-07 09:50:26.426256388 +0100 @@ -1577,6 +1577,7 @@ PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1103), PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1121), PCMCIA_DEVICE_PROD_ID12(2408LAN, Ethernet, 0x352fff7f, 0x00b2e941), + PCMCIA_DEVICE_PROD_ID1234(Socket, CF 10/100 Ethernet Card, Revision B, 05/11/06, 0xb38bcc2e, 0x4de88352, 0xeaca6c8d, 0x7e57c22e), PCMCIA_DEVICE_PROD_ID123(Cardwell, PCMCIA, ETHERNET, 0x9533672e, 0x281f1c5d, 0x3ff7175b), PCMCIA_DEVICE_PROD_ID123(CNet , CN30BC, ETHERNET, 0x9fe55d3d, 0x85601198, 0x3ff7175b), PCMCIA_DEVICE_PROD_ID123(Digital, Ethernet, Adapter, 0xab35, 0x00b2e941, 0x4b0d829e), -- JID: hrw-jabber.org OpenEmbedded developer/consultant Great response time! Was that 5 baud or 10? - 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 re-resend] fix race in AF_UNIX garbage collector
Andrew, Can you please add this to -mm. Sometimes that has wonderful effect on the willingness of people to look at a patch. It fixes a bug in AF_UNIX sockets that affects the ulockmgr library in the fuse package. And for some reason it doesn't seem to interest the netdev guys in the least. Thanks, Miklos From: Miklos Szeredi [EMAIL PROTECTED] Throw out the old mark sweep garbage collector and put in a refcounting cycle detecting one. The old one had a race with recvmsg, that resulted in false positives and hence data loss. The old algorithm operated on all unix sockets in the system, so any additional locking would have meant performance problems for all users of these. The new algorithm instead only operates on in flight sockets, which are very rare, and the additional locking for these doesn't negatively impact the vast majority of users. In fact it's probable, that there weren't *any* heavy senders of sockets over sockets, otherwise the above race would have been discovered long ago. The patch works OK with the app that exposed the race with the old code. The garbage collection has also been verified to work in a few simple cases. See comments inside patch for the description of the algorithm. Signed-off-by: Miklos Szeredi [EMAIL PROTECTED] --- include/net/af_unix.h |3 net/unix/af_unix.c|6 net/unix/garbage.c| 329 -- 3 files changed, 192 insertions(+), 146 deletions(-) Index: linux-2.6.22-rc6/include/net/af_unix.h === --- linux-2.6.22-rc6.orig/include/net/af_unix.h 2007-06-27 22:53:53.0 +0200 +++ linux-2.6.22-rc6/include/net/af_unix.h 2007-06-27 22:53:55.0 +0200 @@ -79,9 +79,10 @@ struct unix_sock { struct mutexreadlock; struct sock*peer; struct sock*other; -struct sock*gc_tree; + struct list_headlink; atomic_tinflight; spinlock_t lock; + unsigned intgc_candidate : 1; wait_queue_head_t peer_wait; }; #define unix_sk(__sk) ((struct unix_sock *)__sk) Index: linux-2.6.22-rc6/net/unix/af_unix.c === --- linux-2.6.22-rc6.orig/net/unix/af_unix.c2007-06-27 22:53:53.0 +0200 +++ linux-2.6.22-rc6/net/unix/af_unix.c 2007-06-27 22:53:55.0 +0200 @@ -592,7 +592,8 @@ static struct sock * unix_create1(struct u-dentry = NULL; u-mnt= NULL; spin_lock_init(u-lock); - atomic_set(u-inflight, sock ? 0 : -1); + atomic_set(u-inflight, 0); + INIT_LIST_HEAD(u-link); mutex_init(u-readlock); /* single task reading lock */ init_waitqueue_head(u-peer_wait); unix_insert_socket(unix_sockets_unbound, sk); @@ -1134,9 +1135,6 @@ restart: /* take ten and and send info to listening sock */ spin_lock(other-sk_receive_queue.lock); __skb_queue_tail(other-sk_receive_queue, skb); - /* Undo artificially decreased inflight after embrion -* is installed to listening socket. */ - atomic_inc(newu-inflight); spin_unlock(other-sk_receive_queue.lock); unix_state_unlock(other); other-sk_data_ready(other, 0); Index: linux-2.6.22-rc6/net/unix/garbage.c === --- linux-2.6.22-rc6.orig/net/unix/garbage.c2007-06-27 22:53:53.0 +0200 +++ linux-2.6.22-rc6/net/unix/garbage.c 2007-06-27 22:53:55.0 +0200 @@ -62,6 +62,10 @@ * AV 1 Mar 1999 * Damn. Added missing check for -dead in listen queues scanning. * + * Miklos Szeredi 25 Jun 2007 + * Reimplement with a cycle collecting algorithm. This should + * solve several problems with the previous code, like being racy + * wrt receive and holding up unrelated socket operations. */ #include linux/kernel.h @@ -84,10 +88,9 @@ /* Internal data structures and random procedures: */ -#define GC_HEAD((struct sock *)(-1)) -#define GC_ORPHAN ((struct sock *)(-3)) - -static struct sock *gc_current = GC_HEAD; /* stack of objects to mark */ +static LIST_HEAD(gc_inflight_list); +static LIST_HEAD(gc_candidates); +static DEFINE_SPINLOCK(unix_gc_lock); atomic_t unix_tot_inflight = ATOMIC_INIT(0); @@ -122,8 +125,16 @@ void unix_inflight(struct file *fp) { struct sock *s = unix_get_socket(fp); if(s) { - atomic_inc(unix_sk(s)-inflight); + struct unix_sock *u = unix_sk(s); + spin_lock(unix_gc_lock); + if (atomic_inc_return(u-inflight) == 1) { + BUG_ON(!list_empty(u-link)); + list_add_tail(u-link, gc_inflight_list); + } else { +
[PATCH] Fix typo in drivers/net/s2io.c
Introduced in d796fdb708fc5b10112934cba43e832c36ce4923. Signed-off-by: Rolf Eike Beer [EMAIL PROTECTED] --- commit 58056c2424917e90b86ca11c2c5d3fd35313d7b6 tree 854d63a14f96416aad64d12ea71cb331acfcc7db parent 87a2df362631d53fdc169a5d76969365aff69c10 author Rolf Eike Beer [EMAIL PROTECTED] Tue, 10 Jul 2007 11:55:46 +0200 committer Rolf Eike Beer [EMAIL PROTECTED] Tue, 10 Jul 2007 11:55:46 +0200 drivers/net/s2io.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 2d826ff..fa29a40 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -8036,7 +8036,7 @@ static void lro_append_pkt(struct s2io_nic *sp, struct lro *lro, /** * s2io_io_error_detected - called when PCI error is detected * @pdev: Pointer to PCI device - * @state: The current pci conneection state + * @state: The current pci connection state * * This function is called after a PCI bus error affecting * this device has been detected. - 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 re-resend] fix race in AF_UNIX garbage collector
On Tue, 10 Jul 2007 11:50:30 +0200 Miklos Szeredi [EMAIL PROTECTED] wrote: Can you please add this to -mm. Sometimes that has wonderful effect on the willingness of people to look at a patch. sure ;) It fixes a bug in AF_UNIX sockets that affects the ulockmgr library in the fuse package. And for some reason it doesn't seem to interest the netdev guys in the least. heh. Maybe it's time to swap the MM and net development teams around. Things have been getting a bit dull around here lately. - 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: + gen_estimator-fix-locking-and-timer-related-bugs.patch added to -mm tree
On Tue, 2007-07-10 at 09:34 +0200, Jarek Poplawski wrote: On Mon, Jul 09, 2007 at 07:43:40PM +0300, Ranko Zivojnovic wrote: On Mon, 2007-07-09 at 15:52 +0200, Patrick McHardy wrote: Ranko Zivojnovic wrote: Patrick, I've taken liberty to try and implement this myself. Attached is the whole new gen_estimator-fix-locking-and-timer-related-bugs.patch that is RCU lists based. Please be kind to review. ... I've some doubts/suggestions too: --- a/net/core/gen_estimator.c 2007-06-25 02:21:48.0 +0300 +++ b/net/core/gen_estimator.c 2007-07-09 19:08:06.801544963 +0300 ... @@ -173,20 +172,24 @@ est-last_packets = bstats-packets; est-avpps = rate_est-pps10; - est-next = elist[est-interval].list; - if (est-next == NULL) { - init_timer(elist[est-interval].timer); - elist[est-interval].timer.data = est-interval; - elist[est-interval].timer.expires = jiffies + ((HZest-interval)/4); - elist[est-interval].timer.function = est_timer; - add_timer(elist[est-interval].timer); + if (!elist[idx].timer.function) { + INIT_LIST_HEAD(elist[idx].list); + setup_timer(elist[idx].timer, est_timer, est-interval); s/est-interval/idx/ here and below. Agree - will do by final submission. } - write_lock_bh(est_lock); - elist[est-interval].list = est; - write_unlock_bh(est_lock); + + if (list_empty(elist[est-interval].list)) + mod_timer(elist[idx].timer, jiffies + ((HZidx)/4)); + + list_add_rcu(est-list, elist[idx].list); return 0; } +static void __gen_kill_estimator(struct rcu_head *head) +{ + struct gen_estimator *e = container_of(head, struct gen_estimator, e_rcu); + kfree(e); +} + /** * gen_kill_estimator - remove a rate estimator * @bstats: basic statistics @@ -199,26 +202,21 @@ struct gnet_stats_rate_est *rate_est) { ... + list_for_each_entry_safe(e, n, elist[idx].list, list) { IMHO, at least for readability list_for_each_entry_rcu() is better here. Should not hurt - however functionality wise not necessary as the list is protected by rtnl_mutex from being altered - also, for correctness, it should be list_for_each_safe_rcu() as there is a list_del_rcu in the loop... However I decided not to use _rcu based iteration neither the rcu_read_lock() after going through the RCU documentation and a bunch of examples in kernel that iterate through the lists using non _rcu macros and do list_del_rcu() just fine. For readability, the reference to list_del_rcu as well as call_rcu, I believe, should be enough of the indication. Please do correct me if I am wrong here. + if (e-rate_est != rate_est || e-bstats != bstats) + continue; - kfree(est); - killed++; + list_del_rcu(e-list); + call_rcu(e-e_rcu, __gen_kill_estimator); I think a race is possible here: e.g. a timer could be running after return from this function yet, and trying to use *bstats, *rate_est and maybe even stats_lock after their destruction. That will not happen because est_timer protects the loop with rcu_read_lock() as well as the iteration is done using list_for_each_entry_rcu(). The destruction callback is deferred and will happen only after the outermost rcu_read_unlock() is called. Well - that is at least what the documentation says... BTW, I think, rcu_read_lock/unlock are recommended around e.g. rcu lists traversals, even if the current implementation doesn't use them now. I am afraid I do not understand what that the current implementation is not using right now... The whole concept and the implementation of the RCU, as I understand it, depends on rcu_read_lock/unlock to protect the read-side critical sections... Please be kind to elaborate... R. - 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 v2 -mm 8/9] netconsole: Support multiple logging targets
On 10/07/07, Satyam Sharma [EMAIL PROTECTED] wrote: + /* Avoid taking lock and disabling interrupts unnecessarily */ + if (unlikely(list_empty(target_list))) + return; Is the unlikely a good idea here? Not having any targets may be unusual but it isn't ridiculous. It might even be a sensible default for distros. My (very limited) understanding of unlikely is that it could impose a very large penalty in that case and would make a very marginal difference at best in the common case. Cheers, Duane. -- I never could learn to drink that blood and call it wine - Bob Dylan - 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: Races in net_rx_action vs netpoll?
On Tuesday 10 July 2007 00:27, David Miller wrote: I'm happy to entertain this kind of solution, but we really need to first have an interface to change multiple bits at a time in one atomic operation, because by itself this patch doubles the number of atomices we do when starting a NAPI poll. Understood. How about the patch below? It takes a similar approach, but it puts the onus on the netpoll code path rather than the general NAPI case. Olaf -- From: Olaf Kirch [EMAIL PROTECTED] Keep netpoll/poll_napi from messing with the poll_list. Only net_rx_action is allowed to manipulate the list. Signed-off-by: Olaf Kirch [EMAIL PROTECTED] --- include/linux/netdevice.h | 10 ++ net/core/netpoll.c|8 2 files changed, 18 insertions(+) Index: iscsi-2.6/include/linux/netdevice.h === --- iscsi-2.6.orig/include/linux/netdevice.h +++ iscsi-2.6/include/linux/netdevice.h @@ -248,6 +248,8 @@ enum netdev_state_t __LINK_STATE_LINKWATCH_PENDING, __LINK_STATE_DORMANT, __LINK_STATE_QDISC_RUNNING, + /* Set by the netpoll NAPI code */ + __LINK_STATE_POLL_LIST_FROZEN, }; @@ -919,6 +921,14 @@ static inline void netif_rx_complete(str { unsigned long flags; +#ifdef CONFIG_NETPOLL + /* Prevent race with netpoll - yes, this is a kludge. +* But at least it doesn't penalize the non-netpoll +* code path. */ + if (test_bit(__LINK_STATE_POLL_LIST_FROZEN, dev-state)) + return; +#endif + local_irq_save(flags); BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, dev-state)); list_del(dev-poll_list); Index: iscsi-2.6/net/core/netpoll.c === --- iscsi-2.6.orig/net/core/netpoll.c +++ iscsi-2.6/net/core/netpoll.c @@ -123,6 +123,13 @@ static void poll_napi(struct netpoll *np if (test_bit(__LINK_STATE_RX_SCHED, np-dev-state) npinfo-poll_owner != smp_processor_id() spin_trylock(npinfo-poll_lock)) { + /* When calling dev-poll from poll_napi, we may end up in +* netif_rx_complete. However, only the CPU to which the +* device was queued is allowed to remove it from poll_list. +* Setting POLL_LIST_FROZEN tells netif_rx_complete +* to leave the NAPI state alone. +*/ + set_bit(__LINK_STATE_POLL_LIST_FROZEN, np-dev-state); npinfo-rx_flags |= NETPOLL_RX_DROP; atomic_inc(trapped); @@ -130,6 +137,7 @@ static void poll_napi(struct netpoll *np atomic_dec(trapped); npinfo-rx_flags = ~NETPOLL_RX_DROP; + clear_bit(__LINK_STATE_POLL_LIST_FROZEN, np-dev-state); spin_unlock(npinfo-poll_lock); } } -- Olaf Kirch | --- o --- Nous sommes du soleil we love when we play [EMAIL PROTECTED] |/ | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax - 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: + gen_estimator-fix-locking-and-timer-related-bugs.patch added to -mm tree
On Tue, Jul 10, 2007 at 01:09:07PM +0300, Ranko Zivojnovic wrote: On Tue, 2007-07-10 at 09:34 +0200, Jarek Poplawski wrote: On Mon, Jul 09, 2007 at 07:43:40PM +0300, Ranko Zivojnovic wrote: On Mon, 2007-07-09 at 15:52 +0200, Patrick McHardy wrote: Ranko Zivojnovic wrote: Patrick, I've taken liberty to try and implement this myself. Attached is the whole new gen_estimator-fix-locking-and-timer-related-bugs.patch that is RCU lists based. Please be kind to review. ... I've some doubts/suggestions too: --- a/net/core/gen_estimator.c2007-06-25 02:21:48.0 +0300 +++ b/net/core/gen_estimator.c2007-07-09 19:08:06.801544963 +0300 ... struct gnet_stats_rate_est *rate_est) { ... + list_for_each_entry_safe(e, n, elist[idx].list, list) { IMHO, at least for readability list_for_each_entry_rcu() is better here. Should not hurt - however functionality wise not necessary as the list is protected by rtnl_mutex from being altered - also, for correctness, it should be list_for_each_safe_rcu() as there is a list_del_rcu in the loop... However I decided not to use _rcu based iteration neither the rcu_read_lock() after going through the RCU documentation and a bunch of examples in kernel that iterate through the lists using non _rcu macros and do list_del_rcu() just fine. For readability, the reference to list_del_rcu as well as call_rcu, I believe, should be enough of the indication. Please do correct me if I am wrong here. It's only my opinion, and it's probably not very popular at least at net/ code, so it's more about general policy and not this particular code. But: - if somebody is looking after some rcu related problems, why can't he/she spare some time by omitting lists without _rcu and not analyzing why/how such lists are used and locked? - if some day rcu code should change and needs to know precisely, where all the reads and writes take place (or some automatic tool needs this for checking), and it's no problem to show this now, why leave this for future? + if (e-rate_est != rate_est || e-bstats != bstats) + continue; - kfree(est); - killed++; + list_del_rcu(e-list); + call_rcu(e-e_rcu, __gen_kill_estimator); I think a race is possible here: e.g. a timer could be running after return from this function yet, and trying to use *bstats, *rate_est and maybe even stats_lock after their destruction. That will not happen because est_timer protects the loop with rcu_read_lock() as well as the iteration is done using list_for_each_entry_rcu(). The destruction callback is deferred and will happen only after the outermost rcu_read_unlock() is called. Well - that is at least what the documentation says... I'm not very sure it's really possible, so I hope it'll be checked by somebody more. I don't mean gen_estimator struct here, but gnet_stats_basic and gnet_stats_rate_est structs here, which are allocated elsewhere, and could be destructed just 'after' - if not before: that's the question... E.g. when we are leaving this function, on another cpu a timer could traverse this list and I'm not sure rcu has to show the change fast enough - before freeing these other structs. BTW, I think, rcu_read_lock/unlock are recommended around e.g. rcu lists traversals, even if the current implementation doesn't use them now. I am afraid I do not understand what that the current implementation is not using right now... The whole concept and the implementation of the RCU, as I understand it, depends on rcu_read_lock/unlock to protect the read-side critical sections... Please be kind to elaborate... Don't take this very seriously, there are many opinions... Cheers, Jarek P. PS: I think you could read more about this here: http://marc.info/?l=linux-kernelm=118193431820959w=2 Especially this: List: linux-kernel Subject:Re: Using RCU with rcu_read_lock()? From: Peter Zijlstra a.p.zijlstra () chello ! nl Date: 2007-06-15 19:04:19 Message-ID: 1181934259.3.6.camel () lappy [Download message RAW] On Fri, 2007-06-15 at 15:00 -0400, Dmitry Torokhov wrote: Hi, I have a piece of code that is always called under a spinlock with interrups disabled. Within that piece of code I iterate through a list. I have another piece of code that wants to modify that list. I have 2 options: 1) Have the other piece of code acquire the same spinlock 2) Use RCU I don't want to do 1) because the otheir piece of code does not really care about object owning the spinlock and so acquiring the spinlock is not nice. However it is guaranteed that the piece of code that accesses lock runs atomically with interrupts disabled. So rcu_read_lock() would be superfluos there. Is it possible to still use list_for_each_rcu() and friends to access that list without
Re: + gen_estimator-fix-locking-and-timer-related-bugs.patch added to -mm tree
Jarek Poplawski wrote: On Tue, Jul 10, 2007 at 01:09:07PM +0300, Ranko Zivojnovic wrote: However I decided not to use _rcu based iteration neither the rcu_read_lock() after going through the RCU documentation and a bunch of examples in kernel that iterate through the lists using non _rcu macros and do list_del_rcu() just fine. For readability, the reference to list_del_rcu as well as call_rcu, I believe, should be enough of the indication. Please do correct me if I am wrong here. It's only my opinion, and it's probably not very popular at least at net/ code, so it's more about general policy and not this particular code. But: - if somebody is looking after some rcu related problems, why can't he/she spare some time by omitting lists without _rcu and not analyzing why/how such lists are used and locked? RCU is used for the read-side, using it on the write-side just makes things *less* understandable IMO. It will look like the read-side but still do modifications. - 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 v2 -mm 4/9] netconsole: Add some useful tips to documentation
On Tuesday 10 July 2007 11:41:43 Matt Mackall wrote: On Tue, Jul 10, 2007 at 02:49:41PM +0530, Satyam Sharma wrote: From: Satyam Sharma [EMAIL PROTECTED] [4/9] netconsole: Add some useful tips to documentation Add some useful general-purpose tips. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] Acked-by: Matt Mackall [EMAIL PROTECTED] As long as we're on the subject, I've been meaning to add a note telling people to set their console log level to something useful, as having that set too low is the most common problem people encounter. How about this? From: Satyam Sharma [EMAIL PROTECTED] Add some useful general-purpose tips. Signed-off-by: Satyam Sharma [EMAIL PROTECTED] Cc: Keiichi Kii [EMAIL PROTECTED] Acked-by: Matt Mackall [EMAIL PROTECTED] Signed-off-by: Jesper Juhl [EMAIL PROTECTED] --- Documentation/networking/netconsole.txt | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/Documentation/networking/netconsole.txt b/Documentation/networking/netconsole.txt index 1caa6c7..ffd5058 100644 --- a/Documentation/networking/netconsole.txt +++ b/Documentation/networking/netconsole.txt @@ -44,11 +44,29 @@ WARNING: the default target ethernet setting uses the broadcast ethernet address to send packets, which can cause increased load on other systems on the same ethernet segment. +TIP: some LAN switches may be configured to suppress ethernet broadcasts +so it is advised to explicitly specify the remote agents' MAC addresses +from the config parameters passed to netconsole. + +TIP: to find out the MAC address of, say, 10.0.0.2, you may try using: + + ping -c 1 10.0.0.2 ; /sbin/arp -n | grep 10.0.0.2 + +TIP: in case the remote logging agent is on a separate LAN subnet than +the sender, it is suggested to try specifying the MAC address of the +default gateway (you may use /sbin/route -n to find it out) as the +remote MAC address instead. + NOTE: the network device (eth1 in the above case) can run any kind of other network traffic, netconsole is not intrusive. Netconsole might cause slight delays in other traffic if the volume of kernel messages is high, but should have no other impact. +Some people forget to raise the kernels log_level to an +appropriate level and thus don't see all the kernel log messages they +expect. You can add the kernel boot option ignore_loglevel to see all +messages or you can use SysRq to set the log level to a specific value. + Netconsole was designed to be as instantaneous as possible, to enable the logging of even the most critical kernel bugs. It works from IRQ contexts as well, and does not enable interrupts while - 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] sis900_mii_probe() must be __devinit
This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x298170): Section mismatch: reference to .init.text:sis900_mii_probe (between 'sis900_probe' and 'sis900_default_phy') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- --- linux-2.6.22-rc6-mm1/drivers/net/sis900.c.old 2007-07-10 04:02:23.0 +0200 +++ linux-2.6.22-rc6-mm1/drivers/net/sis900.c 2007-07-10 04:03:31.0 +0200 @@ -573,7 +573,7 @@ * return error if it failed to found. */ -static int __init sis900_mii_probe(struct net_device * net_dev) +static int __devinit sis900_mii_probe(struct net_device * net_dev) { struct sis900_private * sis_priv = net_dev-priv; const char *dev_name = pci_name(sis_priv-pci_dev); - 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] tokenring/3c359.c:xl_init() must be __devinit
This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x361ef1): Section mismatch: reference to .init.text:xl_init (between 'xl_probe' and 'xl_hw_reset') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- --- linux-2.6.22-rc6-mm1/drivers/net/tokenring/3c359.c.old 2007-07-10 04:07:19.0 +0200 +++ linux-2.6.22-rc6-mm1/drivers/net/tokenring/3c359.c 2007-07-10 04:08:01.0 +0200 @@ -363,7 +363,7 @@ } -static int __init xl_init(struct net_device *dev) +static int __devinit xl_init(struct net_device *dev) { struct xl_private *xl_priv = (struct xl_private *)dev-priv ; - 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] fore200e_param_bs_queue() must be __devinit
This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x6203bb): Section mismatch: reference to .init.text:fore200e_param_bs_queue (between 'fore200e_initialize' and 'fore200e_monitor_putc') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- --- linux-2.6.22-rc6-mm1/drivers/atm/fore200e.c.old 2007-07-10 04:11:43.0 +0200 +++ linux-2.6.22-rc6-mm1/drivers/atm/fore200e.c 2007-07-10 04:12:48.0 +0200 @@ -2435,7 +2435,7 @@ } -static void __init +static void __devinit fore200e_param_bs_queue(struct fore200e* fore200e, enum buffer_scheme scheme, enum buffer_magn magn, int queue_length, int pool_size, int supply_blksize) - 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] atm/lanai.c:sram_test_word() must be __devinit
This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x62e4f7): Section mismatch: reference to .init.text:sram_test_word (between 'sram_test_pass' and 'sram_test_and_clear') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- --- linux-2.6.22-rc6-mm1/drivers/atm/lanai.c.old2007-07-10 04:14:40.0 +0200 +++ linux-2.6.22-rc6-mm1/drivers/atm/lanai.c2007-07-10 04:15:20.0 +0200 @@ -553,8 +553,8 @@ writel(val, sram_addr(lanai, offset)); } -static int __init sram_test_word( - const struct lanai_dev *lanai, int offset, u32 pattern) +static int __devinit sram_test_word(const struct lanai_dev *lanai, + int offset, u32 pattern) { u32 readback; sram_write(lanai, pattern, offset); - 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] rrunner.c:rr_init() must be __devinit
This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x26e3f2): Section mismatch: reference to .init.text:rr_init (between 'rr_init_one' and 'rr_remove_one') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- --- linux-2.6.22-rc6-mm1/drivers/net/rrunner.c.old 2007-07-10 04:34:33.0 +0200 +++ linux-2.6.22-rc6-mm1/drivers/net/rrunner.c 2007-07-10 04:34:42.0 +0200 @@ -516,7 +516,7 @@ } -static int __init rr_init(struct net_device *dev) +static int __devinit rr_init(struct net_device *dev) { struct rr_private *rrpriv; struct rr_regs __iomem *regs; - 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] sunhme.c:quattro_pci_find() must be __devinit
This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x272f8b): Section mismatch: reference to .init.text:quattro_pci_find (between 'happy_meal_pci_probe' and 'happy_meal_pci_remove') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] --- --- linux-2.6.22-rc6-mm1/drivers/net/sunhme.c.old 2007-07-10 04:41:59.0 +0200 +++ linux-2.6.22-rc6-mm1/drivers/net/sunhme.c 2007-07-10 04:42:56.0 +0200 @@ -2625,7 +2625,7 @@ #endif /* CONFIG_SBUS */ #ifdef CONFIG_PCI -static struct quattro * __init quattro_pci_find(struct pci_dev *pdev) +static struct quattro * __devinit quattro_pci_find(struct pci_dev *pdev) { struct pci_dev *bdev = pdev-bus-self; struct quattro *qp; - 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] QE Ethernet driver writes to wrong register to mask interrupts
The QE Ethernet driver was writing to the wrong register to mask interrupts. In ucc_geth_stop(), it was clearing UCCE instead of UCCM. Signed-off-by: Timur Tabi [EMAIL PROTECTED] --- drivers/net/ucc_geth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 18b731b..e4736a3 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c @@ -2276,7 +2276,7 @@ static void ucc_geth_stop(struct ucc_geth_private *ugeth) phy_stop(phydev); /* Mask all interrupts */ - out_be32(ugeth-uccf-p_ucce, 0x); + out_be32(ugeth-uccf-p_uccm, 0x); /* Clear all interrupts */ out_be32(ugeth-uccf-p_ucce, 0x); -- 1.5.0.2.260.g2eb065 - 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] QE Ethernet driver writes to wrong register to mask interrupts
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tabi Timur-B04825 Sent: Tuesday, July 10, 2007 8:51 PM To: [EMAIL PROTECTED]; netdev@vger.kernel.org Cc: Tabi Timur-B04825 Subject: [PATCH] QE Ethernet driver writes to wrong register to mask interrupts The QE Ethernet driver was writing to the wrong register to mask interrupts. In ucc_geth_stop(), it was clearing UCCE instead of UCCM. Signed-off-by: Timur Tabi [EMAIL PROTECTED] Acked-by: Li Yang [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: + gen_estimator-fix-locking-and-timer-related-bugs.patch added to -mm tree
On Tue, Jul 10, 2007 at 02:20:12PM +0200, Patrick McHardy wrote: Jarek Poplawski wrote: On Tue, Jul 10, 2007 at 01:09:07PM +0300, Ranko Zivojnovic wrote: However I decided not to use _rcu based iteration neither the rcu_read_lock() after going through the RCU documentation and a bunch of examples in kernel that iterate through the lists using non _rcu macros and do list_del_rcu() just fine. For readability, the reference to list_del_rcu as well as call_rcu, I believe, should be enough of the indication. Please do correct me if I am wrong here. It's only my opinion, and it's probably not very popular at least at net/ code, so it's more about general policy and not this particular code. But: - if somebody is looking after some rcu related problems, why can't he/she spare some time by omitting lists without _rcu and not analyzing why/how such lists are used and locked? RCU is used for the read-side, using it on the write-side just makes things *less* understandable IMO. It will look like the read-side but still do modifications. From Documentation/RCU/checklist: 9. All RCU list-traversal primitives, which include list_for_each_rcu(), list_for_each_entry_rcu(), list_for_each_continue_rcu(), and list_for_each_safe_rcu(), must be within an RCU read-side critical section. RCU read-side critical sections are delimited by rcu_read_lock() and rcu_read_unlock(), or by similar primitives such as rcu_read_lock_bh() and rcu_read_unlock_bh(). Use of the _rcu() list-traversal primitives outside of an RCU read-side critical section causes no harm other than a slight performance degradation on Alpha CPUs. It can also be quite helpful in reducing code bloat when common code is shared between readers and updaters. So, it seems, it's a question of taste about what is this bloat. I'd certainly agree with you if the write-side looks like in examples from documentation: there is always a few lines of code with some spinlocks. But here we see no locks and no comments, so each time we have to guess which of the supposed here locks is needed for RCU or maybe for the lists without rcu. Sorry, for messing here with my private opinions: I really shouldn't start this theme. 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
iproute2 showing wrong number of bytes on 64bit architectures.
Hello! While investigating the problems reported in Debian bug #199054 (http://bugs.debian.org/199054), stating that the RX/TX bytes differ between ifconfig and ip(route2) I came across this: include/linux/if_link.h (used in kernel and iproute2 source): /* The struct should be in sync with struct net_device_stats */ struct rtnl_link_stats { __u32 ...; __u32 ...; __u32 ...; __u32 ...; ... include/linux/netdevice.h: struct net_device_stats { unsigned long ...; unsigned long ...; unsigned long ...; unsigned long ...; unsigned long ...; This will be a problem when unsigned long isn't 32bits, but I guess the rtnetlink message size is static for good reason. Can someone please advise on how to fix this? -- Regards, Andreas Henriksson - 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: + gen_estimator-fix-locking-and-timer-related-bugs.patch added to -mm tree
On Tue, Jul 10, 2007 at 03:10:34PM +0200, Jarek Poplawski wrote: On Tue, Jul 10, 2007 at 02:20:12PM +0200, Patrick McHardy wrote: Jarek Poplawski wrote: On Tue, Jul 10, 2007 at 01:09:07PM +0300, Ranko Zivojnovic wrote: However I decided not to use _rcu based iteration neither the rcu_read_lock() after going through the RCU documentation and a bunch of examples in kernel that iterate through the lists using non _rcu macros and do list_del_rcu() just fine. For readability, the reference to list_del_rcu as well as call_rcu, I believe, should be enough of the indication. Please do correct me if I am wrong here. It's only my opinion, and it's probably not very popular at least at net/ code, so it's more about general policy and not this particular code. But: - if somebody is looking after some rcu related problems, why can't he/she spare some time by omitting lists without _rcu and not analyzing why/how such lists are used and locked? RCU is used for the read-side, using it on the write-side just makes things *less* understandable IMO. It will look like the read-side but still do modifications. From Documentation/RCU/checklist: 9. All RCU list-traversal primitives, which include list_for_each_rcu(), list_for_each_entry_rcu(), list_for_each_continue_rcu(), and list_for_each_safe_rcu(), must be within an RCU read-side critical section. RCU read-side critical sections are delimited by rcu_read_lock() and rcu_read_unlock(), or by similar primitives such as rcu_read_lock_bh() and rcu_read_unlock_bh(). ...But, on the other hand, Ranko didn't use any of these primitives... So, first I said he should use this, and than I asked why there was no rcu_read_locks around... I really start to amaze with my consistency. I hope some day you'll forgive me (no hurry, I can wait). 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: [PATCH 2.6] WE : Fix get 32 char ESSID
On Mon, Jul 09, 2007 at 03:13:22PM -0700, Jean Tourrilhes wrote: A little bug was introduced a few months ago that prevent reading ESSID with 32 character. Philippe Teuwen was the first one to report that, followed by the MadWifi team : http://madwifi.org/ticket/930 The patch fix this bug by removing obsolete code. It also reenable setting the full range of ESSID, including ESSID with a final NUL which are valid. This was tested on 2.6.21 and 2.6.22. John : would you mind pushing that to 2.6.23 ? If you are happy with it, I can provide backport patches for earlier kernels. Jean, Thanks for the patch. Iirc, I wrote this ugly little piece of code that you seek to remove. It's purpose is/was to preserve userland ABI for older versions of the wireless-tools package. I'll have to dig a little deeper if you need a more detailed refresher -- let me know. In that case, I believe the issue was that using older wireless-tools w/ newer kernels would result in the SSID getting truncated by one character. If we apply this patch (removing my hack/fix), won't we be reintroducing that issue? If not, can you remind me as to why not? Thanks, John Signed-off-by: Jean Tourrilhes [EMAIL PROTECTED] --- --- linux/net/wireless/wext.j1.c 2007-07-09 13:19:22.0 -0700 +++ linux/net/wireless/wext.c 2007-07-09 13:19:59.0 -0700 @@ -741,39 +741,11 @@ static int ioctl_standard_call(struct ne int extra_size; int user_length = 0; int err; - int essid_compat = 0; /* Calculate space needed by arguments. Always allocate * for max space. Easier, and won't last long... */ extra_size = descr-max_tokens * descr-token_size; - /* Check need for ESSID compatibility for WE 21 */ - switch (cmd) { - case SIOCSIWESSID: - case SIOCGIWESSID: - case SIOCSIWNICKN: - case SIOCGIWNICKN: - if (iwr-u.data.length == descr-max_tokens + 1) - essid_compat = 1; - else if (IW_IS_SET(cmd) (iwr-u.data.length != 0)) { - char essid[IW_ESSID_MAX_SIZE + 1]; - - err = copy_from_user(essid, iwr-u.data.pointer, - iwr-u.data.length * - descr-token_size); - if (err) - return -EFAULT; - - if (essid[iwr-u.data.length - 1] == '\0') - essid_compat = 1; - } - break; - default: - break; - } - - iwr-u.data.length -= essid_compat; - /* Check what user space is giving us */ if (IW_IS_SET(cmd)) { /* Check NULL pointer */ @@ -811,7 +783,6 @@ static int ioctl_standard_call(struct ne } /* Create the kernel buffer */ - /*kzalloc ensures NULL-termination for essid_compat */ extra = kzalloc(extra_size, GFP_KERNEL); if (extra == NULL) return -ENOMEM; @@ -830,8 +801,6 @@ static int ioctl_standard_call(struct ne /* Call the handler */ ret = handler(dev, info, (iwr-u), extra); - iwr-u.data.length += essid_compat; - /* If we have something to return to the user */ if (!ret IW_IS_GET(cmd)) { /* Check if there is enough buffer up there */ - To unsubscribe from this list: send the line unsubscribe linux-wireless in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html -- John W. Linville [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
[PATCH] e100: Fix Tyan motherboard e100 not receiving IPMI commands
From: David Graham [EMAIL PROTECTED] The 82550 51 parts have an extended configuration block that includes a bit GMRC, required to enable the expected TCO behavior, in config byte offset 22d. The config block sent by the failing driver does include the extension area, but this bit is not initialised, and the downlaod only specifies 0x16 bytes to be sent to the NIC (thaht's bytes 00..21d). By initializing the GMRC bit, and extending the download size for D102+ MACs, the problem is resolved. Signed-off-by: David Graham [EMAIL PROTECTED] Signed-off-by: Auke Kok [EMAIL PROTECTED] --- drivers/net/e100.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 763810c..74ea637 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c @@ -159,7 +159,7 @@ #define DRV_NAME e100 #define DRV_EXT-NAPI -#define DRV_VERSION3.5.17-k4DRV_EXT +#define DRV_VERSION3.5.23-k4DRV_EXT #define DRV_DESCRIPTIONIntel(R) PRO/100 Network Driver #define DRV_COPYRIGHT Copyright(c) 1999-2006 Intel Corporation #define PFXDRV_NAME : @@ -1024,10 +1024,16 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb) config-mwi_enable = 0x1; /* 1=enable, 0=disable */ config-standard_tcb = 0x0; /* 1=standard, 0=extended */ config-rx_long_ok = 0x1; /* 1=VLANs ok, 0=standard */ - if(nic-mac = mac_82559_D101M) + if (nic-mac = mac_82559_D101M) { config-tno_intr = 0x1; /* TCO stats enable */ - else + /* Enable TCO in extended config */ + if (nic-mac = mac_82551_10) { + config-byte_count = 0x20; /* extended bytes */ + config-rx_d102_mode = 0x1; /* GMRC for TCO */ + } + } else { config-standard_stat_counter = 0x0; + } } DPRINTK(HW, DEBUG, [00-07]=%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\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
Fw: iproute2 showing wrong number of bytes on 64bit architectures.
Looks like net_device_stats should have always used u32? Too late to change it now. Begin forwarded message: Date: Tue, 10 Jul 2007 13:58:51 +0200 From: Andreas Henriksson [EMAIL PROTECTED] To: netdev@vger.kernel.org Cc: [EMAIL PROTECTED] Subject: iproute2 showing wrong number of bytes on 64bit architectures. Hello! While investigating the problems reported in Debian bug #199054 (http://bugs.debian.org/199054), stating that the RX/TX bytes differ between ifconfig and ip(route2) I came across this: include/linux/if_link.h (used in kernel and iproute2 source): /* The struct should be in sync with struct net_device_stats */ struct rtnl_link_stats { __u32 ...; __u32 ...; __u32 ...; __u32 ...; ... include/linux/netdevice.h: struct net_device_stats { unsigned long ...; unsigned long ...; unsigned long ...; unsigned long ...; unsigned long ...; This will be a problem when unsigned long isn't 32bits, but I guess the rtnetlink message size is static for good reason. Can someone please advise on how to fix this? -- Regards, Andreas Henriksson - 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 -- 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
[IOC3] Switch to pci refcounting safe APIs
From: Alan Cox [EMAIL PROTECTED] Convert the IOC3 driver to use ref counting pci interfaces so that we can obsolete the (usually unsafe) pci_find_{slot/device} interfaces and avoid future authors writing hotplug-unsafe device drivers. Signed-off-by: Alan Cox [EMAIL PROTECTED] Build fixes: Signed-off-by: Ralf Baechle [EMAIL PROTECTED] Index: upstream-linus/drivers/net/ioc3-eth.c === --- upstream-linus.orig/drivers/net/ioc3-eth.c +++ upstream-linus/drivers/net/ioc3-eth.c @@ -352,13 +352,12 @@ static u64 nic_find(struct ioc3 *ioc3, i static int nic_init(struct ioc3 *ioc3) { - const char *type; + const char *unknown = unknown; + const char *type = unknown; u8 crc; u8 serial[6]; int save = 0, i; - type = unknown; - while (1) { u64 reg; reg = nic_find(ioc3, save); @@ -392,7 +391,7 @@ static int nic_init(struct ioc3 *ioc3) } printk(Found %s NIC, type); - if (type != unknown) { + if (type != unknown) { printk ( registration number %02x:%02x:%02x:%02x:%02x:%02x, CRC %02x, serial[0], serial[1], serial[2], serial[3], serial[4], serial[5], crc); @@ -1103,20 +1102,28 @@ static int ioc3_close(struct net_device * MiniDINs; all other subdevices are left swinging in the wind, leave * them disabled. */ -static inline int ioc3_is_menet(struct pci_dev *pdev) + +static int ioc3_adjacent_is_ioc3(struct pci_dev *pdev, int slot) { - struct pci_dev *dev; + struct pci_dev *dev = pci_get_slot(pdev-bus, PCI_DEVFN(slot, 0)); + int ret = 0; + + if (dev) { + if (dev-vendor == PCI_VENDOR_ID_SGI + dev-device == PCI_DEVICE_ID_SGI_IOC3) + ret = 1; + pci_dev_put(dev); + } - return pdev-bus-parent == NULL - (dev = pci_find_slot(pdev-bus-number, PCI_DEVFN(0, 0))) - dev-vendor == PCI_VENDOR_ID_SGI - dev-device == PCI_DEVICE_ID_SGI_IOC3 - (dev = pci_find_slot(pdev-bus-number, PCI_DEVFN(1, 0))) - dev-vendor == PCI_VENDOR_ID_SGI - dev-device == PCI_DEVICE_ID_SGI_IOC3 - (dev = pci_find_slot(pdev-bus-number, PCI_DEVFN(2, 0))) - dev-vendor == PCI_VENDOR_ID_SGI - dev-device == PCI_DEVICE_ID_SGI_IOC3; + return ret; +} + +static int ioc3_is_menet(struct pci_dev *pdev) +{ + return pdev-bus-parent == NULL + ioc3_adjacent_is_ioc3(pdev, 0) + ioc3_adjacent_is_ioc3(pdev, 1) + ioc3_adjacent_is_ioc3(pdev, 2); } #ifdef CONFIG_SERIAL_8250 - 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: Does the Netxen driver work?
On 07/10/2007 12:33 AM, Dhananjay Phadke wrote: The MSI error wasn't fatal, so it was suppressed in recent fixes for 2.6.22-rc7. The driver in 2.6.21 had many bugs, but I ain't sure if recent fixes are going to be pulled in Fedora kernel. Fedora 6/7 are moving to kernel 2.6.22 very soon. - 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 01/12] sky2: restore workarounds for lost interrupts
Stephen Hemminger wrote: This patch restores a couple of workarounds from 2.6.16: * restart transmit moderation timer in case it expires during IRQ routine * default to having 10 HZ watchdog timer. At this point it more important not to hang than to worry about the power cost. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] applied 1-12 - 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 3/7] atari_pamsnet.c: old declaration ritchie style fix
[EMAIL PROTECTED] wrote: From: Yoann Padioleau [EMAIL PROTECTED] Use consistent function declaration style. Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/net/atari_pamsnet.c | 62 -- 1 files changed, 22 insertions(+), 40 deletions(-) applied this, and patches 5-7 - 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] spidernet: improve interrupt handling
Linas Vepstas wrote: From: Ishizaki Kou [EMAIL PROTECTED] We intend this patch to improve spidernet interrupt handling to be more strict. We had following problem and this patch solves it. -when CONFIG_DEBUG_SHIRQ=y, request_irq() calls handler(). -when spider_net_open() is called, it calls request_irq() which calls spider_net_interrupt(). -if some specific interrupt bit is set at this timing, it calls netif_rx_schedule() and spider_net_poll() is scheduled. -spider_net_open() calls netif_poll_enable() which clears the bit __LINK_STATE_RX_SCHED. -when spider_net_poll() is called, it calls netif_rx_complete() which causes BUG_ON() because __LINK_STATE_RX_SCHED is not set. Signed-off-by: Kou Ishizaki [EMAIL PROTECTED] Signed-off-by: Linas Vepstas [EMAIL PROTECTED] Jeff, please apply for 2.6.23 Linas. drivers/net/spider_net.c | 59 +++ 1 file changed, 45 insertions(+), 14 deletions(-) applied - 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] PCMCIA: add Socket Ethernet card into pcnet_cs
Marcin Juszkiewicz wrote: From: Marcin Juszkiewicz [EMAIL PROTECTED] One card submitted by Ångström user. Signed-off-by: Marcin Juszkiewicz [EMAIL PROTECTED] applied - 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 typo in drivers/net/s2io.c
Rolf Eike Beer wrote: Introduced in d796fdb708fc5b10112934cba43e832c36ce4923. Signed-off-by: Rolf Eike Beer [EMAIL PROTECTED] --- commit 58056c2424917e90b86ca11c2c5d3fd35313d7b6 tree 854d63a14f96416aad64d12ea71cb331acfcc7db parent 87a2df362631d53fdc169a5d76969365aff69c10 author Rolf Eike Beer [EMAIL PROTECTED] Tue, 10 Jul 2007 11:55:46 +0200 committer Rolf Eike Beer [EMAIL PROTECTED] Tue, 10 Jul 2007 11:55:46 +0200 drivers/net/s2io.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 2d826ff..fa29a40 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c @@ -8036,7 +8036,7 @@ static void lro_append_pkt(struct s2io_nic *sp, struct lro *lro, /** * s2io_io_error_detected - called when PCI error is detected * @pdev: Pointer to PCI device - * @state: The current pci conneection state + * @state: The current pci connection state applied manually, patch was corrupted - 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] sis900_mii_probe() must be __devinit
Adrian Bunk wrote: This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x298170): Section mismatch: reference to .init.text:sis900_mii_probe (between 'sis900_probe' and 'sis900_default_phy') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] applied - 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] tokenring/3c359.c:xl_init() must be __devinit
Adrian Bunk wrote: This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x361ef1): Section mismatch: reference to .init.text:xl_init (between 'xl_probe' and 'xl_hw_reset') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] applied - 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] rrunner.c:rr_init() must be __devinit
Adrian Bunk wrote: This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x26e3f2): Section mismatch: reference to .init.text:rr_init (between 'rr_init_one' and 'rr_remove_one') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] applied - 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] QE Ethernet driver writes to wrong register to mask interrupts
Timur Tabi wrote: The QE Ethernet driver was writing to the wrong register to mask interrupts. In ucc_geth_stop(), it was clearing UCCE instead of UCCM. Signed-off-by: Timur Tabi [EMAIL PROTECTED] --- drivers/net/ucc_geth.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) applied - 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] e100: Fix Tyan motherboard e100 not receiving IPMI commands
Auke Kok wrote: From: David Graham [EMAIL PROTECTED] The 82550 51 parts have an extended configuration block that includes a bit GMRC, required to enable the expected TCO behavior, in config byte offset 22d. The config block sent by the failing driver does include the extension area, but this bit is not initialised, and the downlaod only specifies 0x16 bytes to be sent to the NIC (thaht's bytes 00..21d). By initializing the GMRC bit, and extending the download size for D102+ MACs, the problem is resolved. Signed-off-by: David Graham [EMAIL PROTECTED] Signed-off-by: Auke Kok [EMAIL PROTECTED] --- drivers/net/e100.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) applied - 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: [IOC3] Switch to pci refcounting safe APIs
Ralf Baechle wrote: From: Alan Cox [EMAIL PROTECTED] Convert the IOC3 driver to use ref counting pci interfaces so that we can obsolete the (usually unsafe) pci_find_{slot/device} interfaces and avoid future authors writing hotplug-unsafe device drivers. Signed-off-by: Alan Cox [EMAIL PROTECTED] Build fixes: Signed-off-by: Ralf Baechle [EMAIL PROTECTED] applied - 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] 7990 : Various fixes and cleanups
Philippe De Muyter wrote: This patch - avoids 7990 blocking when no tx buffer is available, [...] diff -r 6c0a10cc415a drivers/net/7990.c --- a/drivers/net/7990.cThu Jul 5 16:10:16 2007 -0700 +++ b/drivers/net/7990.cFri Jul 6 11:27:20 2007 +0200 [...] @@ -541,9 +546,6 @@ int lance_start_xmit (struct sk_buff *sk static int outs; unsigned long flags; -if (!TX_BUFFS_AVAIL) -return -1; - netif_stop_queue (dev); skblen = skb-len; @@ -565,9 +567,11 @@ int lance_start_xmit (struct sk_buff *sk ib-btx_ring [entry].length = (-len) | 0xf000; ib-btx_ring [entry].misc = 0; - if (skb-len ETH_ZLEN) - memset((void *)ib-tx_buf[entry][0], 0, ETH_ZLEN); skb_copy_from_linear_data(skb, (void *)ib-tx_buf[entry][0], skblen); + if (skblen ETH_ZLEN) + memset((char *)ib-tx_buf[entry][0] + skblen, 0, ETH_ZLEN - skblen); + + lp-stats.tx_bytes += skblen; NAK It avoids by removing an overrun check in hard_start_xmit that should not be removed. - 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] AX88796 network driver
Ben Dooks wrote: Support for the Asix AX88796 network controller, an NE2000 compatible 10/100 ethernet device with internal PHY. The driver supports PHY settings via either ioctl() or the ethtool driver ops. Signed-off-by: Ben Dooks [EMAIL PROTECTED] applied - 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/2] phylib: cleanup marvell.c a bit
Olof Johansson wrote: Simplify the marvell driver init a bit: Make the supported devices an array instead of explicitly registering each structure. This makes it considerably easier to add new devices down the road. Signed-off-by: Olof Johansson [EMAIL PROTECTED] applied 1-2 - 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] netxen: deinline and sparse fix
Stephen Hemminger wrote: Get rid of dubious casts to (void *) which causes a sparse warning. And move largeish function from inline to the one file that uses the code, the compiler can then decide to inline it. Compile tested only. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] applied - 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.6.22-rc7] 8139cp: dev-tx_timeout
[EMAIL PROTECTED] wrote: (Resending the patch against 2.6.22-rc7) This patch implements the missing dev-tx_timeout for 8139cp driver Signed-off-by: Mika Lansirinne [EMAIL PROTECTED] ACK but still fails to apply - 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: macmace: use unsigned long flags;
Alexey Dobriyan wrote: Code will do local_irq_save() on it. Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED] --- drivers/net/macmace.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/macmace.c +++ b/drivers/net/macmace.c @@ -577,7 +577,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id) struct mace_data *mp = netdev_priv(dev); volatile struct mace *mb = mp-mace; int intr, fs; - unsigned int flags; + unsigned long flags; applied - 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] atl1: remove write-only var in tx handler
Alexey Dobriyan wrote: Signed-off-by: Alexey Dobriyan [EMAIL PROTECTED] --- drivers/net/atl1/atl1_main.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) applied - 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] bonding / ipv6: no addrconf for slaves separately from master
Jay Vosburgh wrote: At present, when a device is enslaved to bonding, if ipv6 is active then addrconf will be initated on the slave (because it is closed then opened during the enslavement processing). This causes DAD and RS packets to be sent from the slave. These packets in turn can confuse switches that perform ipv6 snooping, causing them to incorrectly update their forwarding tables (if, e.g., the slave being added is an inactve backup that won't be used right away) and direct traffic away from the active slave to a backup slave (where the incoming packets will be dropped). This patch alters the behavior so that addrconf will only run on the master device itself. I believe this is logically correct, as it prevents slaves from having an IPv6 identity independent from the master. This is consistent with the IPv4 behavior for bonding. This is accomplished by (a) having bonding set IFF_SLAVE sooner in the enslavement processing than currently occurs (before open, not after), and (b) having ipv6 addrconf ignore UP and CHANGE events on slave devices. The eql driver also uses the IFF_SLAVE flag. I inspected eql, and I believe this change is reasonable for its usage of IFF_SLAVE, but I did not test it. Signed-off-by: Jay Vosburgh [EMAIL PROTECTED] applied - 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] Cleanup usbnet_probe() return value handling
Peter Korsgaard wrote: David == David Brownell [EMAIL PROTECTED] writes: Hi, David I'd rather see the later test updated to match this one. David (Good catch!) David The return convention is negative means error. There's David code in USB which has multiple nonnegative success codes. Ok, updated patch does that instead. David In particular usb_control_msg(), which would very naturally David used as the body of a bind() method, returns negative or David the number of bytes transferred. Yeah, that was the original problem in my dm9601 driver. usbnet_probe() handles a positive return value from the driver bind() function as success, but will later only setup the status handler if the return value was zero, leading to confusion. Patch adjusts this to accept positive values as success in both checks. Signed-off-by: Peter Korsgaard [EMAIL PROTECTED] --- drivers/net/usb/usbnet.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) applied - 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] the scheduled sk98lin removal
Adrian Bunk wrote: This patch contains the scheduled removal of the sk98lin driver. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Stephen -- ACK? - 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] sunhme.c:quattro_pci_find() must be __devinit
Adrian Bunk wrote: This patch fixes the following section mismatch: -- snip -- ... MODPOST vmlinux WARNING: drivers/built-in.o(.text+0x272f8b): Section mismatch: reference to .init.text:quattro_pci_find (between 'happy_meal_pci_probe' and 'happy_meal_pci_remove') ... -- snip -- Signed-off-by: Adrian Bunk [EMAIL PROTECTED] applied - 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-usb-devel] [PATCH]: cdc-subset to support new vendor/product ID
jing xiang wrote: Hi, This patch is for cdc subset to support Mavell vendor/product ID. Jing Xiang Signed-off-by: Jing Xiang[EMAIL PROTECTED] diff -uNpr linux-2.6.21.5/driver/usb/net/cdc_subset.c linux-2.6.21.5.t/driver/usb/net/cdc_subset.c --- linux-2.6.21.5/driver/usb/net/cdc_subset.c 2007-06-14 18:34:05.0 +0800 +++ linux-2.6.21.5.t/driver/usb/net/cdc_subset.c2007-06-28 15:55:56.290598304 +0800 @@ -305,6 +305,9 @@ static const struct usb_device_id produc USB_DEVICE (0x8086, 0x07d3),// blob bootloader .driver_info = (unsigned long) blob_info, }, { + USB_DEVICE (0x1286, 0x8001),// blob bootloader + .driver_info = (unsigned long) blob_info, +}, { // Linux Ethernet/RNDIS gadget on pxa210/25x/26x, second config // e.g. Gumstix, current OpenZaurus, ... USB_DEVICE_VER (0x0525, 0xa4a2, 0x0203, 0x0203), patch failed to apply. Also, please move extra comments like Hi, and Jing Xiang after a --- separator as described in Documentation/SubmittingPatches, so that they are not copied verbatim into the permanent kernel changelog. - 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
[RFT] via-velocity: use standard VLAN infrastructure
The via-velocity is using a non-standard VLAN acceleration interface. This patch converts it to use standard API. Compile tested only. The module parameter method of VLAN configuration is removed, use vconfig instead. Signed-off-by: Stephen Hemminger [EMAIL PROTECTED] --- drivers/net/via-velocity.c | 68 +++-- drivers/net/via-velocity.h |3 + 2 files changed, 44 insertions(+), 27 deletions(-) --- a/drivers/net/via-velocity.c2007-06-25 09:03:14.0 -0700 +++ b/drivers/net/via-velocity.c2007-07-10 09:38:05.0 -0700 @@ -72,6 +72,7 @@ #include linux/mii.h #include linux/in.h #include linux/if_arp.h +#include linux/if_vlan.h #include linux/ip.h #include linux/tcp.h #include linux/udp.h @@ -111,15 +112,6 @@ VELOCITY_PARAM(RxDescriptors, Number of #define TX_DESC_DEF 64 VELOCITY_PARAM(TxDescriptors, Number of transmit descriptors); -#define VLAN_ID_MIN 0 -#define VLAN_ID_MAX 4095 -#define VLAN_ID_DEF 0 -/* VID_setting[] is used for setting the VID of NIC. - 0: default VID. - 1-4094: other VIDs. -*/ -VELOCITY_PARAM(VID_setting, 802.1Q VLAN ID); - #define RX_THRESH_MIN 0 #define RX_THRESH_MAX 3 #define RX_THRESH_DEF 0 @@ -147,13 +139,6 @@ VELOCITY_PARAM(rx_thresh, Receive fifo */ VELOCITY_PARAM(DMA_length, DMA length); -#define TAGGING_DEF 0 -/* enable_tagging[] is used for enabling 802.1Q VID tagging. - 0: disable VID seeting(default). - 1: enable VID setting. -*/ -VELOCITY_PARAM(enable_tagging, Enable 802.1Q tagging); - #define IP_ALIG_DEF 0 /* IP_byte_align[] is used for IP header DWORD byte aligned 0: indicate the IP header won't be DWORD byte aligned.(Default) . @@ -442,8 +427,7 @@ static void __devinit velocity_get_optio velocity_set_int_opt(opts-DMA_length, DMA_length[index], DMA_LENGTH_MIN, DMA_LENGTH_MAX, DMA_LENGTH_DEF, DMA_length, devname); velocity_set_int_opt(opts-numrx, RxDescriptors[index], RX_DESC_MIN, RX_DESC_MAX, RX_DESC_DEF, RxDescriptors, devname); velocity_set_int_opt(opts-numtx, TxDescriptors[index], TX_DESC_MIN, TX_DESC_MAX, TX_DESC_DEF, TxDescriptors, devname); - velocity_set_int_opt(opts-vid, VID_setting[index], VLAN_ID_MIN, VLAN_ID_MAX, VLAN_ID_DEF, VID_setting, devname); - velocity_set_bool_opt(opts-flags, enable_tagging[index], TAGGING_DEF, VELOCITY_FLAGS_TAGGING, enable_tagging, devname); + velocity_set_bool_opt(opts-flags, txcsum_offload[index], TX_CSUM_DEF, VELOCITY_FLAGS_TX_CSUM, txcsum_offload, devname); velocity_set_int_opt(opts-flow_cntl, flow_control[index], FLOW_CNTL_MIN, FLOW_CNTL_MAX, FLOW_CNTL_DEF, flow_control, devname); velocity_set_bool_opt(opts-flags, IP_byte_align[index], IP_ALIG_DEF, VELOCITY_FLAGS_IP_ALIGN, IP_byte_align, devname); @@ -465,6 +449,7 @@ static void __devinit velocity_get_optio static void velocity_init_cam_filter(struct velocity_info *vptr) { struct mac_regs __iomem * regs = vptr-mac_regs; + unsigned short vid; /* Turn on MCFG_PQEN, turn off MCFG_RTGOPT */ WORD_REG_BITS_SET(MCFG_PQEN, MCFG_RTGOPT, regs-MCFG); @@ -477,13 +462,19 @@ static void velocity_init_cam_filter(str mac_set_cam_mask(regs, vptr-mCAMmask, VELOCITY_MULTICAST_CAM); /* Enable first VCAM */ - if (vptr-flags VELOCITY_FLAGS_TAGGING) { - /* If Tagging option is enabled and VLAN ID is not zero, then - turn on MCFG_RTGOPT also */ - if (vptr-options.vid != 0) - WORD_REG_BITS_ON(MCFG_RTGOPT, regs-MCFG); + if (vptr-vlgrp) { + for (vid = 0; vid VLAN_VID_MASK; vid++) { + if (vlan_group_get_device(vptr-vlgrp, vid)) { + /* If Tagging option is enabled and + VLAN ID is not zero, then + turn on MCFG_RTGOPT also */ + if (vid != 0) + WORD_REG_BITS_ON(MCFG_RTGOPT, regs-MCFG); - mac_set_cam(regs, 0, (u8 *) (vptr-options.vid), VELOCITY_VLAN_ID_CAM); + mac_set_cam(regs, 0, (u8 *) vid, + VELOCITY_VLAN_ID_CAM); + } + } vptr-vCAMmask[0] |= 1; mac_set_cam_mask(regs, vptr-vCAMmask, VELOCITY_VLAN_ID_CAM); } else { @@ -494,6 +485,26 @@ static void velocity_init_cam_filter(str } } +static void velocity_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) +{ + struct velocity_info *vptr = netdev_priv(dev); + + spin_lock_irq(vptr-lock); + velocity_init_cam_filter(vptr); + spin_unlock_irq(vptr-lock); +} + +static void velocity_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) +{ + struct velocity_info *vptr = netdev_priv(dev); + + spin_lock_irq(vptr-lock);
Re: [patch 2/7] Blackfin: on-chip ethernet MAC controller driver
[EMAIL PROTECTED] wrote: From: Wu, Bryan [EMAIL PROTECTED] This patch implements the driver necessary use the Analog Devices Blackfin processor's on-chip ethernet MAC controller. Signed-off-by: Bryan Wu [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/net/Kconfig| 44 + drivers/net/Makefile |1 drivers/net/bfin_mac.c | 981 +++ drivers/net/bfin_mac.h | 147 + 4 files changed, 1173 insertions(+) If I'm not mistaken, Bryan just said he was resending an updated version? - 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] the scheduled sk98lin removal
On Tue, 10 Jul 2007 12:44:35 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Adrian Bunk wrote: This patch contains the scheduled removal of the sk98lin driver. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Stephen -- ACK? Yes. Existing driver is dead, if there are any ancient boards that don't work with skge, I haven't heard any complaints in at least a year. As a fallback users, can always go with vendor driver. - 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/2] eHEA: Capability flag for DLPAR support
Jan-Bernd Themann wrote: This patch introduces a capability flag that is used by the DLPAR userspace tool to check which DLPAR features are supported by the eHEA driver. Missing goto has been included. Signed-off-by: Jan-Bernd Themann [EMAIL PROTECTED] applied - 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] eHEA: Receive SKB Aggregation
Jan-Bernd Themann wrote: This patch enables the receive side processing to aggregate TCP packets within the HEA device driver. It analyses the packets already received after an interrupt arrived and forwards these as chains of SKBs for the same TCP connection with modified header field. We have seen a lower CPU load and improved throughput for small numbers of parallel TCP connections. As this feature is considered as experimental it is switched off by default and can be activated via a module parameter. Some additional security checks have been added since the last posting. Signed-off-by: Jan-Bernd Themann [EMAIL PROTECTED] as noted in comments, we don't need to recreate this in every driver. do something more generic. - 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] PHY fixed driver: rework release path and update phy_id notation
Vitaly Bordug wrote: device_bind_driver() error code returning has been fixed. release() function has been written, so that to free resources in correct way; the release path is now clean. Before the rework, it used to cause Device '[EMAIL PROTECTED]:1' does not have a release() function, it is broken and must be fixed. BUG: at drivers/base/core.c:104 device_release() Call Trace: [802ec380] kobject_cleanup+0x53/0x7e [802ec3ab] kobject_release+0x0/0x9 [802ecf3f] kref_put+0x74/0x81 [8035493b] fixed_mdio_register_device+0x230/0x265 [80564d31] fixed_init+0x1f/0x35 [802071a4] init+0x147/0x2fb [80223b6e] schedule_tail+0x36/0x92 [8020a678] child_rip+0xa/0x12 [80311714] acpi_ds_init_one_object+0x0/0x83 [8020705d] init+0x0/0x2fb [8020a66e] child_rip+0x0/0x12 Also changed the notation of the fixed phy definition on mdio bus to the form of speed+duplex to make it able to be used by gianfar and ucc_geth that define phy_id strictly as %d:%d Signed-off-by: Vitaly Bordug [EMAIL PROTECTED] --- drivers/net/phy/Kconfig |4 ++ drivers/net/phy/fixed.c | 93 +++ 2 files changed, 57 insertions(+), 40 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 09b6f25..a938c48 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -71,4 +71,8 @@ config FIXED_MII_100_FDX bool Emulation for 100M Fdx fixed PHY behavior depends on FIXED_PHY +config FIXED_MII_1000_FDX + bool Emulation for 1000M Fdx fixed PHY behavior + depends on FIXED_PHY + endif # PHYLIB diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c index 68c99b4..34b9111 100644 --- a/drivers/net/phy/fixed.c +++ b/drivers/net/phy/fixed.c @@ -187,12 +187,29 @@ static struct phy_driver fixed_mdio_driver = { .driver = { .owner = THIS_MODULE,}, }; +static void fixed_mdio_release (struct device * dev) +{ + struct phy_device *phydev = container_of(dev, struct phy_device, dev); + struct mii_bus *bus = phydev-bus; + struct fixed_info *fixed = bus-priv; + + kfree(phydev); + kfree(bus-dev); + kfree(bus); + kfree(fixed-regs); + kfree(fixed); +} + /*- * This func is used to create all the necessary stuff, bind * the fixed phy driver and register all it on the mdio_bus_type. - * speed is either 10 or 100, duplex is boolean. + * speed is either 10 or 100 or 1000, duplex is boolean. * number is used to create multiple fixed PHYs, so that several devices can * utilize them simultaneously. + * + * The device on mdio bus will look like bus_id:phy_id, + * bus_id = number + * phy_id = speed+duplex. *-*/ static int fixed_mdio_register_device(int number, int speed, int duplex) { @@ -221,6 +238,12 @@ static int fixed_mdio_register_device(int number, int speed, int duplex) } fixed-regs = kzalloc(MII_REGS_NUM*sizeof(int), GFP_KERNEL); + if (NULL == fixed-regs) { + kfree(dev); + kfree(new_bus); + kfree(fixed); + return -ENOMEM; + } fixed-regs_num = MII_REGS_NUM; fixed-phy_status.speed = speed; fixed-phy_status.duplex = duplex; @@ -249,57 +272,43 @@ static int fixed_mdio_register_device(int number, int speed, int duplex) fixed-phydev = phydev; if(NULL == phydev) { - err = -ENOMEM; - goto device_create_fail; + kfree(dev); + kfree(new_bus); + kfree(fixed-regs); + kfree(fixed); + return -ENOMEM; } phydev-irq = PHY_IGNORE_INTERRUPT; phydev-dev.bus = mdio_bus_type; - if(number) - snprintf(phydev-dev.bus_id, BUS_ID_SIZE, - [EMAIL PROTECTED]:%d, number, speed, duplex); - else - snprintf(phydev-dev.bus_id, BUS_ID_SIZE, - [EMAIL PROTECTED]:%d, speed, duplex); + snprintf(phydev-dev.bus_id, BUS_ID_SIZE, + %d:%d, number, speed + duplex); + phydev-bus = new_bus; + phydev-dev.driver = fixed_mdio_driver.driver; + phydev-dev.release = fixed_mdio_release; + + err = phydev-dev.driver-probe(phydev-dev); + if(err 0) { + printk(KERN_ERR Phy %s: problems with fixed driver\n, + phydev-dev.bus_id); + kfree(phydev); + kfree(dev); + kfree(new_bus); + kfree(fixed-regs); + kfree(fixed); + return err; + } + err = device_register(phydev-dev); if(err) { printk(KERN_ERR Phy %s failed to
Re: [PATCH] ethtool: new ID to decode the registers of the 8101E (realtek)
Francois Romieu wrote: Signed-off-by: Francois Romieu [EMAIL PROTECTED] Cc: Rolf Eike Beer [EMAIL PROTECTED] --- realtek.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) applied - 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
ata and netdev (was Re: -mm merge plans for 2.6.23)
(just to provide my indicator of status) Andrew Morton wrote: libata-config_pm=n-compile-fix.patch that's for a branch that you don't get via libata-dev#ALL, #mv-ahci-pata. pata_acpi-restore-driver.patch see Alan's comments. I've been ignoring pata_acpi for a while, because IMO it always needed work. libata-core-convert-to-use-cancel_rearming_delayed_work.patch will merge libata-implement-ata_wait_after_reset.patch I'm pretty much this is obsolete. Tejun? sata_promise-sata-hotplug-support.patch will merge libata-add-irq_flags-to-struct-pata_platform_info-fix.patch are other pata_platform people happy with this? I don't know embedded well enough to know if adding this struct member will break things. ata-add-the-sw-ncq-support-to-sata_nv-for-mcp51-mcp55-mcp61.patch sata_nv-allow-changing-queue-depth.patch should be combined, really. will merge eventually. basic concept OK, but need to review in depth. pata_hpt3x3-major-reworking-and-testing.patch iomap-sort-out-the-broken-address-reporting-caused-by-the-iomap-layer.patch ata-use-iomap_name.patch generally OK libata-check-for-an-support.patch scsi-expose-an-to-user-space.patch libata-expose-an-to-user-space.patch scsi-save-disk-in-scsi_device.patch libata-send-event-when-an-received.patch Am sitting on these due to confusion regarding the status of the ata-ahci patches. I will apply what I can, but it seems there are lifetime problems ata-ahci-alpm-store-interrupt-value.patch ata-ahci-alpm-expose-power-management-policy-option-to-users.patch ata-ahci-alpm-enable-link-power-management-for-ata-drivers.patch ata-ahci-alpm-enable-aggressive-link-power-management-for-ahci-controllers.patch These appear to need some work. seemed mostly OK to me. what comments did I miss? libata-add-human-readable-error-value-decoding.patch still pondering; in my mbox queue libata-fix-hopefully-all-the-remaining-problems-with.patch testing-patch-for-ali-pata-fixes-hopefully-for-the-problems-with-atapi-dma.patch pata_ali-more-work.patch No idea. I would poke Alan. Probably drop. 8139too-force-media-setting-fix.patch blackfin-on-chip-ethernet-mac-controller-driver.patch atari_pamsnetc-old-declaration-ritchie-style-fix.patch sundance-phy-address-form-0-only-for-device-id-0x0200.patch Needs a bug fix, so that the newly modified loop doesn't scan the final phy id, then loop back around to scan the first again. 3x59x-fix-pci-resource-management.patch update-smc91x-driver-with-arm-versatile-board-info.patch drivers-net-ns83820c-add-paramter-to-disable-auto.patch netdev patches which are stuck in limbo land. ? I don't think I've seen these. bonding-bond_mainc-make-2-functions-static.patch FWIW bonding stuff should go to me, since it lives mostly in drivers/net x86-initial-fixmap-support.patch Andi material? mm-revert-kernel_ds-buffered-write-optimisation.patch revert-81b0c8713385ce1b1b9058e916edcf9561ad76d6.patch revert-6527c2bdf1f833cc18e8f42bd97973d583e4aa83.patch mm-clean-up-buffered-write-code.patch mm-debug-write-deadlocks.patch mm-trim-more-holes.patch mm-buffered-write-cleanup.patch mm-write-iovec-cleanup.patch mm-fix-pagecache-write-deadlocks.patch mm-buffered-write-iterator.patch fs-fix-data-loss-on-error.patch mm-restore-kernel_ds-optimisations.patch pagefault-in-write deadlock fixes. Will hold for 2.6.24. Any of the above worth 2.6.23? Just wondering if they were useful cleanups / minor fixes prior to new aops patches? more-scheduled-oss-driver-removal.patch ACK oss-trident-massive-whitespace-removal.patch oss-trident-fix-locking-around-write_voice_regs.patch oss-trident-replace-deprecated-pci_find_device-with-pci_get_device.patch remove-options-depending-on-oss_obsolete.patch Merge what about just removing the OSS drivers in question? :) intel-iommu-dmar-detection-and-parsing-logic.patch intel-iommu-pci-generic-helper-function.patch intel-iommu-clflush_cache_range-now-takes-size-param.patch intel-iommu-iova-allocation-and-management-routines.patch intel-iommu-intel-iommu-driver.patch intel-iommu-avoid-memory-allocation-failures-in-dma-map-api-calls.patch intel-iommu-intel-iommu-cmdline-option-forcedac.patch intel-iommu-dmar-fault-handling-support.patch intel-iommu-iommu-gfx-workaround.patch intel-iommu-iommu-floppy-workaround.patch Don't know. I don't think there were any great objections, but I don't think much benefit has been demonstrated? Just the general march of progress on new hardware :) I would like to see this support merged in /some/ form. We've been telling Intel for years they were sillyheads for not bothering with an IOMMU. Now that they have, we should give them a cookie and support good technology. 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
[PATCH 0/1] ixgbe: Support for Intel(R) 10GbE PCI Express adapters - Take #2
This patch adds support for the Intel(R) 82598 based PCI Express 10GbE adapters. Please find the full driver as a patch to latest linus-2.6 tree here: git-pull git://lost.foo-projects.org/~aveerani/git/linux-2.6 ixgbe Changes from the last submission... 1. Suspend, resume support is added 2. PCI error recovery support 3. Bit fields usage is removed and replaced with #defines. 4. typedef boolean_t is replaced with bool. 5. Ethtool functionality for eeprom and regiters dump and adapter identification. 6. RxDescriptor, TxDescriptors and XsumRx parameters are removed from the module param list. They can be handled via ethtool. 7. NAPI mode uses sigle Rx queue and so fake netdev usage is removed. 8. Non-NAPI mode is added. 9. LLTX is not used and tx_lock usage in xmit_frame is cleand up. 10. Performance and bug fixes. thanks, Ayyappan - 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
No network on Asus P5B (r8169)
Hi! I just found out that everything is working just fine with a 64-bit Linux kernel. I hope this helps you hunt down the error in the 32-bit version. https://bugzilla.novell.com/show_bug.cgi?id=288406 Clemens - 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 re-resend] fix race in AF_UNIX garbage collector
From: Miklos Szeredi [EMAIL PROTECTED] Date: Tue, 10 Jul 2007 11:50:30 +0200 Can you please add this to -mm. Sometimes that has wonderful effect on the willingness of people to look at a patch. No, I will merge this into my networking tree when I get the chance to review your patch and it will automatically get into -mm that way. Please stop trying to rush this situation, it's driving me absolutely bananas, and you're serving to tick me off rather than make me want to review and go over your work. You do this continuously, and it hurts rather than helps your cause, so please cut it out. - 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 re-resend] fix race in AF_UNIX garbage collector
From: Andrew Morton [EMAIL PROTECTED] Date: Tue, 10 Jul 2007 03:04:43 -0700 On Tue, 10 Jul 2007 11:50:30 +0200 Miklos Szeredi [EMAIL PROTECTED] wrote: Can you please add this to -mm. Sometimes that has wonderful effect on the willingness of people to look at a patch. sure ;) Andrew please don't, it's in my to review pile. - 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 0/1] ixgbe: Support for Intel(R) 10GbE PCI Express adapters - Take #2
[EMAIL PROTECTED] wrote: 7. NAPI mode uses sigle Rx queue and so fake netdev usage is removed. 8. Non-NAPI mode is added. Honestly I'm not sure about drivers that have both NAPI and non-NAPI paths. Several existing drivers do this, and in almost every case, I tend to feel the driver would benefit from picking one approach, rather than doing both. Doing both tends to signal that the author hasn't bothered to measure the differences between various approaches, and pick a clear winner. I strongly prefer NAPI combined with hardware interrupt mitigation -- it helps with multiple net interfaces balance load across the system, at times of high load -- but I'm open to other solutions as well. So... what are your preferences? What is the setup that gets closest to wire speed under Linux? :) 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: iproute2 showing wrong number of bytes on 64bit architectures.
From: Stephen Hemminger [EMAIL PROTECTED] Date: Tue, 10 Jul 2007 08:56:40 -0700 Looks like net_device_stats should have always used u32? It used unsigned long ages ago, and ifconfig gets the bits exported from /proc/net/dev output whereas we have to used fixed data types in whatever we use over netlink so u32 was choosen. - 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] IPv6: optionaly validate RAs on raw sockets
ICMPv6 Router Advertisements may now contain informations that is mostly of interest to userland. This currently mostly consists of recursive DNS server addresses (though one should expect other stuff to come). This patch adds a setsockopt to ICMPv6 sockets to only deliver Router Advertisements if they pass the same set of checks as the kernel IPv6 autoconfiguration does, so that userland can parse attributes it is interested safely (otherwise, it would get and parse advertisements that the kernel rejected). N.B.: not too sure about the option name though... Signed-off-by: Remi Denis-Courmont [EMAIL PROTECTED] diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index 7c5e981..8c96822 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h @@ -139,6 +139,7 @@ static inline struct icmp6hdr *icmp6_hdr(const struct sk_buff *skb) */ #define ICMPV6_FILTER 1 +#define ICMPV6_VALID_ADVERT2 /* * ICMPV6 filter diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 648bd1f..af72f02 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -343,7 +343,9 @@ struct ipv6_pinfo { struct raw6_sock { /* inet_sock has to be the first member of raw6_sock */ struct inet_sockinet; - __u32 checksum; /* perform checksum */ + __u16 unused; + __u8valid_advert; /* deliver valid RAs only */ + __u8checksum; /* perform checksum */ __u32 offset; /* checksum offset */ struct icmp6_filter filter; /* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */ diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index a58459a..da6cb50 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -127,12 +127,35 @@ static __inline__ int icmpv6_filter(struct sock *sk, struct sk_buff *skb) if (pskb_may_pull(skb, sizeof(struct icmp6hdr))) { __u32 *data = rp-filter.data[0]; - int bit_nr; + int type; icmph = (struct icmp6hdr *) skb-data; - bit_nr = icmph-icmp6_type; + type = icmph-icmp6_type; - return (data[bit_nr 5] (1 (bit_nr 31))) != 0; + if (data[type 5] (1 (type 31))) + return 1; + + /* Userland only wants valid router advertisements? */ + if (type == NDISC_ROUTER_ADVERTISEMENT + rp-valid_advert) { + struct inet6_dev *idev; + + if (!pskb_may_pull(skb, sizeof(struct ra_msg)) || + !(ipv6_addr_type(ipv6_hdr(skb)-saddr) + IPV6_ADDR_LINKLOCAL)) + return 1; + + idev = in6_dev_get(skb-dev); + if (!idev) + return 1; + + /* Ignore RA when routing */ + if (idev-cnf.forwarding || !idev-cnf.accept_ra) { + in6_dev_put(idev); + return 1; + } + in6_dev_put(idev); + } } return 0; } @@ -877,13 +900,26 @@ do_confirm: static int rawv6_seticmpfilter(struct sock *sk, int level, int optname, char __user *optval, int optlen) { + struct raw6_sock *rp = raw6_sk(sk); + switch (optname) { case ICMPV6_FILTER: if (optlen sizeof(struct icmp6_filter)) optlen = sizeof(struct icmp6_filter); - if (copy_from_user(raw6_sk(sk)-filter, optval, optlen)) + if (copy_from_user(rp-filter, optval, optlen)) return -EFAULT; return 0; + case ICMPV6_VALID_ADVERT: { + int val; + + if (optlen != sizeof(int)) + return -EINVAL; + if (copy_from_user(val, optval, sizeof(int))) + return -EFAULT; + /* -1 resets to default, which is actually 0 */ + rp-valid_advert = (val 0); + return 0; + } default: return -ENOPROTOOPT; } @@ -894,25 +930,38 @@ static int rawv6_seticmpfilter(struct sock *sk, int level, int optname, static int rawv6_geticmpfilter(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { + struct raw6_sock *rp = raw6_sk(sk); int len; + if (get_user(len, optlen)) + return -EFAULT; + if (len 0) + return -EINVAL; + switch (optname) { case ICMPV6_FILTER: - if (get_user(len, optlen)) - return -EFAULT; - if (len 0) -
RE: [PATCH 0/1] ixgbe: Support for Intel(R) 10GbE PCI Express adapters - Take #2
On 7/10/07, Jeff Garzik [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Doing both tends to signal that the author hasn't bothered to measure the differences between various approaches, and pick a clear winner. I did pick NAPI in our previous submission based on various tests. But to get 10Gig line rate we need to use multiple Rx queues which will need fake netdevs.. Since fake netdevs weren't acceptable, I added non-NAPI support which gets 10Gig line rate with multi-rx. I am ok with removing NAPI support till the work of separating the netdevs and NAPI work is done.. I strongly prefer NAPI combined with hardware interrupt mitigation -- it helps with multiple net interfaces balance load across the system, at times of high load -- but I'm open to other solutions as well. Majority of tests we did here, we saw NAPI is better. But for some specific test cases (especially if we add the SW RSC i.e. LRO), we saw better throughput and CPU utilization with non-NAPI. So... what are your preferences? What is the setup that gets closest to wire speed under Linux? :) With SW LRO, non-NAPI is better but without LRO, NAPI is better but NAPI needs multiple Rx queues. So given the limitations, non-NPAI is my preference now. I will post the performance numbers later today.. Jeff Thanks.. Ayyappan - 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] ps3: gigabit ethernet driver for PS3, take3
Masakazu Mokuno wrote: Hi, This is the third submission of the network driver for PS3. The differences from the previous one are: - renamed source file names so that their prefix can match with the module name - added [EMAIL PROTECTED] line for MAINTAINER file - changed some in copyright comments If there are no more comments, please apply for 2.6.23. Thank you -- Subject: PS3: Ethernet driver From: Masakazu Mokuno [EMAIL PROTECTED] Add Gigabit Ethernet support for the PS3 game console. The module will be called ps3_gelic. CC: Geoff Levand [EMAIL PROTECTED] Signed-off-by: Masakazu Mokuno [EMAIL PROTECTED] --- MAINTAINERS |7 drivers/net/Kconfig | 10 drivers/net/Makefile|2 drivers/net/ps3_gelic_net.c | 1576 drivers/net/ps3_gelic_net.h | 239 ++ 5 files changed, 1834 insertions(+) applied I request that you fix the NETDEV_TX_LOCKED return value on error in -hard_start_xmit(), which appears to be an incorrect return value for that condition, for your driver 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 0/1] ixgbe: Support for Intel(R) 10GbE PCI Express adapters - Take #2
Veeraiyan, Ayyappan wrote: On 7/10/07, Jeff Garzik [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Doing both tends to signal that the author hasn't bothered to measure the differences between various approaches, and pick a clear winner. I did pick NAPI in our previous submission based on various tests. But to get 10Gig line rate we need to use multiple Rx queues which will need fake netdevs.. Since fake netdevs weren't acceptable, I added non-NAPI support which gets 10Gig line rate with multi-rx. I am ok with removing NAPI support till the work of separating the netdevs and NAPI work is done.. That sounds fine to me. Separating netdev and NAPI is the right way to go. Maybe note that in a TODO list at the top of the driver. With SW LRO, non-NAPI is better but without LRO, NAPI is better but NAPI needs multiple Rx queues. So given the limitations, non-NPAI is my preference now. On the subject of SW LRO: We are really looking for a generic implementation, hopefully authored by one or more interested parties. This is something we definitely do not want to reinvent over and over in new drivers -- and in the one or two drivers it exists today, should be removed once the generic code is in place. If Intel could assist with that effort, that would be very helpful. I will post the performance numbers later today.. Thanks, 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: ata and netdev (was Re: -mm merge plans for 2.6.23)
On Tue, 10 Jul 2007 13:42:16 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: (just to provide my indicator of status) Thanks. libata-add-irq_flags-to-struct-pata_platform_info-fix.patch are other pata_platform people happy with this? I don't know embedded well enough to know if adding this struct member will break things. This is just a silly remove-unneeded-cast-of-void* cleanup. I wrote this as a fixup against libata-add-irq_flags-to-struct-pata_platform_info.patch with the intention of folding it into that base patch, but you went and merged the submitter's original patch so this trivial fixup got stranded in -mm. Feel free to give it the piss-off-too-trivial treatment. ata-ahci-alpm-store-interrupt-value.patch ata-ahci-alpm-expose-power-management-policy-option-to-users.patch ata-ahci-alpm-enable-link-power-management-for-ata-drivers.patch ata-ahci-alpm-enable-aggressive-link-power-management-for-ahci-controllers.patch These appear to need some work. seemed mostly OK to me. what comments did I miss? Oh, I thought these were the patches which affected scsi and which James had issues with. I guess I got confused. libata-add-human-readable-error-value-decoding.patch still pondering; in my mbox queue libata-fix-hopefully-all-the-remaining-problems-with.patch testing-patch-for-ali-pata-fixes-hopefully-for-the-problems-with-atapi-dma.patch pata_ali-more-work.patch No idea. I would poke Alan. Probably drop. Alan: poke. 8139too-force-media-setting-fix.patch blackfin-on-chip-ethernet-mac-controller-driver.patch atari_pamsnetc-old-declaration-ritchie-style-fix.patch sundance-phy-address-form-0-only-for-device-id-0x0200.patch Needs a bug fix, so that the newly modified loop doesn't scan the final phy id, then loop back around to scan the first again. 3x59x-fix-pci-resource-management.patch update-smc91x-driver-with-arm-versatile-board-info.patch drivers-net-ns83820c-add-paramter-to-disable-auto.patch netdev patches which are stuck in limbo land. ? I don't think I've seen these. 3x59x-fix-pci-resource-management.patch: you wrote it ;) I have a comment here: - I don't remember the story with cardbus either. Presumably once upon a time the cardbus layer was claiming IO regions on behalf of cardbus devices (?) Need to think about that. update-smc91x-driver-with-arm-versatile-board-info.patch: See comment from rmk in changelog: ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.22-rc6/2.6.22-rc6-mm1/broken-out/update-smc91x-driver-with-arm-versatile-board-info.patch Deepak, can we move this along a bit please? drivers-net-ns83820c-add-paramter-to-disable-auto.patch: See comments in changelog: ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.22-rc6/2.6.22-rc6-mm1/broken-out/drivers-net-ns83820c-add-paramter-to-disable-auto.patch Dan, Ben: is there any prospect of progress here? bonding-bond_mainc-make-2-functions-static.patch FWIW bonding stuff should go to me, since it lives mostly in drivers/net Ah, noted. x86-initial-fixmap-support.patch Andi material? Spose so. But it's buried in the middle of a series of four patches. mm-revert-kernel_ds-buffered-write-optimisation.patch revert-81b0c8713385ce1b1b9058e916edcf9561ad76d6.patch revert-6527c2bdf1f833cc18e8f42bd97973d583e4aa83.patch mm-clean-up-buffered-write-code.patch mm-debug-write-deadlocks.patch mm-trim-more-holes.patch mm-buffered-write-cleanup.patch mm-write-iovec-cleanup.patch mm-fix-pagecache-write-deadlocks.patch mm-buffered-write-iterator.patch fs-fix-data-loss-on-error.patch mm-restore-kernel_ds-optimisations.patch pagefault-in-write deadlock fixes. Will hold for 2.6.24. Any of the above worth 2.6.23? Just wondering if they were useful cleanups / minor fixes prior to new aops patches? The first few patches will a) fix up our writev performance regression and b) reintroduce the writev() deadlock which the writev()-regresion-adding patch fixed. So it's all a bit ugly. oss-trident-massive-whitespace-removal.patch oss-trident-fix-locking-around-write_voice_regs.patch oss-trident-replace-deprecated-pci_find_device-with-pci_get_device.patch remove-options-depending-on-oss_obsolete.patch Merge what about just removing the OSS drivers in question? :) Hey, I only work here. intel-iommu-dmar-detection-and-parsing-logic.patch intel-iommu-pci-generic-helper-function.patch intel-iommu-clflush_cache_range-now-takes-size-param.patch intel-iommu-iova-allocation-and-management-routines.patch intel-iommu-intel-iommu-driver.patch intel-iommu-avoid-memory-allocation-failures-in-dma-map-api-calls.patch intel-iommu-intel-iommu-cmdline-option-forcedac.patch intel-iommu-dmar-fault-handling-support.patch intel-iommu-iommu-gfx-workaround.patch intel-iommu-iommu-floppy-workaround.patch Don't know. I don't think there were any
Re: iproute2 showing wrong number of bytes on 64bit architectures.
David Miller wrote: It used unsigned long ages ago, and ifconfig gets the bits exported from /proc/net/dev output whereas we have to used fixed data types in whatever we use over netlink so u32 was choosen. It's rather ironic that the new-and-improved way of doing things is subject to rollover while the old way is not. Chris - 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: iproute2 showing wrong number of bytes on 64bit architectures.
From: Chris Friesen [EMAIL PROTECTED] Date: Tue, 10 Jul 2007 12:17:12 -0600 It's rather ironic that the new-and-improved way of doing things is subject to rollover while the old way is not. Text is always more flexible, but is hard to extend. We can trivially add u64 statistics to netlink. - 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 2.6] SoftMAC : fix duplicate display of channel in scan
Hi, SoftMAC output the channel twice in the scan output. It should display frequency and channel, but only once for each. Cell 02 - Address: A2:00:04:XX:XX:XX ESSID:TheESSID Protocol:IEEE 802.11b Mode:Ad-Hoc - Channel:5 - Frequency:2.432 GHz (Channel 5) Encryption key:off Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s Quality=95/100 Signal level=-47 dBm Noise level=-65 dBm Extra: Last beacon: 120ms ago The fix is simple, patch attached, tested for 2.6.22 with bcm43xx. If you like it, send it to John. Regards, Jean Signed-off-by: Jean Tourrilhes [EMAIL PROTECTED] --- --- linux/net/ieee80211/ieee80211_wx.j1.c 2007-07-10 11:28:55.0 -0700 +++ linux/net/ieee80211/ieee80211_wx.c 2007-07-10 11:31:18.0 -0700 @@ -90,14 +90,11 @@ static char *ieee80211_translate_scan(st } /* Add channel and frequency */ + /* Note : userspace automatically computes channel using iwrange */ iwe.cmd = SIOCGIWFREQ; - iwe.u.freq.m = network-channel; - iwe.u.freq.e = 0; - iwe.u.freq.i = 0; - start = iwe_stream_add_event(start, stop, iwe, IW_EV_FREQ_LEN); - iwe.u.freq.m = ieee80211_channel_to_freq(ieee, network-channel); iwe.u.freq.e = 6; + iwe.u.freq.i = 0; start = iwe_stream_add_event(start, stop, iwe, IW_EV_FREQ_LEN); /* Add encryption capability */ - 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 0/1] ixgbe: Support for Intel(R) 10GbE PCI Express adapters - Take #2
[EMAIL PROTECTED] wrote: This patch adds support for the Intel(R) 82598 based PCI Express 10GbE adapters. Please find the full driver as a patch to latest linus-2.6 tree here: git-pull git://lost.foo-projects.org/~aveerani/git/linux-2.6 ixgbe Andrew, I rebased this with the new driver code, so you might need to drop the old version. Cheers, Auke - 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 re-resend] fix race in AF_UNIX garbage collector
On Tue, 10 Jul 2007 11:50:30 +0200 Miklos Szeredi [EMAIL PROTECTED] wrote: Can you please add this to -mm. Sometimes that has wonderful effect on the willingness of people to look at a patch. sure ;) Andrew please don't, it's in my to review pile. Yeah, and I can guess, where it is sitting in that pile ;) Dave, if you are busy, just say so. But if you don't reply anything, I'm bound to think the patch is being ignored. I apologize for being annoying. Just let's get over this bloody bug ;) Thanks, Miklos - 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: ata and netdev (was Re: -mm merge plans for 2.6.23)
On Tue, 2007-07-10 at 11:24 -0700, Andrew Morton wrote: ata-ahci-alpm-store-interrupt-value.patch ata-ahci-alpm-expose-power-management-policy-option-to-users.patch ata-ahci-alpm-enable-link-power-management-for-ata-drivers.patch ata-ahci-alpm-enable-aggressive-link-power-management-for-ahci-controllers.patch These appear to need some work. seemed mostly OK to me. what comments did I miss? Oh, I thought these were the patches which affected scsi and which James had issues with. I guess I got confused. Well ... my concern was really how to make them more generic ... ahci isn't the only controller that can do phy power management, and it also seemed to me that the most generic entity for power management was the transport rather than the SCSI mid-layer, but that debate is still ongoing. James - 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: ata and netdev (was Re: -mm merge plans for 2.6.23)
Andrew Morton wrote: On Tue, 10 Jul 2007 13:42:16 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: (just to provide my indicator of status) Thanks. libata-add-irq_flags-to-struct-pata_platform_info-fix.patch are other pata_platform people happy with this? I don't know embedded well enough to know if adding this struct member will break things. This is just a silly remove-unneeded-cast-of-void* cleanup. I wrote this as a fixup against libata-add-irq_flags-to-struct-pata_platform_info.patch with the intention of folding it into that base patch, but you went and merged the submitter's original patch so this trivial fixup got stranded in -mm. Feel free to give it the piss-off-too-trivial treatment. I'm sorry, I didn't look closely enough. I was referring to the add-irq-flags patch itself, not your small fix. ata-ahci-alpm-store-interrupt-value.patch ata-ahci-alpm-expose-power-management-policy-option-to-users.patch ata-ahci-alpm-enable-link-power-management-for-ata-drivers.patch ata-ahci-alpm-enable-aggressive-link-power-management-for-ahci-controllers.patch These appear to need some work. seemed mostly OK to me. what comments did I miss? Oh, I thought these were the patches which affected scsi and which James had issues with. I guess I got confused. hrm. ISTR James wanted some cleanups, Kristen did some cleanups, then looking at the cleanups decided they were needed / appropriate at this time. Anyway, these are in my mbox queue and the libata portions (of which the code is the majority) seem OK. Need to give them a final review. 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
Please pull 'upstream-jgarzik' branch of wireless-2.6
The following changes since commit 71780f59e127bb281a9302d430495ca9586c14e7: Linus Torvalds (1): Merge branch 'for-linus' of git://git.kernel.org/.../ieee1394/linux1394-2.6 are found in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-jgarzik Adrian Bunk (1): drivers/net/wireless/libertas/wext.c: remove dead code Dan Williams (1): libertas: fix disabling WPA Daniel Drake (4): zd1211rw: Allow channels 1-11 for unrecognised regulatory domains zd1211rw: Detect more AL2230S radios zd1211rw: Add ID for Buffalo WLI-U2-KG54L zd1211rw: Defer firmware load until first ifup Holger Schurig (1): libertas: fix use-after-free in rx path Jean Tourrilhes (1): softmac: Fix ESSID problem Matthias Kaehlcke (1): use list_for_each_entry() for iteration in Prism 54 driver Michael Wu (1): rtl8187: fix endianness issue in rtl8225 register writing Michal Schmidt (5): airo: disable the PCI device when unloading module airo: delay some initialization until the netdev is up airo: fix a race causing initialization failures airo: simpler calling convention for enable_MAC() airo: start with radio off Robert P. J. Day (1): WIRELESS: Remove clearly obsolete libertas/version.h file. Stephen Hemminger (2): ipw2200: rf kill switch polling power saving ipw2100: RF kill switch timer power save drivers/net/wireless/airo.c| 208 drivers/net/wireless/ipw2100.c | 11 +- drivers/net/wireless/ipw2200.c |5 +- drivers/net/wireless/libertas/cmd.c|2 +- drivers/net/wireless/libertas/rx.c |1 - drivers/net/wireless/libertas/version.h|1 - drivers/net/wireless/libertas/wext.c |3 - drivers/net/wireless/prism54/isl_ioctl.c | 22 +-- drivers/net/wireless/rtl8187_rtl8225.c |4 +- drivers/net/wireless/zd1211rw/zd_chip.c| 88 ++- drivers/net/wireless/zd1211rw/zd_chip.h| 13 +- drivers/net/wireless/zd1211rw/zd_mac.c | 59 +--- drivers/net/wireless/zd1211rw/zd_mac.h |3 +- drivers/net/wireless/zd1211rw/zd_rf.c |3 +- drivers/net/wireless/zd1211rw/zd_rf.h |2 +- drivers/net/wireless/zd1211rw/zd_rf_al2230.c | 12 +- drivers/net/wireless/zd1211rw/zd_rf_al7230b.c |2 +- drivers/net/wireless/zd1211rw/zd_rf_rf2959.c |2 +- drivers/net/wireless/zd1211rw/zd_rf_uw2453.c |2 +- drivers/net/wireless/zd1211rw/zd_usb.c | 98 --- drivers/net/wireless/zd1211rw/zd_usb.h |3 + net/ieee80211/softmac/ieee80211softmac_assoc.c |5 +- 22 files changed, 280 insertions(+), 269 deletions(-) delete mode 100644 drivers/net/wireless/libertas/version.h diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 2d3a180..1c54908 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -52,6 +52,8 @@ #include airo.h +#define DRV_NAME airo + #ifdef CONFIG_PCI static struct pci_device_id card_ids[] = { { 0x14b9, 1, PCI_ANY_ID, PCI_ANY_ID, }, @@ -71,7 +73,7 @@ static int airo_pci_suspend(struct pci_dev *pdev, pm_message_t state); static int airo_pci_resume(struct pci_dev *pdev); static struct pci_driver airo_driver = { - .name = airo, + .name = DRV_NAME, .id_table = card_ids, .probe= airo_pci_probe, .remove = __devexit_p(airo_pci_remove), @@ -1092,7 +1094,7 @@ static int get_dec_u16( char *buffer, int *start, int limit ); static void OUT4500( struct airo_info *, u16 register, u16 value ); static unsigned short IN4500( struct airo_info *, u16 register ); static u16 setup_card(struct airo_info*, u8 *mac, int lock); -static int enable_MAC( struct airo_info *ai, Resp *rsp, int lock ); +static int enable_MAC(struct airo_info *ai, int lock); static void disable_MAC(struct airo_info *ai, int lock); static void enable_interrupts(struct airo_info*); static void disable_interrupts(struct airo_info*); @@ -1250,7 +1252,7 @@ static int flashputbuf(struct airo_info *ai); static int flashrestart(struct airo_info *ai,struct net_device *dev); #define airo_print(type, name, fmt, args...) \ - { printk(type airo(%s): fmt \n, name, ##args); } + printk(type DRV_NAME (%s): fmt \n, name, ##args) #define airo_print_info(name, fmt, args...) \ airo_print(KERN_INFO, name, fmt, ##args) @@ -1926,28 +1928,54 @@ static int readStatsRid(struct airo_info*ai, StatsRid *sr, int rid, int lock) { return rc; } +static void try_auto_wep(struct airo_info *ai) +{ + if (auto_wep !(ai-flags FLAG_RADIO_DOWN)) { + ai-expires = RUN_AT(3*HZ); + wake_up_interruptible(ai-thr_wait); + } +} + static int airo_open(struct net_device *dev) { - struct airo_info *info
Re: [PATCH 2.6] SoftMAC : fix duplicate display of channel in scan
Jean, Jean Tourrilhes wrote: Hi, SoftMAC output the channel twice in the scan output. It should display frequency and channel, but only once for each. Cell 02 - Address: A2:00:04:XX:XX:XX ESSID:TheESSID Protocol:IEEE 802.11b Mode:Ad-Hoc - Channel:5 - Frequency:2.432 GHz (Channel 5) The frequency output is needed by NetworkManager, which is why I added it. At that time, I thought that some tool or other might be scanning the output looking for Channel:, not Channel ; therefore I left both in. If we are sure that removing the channel-only line will not break something, I'll be happy to send your patch upstream. Larry - 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.6] SoftMAC : fix duplicate display of channel in scan
On Tue, Jul 10, 2007 at 02:25:12PM -0500, Larry Finger wrote: Jean, Jean Tourrilhes wrote: Hi, SoftMAC output the channel twice in the scan output. It should display frequency and channel, but only once for each. Cell 02 - Address: A2:00:04:XX:XX:XX ESSID:TheESSID Protocol:IEEE 802.11b Mode:Ad-Hoc - Channel:5 - Frequency:2.432 GHz (Channel 5) The frequency output is needed by NetworkManager, which is why I added it. At that time, I thought that some tool or other might be scanning the output looking for Channel:, not Channel ; therefore I left both in. All of the other drivers display only a single line, and SoftMAC is the odd one here. I think that have the info twice may confuse some tools. I know that there are scripts that parse iwlist output, however I'm not keen on the practice, as there are alternatives. If we are sure that removing the channel-only line will not break something, I'll be happy to send your patch upstream. Unfortunately, I can't guarantee that. I can only guarantee that it will be similar to what other drivers do. Larry Have fun... Jean - 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: ata and netdev (was Re: -mm merge plans for 2.6.23)
Hello. Jeff Garzik wrote: 3x59x-fix-pci-resource-management.patch Now that the fix for CONFIG_PCI=n has been merged, what's left is to test this on EISA (at least Andrew wanted it :-). netdev patches which are stuck in limbo land. ? I don't think I've seen these. You should have, I was sending it to you. 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: [2.6 patch] the scheduled sk98lin removal
On Tue, 10 Jul 2007, Stephen Hemminger wrote: On Tue, 10 Jul 2007 12:44:35 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Adrian Bunk wrote: This patch contains the scheduled removal of the sk98lin driver. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Stephen -- ACK? Yes. Existing driver is dead, if there are any ancient boards that don't work with skge, I haven't heard any complaints in at least a year. As a fallback users, can always go with vendor driver. I have a several SK-9872s that do not work reliably with skge but work fine with sklin. The SK-9872 is a dual port card. Doing the following causes a hard lock: modprobe bonding miimon=100 mode=active-backup modprobe skge ifup bond0 ifdown bond0 This happens with every version of skge I've tested, including whatever is in 2.6.22. /etc/network/interfaces contains: iface bond0 inet static network 192.168.1.0 address 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0 up ifenslave bond0 eth0 eth1 down ifenslave -d bond0 eth0 eth1 lspci -vv -s 02:01 02:01.0 Ethernet controller: SysKonnect SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link) (rev 11) Subsystem: SysKonnect SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- TAbort- MAbort- SERR- PERR- Latency: 64 (5750ns min, 7750ns max), Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 22 Region 0: Memory at febfc000 (32-bit, non-prefetchable) [size=16K] Region 1: I/O ports at e800 [size=256] Expansion ROM at febc [disabled] [size=128K] Capabilities: access denied -Chris - 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] the scheduled sk98lin removal
On Tue, 10 Jul 2007, Chris Stromsoe wrote: On Tue, 10 Jul 2007, Stephen Hemminger wrote: On Tue, 10 Jul 2007 12:44:35 -0400 Jeff Garzik [EMAIL PROTECTED] wrote: Adrian Bunk wrote: This patch contains the scheduled removal of the sk98lin driver. Signed-off-by: Adrian Bunk [EMAIL PROTECTED] Stephen -- ACK? Yes. Existing driver is dead, if there are any ancient boards that don't work with skge, I haven't heard any complaints in at least a year. As a fallback users, can always go with vendor driver. I have a several SK-9872s that do not work reliably with skge but work fine with sklin. The SK-9872 is a dual port card. Doing the following causes a hard lock: sorry - SK-9844, not 9872. modprobe bonding miimon=100 mode=active-backup modprobe skge ifup bond0 ifdown bond0 This happens with every version of skge I've tested, including whatever is in 2.6.22. /etc/network/interfaces contains: iface bond0 inet static network 192.168.1.0 address 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0 up ifenslave bond0 eth0 eth1 down ifenslave -d bond0 eth0 eth1 lspci -vv -s 02:01 02:01.0 Ethernet controller: SysKonnect SK-9872 Gigabit Ethernet Server Adapter (SK-NET GE-ZX dual link) (rev 11) Subsystem: SysKonnect SK-9844 Gigabit Ethernet Server Adapter (SK-NET GE-SX dual link) Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- TAbort- MAbort- SERR- PERR- Latency: 64 (5750ns min, 7750ns max), Cache Line Size: 32 bytes Interrupt: pin A routed to IRQ 22 Region 0: Memory at febfc000 (32-bit, non-prefetchable) [size=16K] Region 1: I/O ports at e800 [size=256] Expansion ROM at febc [disabled] [size=128K] Capabilities: access denied -Chris - 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: ata and netdev (was Re: -mm merge plans for 2.6.23)
Hello. Andrew Morton wrote: 3x59x-fix-pci-resource-management.patch: you wrote it ;) I have a comment No, I did, almost a year ago already. :-) here: - I don't remember the story with cardbus either. Presumably once upon a time the cardbus layer was claiming IO regions on behalf of cardbus devices (?) IIRC, that's your own comment. Need to think about that. 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: ata and netdev (was Re: -mm merge plans for 2.6.23)
On Wed, 11 Jul 2007 00:31:23 +0400 Sergei Shtylyov [EMAIL PROTECTED] wrote: Hello. Andrew Morton wrote: 3x59x-fix-pci-resource-management.patch: you wrote it ;) I have a comment No, I did, almost a year ago already. :-) I thought that was odd. I fixed the attribution. here: - I don't remember the story with cardbus either. Presumably once upon a time the cardbus layer was claiming IO regions on behalf of cardbus devices (?) IIRC, that's your own comment. yup, that's what I have a comment meant ;) The comment seems rather bogus actually. Let's just merge it. - 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 kernel unaligned access with r8169 on sparc64
Philip Craig [EMAIL PROTECTED] : [...] Try the patches at http://www.fr.zoreil.com/linux/kernel/2.6.x/2.6.22-rc6/ I think patches 0012 and/or 0017 will fix this. They should but they will not apply directly against 2.6.18-something. Florian, can you consider one of the option below: - try current 2.6.23-git. It contains the changes which should fix your alignment issues. - try http://www.fr.zoreil.com/people/francois/backport/r8169/20070604-00 It is a backport against 2.6.18 which should bring you quite close to 2.6.23-git wrt r8169. -- Ueimor - 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: Fwd: r8169 driver supporting the 8167 dev ID
Jonathan Larsen [EMAIL PROTECTED] : I've been looking for the r8169 driver that is for the 2.6.x kernel and also supports the device id 8167, 10ec. chipset is the 8110sc. im sure someone is familiar with this. It is not the most used chipset in the 816x family but there are some known users, yes. i noticed on the most latest kernel that such a driver exists. i downloaded a gentoo live cd and found out. im trying to compile a driver for a 2.6.16.52 kernel, it's for smoothwall. i was hoping someone could help me out in getting the source so i could compile it under the 2.6.16.52 kernel and have it work with my 8110sc chipset nic's. The patchkit from 2.6.18 to (almost) current contains 47 patches. git is a wonderful tool for endless nights of SM backporting but I'd appreciate to understand why you can not use a more recent kernel before engaging. hope i've included enough info and description in what i am trying to accomplish. i just hope it's possible. thank you! :) git format-patch v2.6.18..v2.6.23-rc1 -- drivers/net/r8169.c gives a good summary of the changes in the r8169 driver. One starts from a 2.6.16.something base and cycle through {apply/ignore}/compile/fix {reject/api change} for each patch until the r8169 driver reaches a decent state. It is not difficult but it takes time. -- Ueimor - 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