aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index d5b9b7266c8b..4b95c4387e9e 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -708,7 +708,11 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
708{ 708{
709 struct ata_queued_cmd *qc; 709 struct ata_queued_cmd *qc;
710 710
711 qc = ata_qc_new_init(dev, cmd->request->tag); 711 if (cmd->request->tag != -1)
712 qc = ata_qc_new_init(dev, cmd->request->tag);
713 else
714 qc = ata_qc_new_init(dev, 0);
715
712 if (qc) { 716 if (qc) {
713 qc->scsicmd = cmd; 717 qc->scsicmd = cmd;
714 qc->scsidone = done; 718 qc->scsidone = done;