aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_sil24.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/sata_sil24.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/sata_sil24.c')
-rw-r--r--drivers/scsi/sata_sil24.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c
index 228a7fabffff..24020c68903a 100644
--- a/drivers/scsi/sata_sil24.c
+++ b/drivers/scsi/sata_sil24.c
@@ -371,7 +371,7 @@ static void sil24_dev_config(struct ata_port *ap, struct ata_device *dev)
371{ 371{
372 void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; 372 void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr;
373 373
374 if (ap->cdb_len == 16) 374 if (dev->cdb_len == 16)
375 writel(PORT_CS_CDB16, port + PORT_CTRL_STAT); 375 writel(PORT_CS_CDB16, port + PORT_CTRL_STAT);
376 else 376 else
377 writel(PORT_CS_CDB16, port + PORT_CTRL_CLR); 377 writel(PORT_CS_CDB16, port + PORT_CTRL_CLR);
@@ -543,7 +543,7 @@ static void sil24_qc_prep(struct ata_queued_cmd *qc)
543 prb = &cb->atapi.prb; 543 prb = &cb->atapi.prb;
544 sge = cb->atapi.sge; 544 sge = cb->atapi.sge;
545 memset(cb->atapi.cdb, 0, 32); 545 memset(cb->atapi.cdb, 0, 32);
546 memcpy(cb->atapi.cdb, qc->cdb, ap->cdb_len); 546 memcpy(cb->atapi.cdb, qc->cdb, qc->dev->cdb_len);
547 547
548 if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) { 548 if (qc->tf.protocol != ATA_PROT_ATAPI_NODATA) {
549 if (qc->tf.flags & ATA_TFLAG_WRITE) 549 if (qc->tf.flags & ATA_TFLAG_WRITE)