aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index b0d4ca0d27b4..f9f81fd93293 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -216,6 +216,7 @@ enum {
216 ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE, 216 ATA_QCFLAG_DMAMAP = ATA_QCFLAG_SG | ATA_QCFLAG_SINGLE,
217 ATA_QCFLAG_IO = (1 << 3), /* standard IO command */ 217 ATA_QCFLAG_IO = (1 << 3), /* standard IO command */
218 ATA_QCFLAG_RESULT_TF = (1 << 4), /* result TF requested */ 218 ATA_QCFLAG_RESULT_TF = (1 << 4), /* result TF requested */
219 ATA_QCFLAG_CLEAR_EXCL = (1 << 5), /* clear excl_link on completion */
219 220
220 ATA_QCFLAG_FAILED = (1 << 16), /* cmd failed and is owned by EH */ 221 ATA_QCFLAG_FAILED = (1 << 16), /* cmd failed and is owned by EH */
221 ATA_QCFLAG_SENSE_VALID = (1 << 17), /* sense data valid */ 222 ATA_QCFLAG_SENSE_VALID = (1 << 17), /* sense data valid */
@@ -579,11 +580,13 @@ struct ata_port {
579 struct ata_queued_cmd qcmd[ATA_MAX_QUEUE]; 580 struct ata_queued_cmd qcmd[ATA_MAX_QUEUE];
580 unsigned long qc_allocated; 581 unsigned long qc_allocated;
581 unsigned int qc_active; 582 unsigned int qc_active;
583 int nr_active_links; /* #links with active qcs */
582 584
583 struct ata_link link; /* host default link */ 585 struct ata_link link; /* host default link */
584 586
585 int nr_pmp_links; /* nr of available PMP links */ 587 int nr_pmp_links; /* nr of available PMP links */
586 struct ata_link *pmp_link; /* array of PMP links */ 588 struct ata_link *pmp_link; /* array of PMP links */
589 struct ata_link *excl_link; /* for PMP qc exclusion */
587 590
588 struct ata_port_stats stats; 591 struct ata_port_stats stats;
589 struct ata_host *host; 592 struct ata_host *host;
@@ -1104,6 +1107,11 @@ static inline int ata_link_max_devices(const struct ata_link *link)
1104 return 1; 1107 return 1;
1105} 1108}
1106 1109
1110static inline int ata_link_active(struct ata_link *link)
1111{
1112 return ata_tag_valid(link->active_tag) || link->sactive;
1113}
1114
1107static inline struct ata_link *ata_port_first_link(struct ata_port *ap) 1115static inline struct ata_link *ata_port_first_link(struct ata_port *ap)
1108{ 1116{
1109 if (ap->nr_pmp_links) 1117 if (ap->nr_pmp_links)