rpms/kernel/F-8 linux-2.6-libata-sata_sis-fix-scr-read.patch, NONE, 1.1 linux-2.6-libata-sata_sis_correct-sg-table-size.patch, NONE, 1.1 kernel.spec, 1.259, 1.260

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Tue Nov 13 21:08:58 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30868

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-libata-sata_sis-fix-scr-read.patch 
	linux-2.6-libata-sata_sis_correct-sg-table-size.patch 
Log Message:
* Tue Nov 13 2007 Chuck Ebbert <cebbert at redhat.com>
- Fix completely broken sata_sis libata driver (#365331)


linux-2.6-libata-sata_sis-fix-scr-read.patch:

--- NEW FILE linux-2.6-libata-sata_sis-fix-scr-read.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aaa092a114696f4425cd57c4d7fa05110007e247
Commit:     aaa092a114696f4425cd57c4d7fa05110007e247
Parent:     5c1ad8b30587694590691d6a83b1e7adaa7ca6d0
Author:     Tejun Heo <htejun at gmail.com>
AuthorDate: Thu Oct 18 11:53:39 2007 +0900
Committer:  Jeff Garzik <jeff at garzik.org>
CommitDate: Fri Oct 19 22:55:02 2007 -0400

    sata_sis: fix SCR read breakage
    
    SCR read for controllers which uses PCI configuration space for SCR
    access got broken while adding @val argument to SCR accessors.  Fix
    it.
    
    Signed-off-by: Tejun Heo <htejun at gmail.com>
    Signed-off-by: Jeff Garzik <jeff at garzik.org>
---
 drivers/ata/sata_sis.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index 8d98a9f..dc8e5c0 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -166,11 +166,11 @@ static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg)
 	return addr;
 }
 
-static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
+static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg, u32 *val)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
 	unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg);
-	u32 val, val2 = 0;
+	u32 val2 = 0;
 	u8 pmr;
 
 	if (sc_reg == SCR_ERROR) /* doesn't exist in PCI cfg space */
@@ -178,13 +178,16 @@ static u32 sis_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
 
 	pci_read_config_byte(pdev, SIS_PMR, &pmr);
 
-	pci_read_config_dword(pdev, cfg_addr, &val);
+	pci_read_config_dword(pdev, cfg_addr, val);
 
 	if ((pdev->device == 0x0182) || (pdev->device == 0x0183) ||
 	    (pdev->device == 0x1182) || (pmr & SIS_PMR_COMBINED))
 		pci_read_config_dword(pdev, cfg_addr+0x10, &val2);
 
-	return (val|val2) &  0xfffffffb; /* avoid problems with powerdowned ports */
+	*val |= val2;
+	*val &= 0xfffffffb;	/* avoid problems with powerdowned ports */
+
+	return 0;
 }
 
 static void sis_scr_cfg_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
@@ -214,7 +217,7 @@ static int sis_scr_read(struct ata_port *ap, unsigned int sc_reg, u32 *val)
 		return -EINVAL;
 
 	if (ap->flags & SIS_FLAG_CFGSCR)
-		return sis_scr_cfg_read(ap, sc_reg);
+		return sis_scr_cfg_read(ap, sc_reg, val);
 
 	pci_read_config_byte(pdev, SIS_PMR, &pmr);
 

linux-2.6-libata-sata_sis_correct-sg-table-size.patch:

--- NEW FILE linux-2.6-libata-sata_sis_correct-sg-table-size.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=96af154710d44b574515431a0bb014888398a741
Commit:     96af154710d44b574515431a0bb014888398a741
Parent:     80f6fd3828b74ca123083e4fdc28cbe9d865fd64
Author:     Jeff Garzik <jeff at garzik.org>
AuthorDate: Fri Oct 19 22:56:44 2007 -0400
Committer:  Jeff Garzik <jeff at garzik.org>
CommitDate: Fri Oct 19 22:56:44 2007 -0400

    [libata] sata_sis: use correct S/G table size
    
    sata_sis has the same restrictions as other SFF controllers, and so must
    use LIBATA_MAX_PRD to denote that SCSI may only fill ATA_MAX_PRD/2
    entries, due to our need to handle IOMMU merging.
    
    Signed-off-by: Jeff Garzik <jgarzik at redhat.com>
---
 drivers/ata/sata_sis.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index dc8e5c0..f147dc7 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -92,7 +92,7 @@ static struct scsi_host_template sis_sht = {
 	.queuecommand		= ata_scsi_queuecmd,
 	.can_queue		= ATA_DEF_QUEUE,
 	.this_id		= ATA_SHT_THIS_ID,
-	.sg_tablesize		= ATA_MAX_PRD,
+	.sg_tablesize		= LIBATA_MAX_PRD,
 	.cmd_per_lun		= ATA_SHT_CMD_PER_LUN,
 	.emulated		= ATA_SHT_EMULATED,
 	.use_clustering		= ATA_SHT_USE_CLUSTERING,


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-8/kernel.spec,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -r1.259 -r1.260
--- kernel.spec	9 Nov 2007 15:30:29 -0000	1.259
+++ kernel.spec	13 Nov 2007 21:08:24 -0000	1.260
@@ -663,6 +663,8 @@
 Patch660: linux-2.6-libata-ali-atapi-dma.patch
 Patch661: linux-2.6-libata-acpi-enable.patch
 Patch662: linux-2.6-libata-add-dma-disable-option.patch
+Patch663: linux-2.6-libata-sata_sis-fix-scr-read.patch
+Patch664: linux-2.6-libata-sata_sis_correct-sg-table-size.patch
 Patch670: linux-2.6-ata-quirk.patch
 Patch680: linux-2.6-wireless.patch
 Patch681: linux-2.6-wireless-pending.patch
@@ -1259,6 +1261,9 @@
 ApplyPatch linux-2.6-libata-acpi-enable.patch
 # add option to disable PATA DMA
 ApplyPatch linux-2.6-libata-add-dma-disable-option.patch
+# Fix broken sata_sis in 2.6.23
+ApplyPatch linux-2.6-libata-sata_sis-fix-scr-read.patch
+ApplyPatch linux-2.6-libata-sata_sis_correct-sg-table-size.patch
 
 # wireless patches headed for 2.6.24
 ApplyPatch linux-2.6-wireless.patch
@@ -1968,6 +1973,9 @@
 
 
 %changelog
+* Tue Nov 13 2007 Chuck Ebbert <cebbert at redhat.com>
+- Fix completely broken sata_sis libata driver (#365331)
+
 * Fri Nov  9 2007 Eric Paris <eparis at redhat.com>
 - Fix loop iteration problem in selinux ebitmap code
 




More information about the fedora-extras-commits mailing list