Commit 6cec4a39 authored by Tejun Heo's avatar Tejun Heo

[PATCH] libata-ncq: rename ap->qactive to ap->qc_allocated

Rename ap->qactive to ap->qc_allocated.  This is to accomodate
addition of ap->qc_active, mask of active qcs.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
parent 2115ea94
...@@ -1006,7 +1006,7 @@ unsigned ata_exec_internal(struct ata_device *dev, ...@@ -1006,7 +1006,7 @@ unsigned ata_exec_internal(struct ata_device *dev,
else else
tag = 0; tag = 0;
if (test_and_set_bit(tag, &ap->qactive)) if (test_and_set_bit(tag, &ap->qc_allocated))
BUG(); BUG();
qc = __ata_qc_from_tag(ap, tag); qc = __ata_qc_from_tag(ap, tag);
...@@ -4207,7 +4207,7 @@ static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap) ...@@ -4207,7 +4207,7 @@ static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap)
/* the last tag is reserved for internal command. */ /* the last tag is reserved for internal command. */
for (i = 0; i < ATA_MAX_QUEUE - 1; i++) for (i = 0; i < ATA_MAX_QUEUE - 1; i++)
if (!test_and_set_bit(i, &ap->qactive)) { if (!test_and_set_bit(i, &ap->qc_allocated)) {
qc = __ata_qc_from_tag(ap, i); qc = __ata_qc_from_tag(ap, i);
break; break;
} }
...@@ -4264,7 +4264,7 @@ void ata_qc_free(struct ata_queued_cmd *qc) ...@@ -4264,7 +4264,7 @@ void ata_qc_free(struct ata_queued_cmd *qc)
tag = qc->tag; tag = qc->tag;
if (likely(ata_tag_valid(tag))) { if (likely(ata_tag_valid(tag))) {
qc->tag = ATA_TAG_POISON; qc->tag = ATA_TAG_POISON;
clear_bit(tag, &ap->qactive); clear_bit(tag, &ap->qc_allocated);
} }
} }
......
...@@ -474,7 +474,7 @@ struct ata_port { ...@@ -474,7 +474,7 @@ struct ata_port {
struct ata_device device[ATA_MAX_DEVICES]; struct ata_device device[ATA_MAX_DEVICES];
struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; struct ata_queued_cmd qcmd[ATA_MAX_QUEUE];
unsigned long qactive; unsigned long qc_allocated;
unsigned int active_tag; unsigned int active_tag;
struct ata_host_stats stats; struct ata_host_stats stats;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment