On Mon, 22 Aug 2005, Linus Torvalds wrote:
>
> But disabling the ROM assignment might be a good idea. Almost nobody ever
> really wants to assign the ROM anyway, and there are cards where there are
> some strange rules about ROM alignment (read: doesn't follow spec).
Here's an even better idea.
Let's do the assignment internally in the kernel, but just not write it to
the device unless it's actually enabled. IOW, we'll be doing all the
resource allocation, but devices won't be affected. Modern lspci versions
will show this as a "[virtual] Expansion ROM".
The patch might look something like this. Helge, does this make any
difference?
Ivan, opinions?
Linus
---
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev,
if (resno < 6) {
reg = PCI_BASE_ADDRESS_0 + 4 * resno;
} else if (resno == PCI_ROM_RESOURCE) {
- new |= res->flags & IORESOURCE_ROM_ENABLE;
+ if (!(res->flags & IORESOURCE_ROM_ENABLE))
+ return;
+ new |= PCI_ROM_ADDRESS_ENABLE;
reg = dev->rom_base_reg;
} else {
/* Hmm, non-standard resource. */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|