aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2007-07-04 14:18:55 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-07-14 19:56:33 -0400
commit0ab179bcf31fd54c7b34b4191ea8591267641e92 (patch)
treef9b1dfe68a002d92c60a2d1a02904ad5ede13b12
parentcde760856ce3a88bcceb02f208bcd259c2a71c4c (diff)
[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>
-rw-r--r--drivers/scsi/tmscsim.c3
-rw-r--r--drivers/scsi/tmscsim.h1
2 files changed, 0 insertions, 4 deletions
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
index e8260f2dba0f..14cba1ca38b3 100644
--- a/drivers/scsi/tmscsim.c
+++ b/drivers/scsi/tmscsim.c
@@ -1681,7 +1681,6 @@ dc390_RequestSense(struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_
1681 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN)); 1681 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN));
1682 1682
1683 pSRB->SRBFlag |= AUTO_REQSENSE; 1683 pSRB->SRBFlag |= AUTO_REQSENSE;
1684 pSRB->SavedSGCount = scsi_sg_count(pcmd);
1685 pSRB->SavedTotXLen = pSRB->TotalXferredLen; 1684 pSRB->SavedTotXLen = pSRB->TotalXferredLen;
1686 pSRB->AdaptStatus = 0; 1685 pSRB->AdaptStatus = 0;
1687 pSRB->TargetStatus = 0; /* CHECK_CONDITION<<1; */ 1686 pSRB->TargetStatus = 0; /* CHECK_CONDITION<<1; */
@@ -1729,7 +1728,6 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
1729 (u32) pcmd->result, (u32) pSRB->TotalXferredLen)); 1728 (u32) pcmd->result, (u32) pSRB->TotalXferredLen));
1730 } else { 1729 } else {
1731 SET_RES_DRV(pcmd->result, DRIVER_SENSE); 1730 SET_RES_DRV(pcmd->result, DRIVER_SENSE);
1732 scsi_sg_count(pcmd) = pSRB->SavedSGCount;
1733 //pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8); 1731 //pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8);
1734 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); 1732 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
1735 pSRB->TotalXferredLen = 0; 1733 pSRB->TotalXferredLen = 0;
@@ -1751,7 +1749,6 @@ dc390_SRBdone( struct dc390_acb* pACB, struct dc390_dcb* pDCB, struct dc390_srb*
1751 else if (status == SAM_STAT_TASK_SET_FULL) 1749 else if (status == SAM_STAT_TASK_SET_FULL)
1752 { 1750 {
1753 scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1); 1751 scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1);
1754 scsi_sg_count(pcmd) = pSRB->SavedSGCount;
1755 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); 1752 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
1756 pSRB->TotalXferredLen = 0; 1753 pSRB->TotalXferredLen = 0;
1757 SET_RES_DID(pcmd->result, DID_SOFT_ERROR); 1754 SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
diff --git a/drivers/scsi/tmscsim.h b/drivers/scsi/tmscsim.h
index c74c72aadb08..77adc54dbd16 100644
--- a/drivers/scsi/tmscsim.h
+++ b/drivers/scsi/tmscsim.h
@@ -57,7 +57,6 @@ u8 SGcount;
57 57
58u8 MsgCnt; 58u8 MsgCnt;
59u8 EndMessage; 59u8 EndMessage;
60u8 SavedSGCount;
61 60
62u8 MsgInBuf[6]; 61u8 MsgInBuf[6];
63u8 MsgOutBuf[6]; 62u8 MsgOutBuf[6];