Skip to content

Commit

Permalink
hpt366: write the full 4 bytes of ROM address, not just low 1 byte
Browse files Browse the repository at this point in the history
This is one heck of a confused driver.  It uses a byte write to a dword
register to enable a ROM resource that it doesn't even seem to be using.

"Lost and wandering in the desert of confusion"

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Linus Torvalds committed Sep 11, 2005
1 parent aa7c3a1 commit 9ec4ff4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/ide/pci/hpt366.c
Original file line number Diff line number Diff line change
Expand Up @@ -1334,9 +1334,13 @@ static int __devinit init_hpt366(struct pci_dev *dev)
static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const char *name)
{
int ret = 0;
/* FIXME: Not portable */

/*
* FIXME: Not portable. Also, why do we enable the ROM in the first place?
* We don't seem to be using it.
*/
if (dev->resource[PCI_ROM_RESOURCE].start)
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);

pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));
Expand Down

0 comments on commit 9ec4ff4

Please sign in to comment.