ibmmca fixes for 2.1.92 (was: MCA in or out?)

Klaus Kudielka (kudielka@crl.go.jp)
Thu, 09 Apr 1998 11:05:31 +0900


Shaw Carruthers wrote:
> So ibmmca_scsi_setup is broken and all my patch does is bodge it so
> it works as documented.

Well, the documentation is broken, not the driver. Sorry about that. But, if you
think about it, your patch doesn't make it work as documented, either. Even on
your machine: Did you, for example, try a host adapter ID of 6?

The driver is just lacking the feature of configuring the host adapter SCSI ID
if and only if you have compiled the driver into the kernel. I didn't consider
this as a problem until now, since modern distributions use modules, anyway.

Here is a trivial patch which should fix all of those concerns:

--- linux/Documentation/Configure.help.orig Thu Apr 9 09:27:00 1998
+++ linux/Documentation/Configure.help Thu Apr 9 10:14:19 1998
@@ -2814,20 +2814,23 @@
series computers. These machines have an MCA bus, so you need to say
Y to "MCA support" as well and read Documentation/mca.txt.
If the adapter isn't found during boot (a common problem for models
- 56, 57, 76, and 77) you'll need to use the 'ibmmcascsi=<pun>' kernel
- option, where <pun> is the id of the SCSI subsystem (usually 7, but
- if that doesn't work check your reference diskette). Owners of model
- 95 with a LED-matrix-display can in addition activate some activity
- info like under OS/2, but more informative, by setting
- 'ibmmcascsi=display' as an additional kernel parameter. Try "man
- bootparam" or see the documentation of your boot loader about how to
- pass options to the kernel. The lilo procedure is also explained in
- the SCSI-HOWTO, available via ftp (user: anonymous) in
+ 56, 57, 76, and 77) you'll need to use the 'ibmmcascsi=<io>,<pun>'
+ kernel option, where <io> and <pun> are I/O address and SCSI ID of
+ the host adapter, respectively (usually 0x3540 and 7, but if that
+ doesn't work, check your reference diskette).
+ The model 95 LED-matrix-display can show SCSI bus activity. Enable
+ this feature by setting 'ibmmcascsi=display' as additional kernel
+ parameter.
+ Try "man bootparam" or see the documentation of your boot loader
+ about how to pass options to the kernel. The lilo procedure is also
+ explained in the SCSI-HOWTO, available via ftp (user: anonymous) in
sunsite.unc.edu:/pub/Linux/docs/HOWTO.
If you want to compile this driver as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
say M here and read Documentation/modules.txt. The module will be
- called ibmmca.o.
+ called ibmmca.o. Possible module parameters are 'io_port=<io>',
+ 'scsi_id=<pun>', and 'use_display=1' - corresponding to the
+ kernel parameters discussed above.

Standard SCSI-order
CONFIG_IBMMCA_SCSI_ORDER_STANDARD
--- linux/drivers/scsi/ibmmca.c.orig Thu Apr 9 09:35:41 1998
+++ linux/drivers/scsi/ibmmca.c Thu Apr 9 10:44:13 1998
@@ -822,6 +822,7 @@
#ifdef MODULE_PARM
MODULE_PARM(io_port, "1-" __MODULE_STRING(IM_MAX_HOSTS) "i");
MODULE_PARM(scsi_id, "1-" __MODULE_STRING(IM_MAX_HOSTS) "i");
+MODULE_PARM(use_display, "1i");
#endif

/*counter of concurrent disk read/writes, to turn on/off disk led */
@@ -1504,8 +1505,9 @@
use_display = 1;
} else if( ints ) {
int i;
- for (i = 0; i < IM_MAX_HOSTS && i < ints[0]; i++) {
- io_port[i] = ints[i+1];
+ for (i = 0; i < IM_MAX_HOSTS && 2*i+2 <= ints[0]; i++) {
+ io_port[i] = ints[2*i+1];
+ scsi_id[i] = ints[2*i+2];
}
}
}

--
Klaus Kudielka			     Communications Research Laboratory
Tel. ++81-42-327-6494	       Ministry of Posts and Telecommunications
Fax. ++81-42-327-6699				  Nukui-Kitamachi 4-2-1
E-mail kudielka@crl.go.jp		 Koganei, Tokyo 184-8795, Japan

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu