lkml.org 
[lkml]   [2006]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/15] sas_ata: Implement a libata error handler
Date



Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
---

drivers/scsi/libsas/sas_ata.c | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index e897140..7338775 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -351,6 +351,27 @@ static u32 sas_ata_scr_read(struct ata_p
}
}

+static int sas_ata_hardreset(struct ata_port *ap, unsigned int *classes)
+{
+ struct domain_device *dev = ap->private_data;
+ struct sas_phy *phy = dev->port->phy;
+
+ return sas_phy_reset(phy, 1);
+}
+
+static int sas_ata_softreset(struct ata_port *ap, unsigned int *classes)
+{
+ struct domain_device *dev = ap->private_data;
+ struct sas_phy *phy = dev->port->phy;
+
+ return sas_phy_reset(phy, 0);
+}
+
+static void sas_ata_eh(struct ata_port *ap)
+{
+ ata_do_eh(ap, NULL, sas_ata_softreset, sas_ata_hardreset, NULL);
+}
+
static struct ata_port_operations sas_sata_ops = {
.port_disable = ata_port_disable,
.check_status = sas_ata_check_status,
@@ -364,7 +385,8 @@ static struct ata_port_operations sas_sa
.port_start = ata_sas_port_start,
.port_stop = ata_sas_port_stop,
.scr_read = sas_ata_scr_read,
- .scr_write = sas_ata_scr_write
+ .scr_write = sas_ata_scr_write,
+ .error_handler = sas_ata_eh
};

static struct ata_port_info sata_port_info = {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-11-17 22:07    [W:0.122 / U:1.960 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site