diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/message/fusion | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r-- | drivers/message/fusion/Makefile | 2 | ||||
-rw-r--r-- | drivers/message/fusion/lsi/mpi_cnfg.h | 1 | ||||
-rw-r--r-- | drivers/message/fusion/lsi/mpi_ioc.h | 1 | ||||
-rw-r--r-- | drivers/message/fusion/lsi/mpi_log_fc.h | 4 | ||||
-rw-r--r-- | drivers/message/fusion/lsi/mpi_log_sas.h | 16 | ||||
-rw-r--r-- | drivers/message/fusion/mptbase.c | 41 | ||||
-rw-r--r-- | drivers/message/fusion/mptbase.h | 4 | ||||
-rw-r--r-- | drivers/message/fusion/mptctl.c | 31 | ||||
-rw-r--r-- | drivers/message/fusion/mptfc.c | 7 | ||||
-rw-r--r-- | drivers/message/fusion/mptsas.c | 25 | ||||
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 16 | ||||
-rw-r--r-- | drivers/message/fusion/mptspi.c | 26 |
12 files changed, 109 insertions, 65 deletions
diff --git a/drivers/message/fusion/Makefile b/drivers/message/fusion/Makefile index 95c9532cb07c..d182a24b3195 100644 --- a/drivers/message/fusion/Makefile +++ b/drivers/message/fusion/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | # enable verbose logging | 3 | # enable verbose logging |
4 | # CONFIG_FUSION_LOGGING needs to be enabled in Kconfig | 4 | # CONFIG_FUSION_LOGGING needs to be enabled in Kconfig |
5 | #EXTRA_CFLAGS += -DMPT_DEBUG_VERBOSE | 5 | #ccflags-y := -DMPT_DEBUG_VERBOSE |
6 | 6 | ||
7 | 7 | ||
8 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC | 8 | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-} LSI_LOGIC |
diff --git a/drivers/message/fusion/lsi/mpi_cnfg.h b/drivers/message/fusion/lsi/mpi_cnfg.h index 013c7d881948..22027e7946f7 100644 --- a/drivers/message/fusion/lsi/mpi_cnfg.h +++ b/drivers/message/fusion/lsi/mpi_cnfg.h | |||
@@ -2593,6 +2593,7 @@ typedef struct _CONFIG_PAGE_SAS_IO_UNIT_0 | |||
2593 | #define MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE (0x03) | 2593 | #define MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE (0x03) |
2594 | #define MPI_SAS_IOUNIT0_RATE_1_5 (0x08) | 2594 | #define MPI_SAS_IOUNIT0_RATE_1_5 (0x08) |
2595 | #define MPI_SAS_IOUNIT0_RATE_3_0 (0x09) | 2595 | #define MPI_SAS_IOUNIT0_RATE_3_0 (0x09) |
2596 | #define MPI_SAS_IOUNIT0_RATE_6_0 (0x0A) | ||
2596 | 2597 | ||
2597 | /* see mpi_sas.h for values for SAS IO Unit Page 0 ControllerPhyDeviceInfo values */ | 2598 | /* see mpi_sas.h for values for SAS IO Unit Page 0 ControllerPhyDeviceInfo values */ |
2598 | 2599 | ||
diff --git a/drivers/message/fusion/lsi/mpi_ioc.h b/drivers/message/fusion/lsi/mpi_ioc.h index 8faa4fab7b89..fd6222882a0e 100644 --- a/drivers/message/fusion/lsi/mpi_ioc.h +++ b/drivers/message/fusion/lsi/mpi_ioc.h | |||
@@ -841,6 +841,7 @@ typedef struct _EVENT_DATA_SAS_PHY_LINK_STATUS | |||
841 | #define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE (0x03) | 841 | #define MPI_EVENT_SAS_PLS_LR_RATE_SATA_OOB_COMPLETE (0x03) |
842 | #define MPI_EVENT_SAS_PLS_LR_RATE_1_5 (0x08) | 842 | #define MPI_EVENT_SAS_PLS_LR_RATE_1_5 (0x08) |
843 | #define MPI_EVENT_SAS_PLS_LR_RATE_3_0 (0x09) | 843 | #define MPI_EVENT_SAS_PLS_LR_RATE_3_0 (0x09) |
844 | #define MPI_EVENT_SAS_PLS_LR_RATE_6_0 (0x0A) | ||
844 | 845 | ||
845 | /* SAS Discovery Event data */ | 846 | /* SAS Discovery Event data */ |
846 | 847 | ||
diff --git a/drivers/message/fusion/lsi/mpi_log_fc.h b/drivers/message/fusion/lsi/mpi_log_fc.h index face6e7acc72..03be8b217709 100644 --- a/drivers/message/fusion/lsi/mpi_log_fc.h +++ b/drivers/message/fusion/lsi/mpi_log_fc.h | |||
@@ -38,8 +38,8 @@ typedef enum _MpiIocLogInfoFc | |||
38 | { | 38 | { |
39 | MPI_IOCLOGINFO_FC_INIT_BASE = 0x20000000, | 39 | MPI_IOCLOGINFO_FC_INIT_BASE = 0x20000000, |
40 | MPI_IOCLOGINFO_FC_INIT_ERROR_OUT_OF_ORDER_FRAME = 0x20000001, /* received an out of order frame - unsupported */ | 40 | MPI_IOCLOGINFO_FC_INIT_ERROR_OUT_OF_ORDER_FRAME = 0x20000001, /* received an out of order frame - unsupported */ |
41 | MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_START_OF_FRAME = 0x20000002, /* Bad Rx Frame, bad start of frame primative */ | 41 | MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_START_OF_FRAME = 0x20000002, /* Bad Rx Frame, bad start of frame primitive */ |
42 | MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_END_OF_FRAME = 0x20000003, /* Bad Rx Frame, bad end of frame primative */ | 42 | MPI_IOCLOGINFO_FC_INIT_ERROR_BAD_END_OF_FRAME = 0x20000003, /* Bad Rx Frame, bad end of frame primitive */ |
43 | MPI_IOCLOGINFO_FC_INIT_ERROR_OVER_RUN = 0x20000004, /* Bad Rx Frame, overrun */ | 43 | MPI_IOCLOGINFO_FC_INIT_ERROR_OVER_RUN = 0x20000004, /* Bad Rx Frame, overrun */ |
44 | MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OTHER = 0x20000005, /* Other errors caught by IOC which require retries */ | 44 | MPI_IOCLOGINFO_FC_INIT_ERROR_RX_OTHER = 0x20000005, /* Other errors caught by IOC which require retries */ |
45 | MPI_IOCLOGINFO_FC_INIT_ERROR_SUBPROC_DEAD = 0x20000006, /* Main processor could not initialize sub-processor */ | 45 | MPI_IOCLOGINFO_FC_INIT_ERROR_SUBPROC_DEAD = 0x20000006, /* Main processor could not initialize sub-processor */ |
diff --git a/drivers/message/fusion/lsi/mpi_log_sas.h b/drivers/message/fusion/lsi/mpi_log_sas.h index 691620dbedd2..f62960b5d527 100644 --- a/drivers/message/fusion/lsi/mpi_log_sas.h +++ b/drivers/message/fusion/lsi/mpi_log_sas.h | |||
@@ -56,9 +56,9 @@ | |||
56 | #define IOP_LOGINFO_CODE_FWUPLOAD_NO_FLASH_AVAILABLE (0x0003E000) /* Tried to upload from flash, but there is none */ | 56 | #define IOP_LOGINFO_CODE_FWUPLOAD_NO_FLASH_AVAILABLE (0x0003E000) /* Tried to upload from flash, but there is none */ |
57 | #define IOP_LOGINFO_CODE_FWUPLOAD_UNKNOWN_IMAGE_TYPE (0x0003E001) /* ImageType field contents were invalid */ | 57 | #define IOP_LOGINFO_CODE_FWUPLOAD_UNKNOWN_IMAGE_TYPE (0x0003E001) /* ImageType field contents were invalid */ |
58 | #define IOP_LOGINFO_CODE_FWUPLOAD_WRONG_IMAGE_SIZE (0x0003E002) /* ImageSize field in TCSGE was bad/offset in MfgPg 4 was wrong */ | 58 | #define IOP_LOGINFO_CODE_FWUPLOAD_WRONG_IMAGE_SIZE (0x0003E002) /* ImageSize field in TCSGE was bad/offset in MfgPg 4 was wrong */ |
59 | #define IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED (0x0003E003) /* Error occured while attempting to upload the entire flash */ | 59 | #define IOP_LOGINFO_CODE_FWUPLOAD_ENTIRE_FLASH_UPLOAD_FAILED (0x0003E003) /* Error occurred while attempting to upload the entire flash */ |
60 | #define IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED (0x0003E004) /* Error occured while attempting to upload single flash region */ | 60 | #define IOP_LOGINFO_CODE_FWUPLOAD_REGION_UPLOAD_FAILED (0x0003E004) /* Error occurred while attempting to upload single flash region */ |
61 | #define IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE (0x0003E005) /* Problem occured while DMAing FW to host memory */ | 61 | #define IOP_LOGINFO_CODE_FWUPLOAD_DMA_FAILURE (0x0003E005) /* Problem occurred while DMAing FW to host memory */ |
62 | 62 | ||
63 | #define IOP_LOGINFO_CODE_DIAG_MSG_ERROR (0x00040000) /* Error handling diag msg - or'd with diag status */ | 63 | #define IOP_LOGINFO_CODE_DIAG_MSG_ERROR (0x00040000) /* Error handling diag msg - or'd with diag status */ |
64 | 64 | ||
@@ -187,8 +187,8 @@ | |||
187 | #define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD (0x00005000) | 187 | #define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD (0x00005000) |
188 | 188 | ||
189 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE (0x00200000) /* Can't get SMP Frame */ | 189 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE (0x00200000) /* Can't get SMP Frame */ |
190 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR (0x00200010) /* Error occured on SMP Read */ | 190 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR (0x00200010) /* Error occurred on SMP Read */ |
191 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR (0x00200020) /* Error occured on SMP Write */ | 191 | #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_WRITE_ERROR (0x00200020) /* Error occurred on SMP Write */ |
192 | #define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL (0x00200040) /* Encl Mgmt services not available for this WWID */ | 192 | #define PL_LOGINFO_CODE_ENCL_MGMT_NOT_SUPPORTED_ON_ENCL (0x00200040) /* Encl Mgmt services not available for this WWID */ |
193 | #define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED (0x00200050) /* Address Mode not suppored */ | 193 | #define PL_LOGINFO_CODE_ENCL_MGMT_ADDR_MODE_NOT_SUPPORTED (0x00200050) /* Address Mode not suppored */ |
194 | #define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM (0x00200060) /* Invalid Slot Number in SEP Msg */ | 194 | #define PL_LOGINFO_CODE_ENCL_MGMT_BAD_SLOT_NUM (0x00200060) /* Invalid Slot Number in SEP Msg */ |
@@ -207,8 +207,8 @@ | |||
207 | #define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE (0x00200103) /* SEP NACK'd, it is busy */ | 207 | #define PL_LOGINFO_DA_SEP_RECEIVED_NACK_FROM_SLAVE (0x00200103) /* SEP NACK'd, it is busy */ |
208 | #define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK (0x00200104) /* SEP didn't rcv. ACK (Last Rcvd Bit = 1) */ | 208 | #define PL_LOGINFO_DA_SEP_DID_NOT_RECEIVE_ACK (0x00200104) /* SEP didn't rcv. ACK (Last Rcvd Bit = 1) */ |
209 | #define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM (0x00200105) /* SEP stopped or sent bad chksum in Hdr */ | 209 | #define PL_LOGINFO_DA_SEP_BAD_STATUS_HDR_CHKSUM (0x00200105) /* SEP stopped or sent bad chksum in Hdr */ |
210 | #define PL_LOGINFO_DA_SEP_STOP_ON_DATA (0x00200106) /* SEP stopped while transfering data */ | 210 | #define PL_LOGINFO_DA_SEP_STOP_ON_DATA (0x00200106) /* SEP stopped while transferring data */ |
211 | #define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA (0x00200107) /* SEP stopped while transfering sense data */ | 211 | #define PL_LOGINFO_DA_SEP_STOP_ON_SENSE_DATA (0x00200107) /* SEP stopped while transferring sense data */ |
212 | #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1 (0x00200108) /* SEP returned unknown scsi status */ | 212 | #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_1 (0x00200108) /* SEP returned unknown scsi status */ |
213 | #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2 (0x00200109) /* SEP returned unknown scsi status */ | 213 | #define PL_LOGINFO_DA_SEP_UNSUPPORTED_SCSI_STATUS_2 (0x00200109) /* SEP returned unknown scsi status */ |
214 | #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP (0x0020010A) /* SEP returned bad chksum after STOP */ | 214 | #define PL_LOGINFO_DA_SEP_CHKSUM_ERROR_AFTER_STOP (0x0020010A) /* SEP returned bad chksum after STOP */ |
@@ -268,7 +268,7 @@ | |||
268 | 268 | ||
269 | /* Compatibility Error : IR Disabled */ | 269 | /* Compatibility Error : IR Disabled */ |
270 | #define IR_LOGINFO_COMPAT_ERROR_RAID_DISABLED (0x00010030) | 270 | #define IR_LOGINFO_COMPAT_ERROR_RAID_DISABLED (0x00010030) |
271 | /* Compatibility Error : Inquiry Comand failed */ | 271 | /* Compatibility Error : Inquiry Command failed */ |
272 | #define IR_LOGINFO_COMPAT_ERROR_INQUIRY_FAILED (0x00010031) | 272 | #define IR_LOGINFO_COMPAT_ERROR_INQUIRY_FAILED (0x00010031) |
273 | /* Compatibility Error : Device not direct access device */ | 273 | /* Compatibility Error : Device not direct access device */ |
274 | #define IR_LOGINFO_COMPAT_ERROR_NOT_DIRECT_ACCESS (0x00010032) | 274 | #define IR_LOGINFO_COMPAT_ERROR_NOT_DIRECT_ACCESS (0x00010032) |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 6837a8ef9371..7956a10f9488 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -83,19 +83,18 @@ MODULE_VERSION(my_VERSION); | |||
83 | 83 | ||
84 | static int mpt_msi_enable_spi; | 84 | static int mpt_msi_enable_spi; |
85 | module_param(mpt_msi_enable_spi, int, 0); | 85 | module_param(mpt_msi_enable_spi, int, 0); |
86 | MODULE_PARM_DESC(mpt_msi_enable_spi, " Enable MSI Support for SPI \ | 86 | MODULE_PARM_DESC(mpt_msi_enable_spi, |
87 | controllers (default=0)"); | 87 | " Enable MSI Support for SPI controllers (default=0)"); |
88 | 88 | ||
89 | static int mpt_msi_enable_fc; | 89 | static int mpt_msi_enable_fc; |
90 | module_param(mpt_msi_enable_fc, int, 0); | 90 | module_param(mpt_msi_enable_fc, int, 0); |
91 | MODULE_PARM_DESC(mpt_msi_enable_fc, " Enable MSI Support for FC \ | 91 | MODULE_PARM_DESC(mpt_msi_enable_fc, |
92 | controllers (default=0)"); | 92 | " Enable MSI Support for FC controllers (default=0)"); |
93 | 93 | ||
94 | static int mpt_msi_enable_sas; | 94 | static int mpt_msi_enable_sas; |
95 | module_param(mpt_msi_enable_sas, int, 0); | 95 | module_param(mpt_msi_enable_sas, int, 0); |
96 | MODULE_PARM_DESC(mpt_msi_enable_sas, " Enable MSI Support for SAS \ | 96 | MODULE_PARM_DESC(mpt_msi_enable_sas, |
97 | controllers (default=0)"); | 97 | " Enable MSI Support for SAS controllers (default=0)"); |
98 | |||
99 | 98 | ||
100 | static int mpt_channel_mapping; | 99 | static int mpt_channel_mapping; |
101 | module_param(mpt_channel_mapping, int, 0); | 100 | module_param(mpt_channel_mapping, int, 0); |
@@ -105,15 +104,14 @@ static int mpt_debug_level; | |||
105 | static int mpt_set_debug_level(const char *val, struct kernel_param *kp); | 104 | static int mpt_set_debug_level(const char *val, struct kernel_param *kp); |
106 | module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int, | 105 | module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int, |
107 | &mpt_debug_level, 0600); | 106 | &mpt_debug_level, 0600); |
108 | MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h \ | 107 | MODULE_PARM_DESC(mpt_debug_level, |
109 | - (default=0)"); | 108 | " debug level - refer to mptdebug.h - (default=0)"); |
110 | 109 | ||
111 | int mpt_fwfault_debug; | 110 | int mpt_fwfault_debug; |
112 | EXPORT_SYMBOL(mpt_fwfault_debug); | 111 | EXPORT_SYMBOL(mpt_fwfault_debug); |
113 | module_param(mpt_fwfault_debug, int, 0600); | 112 | module_param(mpt_fwfault_debug, int, 0600); |
114 | MODULE_PARM_DESC(mpt_fwfault_debug, "Enable detection of Firmware fault" | 113 | MODULE_PARM_DESC(mpt_fwfault_debug, |
115 | " and halt Firmware on fault - (default=0)"); | 114 | "Enable detection of Firmware fault and halt Firmware on fault - (default=0)"); |
116 | |||
117 | 115 | ||
118 | static char MptCallbacksName[MPT_MAX_PROTOCOL_DRIVERS][50]; | 116 | static char MptCallbacksName[MPT_MAX_PROTOCOL_DRIVERS][50]; |
119 | 117 | ||
@@ -3435,7 +3433,7 @@ SendPortEnable(MPT_ADAPTER *ioc, int portnum, int sleepFlag) | |||
3435 | * If memory has already been allocated, the same (cached) value | 3433 | * If memory has already been allocated, the same (cached) value |
3436 | * is returned. | 3434 | * is returned. |
3437 | * | 3435 | * |
3438 | * Return 0 if successfull, or non-zero for failure | 3436 | * Return 0 if successful, or non-zero for failure |
3439 | **/ | 3437 | **/ |
3440 | int | 3438 | int |
3441 | mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size) | 3439 | mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size) |
@@ -5945,8 +5943,10 @@ mpt_findImVolumes(MPT_ADAPTER *ioc) | |||
5945 | goto out; | 5943 | goto out; |
5946 | 5944 | ||
5947 | mem = kmalloc(iocpage2sz, GFP_KERNEL); | 5945 | mem = kmalloc(iocpage2sz, GFP_KERNEL); |
5948 | if (!mem) | 5946 | if (!mem) { |
5947 | rc = -ENOMEM; | ||
5949 | goto out; | 5948 | goto out; |
5949 | } | ||
5950 | 5950 | ||
5951 | memcpy(mem, (u8 *)pIoc2, iocpage2sz); | 5951 | memcpy(mem, (u8 *)pIoc2, iocpage2sz); |
5952 | ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem; | 5952 | ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem; |
@@ -6930,7 +6930,7 @@ EXPORT_SYMBOL(mpt_halt_firmware); | |||
6930 | * Message Unit Reset - instructs the IOC to reset the Reply Post and | 6930 | * Message Unit Reset - instructs the IOC to reset the Reply Post and |
6931 | * Free FIFO's. All the Message Frames on Reply Free FIFO are discarded. | 6931 | * Free FIFO's. All the Message Frames on Reply Free FIFO are discarded. |
6932 | * All posted buffers are freed, and event notification is turned off. | 6932 | * All posted buffers are freed, and event notification is turned off. |
6933 | * IOC doesnt reply to any outstanding request. This will transfer IOC | 6933 | * IOC doesn't reply to any outstanding request. This will transfer IOC |
6934 | * to READY state. | 6934 | * to READY state. |
6935 | **/ | 6935 | **/ |
6936 | int | 6936 | int |
@@ -7416,7 +7416,12 @@ mpt_display_event_info(MPT_ADAPTER *ioc, EventNotificationReply_t *pEventReply) | |||
7416 | case MPI_EVENT_SAS_PLS_LR_RATE_3_0: | 7416 | case MPI_EVENT_SAS_PLS_LR_RATE_3_0: |
7417 | snprintf(evStr, EVENT_DESCR_STR_SZ, | 7417 | snprintf(evStr, EVENT_DESCR_STR_SZ, |
7418 | "SAS PHY Link Status: Phy=%d:" | 7418 | "SAS PHY Link Status: Phy=%d:" |
7419 | " Rate 3.0 Gpbs",PhyNumber); | 7419 | " Rate 3.0 Gbps", PhyNumber); |
7420 | break; | ||
7421 | case MPI_EVENT_SAS_PLS_LR_RATE_6_0: | ||
7422 | snprintf(evStr, EVENT_DESCR_STR_SZ, | ||
7423 | "SAS PHY Link Status: Phy=%d:" | ||
7424 | " Rate 6.0 Gbps", PhyNumber); | ||
7420 | break; | 7425 | break; |
7421 | default: | 7426 | default: |
7422 | snprintf(evStr, EVENT_DESCR_STR_SZ, | 7427 | snprintf(evStr, EVENT_DESCR_STR_SZ, |
@@ -7898,7 +7903,7 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info) | |||
7898 | "Owner", /* 15h */ | 7903 | "Owner", /* 15h */ |
7899 | "Open Transmit DMA Abort", /* 16h */ | 7904 | "Open Transmit DMA Abort", /* 16h */ |
7900 | "IO Device Missing Delay Retry", /* 17h */ | 7905 | "IO Device Missing Delay Retry", /* 17h */ |
7901 | "IO Cancelled Due to Recieve Error", /* 18h */ | 7906 | "IO Cancelled Due to Receive Error", /* 18h */ |
7902 | NULL, /* 19h */ | 7907 | NULL, /* 19h */ |
7903 | NULL, /* 1Ah */ | 7908 | NULL, /* 1Ah */ |
7904 | NULL, /* 1Bh */ | 7909 | NULL, /* 1Bh */ |
@@ -7975,7 +7980,7 @@ mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info) | |||
7975 | NULL, /* 2Eh */ | 7980 | NULL, /* 2Eh */ |
7976 | NULL, /* 2Fh */ | 7981 | NULL, /* 2Fh */ |
7977 | "Compatibility Error: IR Disabled", /* 30h */ | 7982 | "Compatibility Error: IR Disabled", /* 30h */ |
7978 | "Compatibility Error: Inquiry Comand Failed", /* 31h */ | 7983 | "Compatibility Error: Inquiry Command Failed", /* 31h */ |
7979 | "Compatibility Error: Device not Direct Access " | 7984 | "Compatibility Error: Device not Direct Access " |
7980 | "Device ", /* 32h */ | 7985 | "Device ", /* 32h */ |
7981 | "Compatibility Error: Removable Device Found", /* 33h */ | 7986 | "Compatibility Error: Removable Device Found", /* 33h */ |
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index f71f22948477..fe902338539b 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -76,8 +76,8 @@ | |||
76 | #define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR | 76 | #define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR |
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | #define MPT_LINUX_VERSION_COMMON "3.04.17" | 79 | #define MPT_LINUX_VERSION_COMMON "3.04.19" |
80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.17" | 80 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.19" |
81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" | 81 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" |
82 | 82 | ||
83 | #define show_mptmod_ver(s,ver) \ | 83 | #define show_mptmod_ver(s,ver) \ |
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index d8ddfdf8be14..6e6e16aab9da 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -54,7 +54,7 @@ | |||
54 | #include <linux/pci.h> | 54 | #include <linux/pci.h> |
55 | #include <linux/delay.h> /* for mdelay */ | 55 | #include <linux/delay.h> /* for mdelay */ |
56 | #include <linux/miscdevice.h> | 56 | #include <linux/miscdevice.h> |
57 | #include <linux/smp_lock.h> | 57 | #include <linux/mutex.h> |
58 | #include <linux/compat.h> | 58 | #include <linux/compat.h> |
59 | 59 | ||
60 | #include <asm/io.h> | 60 | #include <asm/io.h> |
@@ -83,6 +83,7 @@ MODULE_VERSION(my_VERSION); | |||
83 | 83 | ||
84 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 84 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
85 | 85 | ||
86 | static DEFINE_MUTEX(mpctl_mutex); | ||
86 | static u8 mptctl_id = MPT_MAX_PROTOCOL_DRIVERS; | 87 | static u8 mptctl_id = MPT_MAX_PROTOCOL_DRIVERS; |
87 | static u8 mptctl_taskmgmt_id = MPT_MAX_PROTOCOL_DRIVERS; | 88 | static u8 mptctl_taskmgmt_id = MPT_MAX_PROTOCOL_DRIVERS; |
88 | 89 | ||
@@ -596,17 +597,24 @@ mptctl_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply) | |||
596 | } | 597 | } |
597 | 598 | ||
598 | static int | 599 | static int |
600 | mptctl_release(struct inode *inode, struct file *filep) | ||
601 | { | ||
602 | fasync_helper(-1, filep, 0, &async_queue); | ||
603 | return 0; | ||
604 | } | ||
605 | |||
606 | static int | ||
599 | mptctl_fasync(int fd, struct file *filep, int mode) | 607 | mptctl_fasync(int fd, struct file *filep, int mode) |
600 | { | 608 | { |
601 | MPT_ADAPTER *ioc; | 609 | MPT_ADAPTER *ioc; |
602 | int ret; | 610 | int ret; |
603 | 611 | ||
604 | lock_kernel(); | 612 | mutex_lock(&mpctl_mutex); |
605 | list_for_each_entry(ioc, &ioc_list, list) | 613 | list_for_each_entry(ioc, &ioc_list, list) |
606 | ioc->aen_event_read_flag=0; | 614 | ioc->aen_event_read_flag=0; |
607 | 615 | ||
608 | ret = fasync_helper(fd, filep, mode, &async_queue); | 616 | ret = fasync_helper(fd, filep, mode, &async_queue); |
609 | unlock_kernel(); | 617 | mutex_unlock(&mpctl_mutex); |
610 | return ret; | 618 | return ret; |
611 | } | 619 | } |
612 | 620 | ||
@@ -698,9 +706,9 @@ static long | |||
698 | mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | 706 | mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
699 | { | 707 | { |
700 | long ret; | 708 | long ret; |
701 | lock_kernel(); | 709 | mutex_lock(&mpctl_mutex); |
702 | ret = __mptctl_ioctl(file, cmd, arg); | 710 | ret = __mptctl_ioctl(file, cmd, arg); |
703 | unlock_kernel(); | 711 | mutex_unlock(&mpctl_mutex); |
704 | return ret; | 712 | return ret; |
705 | } | 713 | } |
706 | 714 | ||
@@ -977,7 +985,7 @@ retry_wait: | |||
977 | ReplyMsg = (pFWDownloadReply_t)iocp->ioctl_cmds.reply; | 985 | ReplyMsg = (pFWDownloadReply_t)iocp->ioctl_cmds.reply; |
978 | iocstat = le16_to_cpu(ReplyMsg->IOCStatus) & MPI_IOCSTATUS_MASK; | 986 | iocstat = le16_to_cpu(ReplyMsg->IOCStatus) & MPI_IOCSTATUS_MASK; |
979 | if (iocstat == MPI_IOCSTATUS_SUCCESS) { | 987 | if (iocstat == MPI_IOCSTATUS_SUCCESS) { |
980 | printk(MYIOC_s_INFO_FMT "F/W update successfull!\n", iocp->name); | 988 | printk(MYIOC_s_INFO_FMT "F/W update successful!\n", iocp->name); |
981 | return 0; | 989 | return 0; |
982 | } else if (iocstat == MPI_IOCSTATUS_INVALID_FUNCTION) { | 990 | } else if (iocstat == MPI_IOCSTATUS_INVALID_FUNCTION) { |
983 | printk(MYIOC_s_WARN_FMT "Hmmm... F/W download not supported!?!\n", | 991 | printk(MYIOC_s_WARN_FMT "Hmmm... F/W download not supported!?!\n", |
@@ -1306,8 +1314,10 @@ mptctl_getiocinfo (unsigned long arg, unsigned int data_size) | |||
1306 | else | 1314 | else |
1307 | karg->adapterType = MPT_IOCTL_INTERFACE_SCSI; | 1315 | karg->adapterType = MPT_IOCTL_INTERFACE_SCSI; |
1308 | 1316 | ||
1309 | if (karg->hdr.port > 1) | 1317 | if (karg->hdr.port > 1) { |
1318 | kfree(karg); | ||
1310 | return -EINVAL; | 1319 | return -EINVAL; |
1320 | } | ||
1311 | port = karg->hdr.port; | 1321 | port = karg->hdr.port; |
1312 | 1322 | ||
1313 | karg->port = port; | 1323 | karg->port = port; |
@@ -2397,7 +2407,7 @@ done_free_mem: | |||
2397 | } | 2407 | } |
2398 | 2408 | ||
2399 | /* mf is null if command issued successfully | 2409 | /* mf is null if command issued successfully |
2400 | * otherwise, failure occured after mf acquired. | 2410 | * otherwise, failure occurred after mf acquired. |
2401 | */ | 2411 | */ |
2402 | if (mf) | 2412 | if (mf) |
2403 | mpt_free_msg_frame(ioc, mf); | 2413 | mpt_free_msg_frame(ioc, mf); |
@@ -2814,6 +2824,7 @@ static const struct file_operations mptctl_fops = { | |||
2814 | .llseek = no_llseek, | 2824 | .llseek = no_llseek, |
2815 | .fasync = mptctl_fasync, | 2825 | .fasync = mptctl_fasync, |
2816 | .unlocked_ioctl = mptctl_ioctl, | 2826 | .unlocked_ioctl = mptctl_ioctl, |
2827 | .release = mptctl_release, | ||
2817 | #ifdef CONFIG_COMPAT | 2828 | #ifdef CONFIG_COMPAT |
2818 | .compat_ioctl = compat_mpctl_ioctl, | 2829 | .compat_ioctl = compat_mpctl_ioctl, |
2819 | #endif | 2830 | #endif |
@@ -2926,7 +2937,7 @@ compat_mpt_command(struct file *filp, unsigned int cmd, | |||
2926 | static long compat_mpctl_ioctl(struct file *f, unsigned int cmd, unsigned long arg) | 2937 | static long compat_mpctl_ioctl(struct file *f, unsigned int cmd, unsigned long arg) |
2927 | { | 2938 | { |
2928 | long ret; | 2939 | long ret; |
2929 | lock_kernel(); | 2940 | mutex_lock(&mpctl_mutex); |
2930 | switch (cmd) { | 2941 | switch (cmd) { |
2931 | case MPTIOCINFO: | 2942 | case MPTIOCINFO: |
2932 | case MPTIOCINFO1: | 2943 | case MPTIOCINFO1: |
@@ -2951,7 +2962,7 @@ static long compat_mpctl_ioctl(struct file *f, unsigned int cmd, unsigned long a | |||
2951 | ret = -ENOIOCTLCMD; | 2962 | ret = -ENOIOCTLCMD; |
2952 | break; | 2963 | break; |
2953 | } | 2964 | } |
2954 | unlock_kernel(); | 2965 | mutex_unlock(&mpctl_mutex); |
2955 | return ret; | 2966 | return ret; |
2956 | } | 2967 | } |
2957 | 2968 | ||
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index e15220ff52fc..d784c36707c0 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
@@ -97,8 +97,7 @@ static u8 mptfcInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; | |||
97 | 97 | ||
98 | static int mptfc_target_alloc(struct scsi_target *starget); | 98 | static int mptfc_target_alloc(struct scsi_target *starget); |
99 | static int mptfc_slave_alloc(struct scsi_device *sdev); | 99 | static int mptfc_slave_alloc(struct scsi_device *sdev); |
100 | static int mptfc_qcmd(struct scsi_cmnd *SCpnt, | 100 | static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt); |
101 | void (*done)(struct scsi_cmnd *)); | ||
102 | static void mptfc_target_destroy(struct scsi_target *starget); | 101 | static void mptfc_target_destroy(struct scsi_target *starget); |
103 | static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); | 102 | static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); |
104 | static void __devexit mptfc_remove(struct pci_dev *pdev); | 103 | static void __devexit mptfc_remove(struct pci_dev *pdev); |
@@ -650,7 +649,7 @@ mptfc_slave_alloc(struct scsi_device *sdev) | |||
650 | } | 649 | } |
651 | 650 | ||
652 | static int | 651 | static int |
653 | mptfc_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | 652 | mptfc_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) |
654 | { | 653 | { |
655 | struct mptfc_rport_info *ri; | 654 | struct mptfc_rport_info *ri; |
656 | struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device)); | 655 | struct fc_rport *rport = starget_to_rport(scsi_target(SCpnt->device)); |
@@ -681,6 +680,8 @@ mptfc_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
681 | return mptscsih_qcmd(SCpnt,done); | 680 | return mptscsih_qcmd(SCpnt,done); |
682 | } | 681 | } |
683 | 682 | ||
683 | static DEF_SCSI_QCMD(mptfc_qcmd) | ||
684 | |||
684 | /* | 685 | /* |
685 | * mptfc_display_port_link_speed - displaying link speed | 686 | * mptfc_display_port_link_speed - displaying link speed |
686 | * @ioc: Pointer to MPT_ADAPTER structure | 687 | * @ioc: Pointer to MPT_ADAPTER structure |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 83a5115f0251..7596aecd5072 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -307,7 +307,7 @@ mptsas_requeue_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, | |||
307 | spin_unlock_irqrestore(&ioc->fw_event_lock, flags); | 307 | spin_unlock_irqrestore(&ioc->fw_event_lock, flags); |
308 | } | 308 | } |
309 | 309 | ||
310 | /* free memory assoicated to a sas firmware event */ | 310 | /* free memory associated to a sas firmware event */ |
311 | static void | 311 | static void |
312 | mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event) | 312 | mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event) |
313 | { | 313 | { |
@@ -1094,7 +1094,7 @@ mptsas_block_io_starget(struct scsi_target *starget) | |||
1094 | /** | 1094 | /** |
1095 | * mptsas_target_reset_queue | 1095 | * mptsas_target_reset_queue |
1096 | * | 1096 | * |
1097 | * Receive request for TARGET_RESET after recieving an firmware | 1097 | * Receive request for TARGET_RESET after receiving an firmware |
1098 | * event NOT_RESPONDING_EVENT, then put command in link list | 1098 | * event NOT_RESPONDING_EVENT, then put command in link list |
1099 | * and queue if task_queue already in use. | 1099 | * and queue if task_queue already in use. |
1100 | * | 1100 | * |
@@ -1146,7 +1146,7 @@ mptsas_target_reset_queue(MPT_ADAPTER *ioc, | |||
1146 | * | 1146 | * |
1147 | * This function will delete scheduled target reset from the list and | 1147 | * This function will delete scheduled target reset from the list and |
1148 | * try to send next target reset. This will be called from completion | 1148 | * try to send next target reset. This will be called from completion |
1149 | * context of any Task managment command. | 1149 | * context of any Task management command. |
1150 | */ | 1150 | */ |
1151 | 1151 | ||
1152 | void | 1152 | void |
@@ -1403,7 +1403,7 @@ mptsas_sas_enclosure_pg0(MPT_ADAPTER *ioc, struct mptsas_enclosure *enclosure, | |||
1403 | /** | 1403 | /** |
1404 | * mptsas_add_end_device - report a new end device to sas transport layer | 1404 | * mptsas_add_end_device - report a new end device to sas transport layer |
1405 | * @ioc: Pointer to MPT_ADAPTER structure | 1405 | * @ioc: Pointer to MPT_ADAPTER structure |
1406 | * @phy_info: decribes attached device | 1406 | * @phy_info: describes attached device |
1407 | * | 1407 | * |
1408 | * return (0) success (1) failure | 1408 | * return (0) success (1) failure |
1409 | * | 1409 | * |
@@ -1481,7 +1481,7 @@ mptsas_add_end_device(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info) | |||
1481 | /** | 1481 | /** |
1482 | * mptsas_del_end_device - report a deleted end device to sas transport layer | 1482 | * mptsas_del_end_device - report a deleted end device to sas transport layer |
1483 | * @ioc: Pointer to MPT_ADAPTER structure | 1483 | * @ioc: Pointer to MPT_ADAPTER structure |
1484 | * @phy_info: decribes attached device | 1484 | * @phy_info: describes attached device |
1485 | * | 1485 | * |
1486 | **/ | 1486 | **/ |
1487 | static void | 1487 | static void |
@@ -1889,7 +1889,7 @@ mptsas_slave_alloc(struct scsi_device *sdev) | |||
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | static int | 1891 | static int |
1892 | mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | 1892 | mptsas_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) |
1893 | { | 1893 | { |
1894 | MPT_SCSI_HOST *hd; | 1894 | MPT_SCSI_HOST *hd; |
1895 | MPT_ADAPTER *ioc; | 1895 | MPT_ADAPTER *ioc; |
@@ -1913,6 +1913,8 @@ mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
1913 | return mptscsih_qcmd(SCpnt,done); | 1913 | return mptscsih_qcmd(SCpnt,done); |
1914 | } | 1914 | } |
1915 | 1915 | ||
1916 | static DEF_SCSI_QCMD(mptsas_qcmd) | ||
1917 | |||
1916 | /** | 1918 | /** |
1917 | * mptsas_mptsas_eh_timed_out - resets the scsi_cmnd timeout | 1919 | * mptsas_mptsas_eh_timed_out - resets the scsi_cmnd timeout |
1918 | * if the device under question is currently in the | 1920 | * if the device under question is currently in the |
@@ -1971,7 +1973,6 @@ static struct scsi_host_template mptsas_driver_template = { | |||
1971 | .change_queue_depth = mptscsih_change_queue_depth, | 1973 | .change_queue_depth = mptscsih_change_queue_depth, |
1972 | .eh_abort_handler = mptscsih_abort, | 1974 | .eh_abort_handler = mptscsih_abort, |
1973 | .eh_device_reset_handler = mptscsih_dev_reset, | 1975 | .eh_device_reset_handler = mptscsih_dev_reset, |
1974 | .eh_bus_reset_handler = mptscsih_bus_reset, | ||
1975 | .eh_host_reset_handler = mptscsih_host_reset, | 1976 | .eh_host_reset_handler = mptscsih_host_reset, |
1976 | .bios_param = mptscsih_bios_param, | 1977 | .bios_param = mptscsih_bios_param, |
1977 | .can_queue = MPT_SAS_CAN_QUEUE, | 1978 | .can_queue = MPT_SAS_CAN_QUEUE, |
@@ -3061,6 +3062,9 @@ static int mptsas_probe_one_phy(struct device *dev, | |||
3061 | case MPI_SAS_IOUNIT0_RATE_3_0: | 3062 | case MPI_SAS_IOUNIT0_RATE_3_0: |
3062 | phy->negotiated_linkrate = SAS_LINK_RATE_3_0_GBPS; | 3063 | phy->negotiated_linkrate = SAS_LINK_RATE_3_0_GBPS; |
3063 | break; | 3064 | break; |
3065 | case MPI_SAS_IOUNIT0_RATE_6_0: | ||
3066 | phy->negotiated_linkrate = SAS_LINK_RATE_6_0_GBPS; | ||
3067 | break; | ||
3064 | case MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE: | 3068 | case MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE: |
3065 | case MPI_SAS_IOUNIT0_RATE_UNKNOWN: | 3069 | case MPI_SAS_IOUNIT0_RATE_UNKNOWN: |
3066 | default: | 3070 | default: |
@@ -3689,7 +3693,8 @@ mptsas_send_link_status_event(struct fw_event_work *fw_event) | |||
3689 | } | 3693 | } |
3690 | 3694 | ||
3691 | if (link_rate == MPI_SAS_IOUNIT0_RATE_1_5 || | 3695 | if (link_rate == MPI_SAS_IOUNIT0_RATE_1_5 || |
3692 | link_rate == MPI_SAS_IOUNIT0_RATE_3_0) { | 3696 | link_rate == MPI_SAS_IOUNIT0_RATE_3_0 || |
3697 | link_rate == MPI_SAS_IOUNIT0_RATE_6_0) { | ||
3693 | 3698 | ||
3694 | if (!port_info) { | 3699 | if (!port_info) { |
3695 | if (ioc->old_sas_discovery_protocal) { | 3700 | if (ioc->old_sas_discovery_protocal) { |
@@ -5007,7 +5012,6 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) | |||
5007 | (ioc_stat & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE)) { | 5012 | (ioc_stat & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE)) { |
5008 | VirtTarget *vtarget = NULL; | 5013 | VirtTarget *vtarget = NULL; |
5009 | u8 id, channel; | 5014 | u8 id, channel; |
5010 | u32 log_info = le32_to_cpu(reply->IOCLogInfo); | ||
5011 | 5015 | ||
5012 | id = sas_event_data->TargetID; | 5016 | id = sas_event_data->TargetID; |
5013 | channel = sas_event_data->Bus; | 5017 | channel = sas_event_data->Bus; |
@@ -5018,7 +5022,8 @@ mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply) | |||
5018 | "LogInfo (0x%x) available for " | 5022 | "LogInfo (0x%x) available for " |
5019 | "INTERNAL_DEVICE_RESET" | 5023 | "INTERNAL_DEVICE_RESET" |
5020 | "fw_id %d fw_channel %d\n", ioc->name, | 5024 | "fw_id %d fw_channel %d\n", ioc->name, |
5021 | log_info, id, channel)); | 5025 | le32_to_cpu(reply->IOCLogInfo), |
5026 | id, channel)); | ||
5022 | if (vtarget->raidVolume) { | 5027 | if (vtarget->raidVolume) { |
5023 | devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 5028 | devtprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
5024 | "Skipping Raid Volume for inDMD\n", | 5029 | "Skipping Raid Volume for inDMD\n", |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 59b8f53d1ece..a1d4ee6671be 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -1415,11 +1415,8 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
1415 | dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p, done()=%p\n", | 1415 | dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p, done()=%p\n", |
1416 | ioc->name, SCpnt, done)); | 1416 | ioc->name, SCpnt, done)); |
1417 | 1417 | ||
1418 | if (ioc->taskmgmt_quiesce_io) { | 1418 | if (ioc->taskmgmt_quiesce_io) |
1419 | dtmprintk(ioc, printk(MYIOC_s_WARN_FMT "qcmd: SCpnt=%p timeout + 60HZ\n", | ||
1420 | ioc->name, SCpnt)); | ||
1421 | return SCSI_MLQUEUE_HOST_BUSY; | 1419 | return SCSI_MLQUEUE_HOST_BUSY; |
1422 | } | ||
1423 | 1420 | ||
1424 | /* | 1421 | /* |
1425 | * Put together a MPT SCSI request... | 1422 | * Put together a MPT SCSI request... |
@@ -1773,7 +1770,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) | |||
1773 | int scpnt_idx; | 1770 | int scpnt_idx; |
1774 | int retval; | 1771 | int retval; |
1775 | VirtDevice *vdevice; | 1772 | VirtDevice *vdevice; |
1776 | ulong sn = SCpnt->serial_number; | ||
1777 | MPT_ADAPTER *ioc; | 1773 | MPT_ADAPTER *ioc; |
1778 | 1774 | ||
1779 | /* If we can't locate our host adapter structure, return FAILED status. | 1775 | /* If we can't locate our host adapter structure, return FAILED status. |
@@ -1859,8 +1855,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) | |||
1859 | vdevice->vtarget->id, vdevice->lun, | 1855 | vdevice->vtarget->id, vdevice->lun, |
1860 | ctx2abort, mptscsih_get_tm_timeout(ioc)); | 1856 | ctx2abort, mptscsih_get_tm_timeout(ioc)); |
1861 | 1857 | ||
1862 | if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx && | 1858 | if (SCPNT_TO_LOOKUP_IDX(ioc, SCpnt) == scpnt_idx) { |
1863 | SCpnt->serial_number == sn) { | ||
1864 | dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 1859 | dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
1865 | "task abort: command still in active list! (sc=%p)\n", | 1860 | "task abort: command still in active list! (sc=%p)\n", |
1866 | ioc->name, SCpnt)); | 1861 | ioc->name, SCpnt)); |
@@ -1873,8 +1868,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) | |||
1873 | } | 1868 | } |
1874 | 1869 | ||
1875 | out: | 1870 | out: |
1876 | printk(MYIOC_s_INFO_FMT "task abort: %s (sc=%p)\n", | 1871 | printk(MYIOC_s_INFO_FMT "task abort: %s (rv=%04x) (sc=%p)\n", |
1877 | ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), SCpnt); | 1872 | ioc->name, ((retval == SUCCESS) ? "SUCCESS" : "FAILED"), retval, |
1873 | SCpnt); | ||
1878 | 1874 | ||
1879 | return retval; | 1875 | return retval; |
1880 | } | 1876 | } |
@@ -1911,7 +1907,7 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt) | |||
1911 | 1907 | ||
1912 | vdevice = SCpnt->device->hostdata; | 1908 | vdevice = SCpnt->device->hostdata; |
1913 | if (!vdevice || !vdevice->vtarget) { | 1909 | if (!vdevice || !vdevice->vtarget) { |
1914 | retval = SUCCESS; | 1910 | retval = 0; |
1915 | goto out; | 1911 | goto out; |
1916 | } | 1912 | } |
1917 | 1913 | ||
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 0e2803155ae2..8f61ba6aac23 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -780,7 +780,7 @@ static int mptspi_slave_configure(struct scsi_device *sdev) | |||
780 | } | 780 | } |
781 | 781 | ||
782 | static int | 782 | static int |
783 | mptspi_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | 783 | mptspi_qcmd_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) |
784 | { | 784 | { |
785 | struct _MPT_SCSI_HOST *hd = shost_priv(SCpnt->device->host); | 785 | struct _MPT_SCSI_HOST *hd = shost_priv(SCpnt->device->host); |
786 | VirtDevice *vdevice = SCpnt->device->hostdata; | 786 | VirtDevice *vdevice = SCpnt->device->hostdata; |
@@ -805,6 +805,8 @@ mptspi_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
805 | return mptscsih_qcmd(SCpnt,done); | 805 | return mptscsih_qcmd(SCpnt,done); |
806 | } | 806 | } |
807 | 807 | ||
808 | static DEF_SCSI_QCMD(mptspi_qcmd) | ||
809 | |||
808 | static void mptspi_slave_destroy(struct scsi_device *sdev) | 810 | static void mptspi_slave_destroy(struct scsi_device *sdev) |
809 | { | 811 | { |
810 | struct scsi_target *starget = scsi_target(sdev); | 812 | struct scsi_target *starget = scsi_target(sdev); |
@@ -865,6 +867,10 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget, | |||
865 | struct _x_config_parms cfg; | 867 | struct _x_config_parms cfg; |
866 | struct _CONFIG_PAGE_HEADER hdr; | 868 | struct _CONFIG_PAGE_HEADER hdr; |
867 | int err = -EBUSY; | 869 | int err = -EBUSY; |
870 | u32 nego_parms; | ||
871 | u32 period; | ||
872 | struct scsi_device *sdev; | ||
873 | int i; | ||
868 | 874 | ||
869 | /* don't allow updating nego parameters on RAID devices */ | 875 | /* don't allow updating nego parameters on RAID devices */ |
870 | if (starget->channel == 0 && | 876 | if (starget->channel == 0 && |
@@ -902,6 +908,24 @@ static int mptspi_write_spi_device_pg1(struct scsi_target *starget, | |||
902 | pg1->Header.PageNumber = hdr.PageNumber; | 908 | pg1->Header.PageNumber = hdr.PageNumber; |
903 | pg1->Header.PageType = hdr.PageType; | 909 | pg1->Header.PageType = hdr.PageType; |
904 | 910 | ||
911 | nego_parms = le32_to_cpu(pg1->RequestedParameters); | ||
912 | period = (nego_parms & MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK) >> | ||
913 | MPI_SCSIDEVPAGE1_RP_SHIFT_MIN_SYNC_PERIOD; | ||
914 | if (period == 8) { | ||
915 | /* Turn on inline data padding for TAPE when running U320 */ | ||
916 | for (i = 0 ; i < 16; i++) { | ||
917 | sdev = scsi_device_lookup_by_target(starget, i); | ||
918 | if (sdev && sdev->type == TYPE_TAPE) { | ||
919 | sdev_printk(KERN_DEBUG, sdev, MYIOC_s_FMT | ||
920 | "IDP:ON\n", ioc->name); | ||
921 | nego_parms |= MPI_SCSIDEVPAGE1_RP_IDP; | ||
922 | pg1->RequestedParameters = | ||
923 | cpu_to_le32(nego_parms); | ||
924 | break; | ||
925 | } | ||
926 | } | ||
927 | } | ||
928 | |||
905 | mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters)); | 929 | mptspi_print_write_nego(hd, starget, le32_to_cpu(pg1->RequestedParameters)); |
906 | 930 | ||
907 | if (mpt_config(ioc, &cfg)) { | 931 | if (mpt_config(ioc, &cfg)) { |