diff options
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 0c7e6f3c28eb..244ff601559a 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -690,7 +690,8 @@ struct ata_port { | |||
690 | unsigned int qc_active; | 690 | unsigned int qc_active; |
691 | int nr_active_links; /* #links with active qcs */ | 691 | int nr_active_links; /* #links with active qcs */ |
692 | 692 | ||
693 | struct ata_link link; /* host default link */ | 693 | struct ata_link link; /* host default link */ |
694 | struct ata_link *slave_link; /* see ata_slave_link_init() */ | ||
694 | 695 | ||
695 | int nr_pmp_links; /* nr of available PMP links */ | 696 | int nr_pmp_links; /* nr of available PMP links */ |
696 | struct ata_link *pmp_link; /* array of PMP links */ | 697 | struct ata_link *pmp_link; /* array of PMP links */ |
@@ -897,6 +898,7 @@ extern void ata_port_disable(struct ata_port *); | |||
897 | extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); | 898 | extern struct ata_host *ata_host_alloc(struct device *dev, int max_ports); |
898 | extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, | 899 | extern struct ata_host *ata_host_alloc_pinfo(struct device *dev, |
899 | const struct ata_port_info * const * ppi, int n_ports); | 900 | const struct ata_port_info * const * ppi, int n_ports); |
901 | extern int ata_slave_link_init(struct ata_port *ap); | ||
900 | extern int ata_host_start(struct ata_host *host); | 902 | extern int ata_host_start(struct ata_host *host); |
901 | extern int ata_host_register(struct ata_host *host, | 903 | extern int ata_host_register(struct ata_host *host, |
902 | struct scsi_host_template *sht); | 904 | struct scsi_host_template *sht); |
@@ -1136,7 +1138,7 @@ static inline bool sata_pmp_attached(struct ata_port *ap) | |||
1136 | 1138 | ||
1137 | static inline int ata_is_host_link(const struct ata_link *link) | 1139 | static inline int ata_is_host_link(const struct ata_link *link) |
1138 | { | 1140 | { |
1139 | return link == &link->ap->link; | 1141 | return link == &link->ap->link || link == link->ap->slave_link; |
1140 | } | 1142 | } |
1141 | #else /* CONFIG_SATA_PMP */ | 1143 | #else /* CONFIG_SATA_PMP */ |
1142 | static inline bool sata_pmp_supported(struct ata_port *ap) | 1144 | static inline bool sata_pmp_supported(struct ata_port *ap) |
@@ -1169,7 +1171,7 @@ static inline int sata_srst_pmp(struct ata_link *link) | |||
1169 | printk("%sata%u: "fmt, lv, (ap)->print_id , ##args) | 1171 | printk("%sata%u: "fmt, lv, (ap)->print_id , ##args) |
1170 | 1172 | ||
1171 | #define ata_link_printk(link, lv, fmt, args...) do { \ | 1173 | #define ata_link_printk(link, lv, fmt, args...) do { \ |
1172 | if (sata_pmp_attached((link)->ap)) \ | 1174 | if (sata_pmp_attached((link)->ap) || (link)->ap->slave_link) \ |
1173 | printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \ | 1175 | printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \ |
1174 | (link)->pmp , ##args); \ | 1176 | (link)->pmp , ##args); \ |
1175 | else \ | 1177 | else \ |