From 26a7ae72770addd3537e8166e0db4f9d0925ef5a Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Tue, 5 Aug 2003 19:33:34 +0000 Subject: [PATCH] From SONE --- src/bioscall/pcibios.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bioscall/pcibios.c b/src/bioscall/pcibios.c index 4e3ec4eb26..27d7e7e1ba 100644 --- a/src/bioscall/pcibios.c +++ b/src/bioscall/pcibios.c @@ -50,7 +50,7 @@ pcibios( unsigned short func = (unsigned short) eax; int retval = -1; unsigned short devid, vendorid, devfn; - int devindex; + short devindex; /* Use short to get rid of gabage in upper half of 32-bit register */ unsigned char bus; struct pci_dev *dev; @@ -76,7 +76,8 @@ pcibios( *peax = 0; // busnum is an unsigned char; // devfn is an int, so we mask it off. - busdevfn = dev->bus->secondary | (dev->devfn & 0xff); + busdevfn = (dev->bus->secondary << 8) + | (dev->devfn & 0xff); printk_debug("0x%x: return 0x%x\n", func, busdevfn); *pebx = busdevfn; retval = 0;