mpt fusion: RESEND [2.6.30-rc6] rewrite of all internal generated functions that issue commands to FW
Subsystems (2)
PATCH 6/22 mpt fusion: RESEND [2.6.30-rc6] rewrite of all internal generated functions that issue commands to FW
1) rewrite of all internal generated functions that issue commands to firmware, porting them to be single threaded using the generic MPT_MGMT struct. Implemented using completion Queue.
---
Signed-off-by Kashyap Desai <[email protected]>
---
drivers/message/fusion/mptbase.c +2 -0
@@ -1775,6 +1775,8 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)spin_lock_init (&ioc->diagLock);spin_lock_init (&ioc->initializing_hba_lock); +mutex_init (&ioc->internal_cmds.mutex); +init_completion (&ioc->internal_cmds.done);mutex_init (&ioc->mptbase_cmds.mutex);init_completion (&ioc->mptbase_cmds.done);
drivers/message/fusion/mptbase.h +3 -2
@@ -465,7 +465,9 @@ 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 */ +int completion_code; }MPT_MGMT ;/*
@@ -709,6 +711,7 @@ typedef struct _MPT_ADAPTERint sas_index;/* index refrencing */ MPT_MGMT sas_mgmt;MPT_MGMT mptbase_cmds;/* for sending config pages */ +MPT_MGMT internal_cmds;struct work_struct sas_persist_task;struct work_struct fc_setup_reset_work;
@@ -863,8 +866,6 @@ typedef struct _MPT_SCSI_HOST {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;
drivers/message/fusion/mptfc.c +0 -2
@@ -1310,8 +1310,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;
drivers/message/fusion/mptsas.c +0 -2
@@ -3282,8 +3282,6 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) ioc->sas_data.ptClear = mpt_pt_clear; -init_waitqueue_head (&hd->scandv_waitq); - hd->scandv_wait_done =0 ; hd->last_queue_full =0 ;INIT_LIST_HEAD (&hd->target_reset_list);spin_unlock_irqrestore (&ioc->FreeQlock, flags);
drivers/message/fusion/mptscsih.c +211 -303
663 lines not on this page · raw message
drivers/message/fusion/mptscsih.h +1 -0
@@ -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)
drivers/message/fusion/mptspi.c +31 -21
81 lines not on this page · raw message