diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2009-05-29 07:16:07 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-06-09 18:29:06 -0400 |
commit | e7deff3374cc5951f914dcb3c66bc1b8de8a084e (patch) | |
tree | 6c1e416a6cf596c48c4b0fe0b570d014a216df10 /drivers/message/fusion/mptscsih.c | |
parent | 1ba9ab2eb2c53df52e498779e14cf4e5ea77b0ad (diff) |
[SCSI] mpt fusion: Adding DeviceResetCtx for internal Device reset frame
1.) Added taskmgmt_quiesce_io flag in IOC and removed resetPending from
_MPT_SCSI_HOST struct.
2.) Reset from Scsi mid layer and internal Reset are seperate context.
Adding DeviceResetCtx for internal Device reset frame.
mptsas_taskmgmt_complete is optimized as part of implementation.
Signed-off-by: Kashyap Desai <kadesai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 2463731ed355..a6a2bbda2f18 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -99,7 +99,7 @@ int mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, | |||
99 | int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); | 99 | int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset); |
100 | int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); | 100 | int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply); |
101 | 101 | ||
102 | static void | 102 | void |
103 | mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code); | 103 | mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code); |
104 | static int mptscsih_get_completion_code(MPT_ADAPTER *ioc, | 104 | static int mptscsih_get_completion_code(MPT_ADAPTER *ioc, |
105 | MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply); | 105 | MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply); |
@@ -1304,7 +1304,7 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *)) | |||
1304 | dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p, done()=%p\n", | 1304 | dmfprintk(ioc, printk(MYIOC_s_DEBUG_FMT "qcmd: SCpnt=%p, done()=%p\n", |
1305 | ioc->name, SCpnt, done)); | 1305 | ioc->name, SCpnt, done)); |
1306 | 1306 | ||
1307 | if (hd->resetPending) { | 1307 | if (ioc->taskmgmt_quiesce_io) { |
1308 | dtmprintk(ioc, printk(MYIOC_s_WARN_FMT "qcmd: SCpnt=%p timeout + 60HZ\n", | 1308 | dtmprintk(ioc, printk(MYIOC_s_WARN_FMT "qcmd: SCpnt=%p timeout + 60HZ\n", |
1309 | ioc->name, SCpnt)); | 1309 | ioc->name, SCpnt)); |
1310 | return SCSI_MLQUEUE_HOST_BUSY; | 1310 | return SCSI_MLQUEUE_HOST_BUSY; |
@@ -1709,11 +1709,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt) | |||
1709 | goto out; | 1709 | goto out; |
1710 | } | 1710 | } |
1711 | 1711 | ||
1712 | if (hd->resetPending) { | ||
1713 | retval = FAILED; | ||
1714 | goto out; | ||
1715 | } | ||
1716 | |||
1717 | if (hd->timeouts < -1) | 1712 | if (hd->timeouts < -1) |
1718 | hd->timeouts++; | 1713 | hd->timeouts++; |
1719 | 1714 | ||
@@ -1782,11 +1777,6 @@ mptscsih_dev_reset(struct scsi_cmnd * SCpnt) | |||
1782 | ioc->name, SCpnt); | 1777 | ioc->name, SCpnt); |
1783 | scsi_print_command(SCpnt); | 1778 | scsi_print_command(SCpnt); |
1784 | 1779 | ||
1785 | if (hd->resetPending) { | ||
1786 | retval = FAILED; | ||
1787 | goto out; | ||
1788 | } | ||
1789 | |||
1790 | vdevice = SCpnt->device->hostdata; | 1780 | vdevice = SCpnt->device->hostdata; |
1791 | if (!vdevice || !vdevice->vtarget) { | 1781 | if (!vdevice || !vdevice->vtarget) { |
1792 | retval = 0; | 1782 | retval = 0; |
@@ -1967,7 +1957,7 @@ mptscsih_taskmgmt_reply(MPT_ADAPTER *ioc, u8 type, | |||
1967 | } | 1957 | } |
1968 | 1958 | ||
1969 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1959 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
1970 | static void | 1960 | void |
1971 | mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code) | 1961 | mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code) |
1972 | { | 1962 | { |
1973 | char *desc; | 1963 | char *desc; |
@@ -2001,6 +1991,7 @@ mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code) | |||
2001 | printk(MYIOC_s_INFO_FMT "Response Code(0x%08x): F/W: %s\n", | 1991 | printk(MYIOC_s_INFO_FMT "Response Code(0x%08x): F/W: %s\n", |
2002 | ioc->name, response_code, desc); | 1992 | ioc->name, response_code, desc); |
2003 | } | 1993 | } |
1994 | EXPORT_SYMBOL(mptscsih_taskmgmt_response_code); | ||
2004 | 1995 | ||
2005 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1996 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
2006 | /** | 1997 | /** |
@@ -2442,12 +2433,10 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
2442 | case MPT_IOC_SETUP_RESET: | 2433 | case MPT_IOC_SETUP_RESET: |
2443 | dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 2434 | dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
2444 | "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__)); | 2435 | "%s: MPT_IOC_SETUP_RESET\n", ioc->name, __func__)); |
2445 | hd->resetPending = 1; | ||
2446 | break; | 2436 | break; |
2447 | case MPT_IOC_PRE_RESET: | 2437 | case MPT_IOC_PRE_RESET: |
2448 | dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT | 2438 | dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT |
2449 | "%s: MPT_IOC_PRE_RESET\n", ioc->name, __func__)); | 2439 | "%s: MPT_IOC_PRE_RESET\n", ioc->name, __func__)); |
2450 | hd->resetPending = 0; | ||
2451 | mptscsih_flush_running_cmds(hd); | 2440 | mptscsih_flush_running_cmds(hd); |
2452 | break; | 2441 | break; |
2453 | case MPT_IOC_POST_RESET: | 2442 | case MPT_IOC_POST_RESET: |