2.4.0-test11-pre7: isapnp hang
Reading from port 0x313 (my ISA NE2000 is at 0x300-0x31f) hangs my machine dead. Unfortunately, reading from that port is exactly what the isapnp code does on boot, if compiled into the kernel.
Is it the network card's fault (probably), or is there a less invasive probe that isapnp could use (unlikely, I guess)?
Tim.
*/
Quoted 6 lines
Reading from port
0x313(my ISA NE2000 is at 0x300-0x31f) hangs my machine dead. Unfortunately, reading from that port is exactly what the isapnp code does on boot, if compiled into the kernel.Is it the network card's fault (probably), or is there a less invasive probe that isapnp could use (unlikely, I guess)?
That shouldnt be possible - we are supposed to start at 0x203 and skip the problem area.
static int isapnp_next_rdp(void)
{
int rdp = isapnp_rdp;
while (rdp <= 0x3ff) {
if (!check_region(rdp, 1)) {
isapnp_rdp = rdp;
return 0;
}
rdp += RDP_STEP;
/*
* We cannot use NE2000 probe spaces for ISAPnP or we
* will lock up machines.
*/
if(rdp >= 0x280 && rdp <= 0x380)
continue;
}
return -1;
}If you can find out why that port is being touched I'd like to know
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 6 lines
Quoted 2 lines
Is it the network card's fault (probably), or is there a less invasive probe that isapnp could use (unlikely, I guess)?
That shouldnt be possible - we are supposed to start at
0x203and skip the problem area.
And a quick read of the code I pasted instead of just pasting suggests instead we should be using the patch below. Question however is who stole port 0x279 which is the normal port to use. It shouldnt be lp since lp is supposed to init after pnp.
pnp/isapnp.c renamed from pnp/isapnp.c.old +6 -7
@@ -270,17 +270,16 @@ {int rdp = isapnp_rdp;while (rdp <=0x3ff ) { -if (!check_region (rdp,1 )) { - isapnp_rdp = rdp; -return 0 ; - } - rdp +=RDP_STEP ;/* * We cannot use NE2000 probe spaces for ISAPnP or we * will lock up machines. */ -if (rdp >=0x280 && rdp <=0x380 ) -continue ; +if ((rdp <0x280 || rdp >0x380 ) && !check_region (rdp,1 )) + { + isapnp_rdp = rdp; +return 0 ; + } + rdp +=RDP_STEP ; }return -1 ; }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Quoted 4 lines · Alan Cox
And a quick read of the code I pasted instead of just pasting suggests instead we should be using the patch below. Question however is who stole port
0x279which is the normal port to use. It shouldnt be lp since lp is supposed to init after pnp.
Your patch fixes the problem (of course). lp is not compiled into the kernel (nor is parport), and after boot /proc/ioports shows:
[...]
01f0-01f7 : ide0
02e8-02ef : serial(auto)
[...]
Tim.
*/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Followup to: <[email protected]> By author: Tim Waugh <[email protected]> In newsgroup: linux.dev.kernel
Quoted 8 lines
Reading from port
0x313(my ISA NE2000 is at 0x300-0x31f) hangs my machine dead. Unfortunately, reading from that port is exactly what the isapnp code does on boot, if compiled into the kernel.Is it the network card's fault (probably), or is there a less invasive probe that isapnp could use (unlikely, I guess)?
Try reserving ports 0x300-0x31f on the kernel command line ("reserve=0x300,0x20").
I'm surprised isapnp uses a port in such a commonly used range, though.
-hpa
Signature · 7 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 5 lines
Try reserving ports 0x300-0x31f on the kernel command line ("reserve=0x300,0x20").
I'm surprised isapnp uses a port in such a commonly used range, though.
It seems to be a combination of two bugs. The one I posted a patch for and something odd that is taking port 0x279 before the pnp probe is run, which suggests a link order issue. Although in truth _nobody_ should be claing that anyway
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
Followup to: <[email protected]> By author: Alan Cox <[email protected]> In newsgroup: linux.dev.kernel
Quoted 4 lines
Quoted 4 lines
Try reserving ports 0x300-0x31f on the kernel command line ("reserve=0x300,0x20").
Quoted 8 lines
Quoted 2 lines
I'm surprised isapnp uses a port in such a commonly used range, though.
It seems to be a combination of two bugs. The one I posted a patch for and something odd that is taking port
0x279before the pnp probe is run, which suggests a link order issue. Although in truth _nobody_ should be claing that anyway
It seems to me that it would be better to initialize all the (non-PnP) ISA cards first, and have them claim their preferred ranges. Now you can pick the PnP isolate port out of what is left, and also have a much better idea of what is available.
-hpa
Signature · 7 lines
<[email protected]> at work, <[email protected]> in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] Please read the FAQ at http://www.tux.org/lkml/
Quoted 4 lines
It seems to me that it would be better to initialize all the (non-PnP) ISA cards first, and have them claim their preferred ranges. Now you can pick the PnP isolate port out of what is left, and also have a much better idea of what is available.
Post 2.4 only. It means re-architecting all the ISA probes so that they don't mix the PnP and non PnP probes. I suspect implementing a copy of the PCI hot swap API would be the simplest
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/