From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6.11-rc5+ sata_qstor] sata_qstor: eh_timeout fix (RESEND)
Date: Wed, 02 Mar 2005 09:24:44 -0500 [thread overview]
Message-ID: <4225CCAC.7010106@rtr.ca> (raw)
In-Reply-To: <4225279C.1070308@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 331 bytes --]
(I think this got missed first time around, so resubmitting here)
Here is an update to sata_qstor.c to enable full/proper
register access during eh_timeout handling.
Patch is against 2.6.11-rc5 + earlier sata_qstor cosmetic patch.
Signed-off-by: Mark Lord <mlord@pobox.com>
--
Mark Lord
Real-Time Remedies Inc.
mlord@pobox.com
[-- Attachment #2: sata_qstor-2.patch --]
[-- Type: text/x-patch, Size: 2076 bytes --]
--- linux-2.6.11-rc5+/drivers/scsi/sata_qstor.c 2005-02-24 11:28:33.000000000 -0500
+++ linux/drivers/scsi/sata_qstor.c 2005-02-28 11:19:31.000000000 -0500
@@ -38,7 +38,7 @@
#include <linux/libata.h>
#define DRV_NAME "sata_qstor"
-#define DRV_VERSION "0.03"
+#define DRV_VERSION "0.04"
enum {
QS_PORTS = 4,
@@ -120,6 +120,7 @@
static void qs_bmdma_stop(struct ata_port *ap);
static u8 qs_bmdma_status(struct ata_port *ap);
static void qs_irq_clear(struct ata_port *ap);
+static void qs_eng_timeout(struct ata_port *ap);
static Scsi_Host_Template qs_ata_sht = {
.module = THIS_MODULE,
@@ -152,7 +153,7 @@
.phy_reset = qs_phy_reset,
.qc_prep = qs_qc_prep,
.qc_issue = qs_qc_issue,
- .eng_timeout = ata_eng_timeout,
+ .eng_timeout = qs_eng_timeout,
.irq_handler = qs_intr,
.irq_clear = qs_irq_clear,
.scr_read = qs_scr_read,
@@ -212,7 +213,7 @@
/* nothing */
}
-static void qs_enter_reg_mode(struct ata_port *ap)
+static inline void qs_enter_reg_mode(struct ata_port *ap)
{
u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000);
@@ -220,17 +221,34 @@
readb(chan + QS_CCT_CTR0); /* flush */
}
-static void qs_phy_reset(struct ata_port *ap)
+static inline void qs_reset_channel_logic(struct ata_port *ap)
{
u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000);
- struct qs_port_priv *pp = ap->private_data;
- pp->state = qs_state_idle;
writeb(QS_CTR1_RCHN, chan + QS_CCT_CTR1);
+ readb(chan + QS_CCT_CTR0); /* flush */
qs_enter_reg_mode(ap);
+}
+
+static void qs_phy_reset(struct ata_port *ap)
+{
+ struct qs_port_priv *pp = ap->private_data;
+
+ pp->state = qs_state_idle;
+ qs_reset_channel_logic(ap);
sata_phy_reset(ap);
}
+static void qs_eng_timeout(struct ata_port *ap)
+{
+ struct qs_port_priv *pp = ap->private_data;
+
+ if (pp->state != qs_state_idle) /* healthy paranoia */
+ pp->state = qs_state_mmio;
+ qs_reset_channel_logic(ap);
+ ata_eng_timeout(ap);
+}
+
static u32 qs_scr_read (struct ata_port *ap, unsigned int sc_reg)
{
if (sc_reg > SCR_CONTROL)
prev parent reply other threads:[~2005-03-02 14:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-02 2:40 [SATA] libata-dev queue updated Jeff Garzik
2005-03-02 14:24 ` Mark Lord [this message]
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=4225CCAC.7010106@rtr.ca \
--to=liml@rtr.ca \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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.