From: Tejun Heo <tj@kernel.org>
To: jeff@garzik.org, linux-ide@vger.kernel.org,
alan@lxorguk.ukuu.org.uk, JosephChan@via.com.tw
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 3/5] libata: misc updates to prepare for slave link
Date: Thu, 31 Jul 2008 17:02:42 +0900 [thread overview]
Message-ID: <1217491364-19725-4-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1217491364-19725-1-git-send-email-tj@kernel.org>
* Add ATA_EH_ALL_ACTIONS.
* Make sata_link_{on|off}_line() return bool instead of int.
Signed-off-by: Tejun Heo <tj@kernel.org>
---
drivers/ata/libata-core.c | 16 ++++++++--------
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 f7049cd..0c303e6 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4935,16 +4935,16 @@ int sata_scr_write_flush(struct ata_link *link, int reg, u32 val)
* None.
*
* RETURNS:
- * 1 if the port online status is available and online.
+ * True if the port online status is available and online.
*/
-int ata_link_online(struct ata_link *link)
+bool ata_link_online(struct ata_link *link)
{
u32 sstatus;
if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 &&
(sstatus & 0xf) == 0x3)
- return 1;
- return 0;
+ return true;
+ return false;
}
/**
@@ -4959,16 +4959,16 @@ int ata_link_online(struct ata_link *link)
* None.
*
* RETURNS:
- * 1 if the port offline status is available and offline.
+ * True if the port offline status is available and offline.
*/
-int ata_link_offline(struct ata_link *link)
+bool ata_link_offline(struct ata_link *link)
{
u32 sstatus;
if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 &&
(sstatus & 0xf) != 0x3)
- return 1;
- return 0;
+ return true;
+ return false;
}
#ifdef CONFIG_PM
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 42c4b6f..67640ce 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -320,6 +320,8 @@ enum {
ATA_EH_LPM = (1 << 4), /* link power management action */
ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE,
+ ATA_EH_ALL_ACTIONS = ATA_EH_REVALIDATE | ATA_EH_RESET |
+ ATA_EH_ENABLE_LINK | ATA_EH_LPM,
/* ata_eh_info->flags */
ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */
@@ -918,8 +920,8 @@ extern int sata_scr_valid(struct ata_link *link);
extern int sata_scr_read(struct ata_link *link, int reg, u32 *val);
extern int sata_scr_write(struct ata_link *link, int reg, u32 val);
extern int sata_scr_write_flush(struct ata_link *link, int reg, u32 val);
-extern int ata_link_online(struct ata_link *link);
-extern int ata_link_offline(struct ata_link *link);
+extern bool ata_link_online(struct ata_link *link);
+extern bool ata_link_offline(struct ata_link *link);
#ifdef CONFIG_PM
extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
extern void ata_host_resume(struct ata_host *host);
--
1.5.4.5
next prev parent reply other threads:[~2008-07-31 8:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 8:02 [PATCHSET #upstream] libata: implement slave_link Tejun Heo
2008-07-31 8:02 ` [PATCH 1/5] libata: make SCR access ops per-link Tejun Heo
2008-09-29 4:33 ` Jeff Garzik
2008-07-31 8:02 ` [PATCH 2/5] libata: reimplement link iterator Tejun Heo
2008-07-31 8:02 ` Tejun Heo [this message]
2008-07-31 8:02 ` [PATCH 4/5] libata: implement slave_link Tejun Heo
2008-07-31 8:02 ` [PATCH 5/5] ata_piix: drop merged SCR access and use slave_link instead Tejun Heo
2008-09-04 10:36 ` Jeff Garzik
2008-09-04 10:36 ` Tejun Heo
2008-08-13 9:41 ` [PATCHSET #upstream] libata: implement slave_link Tejun Heo
2008-08-13 9:45 ` JosephChan
2008-08-13 10:14 ` Tejun Heo
2008-09-04 9:57 ` Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1217491364-19725-4-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=JosephChan@via.com.tw \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.