diff options
author | FUJITA Tomonori <tomof@acm.org> | 2008-01-13 01:46:13 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-01-23 12:29:27 -0500 |
commit | b80ca4f7ee36c26d300c5a8f429e73372d153379 (patch) | |
tree | 277987f64a44e793eb35c0bde3e48b582fad445a /drivers/scsi/advansys.c | |
parent | 94aa5e5f6251ca0e1d77e083f8c2f9f40ee548c5 (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/advansys.c')
-rw-r--r-- | drivers/scsi/advansys.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 9dd3952516c5..492702ba6463 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -8233,7 +8233,7 @@ static void adv_isr_callback(ADV_DVC_VAR *adv_dvc_varp, ADV_SCSI_REQ_Q *scsiqp) | |||
8233 | if (scsiqp->scsi_status == SAM_STAT_CHECK_CONDITION) { | 8233 | if (scsiqp->scsi_status == SAM_STAT_CHECK_CONDITION) { |
8234 | ASC_DBG(2, "SAM_STAT_CHECK_CONDITION\n"); | 8234 | ASC_DBG(2, "SAM_STAT_CHECK_CONDITION\n"); |
8235 | ASC_DBG_PRT_SENSE(2, scp->sense_buffer, | 8235 | ASC_DBG_PRT_SENSE(2, scp->sense_buffer, |
8236 | sizeof(scp->sense_buffer)); | 8236 | SCSI_SENSE_BUFFERSIZE); |
8237 | /* | 8237 | /* |
8238 | * Note: The 'status_byte()' macro used by | 8238 | * Note: The 'status_byte()' macro used by |
8239 | * target drivers defined in scsi.h shifts the | 8239 | * target drivers defined in scsi.h shifts the |
@@ -9136,7 +9136,7 @@ static void asc_isr_callback(ASC_DVC_VAR *asc_dvc_varp, ASC_QDONE_INFO *qdonep) | |||
9136 | BUG_ON(asc_dvc_varp != &boardp->dvc_var.asc_dvc_var); | 9136 | BUG_ON(asc_dvc_varp != &boardp->dvc_var.asc_dvc_var); |
9137 | 9137 | ||
9138 | dma_unmap_single(boardp->dev, scp->SCp.dma_handle, | 9138 | dma_unmap_single(boardp->dev, scp->SCp.dma_handle, |
9139 | sizeof(scp->sense_buffer), DMA_FROM_DEVICE); | 9139 | SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); |
9140 | /* | 9140 | /* |
9141 | * 'qdonep' contains the command's ending status. | 9141 | * 'qdonep' contains the command's ending status. |
9142 | */ | 9142 | */ |
@@ -9166,7 +9166,7 @@ static void asc_isr_callback(ASC_DVC_VAR *asc_dvc_varp, ASC_QDONE_INFO *qdonep) | |||
9166 | if (qdonep->d3.scsi_stat == SAM_STAT_CHECK_CONDITION) { | 9166 | if (qdonep->d3.scsi_stat == SAM_STAT_CHECK_CONDITION) { |
9167 | ASC_DBG(2, "SAM_STAT_CHECK_CONDITION\n"); | 9167 | ASC_DBG(2, "SAM_STAT_CHECK_CONDITION\n"); |
9168 | ASC_DBG_PRT_SENSE(2, scp->sense_buffer, | 9168 | ASC_DBG_PRT_SENSE(2, scp->sense_buffer, |
9169 | sizeof(scp->sense_buffer)); | 9169 | SCSI_SENSE_BUFFERSIZE); |
9170 | /* | 9170 | /* |
9171 | * Note: The 'status_byte()' macro used by | 9171 | * Note: The 'status_byte()' macro used by |
9172 | * target drivers defined in scsi.h shifts the | 9172 | * target drivers defined in scsi.h shifts the |
@@ -9881,9 +9881,9 @@ static __le32 advansys_get_sense_buffer_dma(struct scsi_cmnd *scp) | |||
9881 | { | 9881 | { |
9882 | struct asc_board *board = shost_priv(scp->device->host); | 9882 | struct asc_board *board = shost_priv(scp->device->host); |
9883 | scp->SCp.dma_handle = dma_map_single(board->dev, scp->sense_buffer, | 9883 | scp->SCp.dma_handle = dma_map_single(board->dev, scp->sense_buffer, |
9884 | sizeof(scp->sense_buffer), DMA_FROM_DEVICE); | 9884 | SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); |
9885 | dma_cache_sync(board->dev, scp->sense_buffer, | 9885 | dma_cache_sync(board->dev, scp->sense_buffer, |
9886 | sizeof(scp->sense_buffer), DMA_FROM_DEVICE); | 9886 | SCSI_SENSE_BUFFERSIZE, DMA_FROM_DEVICE); |
9887 | return cpu_to_le32(scp->SCp.dma_handle); | 9887 | return cpu_to_le32(scp->SCp.dma_handle); |
9888 | } | 9888 | } |
9889 | 9889 | ||
@@ -9914,7 +9914,7 @@ static int asc_build_req(struct asc_board *boardp, struct scsi_cmnd *scp, | |||
9914 | asc_scsi_q->q2.target_ix = | 9914 | asc_scsi_q->q2.target_ix = |
9915 | ASC_TIDLUN_TO_IX(scp->device->id, scp->device->lun); | 9915 | ASC_TIDLUN_TO_IX(scp->device->id, scp->device->lun); |
9916 | asc_scsi_q->q1.sense_addr = advansys_get_sense_buffer_dma(scp); | 9916 | asc_scsi_q->q1.sense_addr = advansys_get_sense_buffer_dma(scp); |
9917 | asc_scsi_q->q1.sense_len = sizeof(scp->sense_buffer); | 9917 | asc_scsi_q->q1.sense_len = SCSI_SENSE_BUFFERSIZE; |
9918 | 9918 | ||
9919 | /* | 9919 | /* |
9920 | * If there are any outstanding requests for the current target, | 9920 | * If there are any outstanding requests for the current target, |
@@ -10173,7 +10173,7 @@ adv_build_req(struct asc_board *boardp, struct scsi_cmnd *scp, | |||
10173 | scsiqp->target_lun = scp->device->lun; | 10173 | scsiqp->target_lun = scp->device->lun; |
10174 | 10174 | ||
10175 | scsiqp->sense_addr = cpu_to_le32(virt_to_bus(&scp->sense_buffer[0])); | 10175 | scsiqp->sense_addr = cpu_to_le32(virt_to_bus(&scp->sense_buffer[0])); |
10176 | scsiqp->sense_len = sizeof(scp->sense_buffer); | 10176 | scsiqp->sense_len = SCSI_SENSE_BUFFERSIZE; |
10177 | 10177 | ||
10178 | /* Build ADV_SCSI_REQ_Q */ | 10178 | /* Build ADV_SCSI_REQ_Q */ |
10179 | 10179 | ||