[parisc-linux-cvs] linux-2.6 grundler

Grant Grundler grundler at parisc-linux.org
Wed Mar 10 00:25:29 MST 2004


On Wed, Mar 10, 2004 at 12:09:51AM -0700, Grant Grundler wrote:
> Log message:
> 2.6.4-rc3-pa1 fix TR4PLUS PCI cfg write for byte/word sizes.
> boots on ion (A500-6X).

The patch also fixes similar problem in lba_cfg_read but I
haven't tested that it actually works. Thus I didn't remove
the two (three?) year old hack that forces the full bug
workaround.

grant


Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/Makefile,v
retrieving revision 1.141
diff -u -p -r1.141 Makefile
--- a/Makefile	10 Mar 2004 02:27:14 -0000	1.141
+++ b/Makefile	10 Mar 2004 07:04:16 -0000
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 4
-EXTRAVERSION =-rc3-pa0
+EXTRAVERSION =-rc3-pa1
 NAME=Feisty Dunnart
 
 # *DOCUMENTATION*
Index: drivers/parisc/lba_pci.c
===================================================================
RCS file: /var/cvs/linux-2.6/drivers/parisc/lba_pci.c,v
retrieving revision 1.9
diff -u -p -r1.9 lba_pci.c
--- a/drivers/parisc/lba_pci.c	4 Feb 2004 16:31:16 -0000	1.9
+++ b/drivers/parisc/lba_pci.c	10 Mar 2004 07:04:18 -0000
@@ -533,10 +533,10 @@ static int lba_cfg_read(struct pci_bus *
 	*/
 	LBA_CFG_TR4_ADDR_SETUP(d, tok | pos);
 	switch(size) {
-	case 1: *(u8 *)  data = READ_REG8(d->hba.base_addr + LBA_PCI_CFG_DATA);
-	   break;
-	case 2: *(u16 *) data = READ_REG16(d->hba.base_addr + LBA_PCI_CFG_DATA);
-	   break;
+	case 1: *(u8 *)  data = READ_REG8(d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 3));
+		break;
+	case 2: *(u16 *) data = READ_REG16(d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 2));
+		break;
 	case 4: *(u32 *) data = READ_REG32(d->hba.base_addr + LBA_PCI_CFG_DATA);
 	   break;
 	}
@@ -613,13 +613,14 @@ static int lba_cfg_write(struct pci_bus 
 	/* Basic Algorithm */
 	LBA_CFG_TR4_ADDR_SETUP(d, tok | pos);
 	switch(size) {
-	case 1: WRITE_REG8 (data, d->hba.base_addr + LBA_PCI_CFG_DATA);
+	case 1: WRITE_REG8 (data, d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 3));
 		   break;
-	case 2: WRITE_REG16(data, d->hba.base_addr + LBA_PCI_CFG_DATA);
+	case 2: WRITE_REG16(data, d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & 2));
 		   break;
 	case 4: WRITE_REG32(data, d->hba.base_addr + LBA_PCI_CFG_DATA);
 		   break;
 	}
+	/* flush posted write */
 	lba_t32 = READ_REG32(d->hba.base_addr + LBA_PCI_CFG_ADDR);
 	return 0;
 }


More information about the parisc-linux-cvs mailing list