aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c700.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <tomof@acm.org>2008-01-13 01:46:13 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-23 12:29:27 -0500
commitb80ca4f7ee36c26d300c5a8f429e73372d153379 (patch)
tree277987f64a44e793eb35c0bde3e48b582fad445a /drivers/scsi/53c700.c
parent94aa5e5f6251ca0e1d77e083f8c2f9f40ee548c5 (diff)
[SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE
This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in several LLDs. It's a preparation for the future changes to remove sense_buffer array in scsi_cmnd structure. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/53c700.c')
-rw-r--r--drivers/scsi/53c700.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 71ff3fbfce12..f4c4fe90240a 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -608,7 +608,8 @@ NCR_700_scsi_done(struct NCR_700_Host_Parameters *hostdata,
608 scsi_print_sense("53c700", SCp); 608 scsi_print_sense("53c700", SCp);
609 609
610#endif 610#endif
611 dma_unmap_single(hostdata->dev, slot->dma_handle, sizeof(SCp->sense_buffer), DMA_FROM_DEVICE); 611 dma_unmap_single(hostdata->dev, slot->dma_handle,
612 SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE);
612 /* restore the old result if the request sense was 613 /* restore the old result if the request sense was
613 * successful */ 614 * successful */
614 if (result == 0) 615 if (result == 0)
@@ -1010,7 +1011,7 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp,
1010 cmnd[1] = (SCp->device->lun & 0x7) << 5; 1011 cmnd[1] = (SCp->device->lun & 0x7) << 5;
1011 cmnd[2] = 0; 1012 cmnd[2] = 0;
1012 cmnd[3] = 0; 1013 cmnd[3] = 0;
1013 cmnd[4] = sizeof(SCp->sense_buffer); 1014 cmnd[4] = SCSI_SENSE_BUFFERSIZE;
1014 cmnd[5] = 0; 1015 cmnd[5] = 0;
1015 /* Here's a quiet hack: the 1016 /* Here's a quiet hack: the
1016 * REQUEST_SENSE command is six bytes, 1017 * REQUEST_SENSE command is six bytes,
@@ -1024,14 +1025,14 @@ process_script_interrupt(__u32 dsps, __u32 dsp, struct scsi_cmnd *SCp,
1024 SCp->cmd_len = 6; /* command length for 1025 SCp->cmd_len = 6; /* command length for
1025 * REQUEST_SENSE */ 1026 * REQUEST_SENSE */
1026 slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE); 1027 slot->pCmd = dma_map_single(hostdata->dev, cmnd, MAX_COMMAND_SIZE, DMA_TO_DEVICE);
1027 slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, sizeof(SCp->sense_buffer), DMA_FROM_DEVICE); 1028 slot->dma_handle = dma_map_single(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE);
1028 slot->SG[0].ins = bS_to_host(SCRIPT_MOVE_DATA_IN | sizeof(SCp->sense_buffer)); 1029 slot->SG[0].ins = bS_to_host(SCRIPT_MOVE_DATA_IN | SCSI_SENSE_BUFFERSIZE);
1029 slot->SG[0].pAddr = bS_to_host(slot->dma_handle); 1030 slot->SG[0].pAddr = bS_to_host(slot->dma_handle);
1030 slot->SG[1].ins = bS_to_host(SCRIPT_RETURN); 1031 slot->SG[1].ins = bS_to_host(SCRIPT_RETURN);
1031 slot->SG[1].pAddr = 0; 1032 slot->SG[1].pAddr = 0;
1032 slot->resume_offset = hostdata->pScript; 1033 slot->resume_offset = hostdata->pScript;
1033 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG[0])*2, DMA_TO_DEVICE); 1034 dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG[0])*2, DMA_TO_DEVICE);
1034 dma_cache_sync(hostdata->dev, SCp->sense_buffer, sizeof(SCp->sense_buffer), DMA_FROM_DEVICE); 1035 dma_cache_sync(hostdata->dev, SCp->sense_buffer, SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE);
1035 1036
1036 /* queue the command for reissue */ 1037 /* queue the command for reissue */
1037 slot->state = NCR_700_SLOT_QUEUED; 1038 slot->state = NCR_700_SLOT_QUEUED;