]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.25/patches.drivers/libata-misc-updates-to-prepare-for-slave-link
Reenabled linux-xen and xen-image build
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.drivers / libata-misc-updates-to-prepare-for-slave-link
CommitLineData
00e5a55c
BS
1From b5b3fa386b8f96c7fa92e507e5deddc2637924b4 Mon Sep 17 00:00:00 2001
2From: Tejun Heo <tj@kernel.org>
3Date: Thu, 31 Jul 2008 17:02:42 +0900
4Subject: [PATCH] libata: misc updates to prepare for slave link
5References: bnc#441420
6
7* Add ATA_EH_ALL_ACTIONS.
8
9* Make sata_link_{on|off}_line() return bool instead of int.
10
11Signed-off-by: Tejun Heo <tj@kernel.org>
12Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
13Signed-off-by: Tejun Heo <teheo@suse.de>
14---
15 drivers/ata/libata-core.c | 16 ++++++++--------
16 include/linux/libata.h | 6 ++++--
17 2 files changed, 12 insertions(+), 10 deletions(-)
18
19--- a/drivers/ata/libata-core.c
20+++ b/drivers/ata/libata-core.c
21@@ -5052,16 +5052,16 @@ int sata_scr_write_flush(struct ata_link
22 * None.
23 *
24 * RETURNS:
25- * 1 if the port online status is available and online.
26+ * True if the port online status is available and online.
27 */
28-int ata_link_online(struct ata_link *link)
29+bool ata_link_online(struct ata_link *link)
30 {
31 u32 sstatus;
32
33 if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 &&
34 (sstatus & 0xf) == 0x3)
35- return 1;
36- return 0;
37+ return true;
38+ return false;
39 }
40
41 /**
42@@ -5076,16 +5076,16 @@ int ata_link_online(struct ata_link *lin
43 * None.
44 *
45 * RETURNS:
46- * 1 if the port offline status is available and offline.
47+ * True if the port offline status is available and offline.
48 */
49-int ata_link_offline(struct ata_link *link)
50+bool ata_link_offline(struct ata_link *link)
51 {
52 u32 sstatus;
53
54 if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 &&
55 (sstatus & 0xf) != 0x3)
56- return 1;
57- return 0;
58+ return true;
59+ return false;
60 }
61
62 #ifdef CONFIG_PM
63--- a/include/linux/libata.h
64+++ b/include/linux/libata.h
65@@ -321,6 +321,8 @@ enum {
66 ATA_EH_LPM = (1 << 4), /* link power management action */
67
68 ATA_EH_PERDEV_MASK = ATA_EH_REVALIDATE,
69+ ATA_EH_ALL_ACTIONS = ATA_EH_REVALIDATE | ATA_EH_RESET |
70+ ATA_EH_ENABLE_LINK | ATA_EH_LPM,
71
72 /* ata_eh_info->flags */
73 ATA_EHI_HOTPLUGGED = (1 << 0), /* could have been hotplugged */
74@@ -921,8 +923,8 @@ extern int sata_scr_valid(struct ata_lin
75 extern int sata_scr_read(struct ata_link *link, int reg, u32 *val);
76 extern int sata_scr_write(struct ata_link *link, int reg, u32 val);
77 extern int sata_scr_write_flush(struct ata_link *link, int reg, u32 val);
78-extern int ata_link_online(struct ata_link *link);
79-extern int ata_link_offline(struct ata_link *link);
80+extern bool ata_link_online(struct ata_link *link);
81+extern bool ata_link_offline(struct ata_link *link);
82 #ifdef CONFIG_PM
83 extern int ata_host_suspend(struct ata_host *host, pm_message_t mesg);
84 extern void ata_host_resume(struct ata_host *host);