Skip to contentSkip to conversation

PnP BIOS: io range length bugfix

PATCH New Andrey Panin 1 participant 1 message Jul 20, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PnP BIOS: io range length bugfix

Hi all,

this patch fixes bug in pnpbios_rawdata_2_pci_dev() - miscalculated length of ioport range. This function uses word at offset 6 in I/O Port Descriptor, but according to ISA PnP specification ioport range length is a byte at offset 7 and byte 6 is base alignment.

BTW will it usefull to implement PnP device naming function ?

Best regards.

Signature · 2 lines
Andrey Panin            | Embedded systems software engineer
[email protected]        | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
linux/drivers/pnp/pnp_bios.c renamed from linux.vanilla/drivers/pnp/pnp_bios.c +1 -1
diff -urN -X /usr/dontdiff /linux.vanilla/drivers/pnp/pnp_bios.c /linux/drivers/pnp/pnp_bios.c
@@ -669,7 +669,7 @@
                         break;
                 case 0x08: // io
 			io= p[2] + p[3] *256;
-			len= p[6] + p[7] *256;
+			len = p[7];
 			i=0;
                         while(pci_dev->resource[i].start && i<DEVICE_COUNT_RESOURCE)
                                 i++;