public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Don't miss the ARM-scsi fix.
@ 2007-07-03 19:03 Rob Landley
  2007-07-03 19:21 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Landley @ 2007-07-03 19:03 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

Just making sure this fix winds up in 2.6.23:

http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=4454/1

It fixes a regression that occurred between 2.6.20 and 2.6.20-rc1.  Without 
it, qemu-system-arm can't use emulated SCSI drives.  It wasn't in -rc7, and 
the attached patch Works For Me (tm).

Signed-off-by: Rob Landley <rob@landley.net>

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.

[-- Attachment #2: linux-armfix.patch --]
[-- Type: text/x-diff, Size: 1131 bytes --]

ARM Versatile PCI config reads of one byte width have the lowest two<br />
bits of the address cleared and result in reading from a wrong place<br />
in the config space.  This change is to use word size accesses like it is done for halfword reads.

Byte reads are used for retrieving the IRQ number of a PCI device and the problem was not exposed until 2.6.20 because the value read was discarded in drivers/pci/setup-irq.c (recently fixed).

Signed-off-by: Andrzej Zaborowski  &lt;(address hidden)&gt;<br />
Acked-by: Paul Brook  &lt;(address hidden)&gt;

Note 2 submitted by Russell King on 02 Jul 2007 12:39:41 (UTC)
Moved to applied
Applied to git-curr.

diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index ba58223..ca82901 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -117,7 +117,10 @@ static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int wh
 	} else {
 		switch (size) {
 		case 1:
-			v = __raw_readb(addr);
+			v = __raw_readl(addr);
+			if (where & 2) v >>= 16;
+			if (where & 1) v >>= 8;
+ 			v &= 0xff;
 			break;
 
 		case 2:

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-07-04 17:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-03 19:03 Don't miss the ARM-scsi fix Rob Landley
2007-07-03 19:21 ` Andrew Morton
2007-07-03 19:31   ` Russell King - ARM Linux
2007-07-04  1:17     ` Rob Landley
2007-07-04 12:00     ` andrzej zaborowski
2007-07-04 17:12       ` Russell King - ARM Linux
2007-07-03 21:45   ` Rob Landley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox