diff options
author | Conke Hu <conke.hu@gmail.com> | 2006-12-19 16:11:37 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-12-20 13:54:44 -0500 |
commit | ab17443a3df35abe4b7529e83511a591aa7384f3 (patch) | |
tree | b28c62aa1112785a0fc4d0609e8593ae3bac45f0 | |
parent | fb0f2b40faff41f03acaa2ee6e6231fc96ca497c (diff) |
PCI: ATI sb600 sata quirk
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/ide/pci/atiixp.c | 1 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 17 |
2 files changed, 17 insertions, 1 deletions
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c index d55b938b1ae..ffdffb6379e 100644 --- a/drivers/ide/pci/atiixp.c +++ b/drivers/ide/pci/atiixp.c | |||
@@ -368,7 +368,6 @@ static struct pci_device_id atiixp_pci_tbl[] = { | |||
368 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 368 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
369 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 369 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
370 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 370 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, |
371 | { PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, PCI_ANY_ID, PCI_ANY_ID, (PCI_CLASS_STORAGE_IDE<<8)|0x8a, 0xffff05, 1}, | ||
372 | { 0, }, | 371 | { 0, }, |
373 | }; | 372 | }; |
374 | MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); | 373 | MODULE_DEVICE_TABLE(pci, atiixp_pci_tbl); |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 8a2db01b903..8f0322d6f3b 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -850,6 +850,23 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_ | |||
850 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb ); | 850 | DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, quirk_disable_pxb ); |
851 | 851 | ||
852 | 852 | ||
853 | static void __devinit quirk_sb600_sata(struct pci_dev *pdev) | ||
854 | { | ||
855 | /* set sb600 sata to ahci mode */ | ||
856 | if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) { | ||
857 | u8 tmp; | ||
858 | |||
859 | pci_read_config_byte(pdev, 0x40, &tmp); | ||
860 | pci_write_config_byte(pdev, 0x40, tmp|1); | ||
861 | pci_write_config_byte(pdev, 0x9, 1); | ||
862 | pci_write_config_byte(pdev, 0xa, 6); | ||
863 | pci_write_config_byte(pdev, 0x40, tmp); | ||
864 | |||
865 | pdev->class = 0x010601; | ||
866 | } | ||
867 | } | ||
868 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata); | ||
869 | |||
853 | /* | 870 | /* |
854 | * Serverworks CSB5 IDE does not fully support native mode | 871 | * Serverworks CSB5 IDE does not fully support native mode |
855 | */ | 872 | */ |