[tulip] kernel parameters having no effect?
Andrew Morton
akpm@zip.com.au
Mon, 20 Aug 2001 20:09:15 -0700
john wa wrote:
>
> hi,
>
> i guess this might be a faq but i've searched all over trying to solve my
> problems.
>
> i have two kingston cards KNE-111TX, in my firewall/router. i'm trying to
> force one card to 10tx so i can restart the networking without having to reboot
> - since autonegotiation only seems to work the first time. i would also like
> to crank up the other card to 100tx-FD but i'm having no luck with either.
>
> using tulip-diag it reckons that both have auto-negotiation on - but in my
> lilo.conf i have append="ether=0,0,4,eth0 ether=0,0,5,eth1". have i done
> something wrong here? (my kernel is a monolithic 2.4.6)
>
The "ether=" mechanism accidentally got broken in kernel 2.4.2. It
does not work for drivers which use the new alloc_etherdev() API.
For now, your only option is to use kernel module parameters.
If you are OK with a local hack, this should fix it:
--- linux-2.4.8-ac8/drivers/net/tulip/tulip_core.c Mon Aug 20 18:33:16 2001
+++ ac/drivers/net/tulip/tulip_core.c Mon Aug 20 20:08:33 2001
@@ -1429,7 +1429,7 @@ static int __devinit tulip_init_one (str
irq = pdev->irq;
/* alloc_etherdev ensures aligned and zeroed private structures */
- dev = alloc_etherdev (sizeof (*tp));
+ dev = init_etherdev (NULL, sizeof (*tp));
if (!dev) {
printk (KERN_ERR PFX "ether device alloc failed, aborting\n");
return -ENOMEM;
@@ -1657,8 +1657,8 @@ static int __devinit tulip_init_one (str
dev->do_ioctl = private_ioctl;
dev->set_multicast_list = set_rx_mode;
- if (register_netdev(dev))
- goto err_out_free_ring;
+// if (register_netdev(dev))
+// goto err_out_free_ring;
printk(KERN_INFO "%s: %s rev %d at %#3lx,",
dev->name, tulip_tbl[chip_idx].chip_name, chip_rev, ioaddr);
@@ -1761,6 +1761,7 @@ err_out_free_res:
pci_release_regions (pdev);
err_out_free_netdev:
+ unregister_netdev(dev);
kfree (dev);
return -ENODEV;
}