lkml.org 
[lkml]   [2000]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] pci_read_bases trivial fixup
On Tue, Dec 05, 2000 at 07:55:58AM -0600, Matt_Domsch@Dell.com wrote:
> In -test11, tmp was declared. Somehow by 12-pre4, it got lost. This puts
> it back. It's needed in the BITS_PER_LONG == 64 case.

BITS_PER_LONG == 64 case is broken anyway.
Better fix would be

--- linux/drivers/pci/pci.c.orig Mon Dec 4 12:49:28 2000
+++ linux/drivers/pci/pci.c Tue Dec 5 18:30:45 2000
@@ -573,10 +573,10 @@ static void pci_read_bases(struct pci_de
res->start |= ((unsigned long) l) << 32;
res->end = res->start + sz;
pci_write_config_dword(dev, reg+4, ~0);
- pci_read_config_dword(dev, reg+4, &tmp);
+ pci_read_config_dword(dev, reg+4, &sz);
pci_write_config_dword(dev, reg+4, l);
- if (l)
- res->end = res->start + (((unsigned long) ~l) << 32);
+ if (sz)
+ res->end = res->start + (((unsigned long) ~sz) << 32);
#else
if (l) {
printk(KERN_ERR "PCI: Unable to handle 64-bit address for device %s\n", dev->slot_name);

Ivan.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:51    [W:0.035 / U:1.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site