* [PATCH] pci_read_bases trivial fixup
@ 2000-12-05 13:55 Matt_Domsch
2000-12-05 15:49 ` Ivan Kokshaysky
0 siblings, 1 reply; 2+ messages in thread
From: Matt_Domsch @ 2000-12-05 13:55 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
Linus, below is a trivial patch to pci.c, and applies against test12-pre5.
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.
Thanks,
Matt Domsch
Dell Enterprise Systems Group
Linux Development Team
diff -burN linux/drivers/pci/pci.c.orig linux/drivers/pci/pci.c
--- linux/drivers/pci/pci.c.orig Tue Dec 5 07:49:28 2000
+++ linux/drivers/pci/pci.c Tue Dec 5 07:49:36 2000
@@ -540,7 +540,7 @@
static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int
rom)
{
unsigned int pos, reg, next;
- u32 l, sz;
+ u32 l, sz, tmp;
struct resource *res;
for(pos=0; pos<howmany; pos = next) {
-
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pci_read_bases trivial fixup
2000-12-05 13:55 [PATCH] pci_read_bases trivial fixup Matt_Domsch
@ 2000-12-05 15:49 ` Ivan Kokshaysky
0 siblings, 0 replies; 2+ messages in thread
From: Ivan Kokshaysky @ 2000-12-05 15:49 UTC (permalink / raw)
To: Matt_Domsch; +Cc: torvalds, linux-kernel
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-05 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-05 13:55 [PATCH] pci_read_bases trivial fixup Matt_Domsch
2000-12-05 15:49 ` Ivan Kokshaysky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®