diff options
-rw-r--r-- | drivers/ata/libata-core.c | 16 | ||||
-rw-r--r-- | include/linux/libata.h | 6 |
2 files changed, 12 insertions, 10 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index d156616f45f5..71024e94c576 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4976,16 +4976,16 @@ int sata_scr_write_flush(struct ata_link *link, int reg, u32 val) | |||
4976 | * None. | 4976 | * None. |
4977 | * | 4977 | * |
4978 | * RETURNS: | 4978 | * RETURNS: |
4979 | * 1 if the port online status is available and online. | 4979 | * True if the port online status is available and online. |
4980 | */ | 4980 | */ |
4981 | int ata_link_online(struct ata_link *link) | 4981 | bool ata_link_online(struct ata_link *link) |
4982 | { | 4982 | { |
4983 | u32 sstatus; | 4983 | u32 sstatus; |
4984 | 4984 | ||
4985 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 && | 4985 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 && |
4986 | (sstatus & 0xf) == 0x3) | 4986 | (sstatus & 0xf) == 0x3) |
4987 | return 1; | 4987 | return true; |
4988 | return 0; | 4988 | return false; |
4989 | } | 4989 | } |
4990 | 4990 | ||
4991 | /** | 4991 | /** |
@@ -5000,16 +5000,16 @@ int ata_link_online(struct ata_link *link) | |||
5000 | * None. | 5000 | * None. |
5001 | * | 5001 | * |
5002 | * RETURNS: | 5002 | * RETURNS: |
5003 | * 1 if the port offline status is available and offline. | 5003 | * True if the port offline status is available and offline. |
5004 | */ | 5004 | */ |
5005 | int ata_link_offline(struct ata_link *link) | 5005 | bool ata_link_offline(struct ata_link *link) |
5006 | { | 5006 | { |
5007 | u32 sstatus; | 5007 | u32 sstatus; |
5008 | 5008 | ||
5009 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 && | 5009 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 && |
5010 | (sstatus & 0xf) != 0x3) | 5010 | (sstatus & 0xf) != 0x3) |
5011 | return 1; | 5011 | return true; |
5012 | return 0; | 5012 | return false; |
5013 | } | 5013 | } |
5014 | 5014 | ||
5015 | #ifdef CONFIG_PM | 5015 | #ifdef CONFIG_PM |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 3eaca347ce29..0c7e6f3c28eb 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -321,6 +321,8 @@ enum { | |||
321 | ATA_EH_LPM = (1 << 4), /* link power management action */ | 321 | ATA_EH_LPM = (1 << 4), /* link power management action */ |
322 | 322 | ||
323 | ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE, | 323 | ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE, |
324 | ATA_EH_ALL_ACTIONS = ATA_EH_REVALIDATE | ATA_EH_RESET | | ||
325 | ATA_EH_ENABLE_LINK | ATA_EH_LPM, | ||
324 | 326 | ||
325 | /* ata_eh_info->flags */ | 327 | /* ata_eh_info->flags */ |
326 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ | 328 | ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */ |
@@ -920,8 +922,8 @@ extern int sata_scr_valid(struct ata_link *link); | |||
920 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); | 922 | extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); |
921 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); | 923 | extern int sata_scr_write(struct ata_link *link, int reg, u32 val); |
922 | extern int sata_scr_write_flush(struct ata_link *link, int reg, u32 val); | 924 | extern int sata_scr_write_flush(struct ata_link *link, int reg, u32 val); |
923 | extern int ata_link_online(struct ata_link *link); | 925 | extern bool ata_link_online(struct ata_link *link); |
924 | extern int ata_link_offline(struct ata_link *link); | 926 | extern bool ata_link_offline(struct ata_link *link); |
925 | #ifdef CONFIG_PM | 927 | #ifdef CONFIG_PM |
926 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); | 928 | extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg); |
927 | extern void ata_host_resume(struct ata_host *host); | 929 | extern void ata_host_resume(struct ata_host *host); |