Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: Documentation/feature-removal-schedule.txt drivers/scsi/fcoe/fcoe.c net/core/drop_monitor.c net/core/net-traces.c
This commit is contained in:
@@ -130,7 +130,7 @@ mpi_ioc.h
|
||||
* 08-08-01 01.02.01 Original release for v1.2 work.
|
||||
* New format for FWVersion and ProductId in
|
||||
* MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
|
||||
* 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and
|
||||
* 08-31-01 01.02.02 Added event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and
|
||||
* related structure and defines.
|
||||
* Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
|
||||
* Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
|
||||
@@ -190,7 +190,7 @@ mpi_ioc.h
|
||||
* 10-11-06 01.05.12 Added MPI_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED.
|
||||
* Added MaxInitiators field to PortFacts reply.
|
||||
* Added SAS Device Status Change ReasonCode for
|
||||
* asynchronous notificaiton.
|
||||
* asynchronous notification.
|
||||
* Added MPI_EVENT_SAS_EXPANDER_STATUS_CHANGE and event
|
||||
* data structure.
|
||||
* Added new ImageType values for FWDownload and FWUpload
|
||||
@@ -623,7 +623,7 @@ mpi_fc.h
|
||||
* 11-02-00 01.01.01 Original release for post 1.0 work
|
||||
* 12-04-00 01.01.02 Added messages for Common Transport Send and
|
||||
* Primitive Send.
|
||||
* 01-09-01 01.01.03 Modifed some of the new flags to have an MPI prefix
|
||||
* 01-09-01 01.01.03 Modified some of the new flags to have an MPI prefix
|
||||
* and modified the FcPrimitiveSend flags.
|
||||
* 01-25-01 01.01.04 Move InitiatorIndex in LinkServiceRsp reply to a larger
|
||||
* field.
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -76,8 +76,8 @@
|
||||
#define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR
|
||||
#endif
|
||||
|
||||
#define MPT_LINUX_VERSION_COMMON "3.04.07"
|
||||
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.07"
|
||||
#define MPT_LINUX_VERSION_COMMON "3.04.10"
|
||||
#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.09"
|
||||
#define WHAT_MAGIC_STRING "@" "(" "#" ")"
|
||||
|
||||
#define show_mptmod_ver(s,ver) \
|
||||
@@ -104,6 +104,7 @@
|
||||
#endif
|
||||
|
||||
#define MPT_NAME_LENGTH 32
|
||||
#define MPT_KOBJ_NAME_LEN 20
|
||||
|
||||
#define MPT_PROCFS_MPTBASEDIR "mpt"
|
||||
/* chg it to "driver/fusion" ? */
|
||||
@@ -134,6 +135,7 @@
|
||||
|
||||
#define MPT_COALESCING_TIMEOUT 0x10
|
||||
|
||||
|
||||
/*
|
||||
* SCSI transfer rate defines.
|
||||
*/
|
||||
@@ -161,10 +163,10 @@
|
||||
/*
|
||||
* Set the MAX_SGE value based on user input.
|
||||
*/
|
||||
#ifdef CONFIG_FUSION_MAX_SGE
|
||||
#if CONFIG_FUSION_MAX_SGE < 16
|
||||
#ifdef CONFIG_FUSION_MAX_SGE
|
||||
#if CONFIG_FUSION_MAX_SGE < 16
|
||||
#define MPT_SCSI_SG_DEPTH 16
|
||||
#elif CONFIG_FUSION_MAX_SGE > 128
|
||||
#elif CONFIG_FUSION_MAX_SGE > 128
|
||||
#define MPT_SCSI_SG_DEPTH 128
|
||||
#else
|
||||
#define MPT_SCSI_SG_DEPTH CONFIG_FUSION_MAX_SGE
|
||||
@@ -173,6 +175,18 @@
|
||||
#define MPT_SCSI_SG_DEPTH 40
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FUSION_MAX_FC_SGE
|
||||
#if CONFIG_FUSION_MAX_FC_SGE < 16
|
||||
#define MPT_SCSI_FC_SG_DEPTH 16
|
||||
#elif CONFIG_FUSION_MAX_FC_SGE > 256
|
||||
#define MPT_SCSI_FC_SG_DEPTH 256
|
||||
#else
|
||||
#define MPT_SCSI_FC_SG_DEPTH CONFIG_FUSION_MAX_FC_SGE
|
||||
#endif
|
||||
#else
|
||||
#define MPT_SCSI_FC_SG_DEPTH 40
|
||||
#endif
|
||||
|
||||
/* debug print string length used for events and iocstatus */
|
||||
# define EVENT_DESCR_STR_SZ 100
|
||||
|
||||
@@ -431,38 +445,36 @@ do { \
|
||||
* IOCTL structure and associated defines
|
||||
*/
|
||||
|
||||
#define MPT_IOCTL_STATUS_DID_IOCRESET 0x01 /* IOC Reset occurred on the current*/
|
||||
#define MPT_IOCTL_STATUS_RF_VALID 0x02 /* The Reply Frame is VALID */
|
||||
#define MPT_IOCTL_STATUS_TIMER_ACTIVE 0x04 /* The timer is running */
|
||||
#define MPT_IOCTL_STATUS_SENSE_VALID 0x08 /* Sense data is valid */
|
||||
#define MPT_IOCTL_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */
|
||||
#define MPT_IOCTL_STATUS_TMTIMER_ACTIVE 0x20 /* The TM timer is running */
|
||||
#define MPT_IOCTL_STATUS_TM_FAILED 0x40 /* User TM request failed */
|
||||
|
||||
#define MPTCTL_RESET_OK 0x01 /* Issue Bus Reset */
|
||||
|
||||
typedef struct _MPT_IOCTL {
|
||||
struct _MPT_ADAPTER *ioc;
|
||||
u8 ReplyFrame[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */
|
||||
u8 sense[MPT_SENSE_BUFFER_ALLOC];
|
||||
int wait_done; /* wake-up value for this ioc */
|
||||
u8 rsvd;
|
||||
u8 status; /* current command status */
|
||||
u8 reset; /* 1 if bus reset allowed */
|
||||
u8 id; /* target for reset */
|
||||
struct mutex ioctl_mutex;
|
||||
} MPT_IOCTL;
|
||||
#define MPT_MGMT_STATUS_RF_VALID 0x01 /* The Reply Frame is VALID */
|
||||
#define MPT_MGMT_STATUS_COMMAND_GOOD 0x02 /* Command Status GOOD */
|
||||
#define MPT_MGMT_STATUS_PENDING 0x04 /* command is pending */
|
||||
#define MPT_MGMT_STATUS_DID_IOCRESET 0x08 /* IOC Reset occurred
|
||||
on the current*/
|
||||
#define MPT_MGMT_STATUS_SENSE_VALID 0x10 /* valid sense info */
|
||||
#define MPT_MGMT_STATUS_TIMER_ACTIVE 0x20 /* obsolete */
|
||||
#define MPT_MGMT_STATUS_FREE_MF 0x40 /* free the mf from
|
||||
complete routine */
|
||||
|
||||
#define MPT_SAS_MGMT_STATUS_RF_VALID 0x02 /* The Reply Frame is VALID */
|
||||
#define MPT_SAS_MGMT_STATUS_COMMAND_GOOD 0x10 /* Command Status GOOD */
|
||||
#define MPT_SAS_MGMT_STATUS_TM_FAILED 0x40 /* User TM request failed */
|
||||
#define INITIALIZE_MGMT_STATUS(status) \
|
||||
status = MPT_MGMT_STATUS_PENDING;
|
||||
#define CLEAR_MGMT_STATUS(status) \
|
||||
status = 0;
|
||||
#define CLEAR_MGMT_PENDING_STATUS(status) \
|
||||
status &= ~MPT_MGMT_STATUS_PENDING;
|
||||
#define SET_MGMT_MSG_CONTEXT(msg_context, value) \
|
||||
msg_context = value;
|
||||
|
||||
typedef struct _MPT_SAS_MGMT {
|
||||
typedef struct _MPT_MGMT {
|
||||
struct mutex mutex;
|
||||
struct completion done;
|
||||
u8 reply[MPT_DEFAULT_FRAME_SIZE]; /* reply frame data */
|
||||
u8 sense[MPT_SENSE_BUFFER_ALLOC];
|
||||
u8 status; /* current command status */
|
||||
}MPT_SAS_MGMT;
|
||||
int completion_code;
|
||||
u32 msg_context;
|
||||
} MPT_MGMT;
|
||||
|
||||
/*
|
||||
* Event Structure and define
|
||||
@@ -564,6 +576,10 @@ struct mptfc_rport_info
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
typedef void (*MPT_ADD_SGE)(void *pAddr, u32 flagslength, dma_addr_t dma_addr);
|
||||
typedef void (*MPT_ADD_CHAIN)(void *pAddr, u8 next, u16 length,
|
||||
dma_addr_t dma_addr);
|
||||
|
||||
/*
|
||||
* Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS
|
||||
*/
|
||||
@@ -573,6 +589,10 @@ typedef struct _MPT_ADAPTER
|
||||
int pci_irq; /* This irq */
|
||||
char name[MPT_NAME_LENGTH]; /* "iocN" */
|
||||
char prod_name[MPT_NAME_LENGTH]; /* "LSIFC9x9" */
|
||||
#ifdef CONFIG_FUSION_LOGGING
|
||||
/* used in mpt_display_event_info */
|
||||
char evStr[EVENT_DESCR_STR_SZ];
|
||||
#endif
|
||||
char board_name[16];
|
||||
char board_assembly[16];
|
||||
char board_tracer[16];
|
||||
@@ -600,6 +620,10 @@ typedef struct _MPT_ADAPTER
|
||||
int reply_depth; /* Num Allocated reply frames */
|
||||
int reply_sz; /* Reply frame size */
|
||||
int num_chain; /* Number of chain buffers */
|
||||
MPT_ADD_SGE add_sge; /* Pointer to add_sge
|
||||
function */
|
||||
MPT_ADD_CHAIN add_chain; /* Pointer to add_chain
|
||||
function */
|
||||
/* Pool of buffers for chaining. ReqToChain
|
||||
* and ChainToChain track index of chain buffers.
|
||||
* ChainBuffer (DMA) virt/phys addresses.
|
||||
@@ -640,11 +664,8 @@ typedef struct _MPT_ADAPTER
|
||||
RaidCfgData raid_data; /* Raid config. data */
|
||||
SasCfgData sas_data; /* Sas config. data */
|
||||
FcCfgData fc_data; /* Fc config. data */
|
||||
MPT_IOCTL *ioctl; /* ioctl data pointer */
|
||||
struct proc_dir_entry *ioc_dentry;
|
||||
struct _MPT_ADAPTER *alt_ioc; /* ptr to 929 bound adapter port */
|
||||
spinlock_t diagLock; /* diagnostic reset lock */
|
||||
int diagPending;
|
||||
u32 biosVersion; /* BIOS version from IO Unit Page 2 */
|
||||
int eventTypes; /* Event logging parameters */
|
||||
int eventContext; /* Next event context */
|
||||
@@ -652,7 +673,6 @@ typedef struct _MPT_ADAPTER
|
||||
struct _mpt_ioctl_events *events; /* pointer to event log */
|
||||
u8 *cached_fw; /* Pointer to FW */
|
||||
dma_addr_t cached_fw_dma;
|
||||
struct list_head configQ; /* linked list of config. requests */
|
||||
int hs_reply_idx;
|
||||
#ifndef MFCNT
|
||||
u32 pad0;
|
||||
@@ -665,9 +685,6 @@ typedef struct _MPT_ADAPTER
|
||||
IOCFactsReply_t facts;
|
||||
PortFactsReply_t pfacts[2];
|
||||
FCPortPage0_t fc_port_page0[2];
|
||||
struct timer_list persist_timer; /* persist table timer */
|
||||
int persist_wait_done; /* persist completion flag */
|
||||
u8 persist_reply_frame[MPT_DEFAULT_FRAME_SIZE]; /* persist reply */
|
||||
LANPage0_t lan_cnfg_page0;
|
||||
LANPage1_t lan_cnfg_page1;
|
||||
|
||||
@@ -682,23 +699,44 @@ typedef struct _MPT_ADAPTER
|
||||
int aen_event_read_flag; /* flag to indicate event log was read*/
|
||||
u8 FirstWhoInit;
|
||||
u8 upload_fw; /* If set, do a fw upload */
|
||||
u8 reload_fw; /* Force a FW Reload on next reset */
|
||||
u8 NBShiftFactor; /* NB Shift Factor based on Block Size (Facts) */
|
||||
u8 pad1[4];
|
||||
u8 DoneCtx;
|
||||
u8 TaskCtx;
|
||||
u8 InternalCtx;
|
||||
spinlock_t initializing_hba_lock;
|
||||
int initializing_hba_lock_flag;
|
||||
struct list_head list;
|
||||
struct net_device *netdev;
|
||||
struct list_head sas_topology;
|
||||
struct mutex sas_topology_mutex;
|
||||
|
||||
struct workqueue_struct *fw_event_q;
|
||||
struct list_head fw_event_list;
|
||||
spinlock_t fw_event_lock;
|
||||
u8 fw_events_off; /* if '1', then ignore events */
|
||||
char fw_event_q_name[MPT_KOBJ_NAME_LEN];
|
||||
|
||||
struct mutex sas_discovery_mutex;
|
||||
u8 sas_discovery_runtime;
|
||||
u8 sas_discovery_ignore_events;
|
||||
|
||||
/* port_info object for the host */
|
||||
struct mptsas_portinfo *hba_port_info;
|
||||
u64 hba_port_sas_addr;
|
||||
u16 hba_port_num_phy;
|
||||
struct list_head sas_device_info_list;
|
||||
struct mutex sas_device_info_mutex;
|
||||
u8 old_sas_discovery_protocal;
|
||||
u8 sas_discovery_quiesce_io;
|
||||
int sas_index; /* index refrencing */
|
||||
MPT_SAS_MGMT sas_mgmt;
|
||||
MPT_MGMT sas_mgmt;
|
||||
MPT_MGMT mptbase_cmds; /* for sending config pages */
|
||||
MPT_MGMT internal_cmds;
|
||||
MPT_MGMT taskmgmt_cmds;
|
||||
MPT_MGMT ioctl_cmds;
|
||||
spinlock_t taskmgmt_lock; /* diagnostic reset lock */
|
||||
int taskmgmt_in_progress;
|
||||
u8 taskmgmt_quiesce_io;
|
||||
u8 ioc_reset_in_progress;
|
||||
struct work_struct sas_persist_task;
|
||||
|
||||
struct work_struct fc_setup_reset_work;
|
||||
@@ -707,15 +745,27 @@ typedef struct _MPT_ADAPTER
|
||||
u8 fc_link_speed[2];
|
||||
spinlock_t fc_rescan_work_lock;
|
||||
struct work_struct fc_rescan_work;
|
||||
char fc_rescan_work_q_name[20];
|
||||
char fc_rescan_work_q_name[MPT_KOBJ_NAME_LEN];
|
||||
struct workqueue_struct *fc_rescan_work_q;
|
||||
|
||||
/* driver forced bus resets count */
|
||||
unsigned long hard_resets;
|
||||
/* fw/external bus resets count */
|
||||
unsigned long soft_resets;
|
||||
/* cmd timeouts */
|
||||
unsigned long timeouts;
|
||||
|
||||
struct scsi_cmnd **ScsiLookup;
|
||||
spinlock_t scsi_lookup_lock;
|
||||
|
||||
char reset_work_q_name[20];
|
||||
u64 dma_mask;
|
||||
u32 broadcast_aen_busy;
|
||||
char reset_work_q_name[MPT_KOBJ_NAME_LEN];
|
||||
struct workqueue_struct *reset_work_q;
|
||||
struct delayed_work fault_reset_work;
|
||||
spinlock_t fault_reset_work_lock;
|
||||
|
||||
u8 sg_addr_size;
|
||||
u8 in_rescan;
|
||||
u8 SGE_size;
|
||||
|
||||
} MPT_ADAPTER;
|
||||
|
||||
@@ -753,13 +803,14 @@ typedef struct _mpt_sge {
|
||||
dma_addr_t Address;
|
||||
} MptSge_t;
|
||||
|
||||
#define mpt_addr_size() \
|
||||
((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SGE_FLAGS_64_BIT_ADDRESSING : \
|
||||
MPI_SGE_FLAGS_32_BIT_ADDRESSING)
|
||||
|
||||
#define mpt_msg_flags() \
|
||||
((sizeof(dma_addr_t) == sizeof(u64)) ? MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \
|
||||
MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32)
|
||||
#define mpt_msg_flags(ioc) \
|
||||
(ioc->sg_addr_size == sizeof(u64)) ? \
|
||||
MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_64 : \
|
||||
MPI_SCSIIO_MSGFLGS_SENSE_WIDTH_32
|
||||
|
||||
#define MPT_SGE_FLAGS_64_BIT_ADDRESSING \
|
||||
(MPI_SGE_FLAGS_64_BIT_ADDRESSING << MPI_SGE_FLAGS_SHIFT)
|
||||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
/*
|
||||
@@ -835,22 +886,14 @@ typedef struct _MPT_SCSI_HOST {
|
||||
/* Pool of memory for holding SCpnts before doing
|
||||
* OS callbacks. freeQ is the free pool.
|
||||
*/
|
||||
u8 tmPending;
|
||||
u8 resetPending;
|
||||
u8 negoNvram; /* DV disabled, nego NVRAM */
|
||||
u8 pad1;
|
||||
u8 tmState;
|
||||
u8 rsvd[2];
|
||||
MPT_FRAME_HDR *cmdPtr; /* Ptr to nonOS request */
|
||||
struct scsi_cmnd *abortSCpnt;
|
||||
MPT_LOCAL_REPLY localReply; /* internal cmd reply struct */
|
||||
unsigned long hard_resets; /* driver forced bus resets count */
|
||||
unsigned long soft_resets; /* fw/external bus resets count */
|
||||
unsigned long timeouts; /* cmd timeouts */
|
||||
ushort sel_timeout[MPT_MAX_FC_DEVICES];
|
||||
char *info_kbuf;
|
||||
wait_queue_head_t scandv_waitq;
|
||||
int scandv_wait_done;
|
||||
long last_queue_full;
|
||||
u16 tm_iocstatus;
|
||||
u16 spi_pending;
|
||||
@@ -870,21 +913,16 @@ struct scsi_cmnd;
|
||||
* Generic structure passed to the base mpt_config function.
|
||||
*/
|
||||
typedef struct _x_config_parms {
|
||||
struct list_head linkage; /* linked list */
|
||||
struct timer_list timer; /* timer function for this request */
|
||||
union {
|
||||
ConfigExtendedPageHeader_t *ehdr;
|
||||
ConfigPageHeader_t *hdr;
|
||||
} cfghdr;
|
||||
dma_addr_t physAddr;
|
||||
int wait_done; /* wait for this request */
|
||||
u32 pageAddr; /* properly formatted */
|
||||
u16 status;
|
||||
u8 action;
|
||||
u8 dir;
|
||||
u8 timeout; /* seconds */
|
||||
u8 pad1;
|
||||
u16 status;
|
||||
u16 pad2;
|
||||
} CONFIGPARMS;
|
||||
|
||||
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
@@ -909,7 +947,6 @@ extern MPT_FRAME_HDR *mpt_get_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc);
|
||||
extern void mpt_free_msg_frame(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
|
||||
extern void mpt_put_msg_frame(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
|
||||
extern void mpt_put_msg_frame_hi_pri(u8 cb_idx, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
|
||||
extern void mpt_add_sge(char *pAddr, u32 flagslength, dma_addr_t dma_addr);
|
||||
|
||||
extern int mpt_send_handshake_request(u8 cb_idx, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag);
|
||||
extern int mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp);
|
||||
@@ -922,6 +959,12 @@ extern void mpt_free_fw_memory(MPT_ADAPTER *ioc);
|
||||
extern int mpt_findImVolumes(MPT_ADAPTER *ioc);
|
||||
extern int mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode);
|
||||
extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk);
|
||||
extern int mpt_raid_phys_disk_pg1(MPT_ADAPTER *ioc, u8 phys_disk_num,
|
||||
pRaidPhysDiskPage1_t phys_disk);
|
||||
extern int mpt_raid_phys_disk_get_num_paths(MPT_ADAPTER *ioc,
|
||||
u8 phys_disk_num);
|
||||
extern int mpt_set_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc);
|
||||
extern void mpt_clear_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc);
|
||||
extern void mpt_halt_firmware(MPT_ADAPTER *ioc);
|
||||
|
||||
|
||||
@@ -959,7 +1002,6 @@ extern int mpt_fwfault_debug;
|
||||
#define MPT_SGE_FLAGS_END_OF_BUFFER (0x40000000)
|
||||
#define MPT_SGE_FLAGS_LOCAL_ADDRESS (0x08000000)
|
||||
#define MPT_SGE_FLAGS_DIRECTION (0x04000000)
|
||||
#define MPT_SGE_FLAGS_ADDRESSING (mpt_addr_size() << MPI_SGE_FLAGS_SHIFT)
|
||||
#define MPT_SGE_FLAGS_END_OF_LIST (0x01000000)
|
||||
|
||||
#define MPT_SGE_FLAGS_TRANSACTION_ELEMENT (0x00000000)
|
||||
@@ -972,14 +1014,12 @@ extern int mpt_fwfault_debug;
|
||||
MPT_SGE_FLAGS_END_OF_BUFFER | \
|
||||
MPT_SGE_FLAGS_END_OF_LIST | \
|
||||
MPT_SGE_FLAGS_SIMPLE_ELEMENT | \
|
||||
MPT_SGE_FLAGS_ADDRESSING | \
|
||||
MPT_TRANSFER_IOC_TO_HOST)
|
||||
#define MPT_SGE_FLAGS_SSIMPLE_WRITE \
|
||||
(MPT_SGE_FLAGS_LAST_ELEMENT | \
|
||||
MPT_SGE_FLAGS_END_OF_BUFFER | \
|
||||
MPT_SGE_FLAGS_END_OF_LIST | \
|
||||
MPT_SGE_FLAGS_SIMPLE_ELEMENT | \
|
||||
MPT_SGE_FLAGS_ADDRESSING | \
|
||||
MPT_TRANSFER_HOST_TO_IOC)
|
||||
|
||||
/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -58,6 +58,7 @@
|
||||
#define MPT_DEBUG_FC 0x00080000
|
||||
#define MPT_DEBUG_SAS 0x00100000
|
||||
#define MPT_DEBUG_SAS_WIDE 0x00200000
|
||||
#define MPT_DEBUG_36GB_MEM 0x00400000
|
||||
|
||||
/*
|
||||
* CONFIG_FUSION_LOGGING - enabled in Kconfig
|
||||
@@ -135,6 +136,8 @@
|
||||
#define dsaswideprintk(IOC, CMD) \
|
||||
MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_SAS_WIDE)
|
||||
|
||||
#define d36memprintk(IOC, CMD) \
|
||||
MPT_CHECK_LOGGING(IOC, CMD, MPT_DEBUG_36GB_MEM)
|
||||
|
||||
|
||||
/*
|
||||
|
@@ -1251,17 +1251,15 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
* A slightly different algorithm is required for
|
||||
* 64bit SGEs.
|
||||
*/
|
||||
scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32));
|
||||
if (sizeof(dma_addr_t) == sizeof(u64)) {
|
||||
scale = ioc->req_sz/ioc->SGE_size;
|
||||
if (ioc->sg_addr_size == sizeof(u64)) {
|
||||
numSGE = (scale - 1) *
|
||||
(ioc->facts.MaxChainDepth-1) + scale +
|
||||
(ioc->req_sz - 60) / (sizeof(dma_addr_t) +
|
||||
sizeof(u32));
|
||||
(ioc->req_sz - 60) / ioc->SGE_size;
|
||||
} else {
|
||||
numSGE = 1 + (scale - 1) *
|
||||
(ioc->facts.MaxChainDepth-1) + scale +
|
||||
(ioc->req_sz - 64) / (sizeof(dma_addr_t) +
|
||||
sizeof(u32));
|
||||
(ioc->req_sz - 64) / ioc->SGE_size;
|
||||
}
|
||||
|
||||
if (numSGE < sh->sg_tablesize) {
|
||||
@@ -1292,9 +1290,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
/* Clear the TM flags
|
||||
*/
|
||||
hd->tmPending = 0;
|
||||
hd->tmState = TM_STATE_NONE;
|
||||
hd->resetPending = 0;
|
||||
hd->abortSCpnt = NULL;
|
||||
|
||||
/* Clear the pointer used to store
|
||||
@@ -1312,8 +1307,6 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
hd->timer.data = (unsigned long) hd;
|
||||
hd->timer.function = mptscsih_timer_expired;
|
||||
|
||||
init_waitqueue_head(&hd->scandv_waitq);
|
||||
hd->scandv_wait_done = 0;
|
||||
hd->last_queue_full = 0;
|
||||
|
||||
sh->transportt = mptfc_transport_template;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,7 @@ struct mptsas_target_reset_event {
|
||||
struct list_head list;
|
||||
EVENT_DATA_SAS_DEVICE_STATUS_CHANGE sas_event_data;
|
||||
u8 target_reset_issued;
|
||||
unsigned long time_count;
|
||||
};
|
||||
|
||||
enum mptsas_hotplug_action {
|
||||
@@ -60,12 +61,37 @@ enum mptsas_hotplug_action {
|
||||
MPTSAS_DEL_DEVICE,
|
||||
MPTSAS_ADD_RAID,
|
||||
MPTSAS_DEL_RAID,
|
||||
MPTSAS_ADD_PHYSDISK,
|
||||
MPTSAS_ADD_PHYSDISK_REPROBE,
|
||||
MPTSAS_DEL_PHYSDISK,
|
||||
MPTSAS_DEL_PHYSDISK_REPROBE,
|
||||
MPTSAS_ADD_INACTIVE_VOLUME,
|
||||
MPTSAS_IGNORE_EVENT,
|
||||
};
|
||||
|
||||
struct mptsas_mapping{
|
||||
u8 id;
|
||||
u8 channel;
|
||||
};
|
||||
|
||||
struct mptsas_device_info {
|
||||
struct list_head list;
|
||||
struct mptsas_mapping os; /* operating system mapping*/
|
||||
struct mptsas_mapping fw; /* firmware mapping */
|
||||
u64 sas_address;
|
||||
u32 device_info; /* specific bits for devices */
|
||||
u16 slot; /* enclosure slot id */
|
||||
u64 enclosure_logical_id; /*enclosure address */
|
||||
u8 is_logical_volume; /* is this logical volume */
|
||||
/* this belongs to volume */
|
||||
u8 is_hidden_raid_component;
|
||||
/* this valid when is_hidden_raid_component set */
|
||||
u8 volume_id;
|
||||
/* cached data for a removed device */
|
||||
u8 is_cached;
|
||||
};
|
||||
|
||||
struct mptsas_hotplug_event {
|
||||
struct work_struct work;
|
||||
MPT_ADAPTER *ioc;
|
||||
enum mptsas_hotplug_action event_type;
|
||||
u64 sas_address;
|
||||
@@ -73,11 +99,18 @@ struct mptsas_hotplug_event {
|
||||
u8 id;
|
||||
u32 device_info;
|
||||
u16 handle;
|
||||
u16 parent_handle;
|
||||
u8 phy_id;
|
||||
u8 phys_disk_num_valid; /* hrc (hidden raid component) */
|
||||
u8 phys_disk_num; /* hrc - unique index*/
|
||||
u8 hidden_raid_component; /* hrc - don't expose*/
|
||||
struct scsi_device *sdev;
|
||||
};
|
||||
|
||||
struct fw_event_work {
|
||||
struct list_head list;
|
||||
struct delayed_work work;
|
||||
MPT_ADAPTER *ioc;
|
||||
u32 event;
|
||||
u8 retries;
|
||||
u8 event_data[1];
|
||||
};
|
||||
|
||||
struct mptsas_discovery_event {
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -60,6 +60,7 @@
|
||||
#define MPT_SCANDV_SELECTION_TIMEOUT (0x00000008)
|
||||
#define MPT_SCANDV_ISSUE_SENSE (0x00000010)
|
||||
#define MPT_SCANDV_FALLBACK (0x00000020)
|
||||
#define MPT_SCANDV_BUSY (0x00000040)
|
||||
|
||||
#define MPT_SCANDV_MAX_RETRIES (10)
|
||||
|
||||
@@ -89,6 +90,7 @@
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _internal_cmd {
|
||||
char *data; /* data pointer */
|
||||
dma_addr_t data_dma; /* data dma address */
|
||||
@@ -112,6 +114,8 @@ extern int mptscsih_resume(struct pci_dev *pdev);
|
||||
extern int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t offset, int length, int func);
|
||||
extern const char * mptscsih_info(struct Scsi_Host *SChost);
|
||||
extern int mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *));
|
||||
extern int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel,
|
||||
u8 id, int lun, int ctx2abort, ulong timeout);
|
||||
extern void mptscsih_slave_destroy(struct scsi_device *device);
|
||||
extern int mptscsih_slave_configure(struct scsi_device *device);
|
||||
extern int mptscsih_abort(struct scsi_cmnd * SCpnt);
|
||||
@@ -126,7 +130,8 @@ extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pE
|
||||
extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
|
||||
extern int mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth);
|
||||
extern void mptscsih_timer_expired(unsigned long data);
|
||||
extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout);
|
||||
extern u8 mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id);
|
||||
extern int mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id);
|
||||
extern struct device_attribute *mptscsih_host_attrs[];
|
||||
extern struct scsi_cmnd *mptscsih_get_scsi_lookup(MPT_ADAPTER *ioc, int i);
|
||||
extern void mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code);
|
||||
|
@@ -300,7 +300,7 @@ mptspi_writeIOCPage4(MPT_SCSI_HOST *hd, u8 channel , u8 id)
|
||||
flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE |
|
||||
(IOCPage4Ptr->Header.PageLength + ii) * 4;
|
||||
|
||||
mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma);
|
||||
ioc->add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma);
|
||||
|
||||
ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT
|
||||
"writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n",
|
||||
@@ -614,19 +614,24 @@ static void mptspi_read_parameters(struct scsi_target *starget)
|
||||
spi_width(starget) = (nego & MPI_SCSIDEVPAGE0_NP_WIDE) ? 1 : 0;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
mptscsih_quiesce_raid(MPT_SCSI_HOST *hd, int quiesce, u8 channel, u8 id)
|
||||
{
|
||||
MPT_ADAPTER *ioc = hd->ioc;
|
||||
MpiRaidActionRequest_t *pReq;
|
||||
MPT_FRAME_HDR *mf;
|
||||
MPT_ADAPTER *ioc = hd->ioc;
|
||||
int ret;
|
||||
unsigned long timeleft;
|
||||
|
||||
mutex_lock(&ioc->internal_cmds.mutex);
|
||||
|
||||
/* Get and Populate a free Frame
|
||||
*/
|
||||
if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) {
|
||||
ddvprintk(ioc, printk(MYIOC_s_WARN_FMT "_do_raid: no msg frames!\n",
|
||||
ioc->name));
|
||||
return -EAGAIN;
|
||||
dfailprintk(hd->ioc, printk(MYIOC_s_WARN_FMT
|
||||
"%s: no msg frames!\n", ioc->name, __func__));
|
||||
ret = -EAGAIN;
|
||||
goto out;
|
||||
}
|
||||
pReq = (MpiRaidActionRequest_t *)mf;
|
||||
if (quiesce)
|
||||
@@ -643,29 +648,36 @@ mptscsih_quiesce_raid(MPT_SCSI_HOST *hd, int quiesce, u8 channel, u8 id)
|
||||
pReq->Reserved2 = 0;
|
||||
pReq->ActionDataWord = 0; /* Reserved for this action */
|
||||
|
||||
mpt_add_sge((char *)&pReq->ActionDataSGE,
|
||||
ioc->add_sge((char *)&pReq->ActionDataSGE,
|
||||
MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
|
||||
|
||||
ddvprintk(ioc, printk(MYIOC_s_DEBUG_FMT "RAID Volume action=%x channel=%d id=%d\n",
|
||||
ioc->name, pReq->Action, channel, id));
|
||||
|
||||
hd->pLocal = NULL;
|
||||
hd->timer.expires = jiffies + HZ*10; /* 10 second timeout */
|
||||
hd->scandv_wait_done = 0;
|
||||
|
||||
/* Save cmd pointer, for resource free if timeout or
|
||||
* FW reload occurs
|
||||
*/
|
||||
hd->cmdPtr = mf;
|
||||
|
||||
add_timer(&hd->timer);
|
||||
INITIALIZE_MGMT_STATUS(ioc->internal_cmds.status)
|
||||
mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
|
||||
wait_event(hd->scandv_waitq, hd->scandv_wait_done);
|
||||
timeleft = wait_for_completion_timeout(&ioc->internal_cmds.done, 10*HZ);
|
||||
if (!(ioc->internal_cmds.status & MPT_MGMT_STATUS_COMMAND_GOOD)) {
|
||||
ret = -ETIME;
|
||||
dfailprintk(ioc, printk(MYIOC_s_DEBUG_FMT "%s: TIMED OUT!\n",
|
||||
ioc->name, __func__));
|
||||
if (ioc->internal_cmds.status & MPT_MGMT_STATUS_DID_IOCRESET)
|
||||
goto out;
|
||||
if (!timeleft) {
|
||||
printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
|
||||
ioc->name, __func__);
|
||||
mpt_HardResetHandler(ioc, CAN_SLEEP);
|
||||
mpt_free_msg_frame(ioc, mf);
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
if ((hd->pLocal == NULL) || (hd->pLocal->completion != 0))
|
||||
return -1;
|
||||
ret = ioc->internal_cmds.completion_code;
|
||||
|
||||
return 0;
|
||||
out:
|
||||
CLEAR_MGMT_STATUS(ioc->internal_cmds.status)
|
||||
mutex_unlock(&ioc->internal_cmds.mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void mptspi_dv_device(struct _MPT_SCSI_HOST *hd,
|
||||
@@ -1423,17 +1435,15 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
* A slightly different algorithm is required for
|
||||
* 64bit SGEs.
|
||||
*/
|
||||
scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32));
|
||||
if (sizeof(dma_addr_t) == sizeof(u64)) {
|
||||
scale = ioc->req_sz/ioc->SGE_size;
|
||||
if (ioc->sg_addr_size == sizeof(u64)) {
|
||||
numSGE = (scale - 1) *
|
||||
(ioc->facts.MaxChainDepth-1) + scale +
|
||||
(ioc->req_sz - 60) / (sizeof(dma_addr_t) +
|
||||
sizeof(u32));
|
||||
(ioc->req_sz - 60) / ioc->SGE_size;
|
||||
} else {
|
||||
numSGE = 1 + (scale - 1) *
|
||||
(ioc->facts.MaxChainDepth-1) + scale +
|
||||
(ioc->req_sz - 64) / (sizeof(dma_addr_t) +
|
||||
sizeof(u32));
|
||||
(ioc->req_sz - 64) / ioc->SGE_size;
|
||||
}
|
||||
|
||||
if (numSGE < sh->sg_tablesize) {
|
||||
@@ -1464,9 +1474,6 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
|
||||
/* Clear the TM flags
|
||||
*/
|
||||
hd->tmPending = 0;
|
||||
hd->tmState = TM_STATE_NONE;
|
||||
hd->resetPending = 0;
|
||||
hd->abortSCpnt = NULL;
|
||||
|
||||
/* Clear the pointer used to store
|
||||
@@ -1493,8 +1500,6 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
mpt_saf_te));
|
||||
ioc->spi_data.noQas = 0;
|
||||
|
||||
init_waitqueue_head(&hd->scandv_waitq);
|
||||
hd->scandv_wait_done = 0;
|
||||
hd->last_queue_full = 0;
|
||||
hd->spi_pending = 0;
|
||||
|
||||
@@ -1514,7 +1519,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
* issue internal bus reset
|
||||
*/
|
||||
if (ioc->spi_data.bus_reset)
|
||||
mptscsih_TMHandler(hd,
|
||||
mptscsih_IssueTaskMgmt(hd,
|
||||
MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
|
||||
0, 0, 0, 0, 5);
|
||||
|
||||
|
Reference in New Issue
Block a user