Missing initio patch...

Brian Macy (bmacy@sunshinecomputing.com)
Fri, 26 Mar 1999 11:05:11 -0800


This is a multi-part message in MIME format.

------=_NextPart_000_0193_01BE7778.849EE7E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

This is the patch that I thought had been eaten from the initio driver. It
is based off of the 2.2.0pre9 version of the ini9100u files. I believe it is
from (Bas Vermeulen) bvermeul@blackstar.xs4all.nl . It provides some
clean-up for the patch I submitted to support the DOMEX 3191U (increments
version number, fixes compiling under 2.0.3x kernels, etc.). For some reason
this patch never made it into the kernel or got reverted (I thought it was
in one of the 2.2.x kernel releases).

Brian Macy

------=_NextPart_000_0193_01BE7778.849EE7E0
Content-Type: application/octet-stream;
name="initio-pre9-v1.03e.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="initio-pre9-v1.03e.patch"

diff -ur /usr/src/linux/drivers/scsi/ini9100u.c ./ini9100u.c=0A=
--- /usr/src/linux/drivers/scsi/ini9100u.c Thu Jan 21 18:57:33 1999=0A=
+++ ./ini9100u.c Thu Jan 21 13:35:53 1999=0A=
@@ -95,6 +95,10 @@=0A=
* pSRB_tail members of the HCS structure.=0A=
* 09/01/99 bv - v1.03d=0A=
* - Fixed a deadlock problem in SMP.=0A=
+ * 21/01/99 bv - v1.03e=0A=
+ * - Add support for the Domex 3192U PCI SCSI=0A=
+ * This is a slightly modified patch by=0A=
+ * Brian Macy <bmacy@sunshinecomputing.com>=0A=
=
*************************************************************************=
*/=0A=
=0A=
#define CVT_LINUX_VERSION(V,P,S) (V * 65536 + P * 256 + S)=0A=
@@ -175,7 +179,7 @@=0A=
char *i91uCopyright =3D "Copyright (C) 1996-98";=0A=
char *i91uInitioName =3D "by Initio Corporation";=0A=
char *i91uProductName =3D "INI-9X00U/UW";=0A=
-char *i91uVersion =3D "v1.03d";=0A=
+char *i91uVersion =3D "v1.03e";=0A=
=0A=
#if LINUX_VERSION_CODE >=3D CVT_LINUX_VERSION(1,3,0)=0A=
struct proc_dir_entry proc_scsi_ini9100u =3D=0A=
@@ -247,17 +251,12 @@=0A=
/* ---- EXTERNAL VARIABLES ---- */=0A=
extern HCS tul_hcs[];=0A=
=0A=
-struct id {=0A=
- int vendor_id;=0A=
- int device_id;=0A=
-};=0A=
-=0A=
-const struct id id_table[] =3D {=0A=
- { INI_VENDOR_ID, I950_DEVICE_ID },=0A=
- { INI_VENDOR_ID, I940_DEVICE_ID },=0A=
- { INI_VENDOR_ID, I935_DEVICE_ID },=0A=
- { INI_VENDOR_ID, 0x0002 },=0A=
- { DMX_VENDOR_ID, 0x0002 },=0A=
+const PCI_ID i91u_pci_devices[] =3D {=0A=
+ { INI_VENDOR_ID, I950_DEVICE_ID },=0A=
+ { INI_VENDOR_ID, I940_DEVICE_ID },=0A=
+ { INI_VENDOR_ID, I935_DEVICE_ID },=0A=
+ { INI_VENDOR_ID, I920_DEVICE_ID },=0A=
+ { DMX_VENDOR_ID, I920_DEVICE_ID },=0A=
};=0A=
=0A=
/*=0A=
@@ -351,14 +350,13 @@=0A=
int iAdapters =3D 0;=0A=
long dRegValue;=0A=
WORD wBIOS;=0A=
- const int iNumIdEntries =3D sizeof(id_table)/sizeof(id_table[0]);=0A=
int i =3D 0;=0A=
=0A=
init_i91uAdapter_table();=0A=
=0A=
- for (i=3D0; i < iNumIdEntries; i++) {=0A=
- struct id curId =3D id_table[i];=0A=
- while ((pDev =3D pci_find_device(curId.vendor_id, curId.device_id, =
pDev)) !=3D NULL) {=0A=
+ for (i =3D 0; i < TULSZ(i91u_pci_devices); i++)=0A=
+ {=0A=
+ while ((pDev =3D pci_find_device(i91u_pci_devices[i].vendor_id, =
i91u_pci_devices[i].device_id, pDev)) !=3D NULL) {=0A=
pci_read_config_dword(pDev, 0x44, (u32 *) & dRegValue);=0A=
wBIOS =3D (UWORD) (dRegValue & 0xFF);=0A=
if (((dRegValue & 0xFF00) >> 8) =3D=3D 0xFF)=0A=
@@ -366,8 +364,8 @@=0A=
wBIOS =3D (wBIOS << 8) + ((UWORD) ((dRegValue & 0xFF00) >> 8));=0A=
if (Addi91u_into_Adapter_table(wBIOS,=0A=
(pDev->base_address[0] & 0xFFFE),=0A=
- pDev->irq,=0A=
- pDev->bus->number,=0A=
+ pDev->irq,=0A=
+ pDev->bus->number,=0A=
(pDev->devfn >> 3)=0A=
) =3D=3D 0)=0A=
iAdapters++;=0A=
@@ -394,17 +392,6 @@=0A=
unsigned short command;=0A=
WORD wBIOS, wBASE;=0A=
BYTE bPCIBusNum, bInterrupt, bPCIDeviceNum;=0A=
- struct {=0A=
- unsigned short vendor_id;=0A=
- unsigned short device_id;=0A=
- } const i91u_pci_devices[] =3D=0A=
- {=0A=
- {INI_VENDOR_ID, I935_DEVICE_ID},=0A=
- {INI_VENDOR_ID, I940_DEVICE_ID},=0A=
- {INI_VENDOR_ID, I950_DEVICE_ID},=0A=
- {INI_VENDOR_ID, I920_DEVICE_ID}=0A=
- };=0A=
-=0A=
=0A=
iAdapters =3D 0;=0A=
/*=0A=
diff -ur /usr/src/linux/drivers/scsi/ini9100u.h ./ini9100u.h=0A=
--- /usr/src/linux/drivers/scsi/ini9100u.h Thu Jan 21 18:57:33 1999=0A=
+++ ./ini9100u.h Thu Jan 21 13:37:23 1999=0A=
@@ -63,7 +63,9 @@=0A=
* - Removed unused code=0A=
* 12/13/98 bv - v1.03b=0A=
* - Add spinlocks to HCS structure.=0A=
-************************************************************************=
*******/=0A=
+ * 21/01/99 bv - v1.03e=0A=
+ * - Added PCI_ID structure=0A=
+ =
*************************************************************************=
*/=0A=
=0A=
#ifndef CVT_LINUX_VERSION=0A=
#define CVT_LINUX_VERSION(V,P,S) (((V) * 65536) + ((P) * 256) + (S))=0A=
@@ -88,7 +90,7 @@=0A=
extern int i91u_biosparam(Disk *, int, int *); /*for linux v1.13 */=0A=
#endif=0A=
=0A=
-#define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: =
1.03d"=0A=
+#define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: =
1.03e"=0A=
=0A=
#if LINUX_VERSION_CODE < CVT_LINUX_VERSION(1, 3, 0)=0A=
#define INI9100U { \=0A=
@@ -207,11 +209,19 @@=0A=
#define SENSE_SIZE 14=0A=
=0A=
#define INI_VENDOR_ID 0x1101 /* Initio's PCI vendor ID */=0A=
-#define DMX_VENDOR_ID 0x134a /* Domex's PCI vendor ID */=0A=
+#define DMX_VENDOR_ID 0x134a /* Domex's PCI vendor ID */=0A=
#define I950_DEVICE_ID 0x9500 /* Initio's inic-950 product ID */=0A=
#define I940_DEVICE_ID 0x9400 /* Initio's inic-940 product ID */=0A=
#define I935_DEVICE_ID 0x9401 /* Initio's inic-935 product ID */=0A=
#define I920_DEVICE_ID 0x0002 /* Initio's other product ID */=0A=
+=0A=
+/***********************************************************************=
*/=0A=
+/* Vendor ID/Device ID Pair Structure */=0A=
+/***********************************************************************=
*/=0A=
+typedef struct PCI_ID_Struc {=0A=
+ unsigned short vendor_id;=0A=
+ unsigned short device_id;=0A=
+} PCI_ID;=0A=
=0A=
=
/************************************************************************=
/=0A=
/* Scatter-Gather Element Structure =
*/=0A=

------=_NextPart_000_0193_01BE7778.849EE7E0--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/