Skip to content

Commit

Permalink
libata: introduce notion of separate hardware tags
Browse files Browse the repository at this point in the history
Rigth now these are the same, but drivers should be using ->hw_tag
for their command setup and issue.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Jens Axboe authored and Tejun Heo committed May 11, 2018
1 parent 804689a commit 5ac4079
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ unsigned ata_exec_internal_sg(struct ata_device *dev,

qc = __ata_qc_from_tag(ap, tag);

qc->tag = tag;
qc->tag = qc->hw_tag = tag;
qc->scsicmd = NULL;
qc->ap = ap;
qc->dev = dev;
Expand Down Expand Up @@ -5125,7 +5125,7 @@ struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev, int tag)
}

qc = __ata_qc_from_tag(ap, tag);
qc->tag = tag;
qc->tag = qc->hw_tag = tag;
qc->scsicmd = NULL;
qc->ap = ap;
qc->dev = dev;
Expand Down
3 changes: 2 additions & 1 deletion include/linux/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,8 @@ struct ata_queued_cmd {
u8 cdb[ATAPI_CDB_LEN];

unsigned long flags; /* ATA_QCFLAG_xxx */
unsigned int tag;
unsigned int tag; /* libata core tag */
unsigned int hw_tag; /* driver tag */
unsigned int n_elem;
unsigned int orig_n_elem;

Expand Down

0 comments on commit 5ac4079

Please sign in to comment.