Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Boaz Harrosh and committed by
James Bottomley
0ab179bc cde76085

-4
-3
drivers/scsi/tmscsim.c
··· 1681 1681 pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN)); 1682 1682 1683 1683 pSRB->SRBFlag |= AUTO_REQSENSE; 1684 - pSRB->SavedSGCount = scsi_sg_count(pcmd); 1685 1684 pSRB->SavedTotXLen = pSRB->TotalXferredLen; 1686 1685 pSRB->AdaptStatus = 0; 1687 1686 pSRB->TargetStatus = 0; /* CHECK_CONDITION<<1; */ ··· 1728 1729 (u32) pcmd->result, (u32) pSRB->TotalXferredLen)); 1729 1730 } else { 1730 1731 SET_RES_DRV(pcmd->result, DRIVER_SENSE); 1731 - scsi_sg_count(pcmd) = pSRB->SavedSGCount; 1732 1732 //pSRB->ScsiCmdLen = (u8) (pSRB->Segment1[0] >> 8); 1733 1733 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); 1734 1734 pSRB->TotalXferredLen = 0; ··· 1749 1751 else if (status == SAM_STAT_TASK_SET_FULL) 1750 1752 { 1751 1753 scsi_track_queue_full(pcmd->device, pDCB->GoingSRBCnt - 1); 1752 - scsi_sg_count(pcmd) = pSRB->SavedSGCount; 1753 1754 DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun)); 1754 1755 pSRB->TotalXferredLen = 0; 1755 1756 SET_RES_DID(pcmd->result, DID_SOFT_ERROR);
-1
drivers/scsi/tmscsim.h
··· 57 57 58 58 u8 MsgCnt; 59 59 u8 EndMessage; 60 - u8 SavedSGCount; 61 60 62 61 u8 MsgInBuf[6]; 63 62 u8 MsgOutBuf[6];