aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 8dad4a307bb8..28aeae46f355 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -205,6 +205,7 @@ enum {
205 ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */ 205 ATA_LFLAG_SW_ACTIVITY = (1 << 7), /* keep activity stats */
206 ATA_LFLAG_NO_LPM = (1 << 8), /* disable LPM on this link */ 206 ATA_LFLAG_NO_LPM = (1 << 8), /* disable LPM on this link */
207 ATA_LFLAG_RST_ONCE = (1 << 9), /* limit recovery to one reset */ 207 ATA_LFLAG_RST_ONCE = (1 << 9), /* limit recovery to one reset */
208 ATA_LFLAG_CHANGED = (1 << 10), /* LPM state changed on this link */
208 209
209 /* struct ata_port flags */ 210 /* struct ata_port flags */
210 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */ 211 ATA_FLAG_SLAVE_POSS = (1 << 0), /* host supports slave dev */
@@ -309,6 +310,12 @@ enum {
309 */ 310 */
310 ATA_TMOUT_PMP_SRST_WAIT = 5000, 311 ATA_TMOUT_PMP_SRST_WAIT = 5000,
311 312
313 /* When the LPM policy is set to ATA_LPM_MAX_POWER, there might
314 * be a spurious PHY event, so ignore the first PHY event that
315 * occurs within 10s after the policy change.
316 */
317 ATA_TMOUT_SPURIOUS_PHY = 10000,
318
312 /* ATA bus states */ 319 /* ATA bus states */
313 BUS_UNKNOWN = 0, 320 BUS_UNKNOWN = 0,
314 BUS_DMA = 1, 321 BUS_DMA = 1,
@@ -788,6 +795,8 @@ struct ata_link {
788 struct ata_eh_context eh_context; 795 struct ata_eh_context eh_context;
789 796
790 struct ata_device device[ATA_MAX_DEVICES]; 797 struct ata_device device[ATA_MAX_DEVICES];
798
799 unsigned long last_lpm_change; /* when last LPM change happened */
791}; 800};
792#define ATA_LINK_CLEAR_BEGIN offsetof(struct ata_link, active_tag) 801#define ATA_LINK_CLEAR_BEGIN offsetof(struct ata_link, active_tag)
793#define ATA_LINK_CLEAR_END offsetof(struct ata_link, device[0]) 802#define ATA_LINK_CLEAR_END offsetof(struct ata_link, device[0])
@@ -1201,6 +1210,7 @@ extern struct ata_device *ata_dev_pair(struct ata_device *adev);
1201extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev); 1210extern int ata_do_set_mode(struct ata_link *link, struct ata_device **r_failed_dev);
1202extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap); 1211extern void ata_scsi_port_error_handler(struct Scsi_Host *host, struct ata_port *ap);
1203extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q); 1212extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port *ap, struct list_head *eh_q);
1213extern bool sata_lpm_ignore_phy_events(struct ata_link *link);
1204 1214
1205extern int ata_cable_40wire(struct ata_port *ap); 1215extern int ata_cable_40wire(struct ata_port *ap);
1206extern int ata_cable_80wire(struct ata_port *ap); 1216extern int ata_cable_80wire(struct ata_port *ap);