mpt2sas: Update driver to MPI2 REV K headers.
PATCH 1/9 mpt2sas: Update driver to MPI2 REV K headers.
Drivers header are updated to the MPI2 REV K headers. Renamed VF_ID to msix_index in all call back handlers. VF_ID is removed from all request descriptor.
---
drivers/scsi/mpt2sas/mpi/mpi2.h +73 -30
@@ -8,7 +8,7 @@* scatter/gather formats. * Creation Date: June 21, 2006 * -* mpi2.h Version: 02.00.11 +* mpi2.h Version: 02.00.12 * * Version History * ---------------
@@ -45,6 +45,13 @@* 10-02-08 02.00.10 Bumped MPI2_HEADER_VERSION_UNIT. * Moved LUN field defines from mpi2_init.h. * 01-19-09 02.00.11 Bumped MPI2_HEADER_VERSION_UNIT. +* 05-06-09 02.00.12 Bumped MPI2_HEADER_VERSION_UNIT. +* In all request and reply descriptors, replaced VF_ID +* field with MSIxIndex field. +* Removed DevHandle field from +* MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR and made those +* bytes reserved. +* Added RAID Accelerator functionality. * -------------------------------------------------------------------------- */
@@ -70,7 +77,7 @@#define MPI2_VERSION_02_00 (0x0200)/* versioning for this MPI header set */ -#define MPI2_HEADER_VERSION_UNIT (0x0B) +#define MPI2_HEADER_VERSION_UNIT (0x0C)#define MPI2_HEADER_VERSION_DEV (0x00)#define MPI2_HEADER_VERSION_UNIT_MASK (0xFF00)#define MPI2_HEADER_VERSION_UNIT_SHIFT (8)
@@ -257,7 +264,7 @@ typedef volatile struct _MPI2_SYSTEM_INTERFACE_REGS typedef struct _MPI2_DEFAULT_REQUEST_DESCRIPTOR { U8 RequestFlags; /* 0x00 */ - U8 VF_ID; /* 0x01 */ + U8 MSIxIndex; /* 0x01 */ U16 SMID; /* 0x02 */ U16 LMID; /* 0x04 */ U16 DescriptorTypeDependent; /* 0x06 */
@@ -271,6 +278,7 @@ typedef struct _MPI2_DEFAULT_REQUEST_DESCRIPTOR#define MPI2_REQ_DESCRIPT_FLAGS_SCSI_TARGET (0x02)#define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY (0x06)#define MPI2_REQ_DESCRIPT_FLAGS_DEFAULT_TYPE (0x08) +#define MPI2_REQ_DESCRIPT_FLAGS_RAID_ACCELERATOR (0x0A)#define MPI2_REQ_DESCRIPT_FLAGS_IOC_FIFO_MARKER (0x01)
@@ -279,7 +287,7 @@ typedef struct _MPI2_DEFAULT_REQUEST_DESCRIPTOR typedef struct _MPI2_HIGH_PRIORITY_REQUEST_DESCRIPTOR { U8 RequestFlags; /* 0x00 */ - U8 VF_ID; /* 0x01 */ + U8 MSIxIndex; /* 0x01 */ U16 SMID; /* 0x02 */ U16 LMID; /* 0x04 */ U16 Reserved1; /* 0x06 */
@@ -293,7 +301,7 @@ typedef struct _MPI2_HIGH_PRIORITY_REQUEST_DESCRIPTOR typedef struct _MPI2_SCSI_IO_REQUEST_DESCRIPTOR { U8 RequestFlags; /* 0x00 */ - U8 VF_ID; /* 0x01 */ + U8 MSIxIndex; /* 0x01 */ U16 SMID; /* 0x02 */ U16 LMID; /* 0x04 */ U16 DevHandle; /* 0x06 */
@@ -306,7 +314,7 @@ typedef struct _MPI2_SCSI_IO_REQUEST_DESCRIPTOR typedef struct _MPI2_SCSI_TARGET_REQUEST_DESCRIPTOR { U8 RequestFlags; /* 0x00 */ - U8 VF_ID; /* 0x01 */ + U8 MSIxIndex; /* 0x01 */ U16 SMID; /* 0x02 */ U16 LMID; /* 0x04 */ U16 IoIndex; /* 0x06 */
@@ -315,14 +323,29 @@ typedef struct _MPI2_SCSI_TARGET_REQUEST_DESCRIPTOR Mpi2SCSITargetRequestDescriptor_t, MPI2_POINTER pMpi2SCSITargetRequestDescriptor_t; + +/* RAID Accelerator Request Descriptor */ +typedef struct _MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR { +U8 RequestFlags;/* 0x00 */ +U8 MSIxIndex;/* 0x01 */ +U16 SMID;/* 0x02 */ +U16 LMID;/* 0x04 */ +U16 Reserved;/* 0x06 */ +}MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR , + MPI2_POINTER PTR_MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR, + Mpi2RAIDAcceleratorRequestDescriptor_t, + MPI2_POINTER pMpi2RAIDAcceleratorRequestDescriptor_t; + +/* union of Request Descriptors */ typedef union _MPI2_REQUEST_DESCRIPTOR_UNION { -MPI2_DEFAULT_REQUEST_DESCRIPTOR Default; -MPI2_HIGH_PRIORITY_REQUEST_DESCRIPTOR HighPriority; -MPI2_SCSI_IO_REQUEST_DESCRIPTOR SCSIIO; -MPI2_SCSI_TARGET_REQUEST_DESCRIPTOR SCSITarget; -U64 Words; +MPI2_DEFAULT_REQUEST_DESCRIPTOR Default; +MPI2_HIGH_PRIORITY_REQUEST_DESCRIPTOR HighPriority; +MPI2_SCSI_IO_REQUEST_DESCRIPTOR SCSIIO; +MPI2_SCSI_TARGET_REQUEST_DESCRIPTOR SCSITarget; +MPI2_RAID_ACCEL_REQUEST_DESCRIPTOR RAIDAccelerator; +U64 Words; } MPI2_REQUEST_DESCRIPTOR_UNION, MPI2_POINTER PTR_MPI2_REQUEST_DESCRIPTOR_UNION, Mpi2RequestDescriptorUnion_t, MPI2_POINTER pMpi2RequestDescriptorUnion_t;
@@ -333,19 +356,20 @@ typedef union _MPI2_REQUEST_DESCRIPTOR_UNIONtypedef struct _MPI2_DEFAULT_REPLY_DESCRIPTOR {U8 ReplyFlags;/* 0x00 */ -U8 VF_ID;/* 0x01 */ +U8 MSIxIndex;/* 0x01 */ U16 DescriptorTypeDependent1;/* 0x02 */ U32 DescriptorTypeDependent2;/* 0x04 */ } MPI2_DEFAULT_REPLY_DESCRIPTOR, MPI2_POINTER PTR_MPI2_DEFAULT_REPLY_DESCRIPTOR, Mpi2DefaultReplyDescriptor_t, MPI2_POINTER pMpi2DefaultReplyDescriptor_t;/* defines for the ReplyFlags field */ -#define MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK (0x0F) -#define MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS (0x00) -#define MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY (0x01) -#define MPI2_RPY_DESCRIPT_FLAGS_TARGETASSIST_SUCCESS (0x02) -#define MPI2_RPY_DESCRIPT_FLAGS_TARGET_COMMAND_BUFFER (0x03) -#define MPI2_RPY_DESCRIPT_FLAGS_UNUSED (0x0F) +#define MPI2_RPY_DESCRIPT_FLAGS_TYPE_MASK (0x0F) +#define MPI2_RPY_DESCRIPT_FLAGS_SCSI_IO_SUCCESS (0x00) +#define MPI2_RPY_DESCRIPT_FLAGS_ADDRESS_REPLY (0x01) +#define MPI2_RPY_DESCRIPT_FLAGS_TARGETASSIST_SUCCESS (0x02) +#define MPI2_RPY_DESCRIPT_FLAGS_TARGET_COMMAND_BUFFER (0x03) +#define MPI2_RPY_DESCRIPT_FLAGS_RAID_ACCELERATOR_SUCCESS (0x05) +#define MPI2_RPY_DESCRIPT_FLAGS_UNUSED (0x0F)/* values for marking a reply descriptor as unused */ #define MPI2_RPY_DESCRIPT_UNUSED_WORD0_MARK (0xFFFFFFFF)
@@ -355,7 +379,7 @@ typedef struct _MPI2_DEFAULT_REPLY_DESCRIPTORtypedef struct _MPI2_ADDRESS_REPLY_DESCRIPTOR {U8 ReplyFlags;/* 0x00 */ -U8 VF_ID;/* 0x01 */ +U8 MSIxIndex;/* 0x01 */ U16 SMID;/* 0x02 */ U32 ReplyFrameAddress;/* 0x04 */ } MPI2_ADDRESS_REPLY_DESCRIPTOR, MPI2_POINTER PTR_MPI2_ADDRESS_REPLY_DESCRIPTOR,
@@ -368,10 +392,10 @@ typedef struct _MPI2_ADDRESS_REPLY_DESCRIPTORtypedef struct _MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR {U8 ReplyFlags;/* 0x00 */ -U8 VF_ID;/* 0x01 */ +U8 MSIxIndex;/* 0x01 */ U16 SMID;/* 0x02 */ U16 TaskTag;/* 0x04 */ -U16 DevHandle;/* 0x06 */ +U16 Reserved1;/* 0x06 */ }MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR , MPI2_POINTER PTR_MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR, Mpi2SCSIIOSuccessReplyDescriptor_t,
@@ -382,7 +406,7 @@ typedef struct _MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR typedef struct _MPI2_TARGETASSIST_SUCCESS_REPLY_DESCRIPTOR { U8 ReplyFlags; /* 0x00 */ - U8 VF_ID; /* 0x01 */ + U8 MSIxIndex; /* 0x01 */ U16 SMID; /* 0x02 */ U8 SequenceNumber; /* 0x04 */ U8 Reserved1; /* 0x05 */
@@ -397,7 +421,7 @@ typedef struct _MPI2_TARGETASSIST_SUCCESS_REPLY_DESCRIPTOR typedef struct _MPI2_TARGET_COMMAND_BUFFER_REPLY_DESCRIPTOR { U8 ReplyFlags; /* 0x00 */ - U8 VF_ID; /* 0x01 */ + U8 MSIxIndex; /* 0x01 */ U8 VP_ID; /* 0x02 */ U8 Flags; /* 0x03 */ U16 InitiatorDevHandle; /* 0x04 */
@@ -411,15 +435,28 @@ typedef struct _MPI2_TARGET_COMMAND_BUFFER_REPLY_DESCRIPTOR#define MPI2_RPY_DESCRIPT_TCB_FLAGS_PHYNUM_MASK (0x3F) +/* RAID Accelerator Success Reply Descriptor */ +typedef struct _MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR { +U8 ReplyFlags;/* 0x00 */ +U8 MSIxIndex;/* 0x01 */ +U16 SMID;/* 0x02 */ +U32 Reserved;/* 0x04 */ +}MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR , + MPI2_POINTER PTR_MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR, + Mpi2RAIDAcceleratorSuccessReplyDescriptor_t, + MPI2_POINTER pMpi2RAIDAcceleratorSuccessReplyDescriptor_t; + +/* union of Reply Descriptors */ typedef union _MPI2_REPLY_DESCRIPTORS_UNION { -MPI2_DEFAULT_REPLY_DESCRIPTOR Default; -MPI2_ADDRESS_REPLY_DESCRIPTOR AddressReply; -MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR SCSIIOSuccess; -MPI2_TARGETASSIST_SUCCESS_REPLY_DESCRIPTOR TargetAssistSuccess; -MPI2_TARGET_COMMAND_BUFFER_REPLY_DESCRIPTOR TargetCommandBuffer; -U64 Words; +MPI2_DEFAULT_REPLY_DESCRIPTOR Default; +MPI2_ADDRESS_REPLY_DESCRIPTOR AddressReply; +MPI2_SCSI_IO_SUCCESS_REPLY_DESCRIPTOR SCSIIOSuccess; +MPI2_TARGETASSIST_SUCCESS_REPLY_DESCRIPTOR TargetAssistSuccess; +MPI2_TARGET_COMMAND_BUFFER_REPLY_DESCRIPTOR TargetCommandBuffer; +MPI2_RAID_ACCELERATOR_SUCCESS_REPLY_DESCRIPTOR RAIDAcceleratorSuccess; +U64 Words; } MPI2_REPLY_DESCRIPTORS_UNION, MPI2_POINTER PTR_MPI2_REPLY_DESCRIPTORS_UNION, Mpi2ReplyDescriptorsUnion_t, MPI2_POINTER pMpi2ReplyDescriptorsUnion_t;
@@ -458,6 +495,7 @@ typedef union _MPI2_REPLY_DESCRIPTORS_UNION#define MPI2_FUNCTION_DIAG_RELEASE (0x1E)/* Diagnostic Release */ #define MPI2_FUNCTION_TARGET_CMD_BUF_BASE_POST (0x24)/* Target Command Buffer Post Base */ #define MPI2_FUNCTION_TARGET_CMD_BUF_LIST_POST (0x25)/* Target Command Buffer Post List */ +#define MPI2_FUNCTION_RAID_ACCELERATOR (0x2C)/* RAID Accelerator*/
@@ -555,12 +593,17 @@ typedef union _MPI2_REPLY_DESCRIPTORS_UNION#define MPI2_IOCSTATUS_DIAGNOSTIC_RELEASED (0x00A0) +/**************************************************************************** +* RAID Accelerator values +****************************************************************************/ + +#define MPI2_IOCSTATUS_RAID_ACCEL_ERROR (0x00B0)/**************************************************************************** * IOCStatus flag to indicate that log info is available ****************************************************************************/ -#define MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE (0x8000) +#define MPI2_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE (0x8000)/**************************************************************************** * IOCLogInfo Types
drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h +198 -2
239 lines not on this page · raw message
drivers/scsi/mpt2sas/mpi/mpi2_init.h +15 -3
@@ -1,12 +1,12 @@/* -* Copyright (c) 2000-2008 LSI Corporation. +* Copyright (c) 2000-2009 LSI Corporation. * * * Name: mpi2_init.h * Title: MPI SCSI initiator mode messages and structures * Creation Date: June 23, 2006 * -* mpi2_init.h Version: 02.00.06 +* mpi2_init.h Version: 02.00.07 * * Version History * ---------------
@@ -23,6 +23,10 @@* Control field Task Attribute flags. * Moved LUN field defines to mpi2.h becasue they are * common to many structures. +* 05-06-09 02.00.07 Changed task management type of Query Unit Attention to +* Query Asynchronous Event. +* Defined two new bits in the SlotStatus field of the SCSI +* Enclosure Processor Request and Reply. * -------------------------------------------------------------------------- */
@@ -289,7 +293,11 @@ typedef struct _MPI2_SCSI_TASK_MANAGE_REQUEST#define MPI2_SCSITASKMGMT_TASKTYPE_QUERY_TASK (0x07)#define MPI2_SCSITASKMGMT_TASKTYPE_CLR_ACA (0x08)#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_TASK_SET (0x09) -#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_UNIT_ATTENTION (0x0A) +#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_ASYNC_EVENT (0x0A) + +/* obsolete TaskType name */ +#define MPI2_SCSITASKMGMT_TASKTYPE_QRY_UNIT_ATTENTION \ + (MPI2_SCSITASKMGMT_TASKTYPE_QRY_ASYNC_EVENT)/* MsgFlags bits */
@@ -375,6 +383,8 @@ typedef struct _MPI2_SEP_REQUEST#define MPI2_SEP_REQ_SLOTSTATUS_HOT_SPARE (0x00000100)#define MPI2_SEP_REQ_SLOTSTATUS_UNCONFIGURED (0x00000080)#define MPI2_SEP_REQ_SLOTSTATUS_PREDICTED_FAULT (0x00000040) +#define MPI2_SEP_REQ_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010) +#define MPI2_SEP_REQ_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008)#define MPI2_SEP_REQ_SLOTSTATUS_DEV_REBUILDING (0x00000004)#define MPI2_SEP_REQ_SLOTSTATUS_DEV_FAULTY (0x00000002)#define MPI2_SEP_REQ_SLOTSTATUS_NO_ERROR (0x00000001)
@@ -410,6 +420,8 @@ typedef struct _MPI2_SEP_REPLY#define MPI2_SEP_REPLY_SLOTSTATUS_HOT_SPARE (0x00000100)#define MPI2_SEP_REPLY_SLOTSTATUS_UNCONFIGURED (0x00000080)#define MPI2_SEP_REPLY_SLOTSTATUS_PREDICTED_FAULT (0x00000040) +#define MPI2_SEP_REPLY_SLOTSTATUS_IN_CRITICAL_ARRAY (0x00000010) +#define MPI2_SEP_REPLY_SLOTSTATUS_IN_FAILED_ARRAY (0x00000008)#define MPI2_SEP_REPLY_SLOTSTATUS_DEV_REBUILDING (0x00000004)#define MPI2_SEP_REPLY_SLOTSTATUS_DEV_FAULTY (0x00000002)#define MPI2_SEP_REPLY_SLOTSTATUS_NO_ERROR (0x00000001)
drivers/scsi/mpt2sas/mpi/mpi2_ioc.h +53 -12
101 lines not on this page · raw message
drivers/scsi/mpt2sas/mpi/mpi2_tool.h +132 -2
169 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_base.c +46 -54
354 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_base.h +18 -12
@@ -701,8 +701,8 @@ struct MPT2SAS_ADAPTER {u32 diagnostic_flags[MPI2_DIAG_BUF_TYPE_COUNT ]; }; -typedef void (*MPT_CALLBACK )(struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID , -u32 reply); +typedef void (*MPT_CALLBACK )(struct MPT2SAS_ADAPTER *ioc,u16 smid, +u8 msix_index,u32 reply);/* base shared API */
@@ -725,17 +725,18 @@ dma_addr_t mpt2sas_base_get_sense_buffer_dma(struct MPT2SAS_ADAPTER *ioc, u16 smu16 mpt2sas_base_get_smid (struct MPT2SAS_ADAPTER *ioc,u8 cb_idx);void mpt2sas_base_free_smid (struct MPT2SAS_ADAPTER *ioc,u16 smid); -void mpt2sas_base_put_smid_scsi_io (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 vf_id, +void mpt2sas_base_put_smid_scsi_io (struct MPT2SAS_ADAPTER *ioc,u16 smid,u16 handle); -void mpt2sas_base_put_smid_hi_priority (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 vf_id); +void mpt2sas_base_put_smid_hi_priority (struct MPT2SAS_ADAPTER *ioc,u16 smid);void mpt2sas_base_put_smid_target_assist (struct MPT2SAS_ADAPTER *ioc,u16 smid, -u8 vf_id,u16 io_index); -void mpt2sas_base_put_smid_default (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 vf_id); +u16 io_index); +void mpt2sas_base_put_smid_default (struct MPT2SAS_ADAPTER *ioc,u16 smid);void mpt2sas_base_initialize_callback_handler (void );u8 mpt2sas_base_register_callback_handler (MPT_CALLBACK cb_func);void mpt2sas_base_release_callback_handler (u8 cb_idx); -void mpt2sas_base_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID ,u32 reply); +void mpt2sas_base_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 msix_index, +u32 reply);void *mpt2sas_base_get_reply_virt_addr (struct MPT2SAS_ADAPTER *ioc,u32 phys_addr);u32 mpt2sas_base_get_iocstate (struct MPT2SAS_ADAPTER *ioc,int cooked);
@@ -760,11 +761,13 @@ struct _sas_node *mpt2sas_scsih_expander_find_by_sas_address(struct MPT2SAS_ADAPstruct _sas_device *mpt2sas_scsih_sas_device_find_by_sas_address (struct MPT2SAS_ADAPTER *ioc,u64 sas_address); -void mpt2sas_scsih_event_callback (struct MPT2SAS_ADAPTER *ioc,u8 VF_ID ,u32 reply); +void mpt2sas_scsih_event_callback (struct MPT2SAS_ADAPTER *ioc,u8 msix_index, +u32 reply);void mpt2sas_scsih_reset_handler (struct MPT2SAS_ADAPTER *ioc,int reset_phase);/* config shared API */ -void mpt2sas_config_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID ,u32 reply); +void mpt2sas_config_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 msix_index, +u32 reply);int mpt2sas_config_get_number_hba_phys (struct MPT2SAS_ADAPTER *ioc,u8 *num_phys);int mpt2sas_config_get_manufacturing_pg0 (struct MPT2SAS_ADAPTER *ioc,Mpi2ConfigReply_t *mpi_reply,Mpi2ManufacturingPage0_t *config_page);
@@ -817,14 +820,17 @@ extern struct device_attribute *mpt2sas_host_attrs[];extern struct device_attribute *mpt2sas_dev_attrs[];void mpt2sas_ctl_init (void );void mpt2sas_ctl_exit (void ); -void mpt2sas_ctl_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID ,u32 reply); +void mpt2sas_ctl_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 msix_index, +u32 reply);void mpt2sas_ctl_reset_handler (struct MPT2SAS_ADAPTER *ioc,int reset_phase); -void mpt2sas_ctl_event_callback (struct MPT2SAS_ADAPTER *ioc,u8 VF_ID ,u32 reply); +void mpt2sas_ctl_event_callback (struct MPT2SAS_ADAPTER *ioc,u8 msix_index, +u32 reply);void mpt2sas_ctl_add_to_event_log (struct MPT2SAS_ADAPTER *ioc,Mpi2EventNotificationReply_t *mpi_reply);/* transport shared API */ -void mpt2sas_transport_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID ,u32 reply); +void mpt2sas_transport_done (struct MPT2SAS_ADAPTER *ioc,u16 smid, +u8 msix_index,u32 reply);struct _sas_port *mpt2sas_transport_port_add (struct MPT2SAS_ADAPTER *ioc,u16 handle,u16 parent_handle); void mpt2sas_transport_port_remove(struct MPT2SAS_ADAPTER *ioc, u64 sas_address,
drivers/scsi/mpt2sas/mpt2sas_config.c +7 -3
@@ -227,7 +227,7 @@ _config_free_config_dma_memory(struct MPT2SAS_ADAPTER *ioc,* mpt2sas_config_done - config page completion routine * @ioc: per adapter object * @smid: system request message index -* @VF_ID: virtual function id +* @msix_index: MSIX table index supplied by the OS * @reply: reply message frame(lower 32bit addr) * Context: none. *
@@ -236,7 +236,8 @@ _config_free_config_dma_memory(struct MPT2SAS_ADAPTER *ioc,* Return nothing. */ void -mpt2sas_config_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID ,u32 reply) +mpt2sas_config_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 msix_index, +u32 reply) {MPI2DefaultReply_t *mpi_reply;
@@ -303,6 +304,9 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t retry_count =0 ;memset (&mem,0 ,sizeof (struct config_request )); + mpi_request->VF_ID =0 ;/* TODO */ + mpi_request->VP_ID =0 ; +if (config_page) { mpi_request->Header.PageVersion = mpi_reply->Header.PageVersion; mpi_request->Header.PageNumber = mpi_reply->Header.PageNumber;
@@ -380,7 +384,7 @@ _config_request(struct MPT2SAS_ADAPTER *ioc, Mpi2ConfigRequest_t_config_display_some_debug (ioc, smid,"config_request" ,NULL );#endif init_completion (&ioc->config_cmds.done); -mpt2sas_base_put_smid_default (ioc, smid, config_request->VF_ID); +mpt2sas_base_put_smid_default (ioc, smid); timeleft =wait_for_completion_timeout (&ioc->config_cmds.done, timeout*HZ );if (!(ioc->config_cmds.status &MPT2_CMD_COMPLETE )) {
drivers/scsi/mpt2sas/mpt2sas_ctl.c +22 -13
@@ -219,7 +219,7 @@ _ctl_display_some_debug(struct MPT2SAS_ADAPTER *ioc, u16 smid,* mpt2sas_ctl_done - ctl module completion routine * @ioc: per adapter object * @smid: system request message index -* @VF_ID: virtual function id +* @msix_index: MSIX table index supplied by the OS * @reply: reply message frame(lower 32bit addr) * Context: none. *
@@ -228,7 +228,8 @@ _ctl_display_some_debug(struct MPT2SAS_ADAPTER *ioc, u16 smid,* Return nothing. */ void -mpt2sas_ctl_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID ,u32 reply) +mpt2sas_ctl_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 msix_index, +u32 reply) {MPI2DefaultReply_t *mpi_reply;
@@ -328,7 +329,7 @@ mpt2sas_ctl_add_to_event_log(struct MPT2SAS_ADAPTER *ioc,/** * mpt2sas_ctl_event_callback - firmware event handler (called at ISR time) * @ioc: per adapter object -* @VF_ID: virtual function id +* @msix_index: MSIX table index supplied by the OS * @reply: reply message frame(lower 32bit addr) * Context: interrupt. *
@@ -338,7 +339,8 @@ mpt2sas_ctl_add_to_event_log(struct MPT2SAS_ADAPTER *ioc,* Return nothing. */ void -mpt2sas_ctl_event_callback (struct MPT2SAS_ADAPTER *ioc,u8 VF_ID ,u32 reply) +mpt2sas_ctl_event_callback (struct MPT2SAS_ADAPTER *ioc,u8 msix_index, +u32 reply) {Mpi2EventNotificationReply_t *mpi_reply;
@@ -737,7 +739,7 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc, (u32 )mpt2sas_base_get_sense_buffer_dma (ioc, smid); priv_sense =mpt2sas_base_get_sense_buffer (ioc, smid);memset (priv_sense,0 ,SCSI_SENSE_BUFFERSIZE ); -mpt2sas_base_put_smid_scsi_io (ioc, smid,0 , +mpt2sas_base_put_smid_scsi_io (ioc, smid,le16_to_cpu (mpi_request->FunctionDependent1));break ; }
@@ -759,8 +761,7 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc,mutex_lock (&ioc->tm_cmds.mutex);mpt2sas_scsih_set_tm_flag (ioc,le16_to_cpu ( tm_request->DevHandle)); -mpt2sas_base_put_smid_hi_priority (ioc, smid, - mpi_request->VF_ID); +mpt2sas_base_put_smid_hi_priority (ioc, smid);break ; }case MPI2_FUNCTION_SMP_PASSTHROUGH :
@@ -781,7 +782,7 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc, ioc->ioc_link_reset_in_progress =1 ; ioc->ignore_loginfos =1 ; } -mpt2sas_base_put_smid_default (ioc, smid, mpi_request->VF_ID); +mpt2sas_base_put_smid_default (ioc, smid);break ; }case MPI2_FUNCTION_SAS_IO_UNIT_CONTROL :
@@ -795,11 +796,11 @@ _ctl_do_mpt_command(struct MPT2SAS_ADAPTER *ioc, ioc->ioc_link_reset_in_progress =1 ; ioc->ignore_loginfos =1 ; } -mpt2sas_base_put_smid_default (ioc, smid, mpi_request->VF_ID); +mpt2sas_base_put_smid_default (ioc, smid);break ; }default : -mpt2sas_base_put_smid_default (ioc, smid, mpi_request->VF_ID); +mpt2sas_base_put_smid_default (ioc, smid);break ; }
@@ -1371,6 +1372,8 @@ _ctl_diag_register(void __user *arg, enum block_state state) mpi_request->Flags =cpu_to_le32 (karg.diagnostic_flags); mpi_request->BufferAddress =cpu_to_le64 (request_data_dma); mpi_request->BufferLength =cpu_to_le32 (request_data_sz); + mpi_request->VF_ID =0 ;/* TODO */ + mpi_request->VP_ID =0 ; dctlprintk(ioc, printk(MPT2SAS_DEBUG_FMT "%s: diag_buffer(0x%p), " "dma(0x%llx), sz(%d)\n", ioc->name, __func__, request_data,
@@ -1380,7 +1383,7 @@ _ctl_diag_register(void __user *arg, enum block_state state) mpi_request->ProductSpecific[i] =cpu_to_le32 (ioc->product_specific[buffer_type][i]); -mpt2sas_base_put_smid_default (ioc, smid, mpi_request->VF_ID); +mpt2sas_base_put_smid_default (ioc, smid); timeleft =wait_for_completion_timeout (&ioc->ctl_cmds.done,MPT2_IOCTL_DEFAULT_TIMEOUT *HZ );
@@ -1643,8 +1646,10 @@ _ctl_send_release(struct MPT2SAS_ADAPTER *ioc, u8 buffer_type, u8 *issue_reset) mpi_request->Function =MPI2_FUNCTION_DIAG_RELEASE ; mpi_request->BufferType = buffer_type; + mpi_request->VF_ID =0 ;/* TODO */ + mpi_request->VP_ID =0 ; -mpt2sas_base_put_smid_default (ioc, smid, mpi_request->VF_ID); +mpt2sas_base_put_smid_default (ioc, smid); timeleft =wait_for_completion_timeout (&ioc->ctl_cmds.done,MPT2_IOCTL_DEFAULT_TIMEOUT *HZ );
@@ -1902,8 +1907,10 @@ _ctl_diag_read_buffer(void __user *arg, enum block_state state)for (i =0 ; i <MPT2_PRODUCT_SPECIFIC_DWORDS ; i++) mpi_request->ProductSpecific[i] =cpu_to_le32 (ioc->product_specific[buffer_type][i]); + mpi_request->VF_ID =0 ;/* TODO */ + mpi_request->VP_ID =0 ; -mpt2sas_base_put_smid_default (ioc, smid, mpi_request->VF_ID); +mpt2sas_base_put_smid_default (ioc, smid); timeleft =wait_for_completion_timeout (&ioc->ctl_cmds.done,MPT2_IOCTL_DEFAULT_TIMEOUT *HZ );
@@ -2069,6 +2076,7 @@ static long _ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { long ret; +lock_kernel (); ret =_ctl_ioctl_main (file, cmd, (void __user *)arg);unlock_kernel ();
@@ -2143,6 +2151,7 @@ static long _ctl_ioctl_compat(struct file *file, unsigned cmd, unsigned long arg) { long ret; +lock_kernel ();if (cmd ==MPT2COMMAND32 ) ret =_ctl_compat_mpt_command (file, cmd, arg);
drivers/scsi/mpt2sas/mpt2sas_scsih.c +78 -70
428 lines not on this page · raw message
drivers/scsi/mpt2sas/mpt2sas_transport.c +8 -4
@@ -212,7 +212,7 @@ _transport_set_identify(struct MPT2SAS_ADAPTER *ioc, u16 handle,* mpt2sas_transport_done - internal transport layer callback handler. * @ioc: per adapter object * @smid: system request message index -* @VF_ID: virtual function id +* @msix_index: MSIX table index supplied by the OS * @reply: reply message frame(lower 32bit addr) * * Callback handler when sending internal generated transport cmds.
@@ -221,7 +221,7 @@ _transport_set_identify(struct MPT2SAS_ADAPTER *ioc, u16 handle,* Return nothing. */ void -mpt2sas_transport_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 VF_ID , +mpt2sas_transport_done (struct MPT2SAS_ADAPTER *ioc,u16 smid,u8 msix_index,u32 reply) {MPI2DefaultReply_t *mpi_reply;
@@ -369,6 +369,8 @@ _transport_expander_report_manufacture(struct MPT2SAS_ADAPTER *ioc,memset (mpi_request,0 ,sizeof (Mpi2SmpPassthroughRequest_t)); mpi_request->Function =MPI2_FUNCTION_SMP_PASSTHROUGH ; mpi_request->PhysicalPort =0xFF ; + mpi_request->VF_ID =0 ;/* TODO */ + mpi_request->VP_ID =0 ; sas_address_le = (u64 *)&mpi_request->SASAddress; *sas_address_le =cpu_to_le64 (sas_address); mpi_request->RequestDataLength =sizeof (struct rep_manu_request );
@@ -396,7 +398,7 @@ _transport_expander_report_manufacture(struct MPT2SAS_ADAPTER *ioc,dtransportprintk (ioc,printk (MPT2SAS_DEBUG_FMT "report_manufacture - " "send to sas_addr(0x%016llx)\n" , ioc->name, (unsigned long long )sas_address)); -mpt2sas_base_put_smid_default (ioc, smid,0 /* VF_ID */ ); +mpt2sas_base_put_smid_default (ioc, smid); timeleft =wait_for_completion_timeout (&ioc->transport_cmds.done,10 *HZ );
@@ -1106,6 +1108,8 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,memset (mpi_request,0 ,sizeof (Mpi2SmpPassthroughRequest_t)); mpi_request->Function =MPI2_FUNCTION_SMP_PASSTHROUGH ; mpi_request->PhysicalPort =0xFF ; + mpi_request->VF_ID =0 ;/* TODO */ + mpi_request->VP_ID =0 ; *((u64 *)&mpi_request->SASAddress) = (rphy) ?cpu_to_le64 (rphy->identify.sas_address) :cpu_to_le64 (ioc->sas_hba.sas_address);
@@ -1147,7 +1151,7 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,dtransportprintk (ioc,printk (MPT2SAS_DEBUG_FMT "%s - " "sending smp request\n" , ioc->name, __func__)); -mpt2sas_base_put_smid_default (ioc, smid,0 /* VF_ID */ ); +mpt2sas_base_put_smid_default (ioc, smid); timeleft =wait_for_completion_timeout (&ioc->transport_cmds.done,10 *HZ );
James Bottomley
maintainerdrivers/scsi/mpt2sas/mpt2sas_scsih.c _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID, · line 3827
Quoted 5 lines · Desai
drivers/scsi/mpt2sas/mpt2sas_scsih.c +1
-0@@ -3818,6 +3824,7 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,struct _sas_node *sas_expander;unsigned long flags;u8 link_rate_; +Mpi2EventDataSasTopologyChangeList_t *event_data = fw_event->event_data;
This causes an unused variable warning when logging is disabled.
James
James,
My compilation environment is always logging enabled. Next time onwards I will perform both the combination before patch submission. this variable usage should be under #define CONFIG_SCSI_MPT2SAS_LOGGING.
Shall I send complete patch set once again or only affected patch ?
Thanks,
Kashyap
________________________________________
From: James Bottomley [[email protected]]
Sent: Thursday, September 24, 2009 2:39 PM
To: Desai, Kashyap
Cc: [email protected]; Moore, Eric; Prakash, Sathya
Subject: Re: [PATCH 1/9] mpt2sas: Update driver to MPI2 REV K headers.
drivers/scsi/mpt2sas/mpt2sas_scsih.c _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID, · line 3827
Quoted 5 lines · Desai
drivers/scsi/mpt2sas/mpt2sas_scsih.c +1
-0@@ -3818,6 +3824,7 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc, u8 VF_ID,struct _sas_node *sas_expander;unsigned long flags;u8 link_rate_; +Mpi2EventDataSasTopologyChangeList_t *event_data = fw_event->event_data;
This causes an unused variable warning when logging is disabled.
James
James Bottomley
maintainerQuoted 6 lines · Kashyap
James,
My compilation environment is always logging enabled. Next time onwards I will perform both the combination before patch submission. this variable usage should be under #define
CONFIG_SCSI_MPT2SAS_LOGGING.Shall I send complete patch set once again or only affected patch ?
Only the affected patch is fine.
James