mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-28 06:32:16 +00:00
[SCSI] tmscsim: Further clean-up of the driver
- The saved sg_count was a leftover from the time the driver was doing dma mapping by himself. But now that scsi-ml is called for the mapping it is not the drivers responsibility. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Acked-by: G. Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
cde760856c
commit
0ab179bcf3
@ -1681,7 +1681,6 @@ dc390_RequestSense(struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_
|
|||||||
pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN));
|
pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN));
|
||||||
|
|
||||||
pSRB->SRBFlag |= AUTO_REQSENSE;
|
pSRB->SRBFlag |= AUTO_REQSENSE;
|
||||||
pSRB->SavedSGCount = scsi_sg_count(pcmd);
|
|
||||||
pSRB->SavedTotXLen = pSRB->TotalXferredLen;
|
pSRB->SavedTotXLen = pSRB->TotalXferredLen;
|
||||||
pSRB->AdaptStatus = 0;
|
pSRB->AdaptStatus = 0;
|
||||||
pSRB->TargetStatus = 0; /* CHECK_CONDITION<<1; */
|
pSRB->TargetStatus = 0; /* CHECK_CONDITION<<1; */
|
||||||
@ -1729,7 +1728,6 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
|
|||||||
(u32) pcmd->result, (u32) pSRB->TotalXferredLen));
|
(u32) pcmd->result, (u32) pSRB->TotalXferredLen));
|
||||||
} else {
|
} else {
|
||||||
SET_RES_DRV(pcmd->result, DRIVER_SENSE);
|
SET_RES_DRV(pcmd->result, DRIVER_SENSE);
|
||||||
scsi_sg_count(pcmd) = pSRB->SavedSGCount;
|
|
||||||
//pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8);
|
//pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8);
|
||||||
DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
|
DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
|
||||||
pSRB->TotalXferredLen = 0;
|
pSRB->TotalXferredLen = 0;
|
||||||
@ -1751,7 +1749,6 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
|
|||||||
else if (status == SAM_STAT_TASK_SET_FULL)
|
else if (status == SAM_STAT_TASK_SET_FULL)
|
||||||
{
|
{
|
||||||
scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1);
|
scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1);
|
||||||
scsi_sg_count(pcmd) = pSRB->SavedSGCount;
|
|
||||||
DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
|
DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
|
||||||
pSRB->TotalXferredLen = 0;
|
pSRB->TotalXferredLen = 0;
|
||||||
SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
|
SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
|
||||||
|
@ -57,7 +57,6 @@ u8 SGcount;
|
|||||||
|
|
||||||
u8 MsgCnt;
|
u8 MsgCnt;
|
||||||
u8 EndMessage;
|
u8 EndMessage;
|
||||||
u8 SavedSGCount;
|
|
||||||
|
|
||||||
u8 MsgInBuf[6];
|
u8 MsgInBuf[6];
|
||||||
u8 MsgOutBuf[6];
|
u8 MsgOutBuf[6];
|
||||||
|
Loading…
Reference in New Issue
Block a user