[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20061117210827.17052.46206.stgit@localhost.localdomain>
Date: Fri, 17 Nov 2006 13:08:27 -0800
From: "Darrick J. Wong" <djwong@...ibm.com>
To: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: alexisb@...ibm.com
Subject: [PATCH 13/15] sas_ata: Implement a libata error handler
Signed-off-by: Darrick J. Wong <djwong@...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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists