/[linux-patches]/genpatches-2.6/tags/2.6.13-4/1013_2_hpt366-write-dword-not-byte-for-ROM-resource.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.13-4/1013_2_hpt366-write-dword-not-byte-for-ROM-resource.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 168 - (show annotations) (download)
Sun Sep 18 11:19:29 2005 UTC (8 years, 11 months ago) by dsd
File size: 1497 byte(s)
2.6.13-4 release
1 From stable-bounces@linux.kernel.org Sun Sep 11 14:07:53 2005
2 Date: Sun, 11 Sep 2005 14:07:43 -0700 (PDT)
3 From: Linus Torvalds <torvalds@osdl.org>
4 To: stable@kernel.org
5 Subject: hpt366: write the full 4 bytes of ROM address, not just low 1 byte
6
7 From: Linus Torvalds <torvalds@g5.osdl.org>
8
9 This is one heck of a confused driver. It uses a byte write to a dword
10 register to enable a ROM resource that it doesn't even seem to be using.
11
12 "Lost and wandering in the desert of confusion"
13
14 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
15 Signed-off-by: Chris Wright <chrisw@osdl.org>
16 ---
17 drivers/ide/pci/hpt366.c | 8 ++++++--
18 1 files changed, 6 insertions(+), 2 deletions(-)
19
20 Index: linux-2.6.13.y/drivers/ide/pci/hpt366.c
21 ===================================================================
22 --- linux-2.6.13.y.orig/drivers/ide/pci/hpt366.c
23 +++ linux-2.6.13.y/drivers/ide/pci/hpt366.c
24 @@ -1334,9 +1334,13 @@ static int __devinit init_hpt366(struct
25 static unsigned int __devinit init_chipset_hpt366(struct pci_dev *dev, const char *name)
26 {
27 int ret = 0;
28 - /* FIXME: Not portable */
29 +
30 + /*
31 + * FIXME: Not portable. Also, why do we enable the ROM in the first place?
32 + * We don't seem to be using it.
33 + */
34 if (dev->resource[PCI_ROM_RESOURCE].start)
35 - pci_write_config_byte(dev, PCI_ROM_ADDRESS,
36 + pci_write_config_dword(dev, PCI_ROM_ADDRESS,
37 dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
38
39 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4));

  ViewVC Help
Powered by ViewVC 1.1.20