On Thu, 8 Feb 2001, Thomas Pugliese wrote: > Here is a patch that fixes the module parameter recognition > problem for the ne2k-pci driver. At the top of ne2k_pci_init_one(), You have identified a bug introduced by whoever converted the driver to 2.4, but you have the wrong fix. > fnd_cnt is incremented but it is used later to index the > parameter arrays. With this patch, the full_duplex option > is recognized and the register is written. The ne2k-pci-diag > utility still says my RTL8029 is in half duplex mode, though. > if (fnd_cnt < MAX_UNITS) { > - if (full_duplex[fnd_cnt] > 0 || (options[fnd_cnt] & FORCE_FDX)) > + if (full_duplex[fnd_cnt - 1] > 0 || (options[fnd_cnt - 1] & FORCE_FDX)) { This works around the obvious problem, but results in supporting on MAX_UNITS-1 adapters. A cleaner fix is - static unsigned int fnd_cnt; + static unsigned int fnd_cnt = -1; long ioaddr; int flags = pci_clone_list[chip_idx].flags; - if (fnd_cnt++ == 0) + if (++fnd_cnt == 0) printk(KERN_INFO "%s" KERN_INFO "%s", version1, version2); Donald Becker becker@scyld.com Scyld Computing Corporation http://www.scyld.com 410 Severn Ave. Suite 210 Second Generation Beowulf Clusters Annapolis MD 21403 410-990-9993 - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org