[arch-commits] CVS update of core/base/kernel26 (sata_sis-2.6.23.patch)
Tobias Powalowski
tpowa at archlinux.org
Sun Oct 28 15:07:11 UTC 2007
Date: Sunday, October 28, 2007 @ 11:07:11
Author: tpowa
Path: /home/cvs-core/core/base/kernel26
Added: sata_sis-2.6.23.patch (1.1)
'upgpgk: added missing patch to cvs'
-----------------------+
sata_sis-2.6.23.patch | 90 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 90 insertions(+)
Index: core/base/kernel26/sata_sis-2.6.23.patch
diff -u /dev/null core/base/kernel26/sata_sis-2.6.23.patch:1.1
--- /dev/null Sun Oct 28 11:07:11 2007
+++ core/base/kernel26/sata_sis-2.6.23.patch Sun Oct 28 11:07:11 2007
@@ -0,0 +1,90 @@
+From: Tejun Heo <htejun at gmail.com>
+Date: Thu, 18 Oct 2007 02:53:39 +0000 (+0900)
+Subject: sata_sis: fix SCR read breakage
+X-Git-Tag: v2.6.24-rc1~126^2~2
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fjgarzik%2Flibata-dev.git;a=commitdiff_plain;h=aaa092a114696f4425cd57c4d7fa05110007e247
+
+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>
+---
+
+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);
+
+From: Jeff Garzik <jeff at garzik.org>
+Date: Sat, 20 Oct 2007 02:56:44 +0000 (-0400)
+Subject: [libata] sata_sis: use correct S/G table size
+X-Git-Tag: v2.6.24-rc1~126^2
+X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Fjgarzik%2Flibata-dev.git;a=commitdiff_plain;h=96af154710d44b574515431a0bb014888398a741
+
+[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>
+---
+
+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,
More information about the arch-commits
mailing list