From: Jonathan McDowell <noodles@earth.li>
To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Patch for reset in ini9100u [Initio 9100U(W)]
Date: Tue, 6 Jan 2004 23:14:26 +0000 [thread overview]
Message-ID: <20040106231426.GR1845@earth.li> (raw)
Hi.
I have an IWill 2935UW SCSI controller which uses the ini9100u driver.
This has been working fine under 2.4 but I've recently built up a box of
spare bits including the controller and installed 2.6 on it. The driver
is marked broken in 2.6, apparently because of a lack of reset/abort
functionality as it compiles and runs ok. So I've taken a stab at
getting reset support back. Patch is below and it's received minimal
testing - it boots, removes the callback trace and error message and
doesn't seem to cause problems (the only disk in the machine is on this
card).
-----------
diff -u linux-2.6.1-rc2.orig/drivers/scsi/ini9100u.c linux-2.6.1-rc2/drivers/scsi/ini9100u.c
--- linux-2.6.1-rc2.orig/drivers/scsi/ini9100u.c 2004-01-06 22:56:04.000000000 +0000
+++ linux-2.6.1-rc2/drivers/scsi/ini9100u.c 2004-01-06 22:58:04.000000000 +0000
@@ -106,6 +106,8 @@
* - Changed the assumption that HZ = 100
* 10/17/03 mc - v1.04
* - added new DMA API support
+ * 06/01/04 jmd - v1.04a
+ * - Re-add reset_bus support
**************************************************************************/
#define CVT_LINUX_VERSION(V,P,S) (V * 65536 + P * 256 + S)
@@ -149,6 +151,7 @@
.queuecommand = i91u_queue,
// .abort = i91u_abort,
// .reset = i91u_reset,
+ .eh_bus_reset_handler = i91u_bus_reset,
.bios_param = i91u_biosparam,
.can_queue = 1,
.this_id = 1,
@@ -161,7 +164,7 @@
char *i91uCopyright = "Copyright (C) 1996-98";
char *i91uInitioName = "by Initio Corporation";
char *i91uProductName = "INI-9X00U/UW";
-char *i91uVersion = "v1.04";
+char *i91uVersion = "v1.04a";
#define TULSZ(sz) (sizeof(sz) / sizeof(sz[0]))
#define TUL_RDWORD(x,y) (short)(inl((int)((ULONG)((ULONG)x+(UCHAR)y)) ))
@@ -587,6 +590,15 @@
return tul_device_reset(pHCB, (ULONG) SCpnt, SCpnt->device->id, reset_flags);
}
+int i91u_bus_reset(Scsi_Cmnd * SCpnt)
+{
+ HCS *pHCB;
+
+ pHCB = (HCS *) SCpnt->device->host->base;
+ tul_reset_scsi_bus(pHCB);
+ return SUCCESS;
+}
+
/*
* Return the "logical geometry"
*/
diff -u linux-2.6.1-rc2.orig/drivers/scsi/ini9100u.h linux-2.6.1-rc2/drivers/scsi/ini9100u.h
--- linux-2.6.1-rc2.orig/drivers/scsi/ini9100u.h 2003-12-18 02:58:56.000000000 +0000
+++ linux-2.6.1-rc2/drivers/scsi/ini9100u.h 2004-01-06 22:58:35.000000000 +0000
@@ -82,10 +82,11 @@
extern int i91u_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
extern int i91u_abort(Scsi_Cmnd *);
extern int i91u_reset(Scsi_Cmnd *, unsigned int);
+extern int i91u_bus_reset(Scsi_Cmnd *);
extern int i91u_biosparam(struct scsi_device *, struct block_device *,
sector_t, int *);
-#define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 1.03g"
+#define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 1.04a"
#define VIRT_TO_BUS(i) (unsigned int) virt_to_bus((void *)(i))
#define ULONG unsigned long
-----------
J.
--
] http://www.earth.li/~noodles/ [] "0 tends to simplify things a bit [
] PGP/GPG Key @ the.earth.li [] when you multiply by it..." -- [
] via keyserver, web or email. [] Bill McColl [
] RSA: 4DC4E7FD / DSA: 5B430367 [] [
next reply other threads:[~2004-01-06 23:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-06 23:14 Jonathan McDowell [this message]
2004-01-08 0:56 ` Patch for reset in ini9100u [Initio 9100U(W)] James Bottomley
2004-01-18 21:30 ` Jonathan McDowell
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=20040106231426.GR1845@earth.li \
--to=noodles@earth.li \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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.