Commit c6678e0c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[SCSI] fusion: whitespace fixes

Acked by: Moore, Eric Dean <Eric.Moore@lsil.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 637fa99b
This diff is collapsed.
...@@ -281,12 +281,12 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER *ioc, int *retIndex) ...@@ -281,12 +281,12 @@ mptscsih_getFreeChainBuffer(MPT_ADAPTER *ioc, int *retIndex)
offset = (u8 *)chainBuf - (u8 *)ioc->ChainBuffer; offset = (u8 *)chainBuf - (u8 *)ioc->ChainBuffer;
chain_idx = offset / ioc->req_sz; chain_idx = offset / ioc->req_sz;
rc = SUCCESS; rc = SUCCESS;
dsgprintk((MYIOC_s_INFO_FMT "getFreeChainBuffer (index %d), got buf=%p\n", dsgprintk((MYIOC_s_ERR_FMT "getFreeChainBuffer chainBuf=%p ChainBuffer=%p offset=%d chain_idx=%d\n",
ioc->name, *retIndex, chainBuf)); ioc->name, chainBuf, ioc->ChainBuffer, offset, chain_idx));
} else { } else {
rc = FAILED; rc = FAILED;
chain_idx = MPT_HOST_NO_CHAIN; chain_idx = MPT_HOST_NO_CHAIN;
dfailprintk((MYIOC_s_ERR_FMT "getFreeChainBuffer failed\n", dfailprintk((MYIOC_s_INFO_FMT "getFreeChainBuffer failed\n",
ioc->name)); ioc->name));
} }
spin_unlock_irqrestore(&ioc->FreeQlock, flags); spin_unlock_irqrestore(&ioc->FreeQlock, flags);
...@@ -432,7 +432,7 @@ mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt, ...@@ -432,7 +432,7 @@ mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt,
*/ */
pReq->ChainOffset = 0; pReq->ChainOffset = 0;
RequestNB = (((sgeOffset - 1) >> ioc->NBShiftFactor) + 1) & 0x03; RequestNB = (((sgeOffset - 1) >> ioc->NBShiftFactor) + 1) & 0x03;
dsgprintk((MYIOC_s_ERR_FMT dsgprintk((MYIOC_s_INFO_FMT
"Single Buffer RequestNB=%x, sgeOffset=%d\n", ioc->name, RequestNB, sgeOffset)); "Single Buffer RequestNB=%x, sgeOffset=%d\n", ioc->name, RequestNB, sgeOffset));
ioc->RequestNB[req_idx] = RequestNB; ioc->RequestNB[req_idx] = RequestNB;
} }
...@@ -491,11 +491,12 @@ mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt, ...@@ -491,11 +491,12 @@ mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt,
/* NOTE: psge points to the beginning of the chain element /* NOTE: psge points to the beginning of the chain element
* in current buffer. Get a chain buffer. * in current buffer. Get a chain buffer.
*/ */
dsgprintk((MYIOC_s_INFO_FMT if ((mptscsih_getFreeChainBuffer(ioc, &newIndex)) == FAILED) {
"calling getFreeChainBuffer SCSI cmd=%02x (%p)\n", dfailprintk((MYIOC_s_INFO_FMT
"getFreeChainBuffer FAILED SCSI cmd=%02x (%p)\n",
ioc->name, pReq->CDB[0], SCpnt)); ioc->name, pReq->CDB[0], SCpnt));
if ((mptscsih_getFreeChainBuffer(ioc, &newIndex)) == FAILED)
return FAILED; return FAILED;
}
/* Update the tracking arrays. /* Update the tracking arrays.
* If chainSge == NULL, update ReqToChain, else ChainToChain * If chainSge == NULL, update ReqToChain, else ChainToChain
...@@ -577,14 +578,20 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) ...@@ -577,14 +578,20 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
return 1; return 1;
} }
dmfprintk((MYIOC_s_INFO_FMT
"ScsiDone (mf=%p,mr=%p,sc=%p,idx=%d)\n",
ioc->name, mf, mr, sc, req_idx));
sc->result = DID_OK << 16; /* Set default reply as OK */ sc->result = DID_OK << 16; /* Set default reply as OK */
pScsiReq = (SCSIIORequest_t *) mf; pScsiReq = (SCSIIORequest_t *) mf;
pScsiReply = (SCSIIOReply_t *) mr; pScsiReply = (SCSIIOReply_t *) mr;
if((ioc->facts.MsgVersion >= MPI_VERSION_01_05) && pScsiReply){
dmfprintk((MYIOC_s_INFO_FMT
"ScsiDone (mf=%p,mr=%p,sc=%p,idx=%d,task-tag=%d)\n",
ioc->name, mf, mr, sc, req_idx, pScsiReply->TaskTag));
}else{
dmfprintk((MYIOC_s_INFO_FMT
"ScsiDone (mf=%p,mr=%p,sc=%p,idx=%d)\n",
ioc->name, mf, mr, sc, req_idx));
}
if (pScsiReply == NULL) { if (pScsiReply == NULL) {
/* special context reply handling */ /* special context reply handling */
; ;
...@@ -668,7 +675,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) ...@@ -668,7 +675,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
} else { } else {
sc->result = DID_SOFT_ERROR << 16; sc->result = DID_SOFT_ERROR << 16;
} }
dreplyprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->target)); dreplyprintk((KERN_NOTICE
"RESIDUAL_MISMATCH: result=%x on id=%d\n",
sc->result, sc->device->id));
break; break;
case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN: /* 0x0045 */ case MPI_IOCSTATUS_SCSI_DATA_UNDERRUN: /* 0x0045 */
...@@ -796,7 +805,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) ...@@ -796,7 +805,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
return 1; return 1;
} }
/* /*
* mptscsih_flush_running_cmds - For each command found, search * mptscsih_flush_running_cmds - For each command found, search
* Scsi_Host instance taskQ and reply to OS. * Scsi_Host instance taskQ and reply to OS.
...@@ -1535,17 +1543,17 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, in ...@@ -1535,17 +1543,17 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, in
*/ */
if (mptscsih_tm_pending_wait(hd) == FAILED) { if (mptscsih_tm_pending_wait(hd) == FAILED) {
if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) { if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
dtmprintk((KERN_WARNING MYNAM ": %s: TMHandler abort: " dtmprintk((KERN_INFO MYNAM ": %s: TMHandler abort: "
"Timed out waiting for last TM (%d) to complete! \n", "Timed out waiting for last TM (%d) to complete! \n",
hd->ioc->name, hd->tmPending)); hd->ioc->name, hd->tmPending));
return FAILED; return FAILED;
} else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) { } else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) {
dtmprintk((KERN_WARNING MYNAM ": %s: TMHandler target reset: " dtmprintk((KERN_INFO MYNAM ": %s: TMHandler target reset: "
"Timed out waiting for last TM (%d) to complete! \n", "Timed out waiting for last TM (%d) to complete! \n",
hd->ioc->name, hd->tmPending)); hd->ioc->name, hd->tmPending));
return FAILED; return FAILED;
} else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) { } else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
dtmprintk((KERN_WARNING MYNAM ": %s: TMHandler bus reset: " dtmprintk((KERN_INFO MYNAM ": %s: TMHandler bus reset: "
"Timed out waiting for last TM (%d) to complete! \n", "Timed out waiting for last TM (%d) to complete! \n",
hd->ioc->name, hd->tmPending)); hd->ioc->name, hd->tmPending));
if (hd->tmPending & (1 << MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS)) if (hd->tmPending & (1 << MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS))
...@@ -1631,8 +1639,7 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun ...@@ -1631,8 +1639,7 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun
if ((mf = mpt_get_msg_frame(hd->ioc->TaskCtx, hd->ioc)) == NULL) { if ((mf = mpt_get_msg_frame(hd->ioc->TaskCtx, hd->ioc)) == NULL) {
dfailprintk((MYIOC_s_ERR_FMT "IssueTaskMgmt, no msg frames!!\n", dfailprintk((MYIOC_s_ERR_FMT "IssueTaskMgmt, no msg frames!!\n",
hd->ioc->name)); hd->ioc->name));
//return FAILED; return FAILED;
return -999;
} }
dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt request @ %p\n", dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt request @ %p\n",
hd->ioc->name, mf)); hd->ioc->name, mf));
...@@ -1661,8 +1668,7 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun ...@@ -1661,8 +1668,7 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun
pScsiTm->TaskMsgContext = ctx2abort; pScsiTm->TaskMsgContext = ctx2abort;
dtmprintk((MYIOC_s_INFO_FMT dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt: ctx2abort (0x%08x) type=%d\n",
"IssueTaskMgmt: ctx2abort (0x%08x) type=%d\n",
hd->ioc->name, ctx2abort, type)); hd->ioc->name, ctx2abort, type));
DBG_DUMP_TM_REQUEST_FRAME((u32 *)pScsiTm); DBG_DUMP_TM_REQUEST_FRAME((u32 *)pScsiTm);
...@@ -1902,13 +1908,13 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt) ...@@ -1902,13 +1908,13 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
/* If we can't locate the host to reset, then we failed. */ /* If we can't locate the host to reset, then we failed. */
if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){ if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
dtmprintk( ( KERN_WARNING MYNAM ": mptscsih_host_reset: " dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: "
"Can't locate host! (sc=%p)\n", "Can't locate host! (sc=%p)\n",
SCpnt ) ); SCpnt ) );
return FAILED; return FAILED;
} }
printk(KERN_WARNING MYNAM ": %s: >> Attempting host reset! (sc=%p)\n", printk(KERN_WARNING MYNAM ": %s: Attempting host reset! (sc=%p)\n",
hd->ioc->name, SCpnt); hd->ioc->name, SCpnt);
/* If our attempts to reset the host failed, then return a failed /* If our attempts to reset the host failed, then return a failed
...@@ -1924,7 +1930,7 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt) ...@@ -1924,7 +1930,7 @@ mptscsih_host_reset(struct scsi_cmnd *SCpnt)
hd->tmState = TM_STATE_NONE; hd->tmState = TM_STATE_NONE;
} }
dtmprintk( ( KERN_WARNING MYNAM ": mptscsih_host_reset: " dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: "
"Status = %s\n", "Status = %s\n",
(status == SUCCESS) ? "SUCCESS" : "FAILED" ) ); (status == SUCCESS) ? "SUCCESS" : "FAILED" ) );
...@@ -1951,8 +1957,8 @@ mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd) ...@@ -1951,8 +1957,8 @@ mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd)
if (hd->tmState == TM_STATE_NONE) { if (hd->tmState == TM_STATE_NONE) {
hd->tmState = TM_STATE_IN_PROGRESS; hd->tmState = TM_STATE_IN_PROGRESS;
hd->tmPending = 1; hd->tmPending = 1;
status = SUCCESS;
spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
status = SUCCESS;
break; break;
} }
spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags); spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
...@@ -3194,7 +3200,7 @@ mptscsih_writeSDP1(MPT_SCSI_HOST *hd, int portnum, int target_id, int flags) ...@@ -3194,7 +3200,7 @@ mptscsih_writeSDP1(MPT_SCSI_HOST *hd, int portnum, int target_id, int flags)
/* Get a MF for this command. /* Get a MF for this command.
*/ */
if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
dprintk((MYIOC_s_WARN_FMT "write SDP1: no msg frames!\n", dfailprintk((MYIOC_s_WARN_FMT "write SDP1: no msg frames!\n",
ioc->name)); ioc->name));
return -EAGAIN; return -EAGAIN;
} }
...@@ -3289,7 +3295,7 @@ mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int target_id, int bus) ...@@ -3289,7 +3295,7 @@ mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int target_id, int bus)
/* Get a MF for this command. /* Get a MF for this command.
*/ */
if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) { if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
dprintk((MYIOC_s_WARN_FMT "writeIOCPage4 : no msg frames!\n", dfailprintk((MYIOC_s_WARN_FMT "writeIOCPage4 : no msg frames!\n",
ioc->name)); ioc->name));
return -EAGAIN; return -EAGAIN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment