/[linux-patches]/genpatches-2.6/tags/2.6.13-4/1010_2_fix-more-byte-to-dword-writes-to-PCI_ROM_ADDRESS-config-word.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.13-4/1010_2_fix-more-byte-to-dword-writes-to-PCI_ROM_ADDRESS-config-word.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 168 - (show annotations) (download)
Sun Sep 18 11:19:29 2005 UTC (9 years, 3 months ago) by dsd
File size: 2068 byte(s)
2.6.13-4 release
1 From stable-bounces@linux.kernel.org Tue Sep 13 08:02:00 2005
2 Date: Tue, 13 Sep 2005 08:01:49 -0700 (PDT)
3 From: Linus Torvalds <torvalds@osdl.org>
4 To: stable@kernel.org
5 Cc:
6 Subject: Fix up more strange byte writes to the PCI_ROM_ADDRESS config word
7
8 It's a dword thing, and the value we write is a dword. Doing a byte
9 write to it is nonsensical, and writes only the low byte, which only
10 contains the enable bit. So we enable a nonsensical address (usually
11 zero), which causes the controller no end of problems.
12
13 Trivial fix, but nasty to find.
14
15 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
16 Signed-off-by: Chris Wright <chrisw@osdl.org>
17 ---
18 drivers/ide/pci/cmd64x.c | 2 +-
19 drivers/ide/pci/hpt34x.c | 2 +-
20 2 files changed, 2 insertions(+), 2 deletions(-)
21
22 Index: linux-2.6.13.y/drivers/ide/pci/cmd64x.c
23 ===================================================================
24 --- linux-2.6.13.y.orig/drivers/ide/pci/cmd64x.c
25 +++ linux-2.6.13.y/drivers/ide/pci/cmd64x.c
26 @@ -608,7 +608,7 @@ static unsigned int __devinit init_chips
27
28 #ifdef __i386__
29 if (dev->resource[PCI_ROM_RESOURCE].start) {
30 - pci_write_config_byte(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
31 + pci_write_config_dword(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
32 printk(KERN_INFO "%s: ROM enabled at 0x%08lx\n", name, dev->resource[PCI_ROM_RESOURCE].start);
33 }
34 #endif
35 Index: linux-2.6.13.y/drivers/ide/pci/hpt34x.c
36 ===================================================================
37 --- linux-2.6.13.y.orig/drivers/ide/pci/hpt34x.c
38 +++ linux-2.6.13.y/drivers/ide/pci/hpt34x.c
39 @@ -173,7 +173,7 @@ static unsigned int __devinit init_chips
40
41 if (cmd & PCI_COMMAND_MEMORY) {
42 if (pci_resource_start(dev, PCI_ROM_RESOURCE)) {
43 - pci_write_config_byte(dev, PCI_ROM_ADDRESS,
44 + pci_write_config_dword(dev, PCI_ROM_ADDRESS,
45 dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE);
46 printk(KERN_INFO "HPT345: ROM enabled at 0x%08lx\n",
47 dev->resource[PCI_ROM_RESOURCE].start);

  ViewVC Help
Powered by ViewVC 1.1.20