public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Patch for reset in ini9100u [Initio 9100U(W)]
@ 2004-01-06 23:14 Jonathan McDowell
  2004-01-08  0:56 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan McDowell @ 2004-01-06 23:14 UTC (permalink / raw)
  To: linux-scsi, linux-kernel

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 []                                     [

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-01-18 21:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-06 23:14 Patch for reset in ini9100u [Initio 9100U(W)] Jonathan McDowell
2004-01-08  0:56 ` James Bottomley
2004-01-18 21:30   ` Jonathan McDowell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox