Bug 3295

Summary: pnpbios don't get the correct ressource in some cases
Product: Drivers Reporter: CASTET Matthieu (castet.matthieu)
Component: PNPAssignee: Adam Belay (ambx1)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: 2.6.8 Subsystem:
Regression: --- Bisected commit-id:
Attachments: patch that resolve the bug

Description CASTET Matthieu 2004-08-28 13:20:43 UTC
Hello,
it seem the parser have a bug for device that have independant irq and io (in
the bios config, you can choose irq and io separatly).
For example for my mpu401, it show
--------------------
Dependent: 01 - Priority acceptable
   port 0x330-0x330, align 0x1, size 0x2, 16-bit address decoding
Dependent: 02 - Priority acceptable
   port 0x300-0x300, align 0x1, size 0x2, 16-bit address decoding
   irq 3,4,5,7,2/9,10 High-Edge
----------------------------
but the irq are for 01 and 02 config and not for 02 !!!

So I have no irq I use 01 config that is the default...
Thanks
Comment 1 CASTET Matthieu 2004-09-02 01:06:32 UTC
Created attachment 3620 [details]
patch that resolve the bug

this patch fix a pnpbios problem with independant resource :
the current code assume that they are given at the beggining (before any
SMALL_TAG_STARTDEP entry), but in some case there are found after
SMALL_TAG_ENDDEP entry.

tag : 6 SMALL_TAG_STARTDEP
tag : 8 SMALL_TAG_PORT
tag : 6 SMALL_TAG_STARTDEP
tag : 8 SMALL_TAG_PORT
tag : 7 SMALL_TAG_ENDDEP
tag : 4 SMALL_TAG_IRQ
tag : f SMALL_TAG_END
Comment 2 CASTET Matthieu 2004-09-02 01:07:52 UTC
hi,
I found the bug and attached a patch.
I also send the patch to the lkml.

Matthieu