diff options
author | Conke Hu <conke.hu@amd.com> | 2007-01-09 05:32:51 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-09 17:39:29 -0500 |
commit | c9f89475a5b184e9a6077b995ce340e6804c1b1a (patch) | |
tree | de0b8eb7c7d514cbc14339705ef278bdb72ac90f | |
parent | 95006188cb1399f1358330503906e5891c129a10 (diff) |
Add pci class code for SATA & AHCI, and replace some magic numbers.
Signed-off-by: Conke Hu <conke.hu@amd.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/ata/ahci.c | 8 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 2 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index e2796fb40eb7..32cfaa89dc7c 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -431,7 +431,7 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
431 | 431 | ||
432 | /* Generic, PCI class code for AHCI */ | 432 | /* Generic, PCI class code for AHCI */ |
433 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 433 | { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
434 | 0x010601, 0xffffff, board_ahci }, | 434 | PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci }, |
435 | 435 | ||
436 | { } /* terminate list */ | 436 | { } /* terminate list */ |
437 | }; | 437 | }; |
@@ -1619,11 +1619,11 @@ static void ahci_print_info(struct ata_probe_ent *probe_ent) | |||
1619 | speed_s = "?"; | 1619 | speed_s = "?"; |
1620 | 1620 | ||
1621 | pci_read_config_word(pdev, 0x0a, &cc); | 1621 | pci_read_config_word(pdev, 0x0a, &cc); |
1622 | if (cc == 0x0101) | 1622 | if (cc == PCI_CLASS_STORAGE_IDE) |
1623 | scc_s = "IDE"; | 1623 | scc_s = "IDE"; |
1624 | else if (cc == 0x0106) | 1624 | else if (cc == PCI_CLASS_STORAGE_SATA) |
1625 | scc_s = "SATA"; | 1625 | scc_s = "SATA"; |
1626 | else if (cc == 0x0104) | 1626 | else if (cc == PCI_CLASS_STORAGE_RAID) |
1627 | scc_s = "RAID"; | 1627 | scc_s = "RAID"; |
1628 | else | 1628 | else |
1629 | scc_s = "unknown"; | 1629 | scc_s = "unknown"; |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 11217bda4b9e..1e6eda25c0d8 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -871,7 +871,7 @@ static void __devinit quirk_sb600_sata(struct pci_dev *pdev) | |||
871 | pci_write_config_byte(pdev, 0xa, 6); | 871 | pci_write_config_byte(pdev, 0xa, 6); |
872 | pci_write_config_byte(pdev, 0x40, tmp); | 872 | pci_write_config_byte(pdev, 0x40, tmp); |
873 | 873 | ||
874 | pdev->class = 0x010601; | 874 | pdev->class = PCI_CLASS_STORAGE_SATA_AHCI; |
875 | } | 875 | } |
876 | } | 876 | } |
877 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata); | 877 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_SATA, quirk_sb600_sata); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4c8966a082af..e67b68ca235a 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #define PCI_CLASS_STORAGE_FLOPPY 0x0102 | 15 | #define PCI_CLASS_STORAGE_FLOPPY 0x0102 |
16 | #define PCI_CLASS_STORAGE_IPI 0x0103 | 16 | #define PCI_CLASS_STORAGE_IPI 0x0103 |
17 | #define PCI_CLASS_STORAGE_RAID 0x0104 | 17 | #define PCI_CLASS_STORAGE_RAID 0x0104 |
18 | #define PCI_CLASS_STORAGE_SATA 0x0106 | ||
19 | #define PCI_CLASS_STORAGE_SATA_AHCI 0x010601 | ||
18 | #define PCI_CLASS_STORAGE_SAS 0x0107 | 20 | #define PCI_CLASS_STORAGE_SAS 0x0107 |
19 | #define PCI_CLASS_STORAGE_OTHER 0x0180 | 21 | #define PCI_CLASS_STORAGE_OTHER 0x0180 |
20 | 22 | ||