Hi, Keir,
This patch adds support for our SB700 storage controllers already available in
newer Linux kernels.
--travis
# HG changeset patch
# User Travis Betak <travis.betak@xxxxxxx>
# Date 1211239562 18000
# Node ID d63c0faf212055b0d425d027030520f9a4595e97
# Parent 8ce60d057d0c4d4394df2c5fab4965d4ec189722
Add support for SB700 storage controllers.
Signed-off-by: Travis Betak <travis.betak@xxxxxxx>
diff -r 8ce60d057d0c -r d63c0faf2120 drivers/ide/pci/atiixp.c
--- a/drivers/ide/pci/atiixp.c Fri May 16 09:36:51 2008 +0100
+++ b/drivers/ide/pci/atiixp.c Mon May 19 18:26:02 2008 -0500
@@ -348,6 +348,7 @@ static struct pci_device_id atiixp_pci_t
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
{ PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
+ { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_IDE, PCI_ANY_ID,
PCI_ANY_ID, 0, 0, 0},
{ 0, },
};
MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl);
diff -r 8ce60d057d0c -r d63c0faf2120 drivers/pci/quirks.c
--- a/drivers/pci/quirks.c Fri May 16 09:36:51 2008 +0100
+++ b/drivers/pci/quirks.c Mon May 19 18:26:02 2008 -0500
@@ -873,6 +873,25 @@ static void __init quirk_disable_pxb(str
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX,
quirk_disable_pxb );
+static void __devinit quirk_sb600_sata(struct pci_dev *pdev)
+{
+ /* set sb600/sb700/sb800 sata to ahci mode */
+ u8 tmp;
+
+ pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp);
+ if (tmp == 0x01) {
+ pci_read_config_byte(pdev, 0x40, &tmp);
+ pci_write_config_byte(pdev, 0x40, tmp|1);
+ pci_write_config_byte(pdev, 0x9, 1);
+ pci_write_config_byte(pdev, 0xa, 6);
+ pci_write_config_byte(pdev, 0x40, tmp);
+
+ pdev->class = PCI_CLASS_STORAGE_SATA_AHCI;
+ dev_info(&pdev->dev, "set SATA to AHCI mode\n");
+ }
+}
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP700_SATA,
quirk_sb600_sata);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA,
quirk_sb600_sata);
/*
* Serverworks CSB5 IDE does not fully support native mode
diff -r 8ce60d057d0c -r d63c0faf2120 drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c Fri May 16 09:36:51 2008 +0100
+++ b/drivers/scsi/ahci.c Mon May 19 18:26:02 2008 -0500
@@ -78,6 +78,7 @@ enum {
board_ahci = 0,
board_ahci_vt8251 = 1,
+ board_ahci_sb700 = 2,
/* global controller registers */
HOST_CAP = 0x00, /* host capabilities */
@@ -283,6 +284,16 @@ static const struct ata_port_info ahci_p
.udma_mask = 0x7f, /* udma0-6 ; FIXME */
.port_ops = &ahci_ops,
},
+ {
+ .sht = &ahci_sht,
+ .host_flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
+ ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
+ ATA_FLAG_ACPI_SATA | ATA_FLAG_AN |
+ ATA_FLAG_IPM,
+ .pio_mask = 0x1f, /* pio0-4 */
+ .udma_mask = 0x7f,
+ .port_ops = &ahci_ops,
+ },
};
static const struct pci_device_id ahci_pci_tbl[] = {
@@ -363,6 +374,18 @@ static const struct pci_device_id ahci_p
board_ahci }, /* ATI SB600 non-raid */
{ PCI_VENDOR_ID_ATI, 0x4381, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
board_ahci }, /* ATI SB600 raid */
+ { PCI_VENDOR_ID_ATI, 0x4390, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4391, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4392, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4393, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4394, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
+ { PCI_VENDOR_ID_ATI, 0x4395, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ board_ahci_sb700 },
/* VIA */
{ PCI_VENDOR_ID_VIA, 0x3349, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
diff -r 8ce60d057d0c -r d63c0faf2120 include/linux/libata.h
--- a/include/linux/libata.h Fri May 16 09:36:51 2008 +0100
+++ b/include/linux/libata.h Mon May 19 18:26:02 2008 -0500
@@ -162,6 +162,12 @@ enum {
ATA_FLAG_SKIP_D2H_BSY = (1 << 12), /* can't wait for the first D2H
* Register FIS clearing BSY */
ATA_FLAG_DEBUGMSG = (1 << 13),
+ ATA_FLAG_IGN_SIMPLEX = (1 << 15), /* ignore SIMPLEX */
+ ATA_FLAG_NO_IORDY = (1 << 16), /* controller lacks iordy */
+ ATA_FLAG_ACPI_SATA = (1 << 17), /* need native SATA ACPI layout */
+ ATA_FLAG_AN = (1 << 18), /* controller supports AN */
+ ATA_FLAG_PMP = (1 << 19), /* controller supports PMP */
+ ATA_FLAG_IPM = (1 << 20), /* driver can handle IPM */
/* The following flag belongs to ap->pflags but is kept in
* ap->flags because it's referenced in many LLDs and will be
diff -r 8ce60d057d0c -r d63c0faf2120 include/linux/pci_ids.h
--- a/include/linux/pci_ids.h Fri May 16 09:36:51 2008 +0100
+++ b/include/linux/pci_ids.h Mon May 19 18:26:02 2008 -0500
@@ -15,6 +15,8 @@
#define PCI_CLASS_STORAGE_FLOPPY 0x0102
#define PCI_CLASS_STORAGE_IPI 0x0103
#define PCI_CLASS_STORAGE_RAID 0x0104
+#define PCI_CLASS_STORAGE_SATA 0x0106
+#define PCI_CLASS_STORAGE_SATA_AHCI 0x010601
#define PCI_CLASS_STORAGE_SAS 0x0107
#define PCI_CLASS_STORAGE_OTHER 0x0180
@@ -363,6 +365,8 @@
#define PCI_DEVICE_ID_ATI_IXP600_SATA 0x4380
#define PCI_DEVICE_ID_ATI_IXP600_SRAID 0x4381
#define PCI_DEVICE_ID_ATI_IXP600_IDE 0x438c
+#define PCI_DEVICE_ID_ATI_IXP700_SATA 0x4390
+#define PCI_DEVICE_ID_ATI_IXP700_IDE 0x439c
#define PCI_VENDOR_ID_VLSI 0x1004
#define PCI_DEVICE_ID_VLSI_82C592 0x0005
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|