]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/pci/pcbios.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / arch / x86 / pci / pcbios.c
index 10ac8c316c468b1161d5b5e17f88b60ddceba2ff..2f7109ac4c151046a812faaeed2f276718bc1857 100644 (file)
@@ -198,6 +198,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
                          "b" (bx),
                          "D" ((long)reg),
                          "S" (&pci_indirect));
+               /*
+                * Zero-extend the result beyond 8 bits, do not trust the
+                * BIOS having done it:
+                */
+               *value &= 0xff;
                break;
        case 2:
                __asm__("lcall *(%%esi); cld\n\t"
@@ -210,6 +215,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
                          "b" (bx),
                          "D" ((long)reg),
                          "S" (&pci_indirect));
+               /*
+                * Zero-extend the result beyond 16 bits, do not trust the
+                * BIOS having done it:
+                */
+               *value &= 0xffff;
                break;
        case 4:
                __asm__("lcall *(%%esi); cld\n\t"