diff options
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r-- | drivers/message/fusion/mptscsih.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 2a3e9e66d4ef..fa0f7761652a 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -819,10 +819,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
819 | sc->resid=0; | 819 | sc->resid=0; |
820 | case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */ | 820 | case MPI_IOCSTATUS_SCSI_RECOVERED_ERROR: /* 0x0040 */ |
821 | case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */ | 821 | case MPI_IOCSTATUS_SUCCESS: /* 0x0000 */ |
822 | if (scsi_status == MPI_SCSI_STATUS_BUSY) | 822 | sc->result = (DID_OK << 16) | scsi_status; |
823 | sc->result = (DID_BUS_BUSY << 16) | scsi_status; | ||
824 | else | ||
825 | sc->result = (DID_OK << 16) | scsi_status; | ||
826 | if (scsi_state == 0) { | 823 | if (scsi_state == 0) { |
827 | ; | 824 | ; |
828 | } else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) { | 825 | } else if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID) { |
@@ -1188,20 +1185,7 @@ mptscsih_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1188 | int | 1185 | int |
1189 | mptscsih_resume(struct pci_dev *pdev) | 1186 | mptscsih_resume(struct pci_dev *pdev) |
1190 | { | 1187 | { |
1191 | MPT_ADAPTER *ioc = pci_get_drvdata(pdev); | 1188 | return mpt_resume(pdev); |
1192 | struct Scsi_Host *host = ioc->sh; | ||
1193 | MPT_SCSI_HOST *hd; | ||
1194 | |||
1195 | mpt_resume(pdev); | ||
1196 | |||
1197 | if(!host) | ||
1198 | return 0; | ||
1199 | |||
1200 | hd = (MPT_SCSI_HOST *)host->hostdata; | ||
1201 | if(!hd) | ||
1202 | return 0; | ||
1203 | |||
1204 | return 0; | ||
1205 | } | 1189 | } |
1206 | 1190 | ||
1207 | #endif | 1191 | #endif |
@@ -1537,21 +1521,23 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx) | |||
1537 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1521 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
1538 | /** | 1522 | /** |
1539 | * mptscsih_TMHandler - Generic handler for SCSI Task Management. | 1523 | * mptscsih_TMHandler - Generic handler for SCSI Task Management. |
1540 | * Fall through to mpt_HardResetHandler if: not operational, too many | 1524 | * @hd: Pointer to MPT SCSI HOST structure |
1541 | * failed TM requests or handshake failure. | ||
1542 | * | ||
1543 | * @ioc: Pointer to MPT_ADAPTER structure | ||
1544 | * @type: Task Management type | 1525 | * @type: Task Management type |
1526 | * @channel: channel number for task management | ||
1545 | * @id: Logical Target ID for reset (if appropriate) | 1527 | * @id: Logical Target ID for reset (if appropriate) |
1546 | * @lun: Logical Unit for reset (if appropriate) | 1528 | * @lun: Logical Unit for reset (if appropriate) |
1547 | * @ctx2abort: Context for the task to be aborted (if appropriate) | 1529 | * @ctx2abort: Context for the task to be aborted (if appropriate) |
1530 | * @timeout: timeout for task management control | ||
1531 | * | ||
1532 | * Fall through to mpt_HardResetHandler if: not operational, too many | ||
1533 | * failed TM requests or handshake failure. | ||
1548 | * | 1534 | * |
1549 | * Remark: Currently invoked from a non-interrupt thread (_bh). | 1535 | * Remark: Currently invoked from a non-interrupt thread (_bh). |
1550 | * | 1536 | * |
1551 | * Remark: With old EH code, at most 1 SCSI TaskMgmt function per IOC | 1537 | * Remark: With old EH code, at most 1 SCSI TaskMgmt function per IOC |
1552 | * will be active. | 1538 | * will be active. |
1553 | * | 1539 | * |
1554 | * Returns 0 for SUCCESS, or FAILED. | 1540 | * Returns 0 for SUCCESS, or %FAILED. |
1555 | **/ | 1541 | **/ |
1556 | int | 1542 | int |
1557 | mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout) | 1543 | mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout) |
@@ -1650,9 +1636,11 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int c | |||
1650 | * mptscsih_IssueTaskMgmt - Generic send Task Management function. | 1636 | * mptscsih_IssueTaskMgmt - Generic send Task Management function. |
1651 | * @hd: Pointer to MPT_SCSI_HOST structure | 1637 | * @hd: Pointer to MPT_SCSI_HOST structure |
1652 | * @type: Task Management type | 1638 | * @type: Task Management type |
1639 | * @channel: channel number for task management | ||
1653 | * @id: Logical Target ID for reset (if appropriate) | 1640 | * @id: Logical Target ID for reset (if appropriate) |
1654 | * @lun: Logical Unit for reset (if appropriate) | 1641 | * @lun: Logical Unit for reset (if appropriate) |
1655 | * @ctx2abort: Context for the task to be aborted (if appropriate) | 1642 | * @ctx2abort: Context for the task to be aborted (if appropriate) |
1643 | * @timeout: timeout for task management control | ||
1656 | * | 1644 | * |
1657 | * Remark: _HardResetHandler can be invoked from an interrupt thread (timer) | 1645 | * Remark: _HardResetHandler can be invoked from an interrupt thread (timer) |
1658 | * or a non-interrupt thread. In the former, must not call schedule(). | 1646 | * or a non-interrupt thread. In the former, must not call schedule(). |
@@ -2022,6 +2010,7 @@ mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd) | |||
2022 | /** | 2010 | /** |
2023 | * mptscsih_tm_wait_for_completion - wait for completion of TM task | 2011 | * mptscsih_tm_wait_for_completion - wait for completion of TM task |
2024 | * @hd: Pointer to MPT host structure. | 2012 | * @hd: Pointer to MPT host structure. |
2013 | * @timeout: timeout value | ||
2025 | * | 2014 | * |
2026 | * Returns {SUCCESS,FAILED}. | 2015 | * Returns {SUCCESS,FAILED}. |
2027 | */ | 2016 | */ |