aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-scsi.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-02-12 09:32:58 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-12 14:29:10 -0500
commit6e7846e9c548443c86cfbad9e4defb4bdcfc538b (patch)
treef92fe0c3ca0000ad7d68bb3caae10d2066a7f78e /drivers/scsi/libata-scsi.c
parent8eabd02c246b808e0e27c3ee9ea17d0349efb06d (diff)
[PATCH] libata: move cdb_len for host to device
cdb_len is per-device property. Sharing cdb_len on ap results in inaccurate configuration on revalidation and hotplugging. This patch makes cdb_len per-device. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r--drivers/scsi/libata-scsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index ebd7cf42550b..3628fedc9865 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -2146,7 +2146,7 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
2146 ata_sg_init_one(qc, cmd->sense_buffer, sizeof(cmd->sense_buffer)); 2146 ata_sg_init_one(qc, cmd->sense_buffer, sizeof(cmd->sense_buffer));
2147 qc->dma_dir = DMA_FROM_DEVICE; 2147 qc->dma_dir = DMA_FROM_DEVICE;
2148 2148
2149 memset(&qc->cdb, 0, ap->cdb_len); 2149 memset(&qc->cdb, 0, qc->dev->cdb_len);
2150 qc->cdb[0] = REQUEST_SENSE; 2150 qc->cdb[0] = REQUEST_SENSE;
2151 qc->cdb[4] = SCSI_SENSE_BUFFERSIZE; 2151 qc->cdb[4] = SCSI_SENSE_BUFFERSIZE;
2152 2152
@@ -2248,7 +2248,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd)
2248 if (ata_check_atapi_dma(qc)) 2248 if (ata_check_atapi_dma(qc))
2249 using_pio = 1; 2249 using_pio = 1;
2250 2250
2251 memcpy(&qc->cdb, scsicmd, qc->ap->cdb_len); 2251 memcpy(&qc->cdb, scsicmd, dev->cdb_len);
2252 2252
2253 qc->complete_fn = atapi_qc_complete; 2253 qc->complete_fn = atapi_qc_complete;
2254 2254