]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Fix up more strange byte writes to the PCI_ROM_ADDRESS config word
authorLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Sep 2005 14:59:34 +0000 (07:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 13 Sep 2005 14:59:34 +0000 (07:59 -0700)
It's a dword thing, and the value we write is a dword.  Doing a byte
write to it is nonsensical, and writes only the low byte, which only
contains the enable bit.  So we enable a nonsensical address (usually
zero), which causes the controller no end of problems.

Trivial fix, but nasty to find.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/ide/pci/cmd64x.c
drivers/ide/pci/hpt34x.c

index 3de9ab897e421aff8eb235023ee115189678cf19..3d9c7afc86950ad1660852bba5eb680199cde1b2 100644 (file)
@@ -608,7 +608,7 @@ static unsigned int __devinit init_chipset_cmd64x(struct pci_dev *dev, const cha
 
 #ifdef __i386__
        if (dev->resource[PCI_ROM_RESOURCE].start) {
-               pci_write_config_byte(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
+               pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
                printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start);
        }
 #endif
index bbde462799843802ccfe66936ef7271618c765ce..be334da7a7549b4fb44f82e59000450875c1abfb 100644 (file)
@@ -173,7 +173,7 @@ static unsigned int __devinit init_chipset_hpt34x(struct pci_dev *dev, const cha
 
        if (cmd & PCI_COMMAND_MEMORY) {
                if (pci_resource_start(dev, PCI_ROM_RESOURCE)) {
-                       pci_write_config_byte(dev, PCI_ROM_ADDRESS,
+                       pci_write_config_dword(dev, PCI_ROM_ADDRESS,
                                dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
                        printk(KERN_INFO "HPT345: ROM enabled at 0x%08lx\n",
                                dev->resource[PCI_ROM_RESOURCE].start);