ISAPNP BUG: 2.4.65 ne2000 driver w. isapnp not working
Subsystems (3)
Quoted 17 lines
Hello.
Have some trouble with loading modules (see earlier message). Tried to compile a driver in.
dmesg:
-------
isapnp: Scanning for PnP cards...
isapnp: Card Plug & Play Ethernet card
isapnp: 1 Plug and Play card detected total
------- no further references do isapnp in logs
- Same card works (with pnp disabled (jumper) and driver compiled as a module) by modprobing it with io=0x300
Quoted 6 lines
- Same card works with 2.4.21-pre5 driver as module both with pnp and modual probing
Regards
Michael
-
Michael,
NE2k ISAPNP broke around 2.5.64, again. There are 2 parts to the attached patch, one to move the NIC initialization earlier in the boot sequence and the second is a HACK to get ne2k to work when compiled into the kernel, I've never tried NE2k as a module...
1. The level of isapnp_init was moved to after apci. Since it is now after net_dev_init, ISA PNP NICs fail to initialized at boot.
This fix allows ISA PNP NIC cards to work during net_dev_init, and still leaves isapnp_init after apci_init.
2. The second piece kills off a now ?unnecessary? probe.
Works for me,
Martin
linux-2.5.65/./drivers/net/ne.c renamed from drivers/net/ne.c +2 -0
@@ -176,8 +176,10 @@return -ENXIO ;/* Then look for any installed ISAPnP clones */ +/* HACK to kill this probe, also done now by new isapnp code if (isapnp_present() && (ne_probe_isapnp(dev) == 0)) return 0; +*/ #ifndef MODULE /* Last resort. The semi-risky ISA auto-probe. */
linux-2.5.65/./drivers/pnp/isapnp/core.c renamed from drivers/pnp/isapnp/core.c +1 -1
@@ -1173,7 +1173,7 @@return 0 ; } -device_initcall (isapnp_init); +subsys_initcall (isapnp_init);/* format is: noisapnp */
Quoted 10 lines · M.H.VanLeeuwen
NE2k ISAPNP broke around 2.5.64, again. There are 2 parts to the attached patch, one to move the NIC initialization earlier in the boot sequence and the second is a HACK to get ne2k to work when compiled into the kernel, I've never tried NE2k as a module...
1. The level of
isapnp_initwas moved to after apci. Since it is now afternet_dev_init, ISA PNP NICs fail to initialized at boot.This fix allows ISA PNP NIC cards to work during
net_dev_init, and still leavesisapnp_initafterapci_init.
We must initialise ACPI before ISAPnP because we need PCI and ACPI to know what system resources we must not hit. How about moving the net_dev_init to later ?
Quoted 10 lines · Alan Cox
Quoted 8 lines · M.H.VanLeeuwen
NE2k ISAPNP broke around 2.5.64, again. There are 2 parts to the attached patch, one to move the NIC initialization earlier in the boot sequence and the second is a HACK to get ne2k to work when compiled into the kernel, I've never tried NE2k as a module...
1. The level of
isapnp_initwas moved to after apci. Since it is now afternet_dev_init, ISA PNP NICs fail to initialized at boot.
Quoted 6 lines
Quoted 2 lines
This fix allows ISA PNP NIC cards to work during
net_dev_init, and still leavesisapnp_initafterapci_init.We must initialise ACPI before ISAPnP because we need PCI and ACPI to know what system resources we must not hit. How about moving the
net_dev_initto later ?
Here is the ordering of initcall from System.map file w/ my change. I take it that you want isapnp_init after pci*_init also, or is it sufficient like it is, after the acpi*_init?
c0410f30 t __initcall_init_bioc0410f34 t __initcall_acpi_initc0410f38 t __initcall_acpi_ec_initc0410f3c t __initcall_acpi_pci_root_initc0410f40 t __initcall_acpi_pci_link_initc0410f44 t __initcall_acpi_power_initc0410f48 t __initcall_acpi_system_initc0410f4c t __initcall_acpi_event_initc0410f50 t __initcall_acpi_scan_initc0410f54 t __initcall_pnp_initc0410f58 t __initcall_pnp_system_initc0410f5c t __initcall_isapnp_init <<<<<< patch moved it here <<<c0410f60 t __initcall_device_initc0410f64 t __initcall_deadline_slab_setupc0410f68 t __initcall_pci_acpi_initc0410f6c t __initcall_pci_legacy_initc0410f70 t __initcall_pcibios_irq_initc0410f74 t __initcall_pcibios_initc0410f78 t __initcall_net_dev_initc0410f7c t __initcall_init_8259A_devicefs
Or is this not the place to see initcall ordering?
Looking into moving net_dev_init to later...
Martin
Quoted 3 lines · M.H.VanLeeuwen
Here is the ordering of initcall from System.map file w/ my change. I take it that you want
isapnp_initafter pci*_init also, or is it sufficient like it is, after the acpi*_init?
pci and pnpbios must come before isapnp as well. Otherwise IGP based systems will MCE on boot
Original 2.5.65. Put some printks in.
Two tries with service network start. Success on the second try.
Here are the messages
First try
Mar 24 08:01:16 mhfl1 network: Setting network parameters: succeeded Mar 24 08:01:17 mhfl1 ifup: Cannot find device "eth0" Mar 24 08:01:18 mhfl1 network: Bringing up loopback interface: succeeded Mar 24 08:01:19 mhfl1 kernel: ne: ne_probe Mar 24 08:01:19 mhfl1 kernel: ne: ne_probe_isapnp
It seems that pnp does not work the first try:
Mar 24 08:01:19 mhfl1 kernel: pnp: res: The PnP device '01:01.00' is already active.
Mar 24 08:01:19 mhfl1 kernel: ne.c: You must supply "io=0xNNN" value(s) for ISA cards. Mar 24 08:01:19 mhfl1 ifup: ne device eth0 does not seem to be present, delaying initialization. Mar 24 08:01:19 mhfl1 network: Bringing up interface eth0: failed
Second try
Mar 24 08:01:20 mhfl1 network: Setting network parameters: succeeded Mar 24 08:01:21 mhfl1 ifup: Cannot find device "eth0" Mar 24 08:01:22 mhfl1 network: Bringing up loopback interface: succeeded Mar 24 08:01:23 mhfl1 kernel: ne: ne_probe Mar 24 08:01:23 mhfl1 kernel: ne: ne_probe_isapnp Mar 24 08:01:23 mhfl1 kernel: ne.c: ISAPnP reports Generic PNP at i/o 0x2a0, irq 15. Mar 24 08:01:23 mhfl1 kernel: ne: ne_probe1 Mar 24 08:01:23 mhfl1 kernel: ne.c:v1.10 9/23/94 Donald Becker ([email protected]) Mar 24 08:01:23 mhfl1 kernel: Last modified Nov 1, 2000 by Paul Gortmaker Mar 24 08:01:23 mhfl1 kernel: NE*000 ethercard probe at 0x2a0: 00 00 ff ff 27 ef Mar 24 08:01:23 mhfl1 kernel: eth0: NE2000 found at 0x2a0, using IRQ 15. Mar 24 08:01:23 mhfl1 kernel: ne: ne_probe_isapnp == 0 Mar 24 08:01:23 mhfl1 kernel: ne: ne_probe Mar 24 08:01:23 mhfl1 kernel: ne: ne_probe_isapnp Mar 24 08:01:26 mhfl1 network: Bringing up interface eth0: succeeded
---------
ne_probe1 and ne_probe_isapnp have only a printk at their top
---------
int __init ne_probe(struct net_device *dev)
{
unsigned int base_addr = dev->base_addr;
printk("ne: ne_probe\n");
SET_MODULE_OWNER(dev);/* First check any supplied i/o locations. User knows best. <cough> */
if (base_addr > 0x1ff) /* Check a single specified location. */
return ne_probe1(dev, base_addr);
else if (base_addr != 0) /* Don't probe at all. */
return -ENXIO;/* Then look for any installed ISAPnP clones */
if (isapnp_present() == 0)
printk("ne: no isapnp found\n");
else if (ne_probe_isapnp(dev) == 0) {
printk("ne: ne_probe_isapnp == 0\n");
return 0;}
#ifndef MODULE
/* Last resort. The semi-risky ISA auto-probe. */
for (base_addr = 0; netcard_portlist[base_addr] != 0; base_addr++) {
int ioaddr = netcard_portlist[base_addr];
if (ne_probe1(dev, ioaddr) == 0)
return 0; }
#endif
return -ENODEV;
}
--------
Quoted 7 lines · Alan Cox
Quoted 3 lines · M.H.VanLeeuwen
Here is the ordering of initcall from System.map file w/ my change. I take it that you want
isapnp_initafter pci*_init also, or is it sufficient like it is, after the acpi*_init?pci and pnpbios must come before isapnp as well. Otherwise IGP based systems will MCE on boot
Martin,
Thank you for your message and patch which I tested. Firstlye some more background info.
I just started testing 2.5 on all kinds of hw. This is being done on RH beta 8.094 (phoebe)
This machine is an old 586 w/o ACPI and bootet with acpi=off. I sent messages and dmesg to your email only.
1) 2.5.65 + acpi20030321, isapnp fails on the _first_ attempt and works on the second and further(rmmod ne and 8390) attempts. There is a kernel message during ifup which may give you a hint
1st attempt:
kernel: pnp: res: The PnP device '01:01.00' is already active.
kernel: ne.c: You must supply "io=0xNNN" value(s) for ISA cards.
ifup: ne device eth0 does not seem to be present, delaying initialization.
network: Bringing up interface eth0: failed
2nd (and further after rmmod) attempt:
kernel: ne.c:v1.10 9/23/94 Donald Becker ([email protected])
kernel: Last modified Nov 1, 2000 by Paul Gortmaker
kernel: NE*000 ethercard probe at 0x2a0: 00 00 ff ff 27 ef
kernel: eth0: NE2000 found at 0x2a0, using IRQ 15.
network: Bringing up interface eth0: succeeded
2) 2.5.65 + acpi20030321 + your patch, pnp does not work at all, but the module can be inserted with modprobe ne io=0x2a0 irq=15. It seems it does not talk to the ne code as Beckers msg missing?
All attempts of ifup eth0 or service network start:
ifup: Cannot find device "eth0"
network: Bringing up loopback interface: succeeded
kernel: ne.c: You must supply "io=0xNNN" value(s) for ISA cards.
ifup: ne device eth0 does not seem to be present, delaying initialization.
network: Bringing up interface eth0: failed
modprobe ne io=0x2a0 irq=15:
kernel: ne.c:v1.10 9/23/94 Donald Becker ([email protected])
kernel: Last modified Nov 1, 2000 by Paul Gortmaker
kernel: NE*000 ethercard probe at 0x2a0: 00 00 ff ff 27 ef
kernel: eth0: NE2000 found at 0x2a0, using IRQ 15.
for me not yet ... :-)
Michael
Quoted 43 lines · you
Quoted 17 lines
Hello.
Have some trouble with loading modules (see earlier message). Tried to compile a driver in.
dmesg:
-------
isapnp: Scanning for PnP cards...
isapnp: Card Plug & Play Ethernet card
isapnp: 1 Plug and Play card detected total
------- no further references do isapnp in logs
- Same card works (with pnp disabled (jumper) and driver compiled as a module) by modprobing it with io=0x300
Quoted 6 lines
- Same card works with 2.4.21-pre5 driver as module both with pnp and modual probing
Regards
Michael
-Michael,
NE2k ISAPNP broke around 2.5.64, again. There are 2 parts to the attached patch, one to move the NIC initialization earlier in the boot sequence and the second is a HACK to get ne2k to work when compiled into the kernel, I've never tried NE2k as a module...
1. The level of
isapnp_initwas moved to after apci. Since it is now afternet_dev_init, ISA PNP NICs fail to initialized at boot.This fix allows ISA PNP NIC cards to work during
net_dev_init, and still leavesisapnp_initafterapci_init.2. The second piece kills off a now ?unnecessary? probe.
Works for me,
Martin
Michael,
Thanks for the info. Like I said in previous e-mail I've not tested modules nor do I use them unless absolutely necessary.
The question is who is the maintainer of the NE2K ISAPNP interface? Is this an NE2k maintainer issue or an ISAPNP issue or a "you have the hdwr" you fix it thingy?
I can hack on ne2k but don't want to spend time on it if someone else already is or has a better solution or possibly colliding with ISAPNP development again as did my last patches sent to Linus.
Martin
Quoted 89 lines · Michael Frank
Martin,
Thank you for your message and patch which I tested. Firstlye some more background info.
I just started testing 2.5 on all kinds of hw. This is being done on RH beta 8.094 (phoebe)
This machine is an old 586 w/o ACPI and bootet with acpi=off. I sent messages and dmesg to your email only.
1) 2.5.65 + acpi20030321, isapnp fails on the _first_ attempt and works on the second and further(rmmod ne and 8390) attempts. There is a kernel message during ifup which may give you a hint
1st attempt:
kernel: pnp: res: The PnP device '01:01.00' is already active.
kernel:ne.c: You must supply "io=0xNNN" value(s) for ISA cards.
ifup: ne device eth0 does not seem to be present, delaying initialization.
network: Bringing up interface eth0: failed2nd (and further after rmmod) attempt:
kernel: ne.c:v1.10 9/23/94 Donald Becker ([email protected])
kernel: Last modified Nov 1, 2000 by Paul Gortmaker
kernel: NE*000 ethercard probe at0x2a0: 00 00 ff ff 27 ef
kernel: eth0: NE2000 found at0x2a0, using IRQ 15.
network: Bringing up interface eth0: succeeded2) 2.5.65 + acpi20030321 + your patch, pnp does not work at all, but the module can be inserted with modprobe ne io=0x2a0 irq=15. It seems it does not talk to the ne code as Beckers msg missing?
All attempts of ifup eth0 or service network start:
ifup: Cannot find device "eth0"
network: Bringing up loopback interface: succeeded
kernel:ne.c: You must supply "io=0xNNN" value(s) for ISA cards.
ifup: ne device eth0 does not seem to be present, delaying initialization.
network: Bringing up interface eth0: failedmodprobe ne io=0x2a0 irq=15:
kernel: ne.c:v1.10 9/23/94 Donald Becker ([email protected])
kernel: Last modified Nov 1, 2000 by Paul Gortmaker
kernel: NE*000 ethercard probe at0x2a0: 00 00 ff ff 27 ef
kernel: eth0: NE2000 found at0x2a0, using IRQ 15.for me not yet ... :-)
MichaelQuoted 43 lines · you
Quoted 17 lines
Hello.
Have some trouble with loading modules (see earlier message). Tried to compile a driver in.
dmesg:
-------
isapnp: Scanning for PnP cards...
isapnp: Card Plug & Play Ethernet card
isapnp: 1 Plug and Play card detected total
------- no further references do isapnp in logs
- Same card works (with pnp disabled (jumper) and driver compiled as a module) by modprobing it with io=0x300
Quoted 6 lines
- Same card works with 2.4.21-pre5 driver as module both with pnp and modual probing
Regards
Michael
-Michael,
NE2k ISAPNP broke around 2.5.64, again. There are 2 parts to the attached patch, one to move the NIC initialization earlier in the boot sequence and the second is a HACK to get ne2k to work when compiled into the kernel, I've never tried NE2k as a module...
1. The level of
isapnp_initwas moved to after apci. Since it is now afternet_dev_init, ISA PNP NICs fail to initialized at boot.This fix allows ISA PNP NIC cards to work during
net_dev_init, and still leavesisapnp_initafterapci_init.2. The second piece kills off a now ?unnecessary? probe.
Works for me,
Martin
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Resolved: ISAPNP BUG: 2.4.65 ne2000 driver w. isapnp not working
Martin,
Thank you for getting the fix going and sending me this patch which I applid on 2.5.66.
The problem is resolved:
.config: CONFIG_NE2000=m
Tested:
network start on boot: OK
several network restart: OK
rmmod ne 8390; network start: OK
several network restart: OK
I like also to thank Adam Belay for getting this fixed.
Best Regards
Michael
Quoted 35 lines · you
Michael,
Adam Belay has posted some PNP patches you may want to try for 2.5.66.
One of them looks like it may help...I haven't tried.
Martin
diff -Nru
a/drivers/pnp/manager.cb/drivers/pnp/manager.cdrivers/pnp/manager.c Tue Mar 25 21:44:41 2003 +1
-2@@ -632,8 +632,7 @@ if (!dev) return -EINVAL; if (dev->active) { - pnp_info("res: The PnP device '%s' is already active.", dev->dev.bus_id); - return -EBUSY; + return 0; /* the device is already active */ } /* If this condition is true, advanced configuration failed, weneed to get this device up and running * so we use the simple config engine which ignores cold conflicts, this of course may lead to new failures */ @@ -698,8 +697,7 @@
if (!dev) return -EINVAL; if (!dev->active) { - pnp_info("res: The PnP device '%s' is already disabled.", dev->dev.bus_id); - return -EINVAL; + return 0; /* the device is already disabled */ } if (dev->status != PNP_READY){ pnp_info("res: Disable failed becuase the PnP device '%s'is busy.",
dev->dev.bus_id);