[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>
This commit is contained in:
Tejun Heo
2006-02-12 23:32:58 +09:00
committed by Jeff Garzik
parent 8eabd02c24
commit 6e7846e9c5
5 changed files with 19 additions and 13 deletions

View File

@@ -617,7 +617,8 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc)
ata_tf_to_fis(&qc->tf, pp->cmd_tbl, 0);
if (is_atapi) {
memset(pp->cmd_tbl + AHCI_CMD_TBL_CDB, 0, 32);
memcpy(pp->cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb, ap->cdb_len);
memcpy(pp->cmd_tbl + AHCI_CMD_TBL_CDB, qc->cdb,
qc->dev->cdb_len);
}
n_elem = 0;