1SUBJECT 2------- 3AM53/79C974 PC-SCSI Driver 4 5 6DISCLAIMER 7---------- 8*** THIS SHOULD BE CONSIDERED AS BETA SOFTWARE *** 9*** USE AT YOUR OWN RISK! *** 10 11 12Copyright 13--------- 14The architecture and much of the code of this device driver was 15originally developed by Drew Eckhardt for the NCR5380. The 16following copyrights apply: 17 18For the architecture and all pieces of code which can also be found 19in the NCR5380 device driver: 20Copyright 1993, Drew Eckhardt 21 Visionary Computing 22 (Unix and Linux consulting and custom programming) 23 drew@colorado.edu 24 +1 (303) 666-5836 25 26The AM53C974_nobios_detect code was originally developed by 27Robin Cutshaw (robin@xfree86.org) and is used here in a 28slightly modified form. 29 30For the remaining code: 31 Copyright 1994, D. Frieauff 32 EMail: fri@rsx42sun0.dofn.de 33 Phone: x49-7545-8-2256 , x49-7541-42305 34 35 36Version 37------- 38AM53/79C974 (PC-SCSI) Linux driver ALPHA release 0.5, 19 November 1995 39 40 41Changelog 42--------- 430.1 -> 0.2: 44 - Extended message handling re-written to eliminate 'invalid message 17' bug 45 - Parameters of AM53C974_intr adapted 46 - Debug messages structured 47 - Spelling improved 480.2 -> 0.3: 49 - README file updated -- please read this file up to the end! 50 - Automatic scanning of io_port and irq implemented; no need for BIOS32 51 anymore 52 - Improved configuration (now via LILO parameter string) 53 - Cleanup of probing and initialization code 54 - Improved sync. negotiation (can be setup individually for every device) 55 - Improved/ debugged code for reception of ext. messages 560.3 -> 0.4: 57 - Improved PCI probing and initialization code 58 - Compatibility changes for Linux 1.3.x 590.4 -> 0.5: 60 - Compatibility changes for Linux 1.3.42 61 62 63Bugs & Todo 64----------- 65 - Add proc info function 66 - Support SCSI-2 tagged queuing 67 - Finalize abort code 68 69 70Features 71-------- 72This driver supports asynchronous and synchronous SCSI-I and SCSI-II 73devices. It is capable of transfer rate and synchronous negotiation 74(see below). The driver supports scatter-gather. Transfers are DMA 75based, but do not (yet) make use of the AM53/79C974 MDL mode. 76Max. transfer rate is 10MHz (whatever this is in real life). The 77transfer rate is negotiated with each device (see dmesg output). The 78AM53/79C974 has a 96-byte DMA FIFO to the PCI bus and a 16-byte SCSI 79FIFO. It provides active negation and glitch suppression functions. 80Burst DMA transfer rate is 132 MBytes/sec. 81 82 83Configuration 84------------- 85 86The following communication characteristics can be set individually 87for every SCSI device on the bus: 88 89 - enable/disable sync. negotiation 90 - transfer rate 91 - asynchronous or synchronous communication 92 - in case of sync. communication, the sync. offset 93 94The sync. offset specifies the number of bytes that can be sent or 95received from the SCSI bus without ACK resp. REQ signal. 96CAUTION: USING SYNCHRONOUS MODE ON LONG SCSI CABLES MAY CAUSE 97 COMMUNICATION PROBLEMS LEADING TO LOSS OF DATA. 98 99The default setting of the SCSI communication parameters is as follows: 100 - no negotiation 101 - 5.0 MHz transfer rate 102 - asynchronous mode 103 - zero offset 104 105The parameters can be modified by passing a string with the following 106syntax to the kernel: 107 108 AM53C974=host-scsi-id,target-scsi-id,max-rate,max-offset 109 110The parameters will be used by the driver as negotiation basis. The 111range of the rate parameter is 3 to 10 MHz. The range of the 112sync. offset parameter is 0 to 15 bytes. A value of 0 denotes 113asynchronous comm. mode. If the target cannot cope with the specified 114transfer rate, sync. mode or sync. offset, the negotiation result 115will differ from the specified values. The negotiation result is 116printed out at the end of the negotiation process (to read it, use the 117dmesg program or the appropriate syslog). The parameter strings 118(blank separated) can be passed to the kernel at the LILO prompt, or 119as part of the LILO configuration file. 120 121For example, the string "AM53C974=7,2,8,15" would be interpreted as 122follows: 123 124For communication between the controller with SCSI-ID 7 and the 125device with SCSI-ID 2 a transfer rate of 8MHz in synchronous mode with 126max. 15 bytes offset should be negotiated. 127 128As an example, here my LILO configuration file: 129 boot = /dev/sda 130 compact 131 #prompt 132 delay = 50 # optional, for systems that boot very quickly 133 vga = normal # force sane state 134 ramdisk = 0 # paranoia setting 135 root = current # use "current" root 136 image = /usr/src/linux/arch/i386/boot/zImage 137 label = linux 138 append = "AM53C974=7,0,10,0 AM53C974=7,1,10,0 AM53C974=7,2,10,15 AM53C974=7,4,10,0 AM53C974=7,5,10,0" 139 read-only 140 other = /dev/sda4 141 label = os2 142 other = /dev/sdb3 143 loader = /boot/any_d.b 144 table = /dev/sdb 145 label = setup 146 147The same parameters at the LILO prompt: 148 149 LILO boot: linux AM53C974=7,0,10,0 AM53C974=7,1,10,0 AM53C974=7,2,10,15 AM53C974=7,4,10,0 AM53C974=7,5,10,0 150 151You can override parameters specified in the LILO configuration file 152by parameters specified on the LILO command line. 153 154 155BIOS usage 156---------- 157Version 0.4 of the driver will use the BIOS, if available. Otherwise 158it will try its internal PCI scan and access routines. The driver 159assumes that the controller's SCSI-ID (usually 7) has been correctly 160loaded by the BIOS into the controller's register during system 161boot. If the driver detects that the controller's SCSI ID is not '7' 162it will print out a warning. If this happens to you please correct 163setting of the controller's SCSI-ID. If it is wrong, then edit the 164AM53C974_SCSI_ID definition in file AM53C974.h accordingly. 165 166 167Test environment 168---------------- 169This driver was tested on a Compaq XL566 with the following SCSI configuration: 1702 x HP C2247 fixed disk (internal, rate=10MHz, async.) 1711 x Micropolis 1624 fixed disk (external, rate=8MHz, sync., offset=15 bytes) 1721 x Wangtek W5525ES cartridge streamer (internal, rate=5MHz, async.) 1731 x Toshiba XM-3301B CD-ROM (external, rate=5MHz, async.) 174 175 176Known problems 177-------------- 178 - Compaq/Matsushita CD-ROM: 179 Use of this device with AM53C974 driver version 0.2 caused the kernel to 180 hang during Linux boot. If you encounter the problem, don't enable sync. 181 negotiation with the CD-ROM, i.e. simply don't specify comm. parameters 182 for this device on the LILO command line or configuration file. 183 The driver will thus use its default for the CD-ROM, which is 5MHz 184 transfer rate async and no sync. negotiation. 185 - Some disks cause problems. 186 187 188What to do if there is a SCSI problem possibly related to the driver 189-------------------------------------------------------------------- 190 191Read Klaus Liedl's WWW page (http://www-c724.uibk.ac.at/XL/). In case 192this does not help: Send me a complete description of the problem, 193including your SCSI configuration plus as much debugging information 194as possible. Don't wait until I ask you for this information. To 195enable the generation of debugging output, remove the comments from 196the following definitions in the AM53C974.h file: 197 198 AM53C974_DEBUG 199 AM53C974_DEBUG_MSG 200 AM53C974_DEBUG_KEYWAIT 201 AM53C974_DEBUG_INFO 202 AM53C974_DEBUG_INTR 203 204With these definitions enabled, the driver will enter single-step mode 205during Linux boot. Use the spacebar for stepping. Take note of at 206least the last 10 printout sections (marked by dashes) before the 207crash/hangup or whatever happens and send me all of this information 208via email. If the system can boot, use the syslogd daemon to record 209the debugging output. Maybe you can use the ramdisk for this purpose 210too (if necessary, kindly ask K. Liedl (Klaus.Liedl@uibk.ac.at) for 211support, he knows how to do it -- I never tried). Stay in email 212contact with me. Be aware that the following weeks/months could be the 213worst of your life. Note: If single-stepping takes up too much time, 214you can try to let the driver catch the problem by pressing the 'r' 215key. The driver will automatically enter single-step mode if it has 216detected something weird. 217 218 219Author's Contact Address 220----------------------- 221Email: fri@rsx42sun0.dofn.de 222Phone: x49-7545-2256 (office), x49-7541-42305 (home) 223Home address: D. Frieauff, Stockerholzstr. 27, 88048 Friedrichshafen, Germany 224 225 226!!!! Important Notice !!!! 227----------------------------- 228- Klaus Liedl maintains an excellent WWW page about Linux on Compaq XL. 229 It includes an FAQ, lots of tips & tricks as well as downloadable 230 boot disk images. The URL is: http://www-c724.uibk.ac.at/XL/ 231- Volunteer wanted for further maintenance of this driver software. I 232 don't have the time anymore to do serious support as some of you will know. 233 234 235Literature 236---------- 237 - AMD AM53C974 PC-SCSI Technical Manual, publication #18624B 238 - Amendment to the AMD AM53C974 PC-SCSI Technical Manual 239 - AMD AM79C974 PC-NET Datasheet, publication #18681 240 - Amendment to the AMD AM79C974 PC-NET Datasheet 241 242 243THANKS to 244--------- 245 - Drew Eckhardt, Robin Cutshaw, K. Liedl, Robert J. Pappas, A. Grenier, 246 Mark Stockton, David C. Niemi, Ben Craft, and many others who have helped 247