diff options
author | Anand Kumar Santhanam <AnandKumar.Santhanam@pmcs.com> | 2013-09-03 05:39:42 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-10-25 04:58:13 -0400 |
commit | a9a923e55ede94ddbf5b870b0f057da8b7cee1b9 (patch) | |
tree | e28a63a9868404cfd830a7d6448c00dc27740b69 | |
parent | c712495e687e221b00bddae96247dbf6ffbc6200 (diff) |
[SCSI] pm80xx: Device id changes to support series 8 controllers.
Updated pci id table with device, vendor, subdevice and subvendor ids
for 8074, 8076, 8077 SAS/SATA 12G controllers. Added 12G related macros.
Signed-off-by: Anandkumar.Santhanam@pmcs.com
Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/pm8001/pm8001_defs.h | 5 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm8001_init.c | 32 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm8001_sas.h | 3 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm80xx_hwi.c | 25 | ||||
-rw-r--r-- | drivers/scsi/pm8001/pm80xx_hwi.h | 9 |
5 files changed, 63 insertions, 11 deletions
diff --git a/drivers/scsi/pm8001/pm8001_defs.h b/drivers/scsi/pm8001/pm8001_defs.h index 479c5a7a863a..4bb304d379da 100644 --- a/drivers/scsi/pm8001/pm8001_defs.h +++ b/drivers/scsi/pm8001/pm8001_defs.h | |||
@@ -46,7 +46,10 @@ enum chip_flavors { | |||
46 | chip_8008, | 46 | chip_8008, |
47 | chip_8009, | 47 | chip_8009, |
48 | chip_8018, | 48 | chip_8018, |
49 | chip_8019 | 49 | chip_8019, |
50 | chip_8074, | ||
51 | chip_8076, | ||
52 | chip_8077 | ||
50 | }; | 53 | }; |
51 | 54 | ||
52 | enum phy_speed { | 55 | enum phy_speed { |
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c index f7c189606b84..93e2d9e9d2b3 100644 --- a/drivers/scsi/pm8001/pm8001_init.c +++ b/drivers/scsi/pm8001/pm8001_init.c | |||
@@ -54,6 +54,9 @@ static const struct pm8001_chip_info pm8001_chips[] = { | |||
54 | [chip_8009] = {1, 8, &pm8001_80xx_dispatch,}, | 54 | [chip_8009] = {1, 8, &pm8001_80xx_dispatch,}, |
55 | [chip_8018] = {0, 16, &pm8001_80xx_dispatch,}, | 55 | [chip_8018] = {0, 16, &pm8001_80xx_dispatch,}, |
56 | [chip_8019] = {1, 16, &pm8001_80xx_dispatch,}, | 56 | [chip_8019] = {1, 16, &pm8001_80xx_dispatch,}, |
57 | [chip_8074] = {0, 8, &pm8001_80xx_dispatch,}, | ||
58 | [chip_8076] = {0, 16, &pm8001_80xx_dispatch,}, | ||
59 | [chip_8077] = {0, 16, &pm8001_80xx_dispatch,}, | ||
57 | }; | 60 | }; |
58 | static int pm8001_id; | 61 | static int pm8001_id; |
59 | 62 | ||
@@ -1037,6 +1040,12 @@ static struct pci_device_id pm8001_pci_table[] = { | |||
1037 | { PCI_VDEVICE(ADAPTEC2, 0x8009), chip_8009 }, | 1040 | { PCI_VDEVICE(ADAPTEC2, 0x8009), chip_8009 }, |
1038 | { PCI_VDEVICE(PMC_Sierra, 0x8019), chip_8019 }, | 1041 | { PCI_VDEVICE(PMC_Sierra, 0x8019), chip_8019 }, |
1039 | { PCI_VDEVICE(ADAPTEC2, 0x8019), chip_8019 }, | 1042 | { PCI_VDEVICE(ADAPTEC2, 0x8019), chip_8019 }, |
1043 | { PCI_VDEVICE(PMC_Sierra, 0x8074), chip_8074 }, | ||
1044 | { PCI_VDEVICE(ADAPTEC2, 0x8074), chip_8074 }, | ||
1045 | { PCI_VDEVICE(PMC_Sierra, 0x8076), chip_8076 }, | ||
1046 | { PCI_VDEVICE(ADAPTEC2, 0x8076), chip_8076 }, | ||
1047 | { PCI_VDEVICE(PMC_Sierra, 0x8077), chip_8077 }, | ||
1048 | { PCI_VDEVICE(ADAPTEC2, 0x8077), chip_8077 }, | ||
1040 | { PCI_VENDOR_ID_ADAPTEC2, 0x8081, | 1049 | { PCI_VENDOR_ID_ADAPTEC2, 0x8081, |
1041 | PCI_VENDOR_ID_ADAPTEC2, 0x0400, 0, 0, chip_8001 }, | 1050 | PCI_VENDOR_ID_ADAPTEC2, 0x0400, 0, 0, chip_8001 }, |
1042 | { PCI_VENDOR_ID_ADAPTEC2, 0x8081, | 1051 | { PCI_VENDOR_ID_ADAPTEC2, 0x8081, |
@@ -1057,6 +1066,24 @@ static struct pci_device_id pm8001_pci_table[] = { | |||
1057 | PCI_VENDOR_ID_ADAPTEC2, 0x0016, 0, 0, chip_8019 }, | 1066 | PCI_VENDOR_ID_ADAPTEC2, 0x0016, 0, 0, chip_8019 }, |
1058 | { PCI_VENDOR_ID_ADAPTEC2, 0x8089, | 1067 | { PCI_VENDOR_ID_ADAPTEC2, 0x8089, |
1059 | PCI_VENDOR_ID_ADAPTEC2, 0x1600, 0, 0, chip_8019 }, | 1068 | PCI_VENDOR_ID_ADAPTEC2, 0x1600, 0, 0, chip_8019 }, |
1069 | { PCI_VENDOR_ID_ADAPTEC2, 0x8074, | ||
1070 | PCI_VENDOR_ID_ADAPTEC2, 0x0800, 0, 0, chip_8074 }, | ||
1071 | { PCI_VENDOR_ID_ADAPTEC2, 0x8076, | ||
1072 | PCI_VENDOR_ID_ADAPTEC2, 0x1600, 0, 0, chip_8076 }, | ||
1073 | { PCI_VENDOR_ID_ADAPTEC2, 0x8077, | ||
1074 | PCI_VENDOR_ID_ADAPTEC2, 0x1600, 0, 0, chip_8077 }, | ||
1075 | { PCI_VENDOR_ID_ADAPTEC2, 0x8074, | ||
1076 | PCI_VENDOR_ID_ADAPTEC2, 0x0008, 0, 0, chip_8074 }, | ||
1077 | { PCI_VENDOR_ID_ADAPTEC2, 0x8076, | ||
1078 | PCI_VENDOR_ID_ADAPTEC2, 0x0016, 0, 0, chip_8076 }, | ||
1079 | { PCI_VENDOR_ID_ADAPTEC2, 0x8077, | ||
1080 | PCI_VENDOR_ID_ADAPTEC2, 0x0016, 0, 0, chip_8077 }, | ||
1081 | { PCI_VENDOR_ID_ADAPTEC2, 0x8076, | ||
1082 | PCI_VENDOR_ID_ADAPTEC2, 0x0808, 0, 0, chip_8076 }, | ||
1083 | { PCI_VENDOR_ID_ADAPTEC2, 0x8077, | ||
1084 | PCI_VENDOR_ID_ADAPTEC2, 0x0808, 0, 0, chip_8077 }, | ||
1085 | { PCI_VENDOR_ID_ADAPTEC2, 0x8074, | ||
1086 | PCI_VENDOR_ID_ADAPTEC2, 0x0404, 0, 0, chip_8074 }, | ||
1060 | {} /* terminate list */ | 1087 | {} /* terminate list */ |
1061 | }; | 1088 | }; |
1062 | 1089 | ||
@@ -1108,8 +1135,11 @@ module_init(pm8001_init); | |||
1108 | module_exit(pm8001_exit); | 1135 | module_exit(pm8001_exit); |
1109 | 1136 | ||
1110 | MODULE_AUTHOR("Jack Wang <jack_wang@usish.com>"); | 1137 | MODULE_AUTHOR("Jack Wang <jack_wang@usish.com>"); |
1138 | MODULE_AUTHOR("Anand Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>"); | ||
1139 | MODULE_AUTHOR("Sangeetha Gnanasekaran <Sangeetha.Gnanasekaran@pmcs.com>"); | ||
1111 | MODULE_DESCRIPTION( | 1140 | MODULE_DESCRIPTION( |
1112 | "PMC-Sierra PM8001/8081/8088/8089 SAS/SATA controller driver"); | 1141 | "PMC-Sierra PM8001/8081/8088/8089/8074/8076/8077 " |
1142 | "SAS/SATA controller driver"); | ||
1113 | MODULE_VERSION(DRV_VERSION); | 1143 | MODULE_VERSION(DRV_VERSION); |
1114 | MODULE_LICENSE("GPL"); | 1144 | MODULE_LICENSE("GPL"); |
1115 | MODULE_DEVICE_TABLE(pci, pm8001_pci_table); | 1145 | MODULE_DEVICE_TABLE(pci, pm8001_pci_table); |
diff --git a/drivers/scsi/pm8001/pm8001_sas.h b/drivers/scsi/pm8001/pm8001_sas.h index 570819464d90..68e1147e3cec 100644 --- a/drivers/scsi/pm8001/pm8001_sas.h +++ b/drivers/scsi/pm8001/pm8001_sas.h | |||
@@ -104,6 +104,9 @@ do { \ | |||
104 | 104 | ||
105 | 105 | ||
106 | #define DEV_IS_EXPANDER(type) ((type == SAS_EDGE_EXPANDER_DEVICE) || (type == SAS_FANOUT_EXPANDER_DEVICE)) | 106 | #define DEV_IS_EXPANDER(type) ((type == SAS_EDGE_EXPANDER_DEVICE) || (type == SAS_FANOUT_EXPANDER_DEVICE)) |
107 | #define IS_SPCV_12G(dev) ((dev->device == 0X8074) \ | ||
108 | || (dev->device == 0X8076) \ | ||
109 | || (dev->device == 0X8077)) | ||
107 | 110 | ||
108 | #define PM8001_NAME_LENGTH 32/* generic length of strings */ | 111 | #define PM8001_NAME_LENGTH 32/* generic length of strings */ |
109 | extern struct list_head hba_list; | 112 | extern struct list_head hba_list; |
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.c b/drivers/scsi/pm8001/pm80xx_hwi.c index 9f91030211e8..6f836d18f269 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.c +++ b/drivers/scsi/pm8001/pm80xx_hwi.c | |||
@@ -430,7 +430,11 @@ static int mpi_init_check(struct pm8001_hba_info *pm8001_ha) | |||
430 | table is updated */ | 430 | table is updated */ |
431 | pm8001_cw32(pm8001_ha, 0, MSGU_IBDB_SET, SPCv_MSGU_CFG_TABLE_UPDATE); | 431 | pm8001_cw32(pm8001_ha, 0, MSGU_IBDB_SET, SPCv_MSGU_CFG_TABLE_UPDATE); |
432 | /* wait until Inbound DoorBell Clear Register toggled */ | 432 | /* wait until Inbound DoorBell Clear Register toggled */ |
433 | max_wait_count = 2 * 1000 * 1000;/* 2 sec for spcv/ve */ | 433 | if (IS_SPCV_12G(pm8001_ha->pdev)) { |
434 | max_wait_count = 4 * 1000 * 1000;/* 4 sec */ | ||
435 | } else { | ||
436 | max_wait_count = 2 * 1000 * 1000;/* 2 sec */ | ||
437 | } | ||
434 | do { | 438 | do { |
435 | udelay(1); | 439 | udelay(1); |
436 | value = pm8001_cr32(pm8001_ha, 0, MSGU_IBDB_SET); | 440 | value = pm8001_cr32(pm8001_ha, 0, MSGU_IBDB_SET); |
@@ -913,7 +917,11 @@ static int mpi_uninit_check(struct pm8001_hba_info *pm8001_ha) | |||
913 | pm8001_cw32(pm8001_ha, 0, MSGU_IBDB_SET, SPCv_MSGU_CFG_TABLE_RESET); | 917 | pm8001_cw32(pm8001_ha, 0, MSGU_IBDB_SET, SPCv_MSGU_CFG_TABLE_RESET); |
914 | 918 | ||
915 | /* wait until Inbound DoorBell Clear Register toggled */ | 919 | /* wait until Inbound DoorBell Clear Register toggled */ |
916 | max_wait_count = 2 * 1000 * 1000; /* 2 sec for spcv/ve */ | 920 | if (IS_SPCV_12G(pm8001_ha->pdev)) { |
921 | max_wait_count = 4 * 1000 * 1000;/* 4 sec */ | ||
922 | } else { | ||
923 | max_wait_count = 2 * 1000 * 1000;/* 2 sec */ | ||
924 | } | ||
917 | do { | 925 | do { |
918 | udelay(1); | 926 | udelay(1); |
919 | value = pm8001_cr32(pm8001_ha, 0, MSGU_IBDB_SET); | 927 | value = pm8001_cr32(pm8001_ha, 0, MSGU_IBDB_SET); |
@@ -3941,9 +3949,16 @@ pm80xx_chip_phy_start_req(struct pm8001_hba_info *pm8001_ha, u8 phy_id) | |||
3941 | ** [14] 0b disable spin up hold; 1b enable spin up hold | 3949 | ** [14] 0b disable spin up hold; 1b enable spin up hold |
3942 | ** [15] ob no change in current PHY analig setup 1b enable using SPAST | 3950 | ** [15] ob no change in current PHY analig setup 1b enable using SPAST |
3943 | */ | 3951 | */ |
3944 | payload.ase_sh_lm_slr_phyid = cpu_to_le32(SPINHOLD_DISABLE | | 3952 | if (!IS_SPCV_12G(pm8001_ha->pdev)) |
3945 | LINKMODE_AUTO | LINKRATE_15 | | 3953 | payload.ase_sh_lm_slr_phyid = cpu_to_le32(SPINHOLD_DISABLE | |
3946 | LINKRATE_30 | LINKRATE_60 | phy_id); | 3954 | LINKMODE_AUTO | LINKRATE_15 | |
3955 | LINKRATE_30 | LINKRATE_60 | phy_id); | ||
3956 | else | ||
3957 | payload.ase_sh_lm_slr_phyid = cpu_to_le32(SPINHOLD_DISABLE | | ||
3958 | LINKMODE_AUTO | LINKRATE_15 | | ||
3959 | LINKRATE_30 | LINKRATE_60 | LINKRATE_120 | | ||
3960 | phy_id); | ||
3961 | |||
3947 | /* SSC Disable and SAS Analog ST configuration */ | 3962 | /* SSC Disable and SAS Analog ST configuration */ |
3948 | /** | 3963 | /** |
3949 | payload.ase_sh_lm_slr_phyid = | 3964 | payload.ase_sh_lm_slr_phyid = |
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi.h index 2b760ba75d7b..9a9116d43566 100644 --- a/drivers/scsi/pm8001/pm80xx_hwi.h +++ b/drivers/scsi/pm8001/pm80xx_hwi.h | |||
@@ -168,6 +168,7 @@ | |||
168 | #define LINKRATE_15 (0x01 << 8) | 168 | #define LINKRATE_15 (0x01 << 8) |
169 | #define LINKRATE_30 (0x02 << 8) | 169 | #define LINKRATE_30 (0x02 << 8) |
170 | #define LINKRATE_60 (0x06 << 8) | 170 | #define LINKRATE_60 (0x06 << 8) |
171 | #define LINKRATE_120 (0x08 << 8) | ||
171 | 172 | ||
172 | /* Thermal related */ | 173 | /* Thermal related */ |
173 | #define THERMAL_ENABLE 0x1 | 174 | #define THERMAL_ENABLE 0x1 |
@@ -1223,10 +1224,10 @@ typedef struct SASProtocolTimerConfig SASProtocolTimerConfig_t; | |||
1223 | 1224 | ||
1224 | /* MSGU CONFIGURATION TABLE*/ | 1225 | /* MSGU CONFIGURATION TABLE*/ |
1225 | 1226 | ||
1226 | #define SPCv_MSGU_CFG_TABLE_UPDATE 0x01 | 1227 | #define SPCv_MSGU_CFG_TABLE_UPDATE 0x001 |
1227 | #define SPCv_MSGU_CFG_TABLE_RESET 0x02 | 1228 | #define SPCv_MSGU_CFG_TABLE_RESET 0x002 |
1228 | #define SPCv_MSGU_CFG_TABLE_FREEZE 0x04 | 1229 | #define SPCv_MSGU_CFG_TABLE_FREEZE 0x004 |
1229 | #define SPCv_MSGU_CFG_TABLE_UNFREEZE 0x08 | 1230 | #define SPCv_MSGU_CFG_TABLE_UNFREEZE 0x008 |
1230 | #define MSGU_IBDB_SET 0x00 | 1231 | #define MSGU_IBDB_SET 0x00 |
1231 | #define MSGU_HOST_INT_STATUS 0x08 | 1232 | #define MSGU_HOST_INT_STATUS 0x08 |
1232 | #define MSGU_HOST_INT_MASK 0x0C | 1233 | #define MSGU_HOST_INT_MASK 0x0C |