⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ibmmca.txt

📁 linux 内核源代码
💻 TXT
📖 第 1 页 / 共 5 页
字号:
               -=< 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 source code   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 Bug reports     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 of this file to simplify 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   text size 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                  Permissions       0     Command Interface Register 1    Read/Write       1     Command Interface Register 2    Read/Write       2     Command Interface Register 3    Read/Write       3     Command Interface Register 4    Read/Write       4     Attention Register              Read/Write       5     Basic Control Register          Read/Write       6     Interrupt Status Register       Read       7     Basic Status Register           Read      After the I/O-address range is assigned, the host-adapter is assigned   to a local structure which keeps all adapter information needed for the   driver itself and the mid- and higher-level SCSI-drivers. The SCSI pun/lun   and the adapters' ldn tables are initialized and get probed afterwards by   the check_devices() function. If no further adapters are found,    ibmmca_detect() quits.      2.2 Physical Units, Logical Units, and Logical Devices   ------------------------------------------------------   There can be up to 56 devices on the SCSI bus (besides the adapter):   there are up to 7 "physical units" (each identified by physical unit    number or pun, also called the scsi id, this is the number you select   with hardware jumpers), and each physical unit can have up to 8    "logical units" (each identified by logical unit number, or lun,    between 0 and 7). The IBM SCSI-2 F/W adapter offers this on up to two   busses and provides support for 30 logical devices at the same time, where   in wide-addressing mode you can have 16 puns with 32 luns on each device.   This section describes the handling of devices on non-F/W adapters.   Just imagine, that you can have 16 * 32 = 512 devices on a F/W adapter   which means a lot of possible devices for such a small machine.   Typically the adapter has pun=7, so puns of other physical units   are between 0 and 6(15). On a wide-adapter a pun higher than 7 is   possible, but is normally not used. Almost all physical units have only    one logical unit, with lun=0. A CD-ROM jukebox would be an example of a    physical unit with more than one logical unit.   The embedded microprocessor of the IBM SCSI-subsystem hides the complex   two-dimensional (pun,lun) organization from the operating system.   When the machine is powered-up (or rebooted), the embedded microprocessor    checks, on its own, all 56 possible (pun,lun) combinations, and the first    15 devices found are assigned into a one-dimensional array of so-called    "logical devices", identified by "logical device numbers" or ldn. The last    ldn=15 is reserved for the subsystem itself. Wide adapters may have    to check up to 15 * 8 = 120 pun/lun combinations.      2.3 SCSI-Device Recognition and Dynamical ldn Assignment   --------------------------------------------------------   One consequence of information hiding is that the real (pun,lun)       numbers are also hidden. The two possibilities to get around this problem   are to offer fake pun/lun combinations to the operating system or to    delete the whole mapping of the adapter and to reassign the ldns, using   the immediate assign command of the SCSI-subsystem for probing through   all possible pun/lun combinations.  An ldn is a "logical device number"   which is used by IBM SCSI-subsystems to access some valid SCSI-device.   At the beginning of the development of this driver, the following approach    was used:      First, the driver checked the ldn's (0 to 6) to find out which ldn's   have devices assigned. This was done by the functions check_devices() and   device_exists(). The interrupt handler has a special paragraph of code   (see local_checking_phase_flag) to assist in the checking. Assume, for   example, that three logical devices were found assigned at ldn 0, 1, 2.   These are presented to the upper layer of Linux SCSI driver   as devices with bogus (pun, lun) equal to (0,0), (1,0), (2,0).    On the other hand, if the upper layer issues a command to device   say (4,0), this driver returns DID_NO_CONNECT error.   In a second step of the driver development, the following improvement has   been applied: The first approach limited the number of devices to 7, far   fewer than the 15 that it could use, then it just mapped ldn ->    (ldn/8,ldn%8) for pun,lun.  We ended up with a real mishmash of puns

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -