-=< The IBM Microchannel SCSI-Subsystem >=-
for the IBM PS/2 series
Low Level Software-Driver for Linux
Copyright (c) 1995 Strom Systems, Inc. under the terms of the GNU
General Public License. Originally written by Martin Kolinek, December 1995.
Officially modified and maintained by Michael Lang since January 1999.
Version 4.0a
Last update: January 3, 2001
Before you Start
----------------
This is the common README.ibmmca file for all driver releases of the
IBM MCA SCSI driver for Linux. Please note, that driver releases 4.0
or newer do not work with kernel versions older than 2.4.0, while driver
versions older than 4.0 do not work with kernels 2.4.0 or later! If you
try to compile your kernel with the wrong driver source, the
compilation is aborted and you get a corresponding error message. This is
no bug in the driver. It prevents you from using the wrong sourcecode
with the wrong kernel version.
Authors of this Driver
----------------------
- Chris Beauregard (improvement of the SCSI-device mapping by the driver)
- Martin Kolinek (origin, first release of this driver)
- Klaus Kudielka (multiple SCSI-host management/detection, adaption to
Linux Kernel 2.1.x, module support)
- Michael Lang (assigning original pun/lun mapping, dynamical ldn
assignment, rewritten adapter detection, this file,
patches, official driver maintenance and subsequent
debugging, related with the driver)
Table of Contents
-----------------
1 Abstract
2 Driver Description
2.1 IBM SCSI-Subsystem Detection
2.2 Physical Units, Logical Units, and Logical Devices
2.3 SCSI-Device Recognition and dynamical ldn Assignment
2.4 SCSI-Device Order
2.5 Regular SCSI-Command-Processing
2.6 Abort & Reset Commands
2.7 Disk Geometry
2.8 Kernel Boot Option
2.9 Driver Module Support
2.10 Multiple Hostadapter Support
2.11 /proc/scsi-Filesystem Information
2.12 /proc/mca-Filesystem Information
2.13 Supported IBM SCSI-Subsystems
2.14 Linux Kernel Versions
3 Code History
4 To do
5 Users' Manual
5.1 Commandline Parameters
5.2 Troubleshooting
5.3 Bugreports
5.4 Support WWW-page
6 References
7 Credits to
7.1 People
7.2 Sponsors & Supporters
8 Trademarks
9 Disclaimer
* * *
1 Abstract
----------
This README-file describes the IBM SCSI-subsystem low level driver for
Linux. The descriptions which were formerly kept in the source-code have
been taken out to this file to easify the codes' readability. The driver
description has been updated, as most of the former description was already
quite outdated. The history of the driver development is also kept inside
here. Multiple historical developments have been summarized to shorten the
textsize a bit. At the end of this file you can find a small manual for
this driver and hints to get it running on your machine.
2 Driver Description
--------------------
2.1 IBM SCSI-Subsystem Detection
--------------------------------
This is done in the ibmmca_detect() function. It first checks, if the
Microchannel-bus support is enabled, as the IBM SCSI-subsystem needs the
Microchannel. In a next step, a free interrupt is chosen and the main
interrupt handler is connected to it to handle answers of the SCSI-
subsystem(s). If the F/W SCSI-adapter is forced by the BIOS to use IRQ11
instead of IRQ14, IRQ11 is used for the IBM SCSI-2 F/W adapter. In a
further step it is checked, if the adapter gets detected by force from
the kernel commandline, where the I/O port and the SCSI-subsystem id can
be specified. The next step checks if there is an integrated SCSI-subsystem
installed. This register area is fixed through all IBM PS/2 MCA-machines
and appears as something like a virtual slot 10 of the MCA-bus. On most
PS/2 machines, the POS registers of slot 10 are set to 0xff or 0x00 if not
integrated SCSI-controller is available. But on certain PS/2s, like model
9595, this slot 10 is used to store other information which at earlier
stage confused the driver and resulted in the detection of some ghost-SCSI.
If POS-register 2 and 3 are not 0x00 and not 0xff, but all other POS
registers are either 0xff or 0x00, there must be an integrated SCSI-
subsystem present and it will be registered as IBM Integrated SCSI-
Subsystem. The next step checks, if there is a slot-adapter installed on
the MCA-bus. To get this, the first two POS-registers, that represent the
adapter ID are checked. If they fit to one of the ids, stored in the
adapter list, a SCSI-subsystem is assumed to be found in a slot and will be
registered. This check is done through all possible MCA-bus slots to allow
more than one SCSI-adapter to be present in the PS/2-system and this is
already the first point of problems. Looking into the technical reference
manual for the IBM PS/2 common interfaces, the POS2 register must have
different interpretation of its single bits to avoid overlapping I/O
regions. While one can assume, that the integrated subsystem has a fix
I/O-address at 0x3540 - 0x3547, further installed IBM SCSI-adapters must
use a different I/O-address. This is expressed by bit 1 to 3 of POS2
(multiplied by 8 + 0x3540). Bits 2 and 3 are reserved for the integrated
subsystem, but not for the adapters! The following list shows, how the
bits of POS2 and POS3 should be interpreted.
The POS2-register of all PS/2 models' integrated SCSI-subsystems has the
following interpretation of bits:
Bit 7 - 4 : Chip Revision ID (Release)
Bit 3 - 2 : Reserved
Bit 1 : 8k NVRAM Disabled
Bit 0 : Chip Enable (EN-Signal)
The POS3-register is interpreted as follows (for most IBM SCSI-subsys.):
Bit 7 - 5 : SCSI ID
Bit 4 - 0 : Reserved = 0
The slot-adapters have different interpretation of these bits. The IBM SCSI
adapter (w/Cache) and the IBM SCSI-2 F/W adapter use the following
interpretation of the POS2 register:
Bit 7 - 4 : ROM Segment Address Select
Bit 3 - 1 : Adapter I/O Address Select (*8+0x3540)
Bit 0 : Adapter Enable (EN-Signal)
and for the POS3 register:
Bit 7 - 5 : SCSI ID
Bit 4 : Fairness Enable (SCSI ID3 f. F/W)
Bit 3 - 0 : Arbitration Level
The most modern product of the series is the IBM SCSI-2 F/W adapter, it
allows dual-bus SCSI and SCSI-wide addressing, which means, PUNs may be
between 0 and 15. Here, Bit 4 is the high-order bit of the 4-bit wide
adapter PUN expression. In short words, this means, that IBM PS/2 machines
can only support 1 single integrated subsystem by default. Additional
slot-adapters get ports assigned by the automatic configuration tool.
One day I found a patch in ibmmca_detect(), forcing the I/O-address to be
0x3540 for integrated SCSI-subsystems, there was a remark placed, that on
integrated IBM SCSI-subsystems of model 56, the POS2 register was showing 5.
This means, that really for these models, POS2 has to be interpreted
sticking to the technical reference guide. In this case, the bit 2 (4) is
a reserved bit and may not be interpreted. These differences between the
adapters and the integrated controllers are taken into account by the
detection routine of the driver on from version >3.0g.
Every time, a SCSI-subsystem is discovered, the ibmmca_register() function
is called. This function checks first, if the requested area for the I/O-
address of this SCSI-subsystem is still available and assigns this I/O-
area to the SCSI-subsystem. There are always 8 sequential I/O-addresses
taken for each individual SCSI-subsystem found, which are:
Offset Type