aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptscsih.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-05 16:30:44 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-05 16:30:44 -0400
commit4f7a307dc6e4d8bfeb56f7cf7231b08cb845687c (patch)
tree3bf90522c87fcb32373cb2a5ff25b1ead33405f5 /drivers/message/fusion/mptscsih.c
parentfabb5c4e4a474ff0f7d6c1d3466a1b79bbce5f49 (diff)
parent7297824581755593535fc97d2c8b6c47e2dc2db6 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (87 commits) [SCSI] fusion: fix domain validation loops [SCSI] qla2xxx: fix regression on sparc64 [SCSI] modalias for scsi devices [SCSI] sg: cap reserved_size values at max_sectors [SCSI] BusLogic: stop using check_region [SCSI] tgt: fix rdma transfer bugs [SCSI] aacraid: fix aacraid not finding device [SCSI] aacraid: Correct SMC products in aacraid.txt [SCSI] scsi_error.c: Add EH Start Unit retry [SCSI] aacraid: [Fastboot] Panics for AACRAID driver during 'insmod' for kexec test. [SCSI] ipr: Driver version to 2.3.2 [SCSI] ipr: Faster sg list fetch [SCSI] ipr: Return better qc_issue errors [SCSI] ipr: Disrupt device error [SCSI] ipr: Improve async error logging level control [SCSI] ipr: PCI unblock config access fix [SCSI] ipr: Fix for oops following SATA request sense [SCSI] ipr: Log error for SAS dual path switch [SCSI] ipr: Enable logging of debug error data for all devices [SCSI] ipr: Add new PCI-E IDs to device table ...
Diffstat (limited to 'drivers/message/fusion/mptscsih.c')
-rw-r--r--drivers/message/fusion/mptscsih.c35
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)
1188int 1185int
1189mptscsih_resume(struct pci_dev *pdev) 1186mptscsih_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 **/
1556int 1542int
1557mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, int lun, int ctx2abort, ulong timeout) 1543mptscsih_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 */