aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/message
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/Makefile2
-rw-r--r--drivers/message/fusion/lsi/mpi_cnfg.h1
-rw-r--r--drivers/message/fusion/lsi/mpi_ioc.h1
-rw-r--r--drivers/message/fusion/lsi/mpi_log_fc.h4
-rw-r--r--drivers/message/fusion/lsi/mpi_log_sas.h16
-rw-r--r--drivers/message/fusion/mptbase.c41
-rw-r--r--drivers/message/fusion/mptbase.h4
-rw-r--r--drivers/message/fusion/mptctl.c31
-rw-r--r--drivers/message/fusion/mptfc.c7
-rw-r--r--drivers/message/fusion/mptsas.c25
-rw-r--r--drivers/message/fusion/mptscsih.c16
-rw-r--r--drivers/message/fusion/mptspi.c26
-rw-r--r--drivers/message/i2o/README2
-rw-r--r--drivers/message/i2o/README.ioctl2
-rw-r--r--drivers/message/i2o/device.c8
-rw-r--r--drivers/message/i2o/driver.c3
-rw-r--r--drivers/message/i2o/i2o_block.c37
-rw-r--r--drivers/message/i2o/i2o_block.h2
-rw-r--r--drivers/message/i2o/i2o_config.c26
-rw-r--r--drivers/message/i2o/i2o_scsi.c12
20 files changed, 156 insertions, 110 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
84static int mpt_msi_enable_spi; 84static int mpt_msi_enable_spi;
85module_param(mpt_msi_enable_spi, int, 0); 85module_param(mpt_msi_enable_spi, int, 0);
86MODULE_PARM_DESC(mpt_msi_enable_spi, " Enable MSI Support for SPI \ 86MODULE_PARM_DESC(mpt_msi_enable_spi,
87 controllers (default=0)"); 87 " Enable MSI Support for SPI controllers (default=0)");
88 88
89static int mpt_msi_enable_fc; 89static int mpt_msi_enable_fc;
90module_param(mpt_msi_enable_fc, int, 0); 90module_param(mpt_msi_enable_fc, int, 0);
91MODULE_PARM_DESC(mpt_msi_enable_fc, " Enable MSI Support for FC \ 91MODULE_PARM_DESC(mpt_msi_enable_fc,
92 controllers (default=0)"); 92 " Enable MSI Support for FC controllers (default=0)");
93 93
94static int mpt_msi_enable_sas; 94static int mpt_msi_enable_sas;
95module_param(mpt_msi_enable_sas, int, 0); 95module_param(mpt_msi_enable_sas, int, 0);
96MODULE_PARM_DESC(mpt_msi_enable_sas, " Enable MSI Support for SAS \ 96MODULE_PARM_DESC(mpt_msi_enable_sas,
97 controllers (default=0)"); 97 " Enable MSI Support for SAS controllers (default=0)");
98
99 98
100static int mpt_channel_mapping; 99static int mpt_channel_mapping;
101module_param(mpt_channel_mapping, int, 0); 100module_param(mpt_channel_mapping, int, 0);
@@ -105,15 +104,14 @@ static int mpt_debug_level;
105static int mpt_set_debug_level(const char *val, struct kernel_param *kp); 104static int mpt_set_debug_level(const char *val, struct kernel_param *kp);
106module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int, 105module_param_call(mpt_debug_level, mpt_set_debug_level, param_get_int,
107 &mpt_debug_level, 0600); 106 &mpt_debug_level, 0600);
108MODULE_PARM_DESC(mpt_debug_level, " debug level - refer to mptdebug.h \ 107MODULE_PARM_DESC(mpt_debug_level,
109 - (default=0)"); 108 " debug level - refer to mptdebug.h - (default=0)");
110 109
111int mpt_fwfault_debug; 110int mpt_fwfault_debug;
112EXPORT_SYMBOL(mpt_fwfault_debug); 111EXPORT_SYMBOL(mpt_fwfault_debug);
113module_param(mpt_fwfault_debug, int, 0600); 112module_param(mpt_fwfault_debug, int, 0600);
114MODULE_PARM_DESC(mpt_fwfault_debug, "Enable detection of Firmware fault" 113MODULE_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
118static char MptCallbacksName[MPT_MAX_PROTOCOL_DRIVERS][50]; 116static 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 **/
3440int 3438int
3441mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size) 3439mpt_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 **/
6936int 6936int
@@ -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
86static DEFINE_MUTEX(mpctl_mutex);
86static u8 mptctl_id = MPT_MAX_PROTOCOL_DRIVERS; 87static u8 mptctl_id = MPT_MAX_PROTOCOL_DRIVERS;
87static u8 mptctl_taskmgmt_id = MPT_MAX_PROTOCOL_DRIVERS; 88static 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
598static int 599static int
600mptctl_release(struct inode *inode, struct file *filep)
601{
602 fasync_helper(-1, filep, 0, &async_queue);
603 return 0;
604}
605
606static int
599mptctl_fasync(int fd, struct file *filep, int mode) 607mptctl_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
698mptctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 706mptctl_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,
2926static long compat_mpctl_ioctl(struct file *f, unsigned int cmd, unsigned long arg) 2937static 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
98static int mptfc_target_alloc(struct scsi_target *starget); 98static int mptfc_target_alloc(struct scsi_target *starget);
99static int mptfc_slave_alloc(struct scsi_device *sdev); 99static int mptfc_slave_alloc(struct scsi_device *sdev);
100static int mptfc_qcmd(struct scsi_cmnd *SCpnt, 100static int mptfc_qcmd(struct Scsi_Host *shost, struct scsi_cmnd *SCpnt);
101 void (*done)(struct scsi_cmnd *));
102static void mptfc_target_destroy(struct scsi_target *starget); 101static void mptfc_target_destroy(struct scsi_target *starget);
103static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout); 102static void mptfc_set_rport_loss_tmo(struct fc_rport *rport, uint32_t timeout);
104static void __devexit mptfc_remove(struct pci_dev *pdev); 103static void __devexit mptfc_remove(struct pci_dev *pdev);
@@ -650,7 +649,7 @@ mptfc_slave_alloc(struct scsi_device *sdev)
650} 649}
651 650
652static int 651static int
653mptfc_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) 652mptfc_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
683static 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 */
311static void 311static void
312mptsas_free_fw_event(MPT_ADAPTER *ioc, struct fw_event_work *fw_event) 312mptsas_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
1152void 1152void
@@ -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 **/
1487static void 1487static void
@@ -1889,7 +1889,7 @@ mptsas_slave_alloc(struct scsi_device *sdev)
1889} 1889}
1890 1890
1891static int 1891static int
1892mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) 1892mptsas_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
1916static 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
782static int 782static int
783mptspi_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) 783mptspi_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
808static DEF_SCSI_QCMD(mptspi_qcmd)
809
808static void mptspi_slave_destroy(struct scsi_device *sdev) 810static 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)) {
diff --git a/drivers/message/i2o/README b/drivers/message/i2o/README
index 911fc3021e3b..f072a8eb3041 100644
--- a/drivers/message/i2o/README
+++ b/drivers/message/i2o/README
@@ -53,7 +53,7 @@ Symbios Logic (Now LSI)
53BoxHill Corporation 53BoxHill Corporation
54 Loan of initial FibreChannel disk array used for development work. 54 Loan of initial FibreChannel disk array used for development work.
55 55
56European Comission 56European Commission
57 Funding the work done by the University of Helsinki 57 Funding the work done by the University of Helsinki
58 58
59SysKonnect 59SysKonnect
diff --git a/drivers/message/i2o/README.ioctl b/drivers/message/i2o/README.ioctl
index 65c0c47aeb79..5fb195af43e2 100644
--- a/drivers/message/i2o/README.ioctl
+++ b/drivers/message/i2o/README.ioctl
@@ -110,7 +110,7 @@ V. Getting Logical Configuration Table
110 ENOBUFS Buffer not large enough. If this occurs, the required 110 ENOBUFS Buffer not large enough. If this occurs, the required
111 buffer length is written into *(lct->reslen) 111 buffer length is written into *(lct->reslen)
112 112
113VI. Settting Parameters 113VI. Setting Parameters
114 114
115 SYNOPSIS 115 SYNOPSIS
116 116
diff --git a/drivers/message/i2o/device.c b/drivers/message/i2o/device.c
index 0ee4264f5db7..4547db99f7da 100644
--- a/drivers/message/i2o/device.c
+++ b/drivers/message/i2o/device.c
@@ -65,7 +65,7 @@ int i2o_device_claim(struct i2o_device *dev)
65 65
66 rc = i2o_device_issue_claim(dev, I2O_CMD_UTIL_CLAIM, I2O_CLAIM_PRIMARY); 66 rc = i2o_device_issue_claim(dev, I2O_CMD_UTIL_CLAIM, I2O_CLAIM_PRIMARY);
67 if (!rc) 67 if (!rc)
68 pr_debug("i2o: claim of device %d succeded\n", 68 pr_debug("i2o: claim of device %d succeeded\n",
69 dev->lct_data.tid); 69 dev->lct_data.tid);
70 else 70 else
71 pr_debug("i2o: claim of device %d failed %d\n", 71 pr_debug("i2o: claim of device %d failed %d\n",
@@ -110,7 +110,7 @@ int i2o_device_claim_release(struct i2o_device *dev)
110 } 110 }
111 111
112 if (!rc) 112 if (!rc)
113 pr_debug("i2o: claim release of device %d succeded\n", 113 pr_debug("i2o: claim release of device %d succeeded\n",
114 dev->lct_data.tid); 114 dev->lct_data.tid);
115 else 115 else
116 pr_debug("i2o: claim release of device %d failed %d\n", 116 pr_debug("i2o: claim release of device %d failed %d\n",
@@ -248,7 +248,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
248 goto unreg_dev; 248 goto unreg_dev;
249 } 249 }
250 250
251 /* create user entries refering to this device */ 251 /* create user entries referring to this device */
252 list_for_each_entry(tmp, &c->devices, list) 252 list_for_each_entry(tmp, &c->devices, list)
253 if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid) 253 if ((tmp->lct_data.user_tid == i2o_dev->lct_data.tid)
254 && (tmp != i2o_dev)) { 254 && (tmp != i2o_dev)) {
@@ -267,7 +267,7 @@ static int i2o_device_add(struct i2o_controller *c, i2o_lct_entry *entry)
267 goto rmlink1; 267 goto rmlink1;
268 } 268 }
269 269
270 /* create parent entries refering to this device */ 270 /* create parent entries referring to this device */
271 list_for_each_entry(tmp, &c->devices, list) 271 list_for_each_entry(tmp, &c->devices, list)
272 if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid) 272 if ((tmp->lct_data.parent_tid == i2o_dev->lct_data.tid)
273 && (tmp != i2o_dev)) { 273 && (tmp != i2o_dev)) {
diff --git a/drivers/message/i2o/driver.c b/drivers/message/i2o/driver.c
index a0421efe04ca..8a5b2d8f4daf 100644
--- a/drivers/message/i2o/driver.c
+++ b/drivers/message/i2o/driver.c
@@ -84,7 +84,8 @@ int i2o_driver_register(struct i2o_driver *drv)
84 osm_debug("Register driver %s\n", drv->name); 84 osm_debug("Register driver %s\n", drv->name);
85 85
86 if (drv->event) { 86 if (drv->event) {
87 drv->event_queue = create_workqueue(drv->name); 87 drv->event_queue = alloc_workqueue(drv->name,
88 WQ_MEM_RECLAIM, 1);
88 if (!drv->event_queue) { 89 if (!drv->event_queue) {
89 osm_err("Could not initialize event queue for driver " 90 osm_err("Could not initialize event queue for driver "
90 "%s\n", drv->name); 91 "%s\n", drv->name);
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
index f0f1e667000f..4796bbf0ae4e 100644
--- a/drivers/message/i2o/i2o_block.c
+++ b/drivers/message/i2o/i2o_block.c
@@ -53,7 +53,7 @@
53#include <linux/module.h> 53#include <linux/module.h>
54#include <linux/slab.h> 54#include <linux/slab.h>
55#include <linux/i2o.h> 55#include <linux/i2o.h>
56#include <linux/smp_lock.h> 56#include <linux/mutex.h>
57 57
58#include <linux/mempool.h> 58#include <linux/mempool.h>
59 59
@@ -69,6 +69,7 @@
69#define OSM_VERSION "1.325" 69#define OSM_VERSION "1.325"
70#define OSM_DESCRIPTION "I2O Block Device OSM" 70#define OSM_DESCRIPTION "I2O Block Device OSM"
71 71
72static DEFINE_MUTEX(i2o_block_mutex);
72static struct i2o_driver i2o_block_driver; 73static struct i2o_driver i2o_block_driver;
73 74
74/* global Block OSM request mempool */ 75/* global Block OSM request mempool */
@@ -308,7 +309,7 @@ static inline void i2o_block_request_free(struct i2o_block_request *ireq)
308 * @ireq: I2O block request 309 * @ireq: I2O block request
309 * @mptr: message body pointer 310 * @mptr: message body pointer
310 * 311 *
311 * Builds the SG list and map it to be accessable by the controller. 312 * Builds the SG list and map it to be accessible by the controller.
312 * 313 *
313 * Returns 0 on failure or 1 on success. 314 * Returns 0 on failure or 1 on success.
314 */ 315 */
@@ -578,7 +579,7 @@ static int i2o_block_open(struct block_device *bdev, fmode_t mode)
578 if (!dev->i2o_dev) 579 if (!dev->i2o_dev)
579 return -ENODEV; 580 return -ENODEV;
580 581
581 lock_kernel(); 582 mutex_lock(&i2o_block_mutex);
582 if (dev->power > 0x1f) 583 if (dev->power > 0x1f)
583 i2o_block_device_power(dev, 0x02); 584 i2o_block_device_power(dev, 0x02);
584 585
@@ -587,7 +588,7 @@ static int i2o_block_open(struct block_device *bdev, fmode_t mode)
587 i2o_block_device_lock(dev->i2o_dev, -1); 588 i2o_block_device_lock(dev->i2o_dev, -1);
588 589
589 osm_debug("Ready.\n"); 590 osm_debug("Ready.\n");
590 unlock_kernel(); 591 mutex_unlock(&i2o_block_mutex);
591 592
592 return 0; 593 return 0;
593}; 594};
@@ -609,7 +610,7 @@ static int i2o_block_release(struct gendisk *disk, fmode_t mode)
609 610
610 /* 611 /*
611 * This is to deail with the case of an application 612 * This is to deail with the case of an application
612 * opening a device and then the device dissapears while 613 * opening a device and then the device disappears while
613 * it's in use, and then the application tries to release 614 * it's in use, and then the application tries to release
614 * it. ex: Unmounting a deleted RAID volume at reboot. 615 * it. ex: Unmounting a deleted RAID volume at reboot.
615 * If we send messages, it will just cause FAILs since 616 * If we send messages, it will just cause FAILs since
@@ -618,7 +619,7 @@ static int i2o_block_release(struct gendisk *disk, fmode_t mode)
618 if (!dev->i2o_dev) 619 if (!dev->i2o_dev)
619 return 0; 620 return 0;
620 621
621 lock_kernel(); 622 mutex_lock(&i2o_block_mutex);
622 i2o_block_device_flush(dev->i2o_dev); 623 i2o_block_device_flush(dev->i2o_dev);
623 624
624 i2o_block_device_unlock(dev->i2o_dev, -1); 625 i2o_block_device_unlock(dev->i2o_dev, -1);
@@ -629,7 +630,7 @@ static int i2o_block_release(struct gendisk *disk, fmode_t mode)
629 operation = 0x24; 630 operation = 0x24;
630 631
631 i2o_block_device_power(dev, operation); 632 i2o_block_device_power(dev, operation);
632 unlock_kernel(); 633 mutex_unlock(&i2o_block_mutex);
633 634
634 return 0; 635 return 0;
635} 636}
@@ -664,7 +665,7 @@ static int i2o_block_ioctl(struct block_device *bdev, fmode_t mode,
664 if (!capable(CAP_SYS_ADMIN)) 665 if (!capable(CAP_SYS_ADMIN))
665 return -EPERM; 666 return -EPERM;
666 667
667 lock_kernel(); 668 mutex_lock(&i2o_block_mutex);
668 switch (cmd) { 669 switch (cmd) {
669 case BLKI2OGRSTRAT: 670 case BLKI2OGRSTRAT:
670 ret = put_user(dev->rcache, (int __user *)arg); 671 ret = put_user(dev->rcache, (int __user *)arg);
@@ -688,33 +689,35 @@ static int i2o_block_ioctl(struct block_device *bdev, fmode_t mode,
688 ret = 0; 689 ret = 0;
689 break; 690 break;
690 } 691 }
691 unlock_kernel(); 692 mutex_unlock(&i2o_block_mutex);
692 693
693 return ret; 694 return ret;
694}; 695};
695 696
696/** 697/**
697 * i2o_block_media_changed - Have we seen a media change? 698 * i2o_block_check_events - Have we seen a media change?
698 * @disk: gendisk which should be verified 699 * @disk: gendisk which should be verified
700 * @clearing: events being cleared
699 * 701 *
700 * Verifies if the media has changed. 702 * Verifies if the media has changed.
701 * 703 *
702 * Returns 1 if the media was changed or 0 otherwise. 704 * Returns 1 if the media was changed or 0 otherwise.
703 */ 705 */
704static int i2o_block_media_changed(struct gendisk *disk) 706static unsigned int i2o_block_check_events(struct gendisk *disk,
707 unsigned int clearing)
705{ 708{
706 struct i2o_block_device *p = disk->private_data; 709 struct i2o_block_device *p = disk->private_data;
707 710
708 if (p->media_change_flag) { 711 if (p->media_change_flag) {
709 p->media_change_flag = 0; 712 p->media_change_flag = 0;
710 return 1; 713 return DISK_EVENT_MEDIA_CHANGE;
711 } 714 }
712 return 0; 715 return 0;
713} 716}
714 717
715/** 718/**
716 * i2o_block_transfer - Transfer a request to/from the I2O controller 719 * i2o_block_transfer - Transfer a request to/from the I2O controller
717 * @req: the request which should be transfered 720 * @req: the request which should be transferred
718 * 721 *
719 * This function converts the request into a I2O message. The necessary 722 * This function converts the request into a I2O message. The necessary
720 * DMA buffers are allocated and after everything is setup post the message 723 * DMA buffers are allocated and after everything is setup post the message
@@ -894,11 +897,7 @@ static void i2o_block_request_fn(struct request_queue *q)
894{ 897{
895 struct request *req; 898 struct request *req;
896 899
897 while (!blk_queue_plugged(q)) { 900 while ((req = blk_peek_request(q)) != NULL) {
898 req = blk_peek_request(q);
899 if (!req)
900 break;
901
902 if (req->cmd_type == REQ_TYPE_FS) { 901 if (req->cmd_type == REQ_TYPE_FS) {
903 struct i2o_block_delayed_request *dreq; 902 struct i2o_block_delayed_request *dreq;
904 struct i2o_block_request *ireq = req->special; 903 struct i2o_block_request *ireq = req->special;
@@ -949,7 +948,7 @@ static const struct block_device_operations i2o_block_fops = {
949 .ioctl = i2o_block_ioctl, 948 .ioctl = i2o_block_ioctl,
950 .compat_ioctl = i2o_block_ioctl, 949 .compat_ioctl = i2o_block_ioctl,
951 .getgeo = i2o_block_getgeo, 950 .getgeo = i2o_block_getgeo,
952 .media_changed = i2o_block_media_changed 951 .check_events = i2o_block_check_events,
953}; 952};
954 953
955/** 954/**
diff --git a/drivers/message/i2o/i2o_block.h b/drivers/message/i2o/i2o_block.h
index 67f921b4419b..cf8873cbca3f 100644
--- a/drivers/message/i2o/i2o_block.h
+++ b/drivers/message/i2o/i2o_block.h
@@ -73,7 +73,7 @@ struct i2o_block_device {
73 struct i2o_device *i2o_dev; /* pointer to I2O device */ 73 struct i2o_device *i2o_dev; /* pointer to I2O device */
74 struct gendisk *gd; 74 struct gendisk *gd;
75 spinlock_t lock; /* queue lock */ 75 spinlock_t lock; /* queue lock */
76 struct list_head open_queue; /* list of transfered, but unfinished 76 struct list_head open_queue; /* list of transferred, but unfinished
77 requests */ 77 requests */
78 unsigned int open_queue_depth; /* number of requests in the queue */ 78 unsigned int open_queue_depth; /* number of requests in the queue */
79 79
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 068ba0785bb4..098de2b35784 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -31,7 +31,7 @@
31 */ 31 */
32 32
33#include <linux/miscdevice.h> 33#include <linux/miscdevice.h>
34#include <linux/smp_lock.h> 34#include <linux/mutex.h>
35#include <linux/compat.h> 35#include <linux/compat.h>
36#include <linux/slab.h> 36#include <linux/slab.h>
37 37
@@ -41,6 +41,7 @@
41 41
42#define SG_TABLESIZE 30 42#define SG_TABLESIZE 30
43 43
44static DEFINE_MUTEX(i2o_cfg_mutex);
44static long i2o_cfg_ioctl(struct file *, unsigned int, unsigned long); 45static long i2o_cfg_ioctl(struct file *, unsigned int, unsigned long);
45 46
46static spinlock_t i2o_config_lock; 47static spinlock_t i2o_config_lock;
@@ -741,7 +742,7 @@ static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,
741 unsigned long arg) 742 unsigned long arg)
742{ 743{
743 int ret; 744 int ret;
744 lock_kernel(); 745 mutex_lock(&i2o_cfg_mutex);
745 switch (cmd) { 746 switch (cmd) {
746 case I2OGETIOPS: 747 case I2OGETIOPS:
747 ret = i2o_cfg_ioctl(file, cmd, arg); 748 ret = i2o_cfg_ioctl(file, cmd, arg);
@@ -753,7 +754,7 @@ static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,
753 ret = -ENOIOCTLCMD; 754 ret = -ENOIOCTLCMD;
754 break; 755 break;
755 } 756 }
756 unlock_kernel(); 757 mutex_unlock(&i2o_cfg_mutex);
757 return ret; 758 return ret;
758} 759}
759 760
@@ -981,7 +982,7 @@ static long i2o_cfg_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
981{ 982{
982 int ret; 983 int ret;
983 984
984 lock_kernel(); 985 mutex_lock(&i2o_cfg_mutex);
985 switch (cmd) { 986 switch (cmd) {
986 case I2OGETIOPS: 987 case I2OGETIOPS:
987 ret = i2o_cfg_getiops(arg); 988 ret = i2o_cfg_getiops(arg);
@@ -1037,21 +1038,20 @@ static long i2o_cfg_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
1037 osm_debug("unknown ioctl called!\n"); 1038 osm_debug("unknown ioctl called!\n");
1038 ret = -EINVAL; 1039 ret = -EINVAL;
1039 } 1040 }
1040 unlock_kernel(); 1041 mutex_unlock(&i2o_cfg_mutex);
1041 return ret; 1042 return ret;
1042} 1043}
1043 1044
1044static int cfg_open(struct inode *inode, struct file *file) 1045static int cfg_open(struct inode *inode, struct file *file)
1045{ 1046{
1046 struct i2o_cfg_info *tmp = 1047 struct i2o_cfg_info *tmp = kmalloc(sizeof(struct i2o_cfg_info),
1047 (struct i2o_cfg_info *)kmalloc(sizeof(struct i2o_cfg_info),
1048 GFP_KERNEL); 1048 GFP_KERNEL);
1049 unsigned long flags; 1049 unsigned long flags;
1050 1050
1051 if (!tmp) 1051 if (!tmp)
1052 return -ENOMEM; 1052 return -ENOMEM;
1053 1053
1054 lock_kernel(); 1054 mutex_lock(&i2o_cfg_mutex);
1055 file->private_data = (void *)(i2o_cfg_info_id++); 1055 file->private_data = (void *)(i2o_cfg_info_id++);
1056 tmp->fp = file; 1056 tmp->fp = file;
1057 tmp->fasync = NULL; 1057 tmp->fasync = NULL;
@@ -1065,7 +1065,7 @@ static int cfg_open(struct inode *inode, struct file *file)
1065 spin_lock_irqsave(&i2o_config_lock, flags); 1065 spin_lock_irqsave(&i2o_config_lock, flags);
1066 open_files = tmp; 1066 open_files = tmp;
1067 spin_unlock_irqrestore(&i2o_config_lock, flags); 1067 spin_unlock_irqrestore(&i2o_config_lock, flags);
1068 unlock_kernel(); 1068 mutex_unlock(&i2o_cfg_mutex);
1069 1069
1070 return 0; 1070 return 0;
1071} 1071}
@@ -1076,14 +1076,14 @@ static int cfg_fasync(int fd, struct file *fp, int on)
1076 struct i2o_cfg_info *p; 1076 struct i2o_cfg_info *p;
1077 int ret = -EBADF; 1077 int ret = -EBADF;
1078 1078
1079 lock_kernel(); 1079 mutex_lock(&i2o_cfg_mutex);
1080 for (p = open_files; p; p = p->next) 1080 for (p = open_files; p; p = p->next)
1081 if (p->q_id == id) 1081 if (p->q_id == id)
1082 break; 1082 break;
1083 1083
1084 if (p) 1084 if (p)
1085 ret = fasync_helper(fd, fp, on, &p->fasync); 1085 ret = fasync_helper(fd, fp, on, &p->fasync);
1086 unlock_kernel(); 1086 mutex_unlock(&i2o_cfg_mutex);
1087 return ret; 1087 return ret;
1088} 1088}
1089 1089
@@ -1093,7 +1093,7 @@ static int cfg_release(struct inode *inode, struct file *file)
1093 struct i2o_cfg_info *p, **q; 1093 struct i2o_cfg_info *p, **q;
1094 unsigned long flags; 1094 unsigned long flags;
1095 1095
1096 lock_kernel(); 1096 mutex_lock(&i2o_cfg_mutex);
1097 spin_lock_irqsave(&i2o_config_lock, flags); 1097 spin_lock_irqsave(&i2o_config_lock, flags);
1098 for (q = &open_files; (p = *q) != NULL; q = &p->next) { 1098 for (q = &open_files; (p = *q) != NULL; q = &p->next) {
1099 if (p->q_id == id) { 1099 if (p->q_id == id) {
@@ -1103,7 +1103,7 @@ static int cfg_release(struct inode *inode, struct file *file)
1103 } 1103 }
1104 } 1104 }
1105 spin_unlock_irqrestore(&i2o_config_lock, flags); 1105 spin_unlock_irqrestore(&i2o_config_lock, flags);
1106 unlock_kernel(); 1106 mutex_unlock(&i2o_cfg_mutex);
1107 1107
1108 return 0; 1108 return 0;
1109} 1109}
diff --git a/drivers/message/i2o/i2o_scsi.c b/drivers/message/i2o/i2o_scsi.c
index ea6b2197da8a..74fbe56321ff 100644
--- a/drivers/message/i2o/i2o_scsi.c
+++ b/drivers/message/i2o/i2o_scsi.c
@@ -204,7 +204,7 @@ static int i2o_scsi_remove(struct device *dev)
204 * i2o_scsi_probe - verify if dev is a I2O SCSI device and install it 204 * i2o_scsi_probe - verify if dev is a I2O SCSI device and install it
205 * @dev: device to verify if it is a I2O SCSI device 205 * @dev: device to verify if it is a I2O SCSI device
206 * 206 *
207 * Retrieve channel, id and lun for I2O device. If everthing goes well 207 * Retrieve channel, id and lun for I2O device. If everything goes well
208 * register the I2O device as SCSI device on the I2O SCSI controller. 208 * register the I2O device as SCSI device on the I2O SCSI controller.
209 * 209 *
210 * Returns 0 on success or negative error code on failure. 210 * Returns 0 on success or negative error code on failure.
@@ -361,7 +361,7 @@ static int i2o_scsi_reply(struct i2o_controller *c, u32 m,
361 */ 361 */
362 error = le32_to_cpu(msg->body[0]); 362 error = le32_to_cpu(msg->body[0]);
363 363
364 osm_debug("Completed %ld\n", cmd->serial_number); 364 osm_debug("Completed %0x%p\n", cmd);
365 365
366 cmd->result = error & 0xff; 366 cmd->result = error & 0xff;
367 /* 367 /*
@@ -506,7 +506,7 @@ static struct i2o_driver i2o_scsi_driver = {
506 * Locks: takes the controller lock on error path only 506 * Locks: takes the controller lock on error path only
507 */ 507 */
508 508
509static int i2o_scsi_queuecommand(struct scsi_cmnd *SCpnt, 509static int i2o_scsi_queuecommand_lck(struct scsi_cmnd *SCpnt,
510 void (*done) (struct scsi_cmnd *)) 510 void (*done) (struct scsi_cmnd *))
511{ 511{
512 struct i2o_controller *c; 512 struct i2o_controller *c;
@@ -678,7 +678,7 @@ static int i2o_scsi_queuecommand(struct scsi_cmnd *SCpnt,
678 /* Queue the message */ 678 /* Queue the message */
679 i2o_msg_post(c, msg); 679 i2o_msg_post(c, msg);
680 680
681 osm_debug("Issued %ld\n", SCpnt->serial_number); 681 osm_debug("Issued %0x%p\n", SCpnt);
682 682
683 return 0; 683 return 0;
684 684
@@ -688,7 +688,9 @@ static int i2o_scsi_queuecommand(struct scsi_cmnd *SCpnt,
688 688
689 exit: 689 exit:
690 return rc; 690 return rc;
691}; 691}
692
693static DEF_SCSI_QCMD(i2o_scsi_queuecommand)
692 694
693/** 695/**
694 * i2o_scsi_abort - abort a running command 696 * i2o_scsi_abort - abort a running command