Title |
Adaptec SCSI controller for QNX2 |
Ref. No. |
QNX.000009457 |
Category(ies) |
Filesystem |
Issue |
Trying to get the disk.ahascsi to work on fast Pentium II/III computers.
We are using the Adaptec 1542CP scsi controller, which works on a Pentium 100.
adaptec_test returns error code fffc i.e. Unable to setup interrupt.
We are using Int 12 (PS2 mouse has been disabled in setup) IO base address 330, DMA channel 5, and default BIOS address DC000 (QNX ArcNet card is set at CC000).
|
Solution |
The problem you are experiencing is most likely due to the fact that QNX2 was not designed for Faster PII and PIII machines. Try the troubleshooting tips contained later in this document, and if you still have problems, then see the article on "Problems booting QNX2.21 on Pentium II/III machines".
Notes on the Adaptec SCSI host adapter driver -- disk.ahascsi
Getting Started --------------- The hard disk driver disk.ahascsi is a SCSI hard disk driver which works with the Adaptec line of SCSI host adapters. The host adapter models currently supported are: AHA-1540A/1542A (ISA bus) AHA-1540B/1542B (ISA bus) AHA-1640/1642 (MCA bus) AHA-1740/1742 (EISA bus)
This incarnation of the driver supports up to seven physical SCSI devices (targets). Direct-Access Devices (including removable media drives), Winchesters, WORMs, CD-ROMs and magneto-optical (erasable optical) drives are all currently supported. When the driver is mounted it performs auto sensing to determine the base port address, IRQ level, and DMA channel. After setting up the interrupt service routine the driver is ready to mount physical SCSI devices. A SCSI device is installed by mounting it using its target ID. The target ID is passed to the mount command by the "p=" option, the number specified is the target ID plus one. For example, target 3 is a CD-ROM and targets 0 and 1 are SCSI hard disk drives; to mount the first QNX partition of target 1 as drive 3 you would issue:
mount disk 3 /drivers/disk.ahascsi p=2 pa=qnx
(Note how the physical drive number given to mount with "p=2" is the SCSI target ID plus one) To mount the CD-ROM as drive 6 you could use:
mount disk 6 d=3 p=4
Since SCSI drives are addressed by block number and not by head, cylinder, and sector; you should NOT specify the h=, t=, n= parameters when mounting the device as this will confuse the driver. The driver automatically sets the heads to 64, the number of sectors per track to 32 and calculates the appropriate number of cylinders. The disk.ahascsi driver is a caching driver and therefore can make use of the a1, a2, and a3 parameters of mount. The default settings are 8 buffers of 8 blocks each (a1=8 a2=8).
To gain a fairly significant increase in sequential read/write performance without affecting random access performance too much, the driver can be mounted with 8 buffers of 16 blocks each:
mount disk 3 /drivers/disk.ahascsi p=2 pa=qnx a1=8 a2=16
If the auto sensing is causing a problem when attempting to mount the driver, it can be over-ridden by specifying the correct base port address:
mount disk 3 /drivers/disk.ahascsi p=2 pa=qnx c=330
In order to boot from hard disk the BIOS ROM must be enabled and the base port address must be set to 330 hex (this is a restriction of the BIOS, not the driver).
A Note on CD-ROMs and WORMs ---------------------------
This version of the AHA-154xA driver supports Read-Only(CD-ROM) and Write-Once(WORM) devices. As neither of these types of devices allow the media to be erased, a QNX file system cannot be placed onto these devices. These devices can only be accessed with the low-level disk routines: disk_open(), disk_close(), disk_read_blk(), and disk_write_blk(). For specialized applications which may need greater functionality than this, there is a method to send a SCSI command through the file system. For example source on how to do this please see the source on the update system in the "/nfree/disk/scsi/control" directory. You will also need the libraries from the "/nfree/disk/libs" directory.
Using the AHA-154xA with a standard hard disk controller --------------------------------------------------------
The Adaptec AHA-154xA can be used in conjunction with a standard AT compatible hard disk controller. The two possible areas of conflict which must be resolved are the BIOS address space of the cards in your system and in the case of the AHA-1542A, which card is to control the floppy drives. If cards in your system have over-lapping BIOS address spaces you will experience unpredictable behavior from the system and it will usually become catatonic.
By default the QNXnet networking cards are shipped with their BIOS address space starting at segment DC00 as it happens the Adaptec AHA-154xA is also shipped with this address range selected. In order for these cards to get along one of them will have to move to a new address. One possibility is to move the AHA-154xA's address space to start at segment D800. This is accomplished by placing a jumper over the left hand pair of pins of J10 on the Adaptec card and removing any jumper from the right hand pair of pins of J10.
If you are installing an AHA-1542A which has a floppy controller built into it and you also have a standard hard disk/floppy disk controller in the system the floppy controller of one of the cards will have to be disabled. To do this you can use the floppy controller on the 1542A and disable the other floppy controller by moving it's base port address to the secondary address range 370-377 (hex).
A system with a standard hard disk controller, an AHA-154xA, a QNXnet card and a VGA video card installed in it, may have it's BIOS addresses arranged like this:
VGA video card C000 Hard disk controller C800 Adaptec AHA-154xA D800 QNXnet network card DC00
Trouble Shooting ---------------- If you are having problems getting started with your AHA-154xA card here is a check list you can review.
- Are all the jumpers except those which need to be changed in their default positions?
- Is the card's BIOS in conflict with any other BIOS in the system?
- Do all devices on the SCSI bus (including the AHA-154xA) have parity uniformly enabled or disabled?
- If you have both internal and external SCSI devices attached to the card have you removed the termination resistors from the AHA-154xA?
- Are you sure you are specifying the proper target ID to the mount command (p=target_id + 1 ) ? Is the target ID set correctly on the device?
- If you mount the device with the "+v" option what error code is returned?
Possible Error Codes 0xEF (-17) Unable to locate SCSI Host Adapter 0xEE (-18) SCSI Host Adapter failed diagnostics 0xED (-19) Unable to attach to free port 0xEC (-20) Unable to initialize interrupt vector 0xEB (-21) 0xEA (-22) Error initializing mail-boxes 0xE9 (-23) Error executing AHA-154xA command 0xE8 (-24) Card installed is not supported by this version 0xE7 (-25) Device not ready 0xE6 (-26) Unable to start device 0xE5 (-27) Error during SCSI Inquiry 0xE4 (-28) Error during SCSI Request Capacity 0xE3 (-29) Error during SCSI Request Partial Capacity 0xE2 (-30) No SCSI devices found 0xE1 (-31) 0xE0 (-32) 0xDF (-33) Unexpected event type 0xDE (-34) Unsupported SCSI version 0xDD (-35) Unsupported SCSI device 0xDC (-36) Unsupported user command
For more details on configuring the Adaptec AHA-154xA card please refer to the appropriate installation guide:
AHA-1540A/1542A Installation Guide AHA-1540B/1542B Installation Guide AHA-1740/1742 Installation Guide |
|