aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pm8001/pm80xx_hwi.h
diff options
context:
space:
mode:
authorSakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>2013-03-19 08:38:40 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-05-10 10:47:51 -0400
commita6cb3d012b983b350ae3892cff2e692665df0e1e (patch)
treee22bce8642adf4f4b5caf08ab0995a131db2e39e /drivers/scsi/pm8001/pm80xx_hwi.h
parentc6b9ef5779c3e1edfa9de949d2a51252bc347663 (diff)
[SCSI] pm80xx: thermal, sas controller config and error handling update
Modified thermal configuration to happen after interrupt registration Added SAS controller configuration during initialization Added error handling logic to handle I_T_Nexus errors and variants [jejb: fix up tabs and spaces issues] Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com> Acked-by: Jack Wang <jack_wang@usish.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/pm8001/pm80xx_hwi.h')
-rw-r--r--drivers/scsi/pm8001/pm80xx_hwi.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/drivers/scsi/pm8001/pm80xx_hwi.h b/drivers/scsi/pm8001/pm80xx_hwi.h
index b7c864f16402..2b760ba75d7b 100644
--- a/drivers/scsi/pm8001/pm80xx_hwi.h
+++ b/drivers/scsi/pm8001/pm80xx_hwi.h
@@ -197,6 +197,30 @@
197#define CIPHER_MODE_XTS 0x00000002 197#define CIPHER_MODE_XTS 0x00000002
198#define KEK_MGMT_SUBOP_KEYCARDUPDATE 0x4 198#define KEK_MGMT_SUBOP_KEYCARDUPDATE 0x4
199 199
200/* SAS protocol timer configuration page */
201#define SAS_PROTOCOL_TIMER_CONFIG_PAGE 0x04
202#define STP_MCT_TMO 32
203#define SSP_MCT_TMO 32
204#define SAS_MAX_OPEN_TIME 5
205#define SMP_MAX_CONN_TIMER 0xFF
206#define STP_FRM_TIMER 0
207#define STP_IDLE_TIME 5 /* 5 us; controller default */
208#define SAS_MFD 0
209#define SAS_OPNRJT_RTRY_INTVL 2
210#define SAS_DOPNRJT_RTRY_TMO 128
211#define SAS_COPNRJT_RTRY_TMO 128
212
213/*
214 Making ORR bigger than IT NEXUS LOSS which is 2000000us = 2 second.
215 Assuming a bigger value 3 second, 3000000/128 = 23437.5 where 128
216 is DOPNRJT_RTRY_TMO
217*/
218#define SAS_DOPNRJT_RTRY_THR 23438
219#define SAS_COPNRJT_RTRY_THR 23438
220#define SAS_MAX_AIP 0x200000
221#define IT_NEXUS_TIMEOUT 0x7D0
222#define PORT_RECOVERY_TIMEOUT ((IT_NEXUS_TIMEOUT/100) + 30)
223
200struct mpi_msg_hdr { 224struct mpi_msg_hdr {
201 __le32 header; /* Bits [11:0] - Message operation code */ 225 __le32 header; /* Bits [11:0] - Message operation code */
202 /* Bits [15:12] - Message Category */ 226 /* Bits [15:12] - Message Category */
@@ -996,6 +1020,23 @@ struct ssp_coalesced_comp_resp {
996 1020
997/* new outbound structure for spcv - ends */ 1021/* new outbound structure for spcv - ends */
998 1022
1023/* brief data structure for SAS protocol timer configuration page.
1024 *
1025 */
1026struct SASProtocolTimerConfig {
1027 __le32 pageCode; /* 0 */
1028 __le32 MST_MSI; /* 1 */
1029 __le32 STP_SSP_MCT_TMO; /* 2 */
1030 __le32 STP_FRM_TMO; /* 3 */
1031 __le32 STP_IDLE_TMO; /* 4 */
1032 __le32 OPNRJT_RTRY_INTVL; /* 5 */
1033 __le32 Data_Cmd_OPNRJT_RTRY_TMO; /* 6 */
1034 __le32 Data_Cmd_OPNRJT_RTRY_THR; /* 7 */
1035 __le32 MAX_AIP; /* 8 */
1036} __attribute__((packed, aligned(4)));
1037
1038typedef struct SASProtocolTimerConfig SASProtocolTimerConfig_t;
1039
999#define NDS_BITS 0x0F 1040#define NDS_BITS 0x0F
1000#define PDS_BITS 0xF0 1041#define PDS_BITS 0xF0
1001 1042
@@ -1122,7 +1163,8 @@ struct ssp_coalesced_comp_resp {
1122#define IO_DS_INVALID 0x49 1163#define IO_DS_INVALID 0x49
1123/* WARNING: the value is not contiguous from here */ 1164/* WARNING: the value is not contiguous from here */
1124#define IO_XFER_ERR_LAST_PIO_DATAIN_CRC_ERR 0x52 1165#define IO_XFER_ERR_LAST_PIO_DATAIN_CRC_ERR 0x52
1125#define IO_XFR_ERROR_INTERNAL_CRC_ERROR 0x54 1166#define IO_XFER_DMA_ACTIVATE_TIMEOUT 0x53
1167#define IO_XFER_ERROR_INTERNAL_CRC_ERROR 0x54
1126#define MPI_IO_RQE_BUSY_FULL 0x55 1168#define MPI_IO_RQE_BUSY_FULL 0x55
1127#define IO_XFER_ERR_EOB_DATA_OVERRUN 0x56 1169#define IO_XFER_ERR_EOB_DATA_OVERRUN 0x56
1128#define IO_XFR_ERROR_INVALID_SSP_RSP_FRAME 0x57 1170#define IO_XFR_ERROR_INVALID_SSP_RSP_FRAME 0x57