diff options
author | Tejun Heo <htejun@gmail.com> | 2006-02-12 23:32:58 +0900 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-02-12 14:29:10 -0500 |
commit | 6e7846e9c548443c86cfbad9e4defb4bdcfc538b (patch) | |
tree | f92fe0c3ca0000ad7d68bb3caae10d2066a7f78e /drivers/scsi/libata-scsi.c | |
parent | 8eabd02c246b808e0e27c3ee9ea17d0349efb06d (diff) | |
download | kernel_samsung_smdk4412-6e7846e9c548443c86cfbad9e4defb4bdcfc538b.tar.gz kernel_samsung_smdk4412-6e7846e9c548443c86cfbad9e4defb4bdcfc538b.tar.bz2 kernel_samsung_smdk4412-6e7846e9c548443c86cfbad9e4defb4bdcfc538b.zip |
[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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index ebd7cf42550..3628fedc986 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) ata_sg_init_one(qc, cmd->sense_buffer, sizeof(cmd->sense_buffer)); qc->dma_dir = DMA_FROM_DEVICE; - memset(&qc->cdb, 0, ap->cdb_len); + memset(&qc->cdb, 0, qc->dev->cdb_len); qc->cdb[0] = REQUEST_SENSE; qc->cdb[4] = SCSI_SENSE_BUFFERSIZE; @@ -2248,7 +2248,7 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc, const u8 *scsicmd) if (ata_check_atapi_dma(qc)) using_pio = 1; - memcpy(&qc->cdb, scsicmd, qc->ap->cdb_len); + memcpy(&qc->cdb, scsicmd, dev->cdb_len); qc->complete_fn = atapi_qc_complete; |