aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index 6796597dcee..7bd4c0fc23c 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -1149,11 +1149,6 @@ mptscsih_remove(struct pci_dev *pdev)
1149 MPT_SCSI_HOST *hd; 1149 MPT_SCSI_HOST *hd;
1150 int sz1; 1150 int sz1;
1151 1151
1152 if(!host) {
1153 mpt_detach(pdev);
1154 return;
1155 }
1156
1157 scsi_remove_host(host); 1152 scsi_remove_host(host);
1158 1153
1159 if((hd = shost_priv(host)) == NULL) 1154 if((hd = shost_priv(host)) == NULL)
@@ -1711,7 +1706,7 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun,
1711 if (issue_hard_reset) { 1706 if (issue_hard_reset) {
1712 printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n", 1707 printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
1713 ioc->name, __func__); 1708 ioc->name, __func__);
1714 retval = mpt_HardResetHandler(ioc, CAN_SLEEP); 1709 retval = mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
1715 mpt_free_msg_frame(ioc, mf); 1710 mpt_free_msg_frame(ioc, mf);
1716 } 1711 }
1717 1712
@@ -1728,6 +1723,7 @@ mptscsih_get_tm_timeout(MPT_ADAPTER *ioc)
1728 case FC: 1723 case FC:
1729 return 40; 1724 return 40;
1730 case SAS: 1725 case SAS:
1726 return 30;
1731 case SPI: 1727 case SPI:
1732 default: 1728 default:
1733 return 10; 1729 return 10;
@@ -1777,7 +1773,7 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1777 ioc->name, SCpnt)); 1773 ioc->name, SCpnt));
1778 SCpnt->result = DID_NO_CONNECT << 16; 1774 SCpnt->result = DID_NO_CONNECT << 16;
1779 SCpnt->scsi_done(SCpnt); 1775 SCpnt->scsi_done(SCpnt);
1780 retval = 0; 1776 retval = SUCCESS;
1781 goto out; 1777 goto out;
1782 } 1778 }
1783 1779
@@ -1792,6 +1788,17 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
1792 goto out; 1788 goto out;
1793 } 1789 }
1794 1790
1791 /* Task aborts are not supported for volumes.
1792 */
1793 if (vdevice->vtarget->raidVolume) {
1794 dtmprintk(ioc, printk(MYIOC_s_DEBUG_FMT
1795 "task abort: raid volume (sc=%p)\n",
1796 ioc->name, SCpnt));
1797 SCpnt->result = DID_RESET << 16;
1798 retval = FAILED;
1799 goto out;
1800 }
1801
1795 /* Find this command 1802 /* Find this command
1796 */ 1803 */
1797 if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(ioc, SCpnt)) < 0) { 1804 if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(ioc, SCpnt)) < 0) {
@@ -1991,7 +1998,7 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
1991 /* If our attempts to reset the host failed, then return a failed 1998 /* If our attempts to reset the host failed, then return a failed
1992 * status. The host will be taken off line by the SCSI mid-layer. 1999 * status. The host will be taken off line by the SCSI mid-layer.
1993 */ 2000 */
1994 retval = mpt_HardResetHandler(ioc, CAN_SLEEP); 2001 retval = mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
1995 if (retval < 0) 2002 if (retval < 0)
1996 status = FAILED; 2003 status = FAILED;
1997 else 2004 else
@@ -2344,6 +2351,8 @@ mptscsih_slave_destroy(struct scsi_device *sdev)
2344 starget = scsi_target(sdev); 2351 starget = scsi_target(sdev);
2345 vtarget = starget->hostdata; 2352 vtarget = starget->hostdata;
2346 vdevice = sdev->hostdata; 2353 vdevice = sdev->hostdata;
2354 if (!vdevice)
2355 return;
2347 2356
2348 mptscsih_search_running_cmds(hd, vdevice); 2357 mptscsih_search_running_cmds(hd, vdevice);
2349 vtarget->num_luns--; 2358 vtarget->num_luns--;
@@ -3040,7 +3049,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *io)
3040 if (!timeleft) { 3049 if (!timeleft) {
3041 printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n", 3050 printk(MYIOC_s_WARN_FMT "Issuing Reset from %s!!\n",
3042 ioc->name, __func__); 3051 ioc->name, __func__);
3043 mpt_HardResetHandler(ioc, CAN_SLEEP); 3052 mpt_Soft_Hard_ResetHandler(ioc, CAN_SLEEP);
3044 mpt_free_msg_frame(ioc, mf); 3053 mpt_free_msg_frame(ioc, mf);
3045 } 3054 }
3046 goto out; 3055 goto out;