]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Add pci class code for SATA & AHCI, and replace some magic numbers.
authorConke Hu <conke.hu@amd.com>
Tue, 9 Jan 2007 10:32:51 +0000 (05:32 -0500)
committerJeff Garzik <jeff@garzik.org>
Fri, 9 Feb 2007 22:39:29 +0000 (17:39 -0500)
Signed-off-by: Conke Hu <conke.hu@amd.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/ahci.c
drivers/pci/quirks.c
include/linux/pci_ids.h

index e2796fb40eb7eb7765060262f77a8d54763a051c..32cfaa89dc7ce2462d7c4a4f7915c2c4a6ff6cb6 100644 (file)
@@ -431,7 +431,7 @@ static const struct pci_device_id ahci_pci_tbl[] = {
 
        /* Generic, PCI class code for AHCI */
        { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
-         0x010601, 0xffffff, board_ahci },
+         PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci },
 
        { }     /* terminate list */
 };
@@ -1619,11 +1619,11 @@ static void ahci_print_info(struct ata_probe_ent *probe_ent)
                speed_s = "?";
 
        pci_read_config_word(pdev, 0x0a, &cc);
-       if (cc == 0x0101)
+       if (cc == PCI_CLASS_STORAGE_IDE)
                scc_s = "IDE";
-       else if (cc == 0x0106)
+       else if (cc == PCI_CLASS_STORAGE_SATA)
                scc_s = "SATA";
-       else if (cc == 0x0104)
+       else if (cc == PCI_CLASS_STORAGE_RAID)
                scc_s = "RAID";
        else
                scc_s = "unknown";
index 11217bda4b9ef1c98003bd50f16d92a90c42db39..1e6eda25c0d82c800cf260a832209ee70899d9b7 100644 (file)
@@ -871,7 +871,7 @@ static void __devinit quirk_sb600_sata(struct pci_dev *pdev)
                pci_write_config_byte(pdev, 0xa, 6);
                pci_write_config_byte(pdev, 0x40, tmp);
 
-               pdev->class = 0x010601;
+               pdev->class = PCI_CLASS_STORAGE_SATA_AHCI;
        }
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata);
index 4c8966a082af11da95a8469afcc9917a0931f6f6..e67b68ca235a45181eb4769f6fb8adbea05910e5 100644 (file)
@@ -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