Linkspfeil Back to Linux/Free Software Page

Linux DC390/AM53C974 (tmscsim) SCSI driver


The Linux DC390 PCI SCSI driver was originally written by a Tekram engineer to support the Tekram DC390(T) PCI Fast SCSI host adpator. It was enhanced by me and now supports any AM53C974 / AM79C974 based adaptor, such as DawiControl2974, Qlogic Fast! PCI Basic and some onboard PCscsi/PCnet(R) solutions.

Note, that there is another AM53C974 driver in the Linux kernel, but it has some problems (e.g. aborts, when disconnection is enabled) and is not very well maintained, so I'd suggest using this driver for AM53C974 based SCSI controllers.

Note, that the Tekram DC390W/U/F are NCR/Sym53C825/875 based and very well supported by Gerard Roudier's ncr53c8xx driver. Consult /proc/pci (or use lspci on 2.1 kernels without /proc/pci support), if you are not sure about the chip used on your SCSI controller.


Note that the driver is included into the Linux kernel source tree, so you only need to download files, if the driver there is older than the one found here, and you want to upgrade.

DC390 drivers in the kernel (98/12/28):

1.12 (Use dc390- 2036p21-20b1.diff.gz to upgrade to 2.0b1 and dc390-2037p1-20d.diff.gz to go to 2.0d)
2.0b1 (Use dc390-2037p1-20d.diff.gz to upgrade to 2.0d)
2.0d (No need to upgrade. Look out for a patch to the kernel config files or wait for pre5. (This has nothing to do with the DC390 driver.))
1.12 (Use dc390-21125-20b.diff.gz and dc390-21129-20d.diff.gz to upgrade to 2.0d)
2.0b (Use dc390-21129-20d.diff.gz to upgrade to 2.0d)
2.1.132-ac3 (ac = Alan Cox)
2.1.133-pre3 / 2.2.0-pre1
2.0d (No need to upgrade ... but you may want to try 2.0f)
2.0d (You should upgarde to 2.0f)
If you are not sure, what driver is in your kernel source tree, just have a look at linux/drivers/scsi/dc390.h or linux/drivers/scsi/tmscsim.c. On a running kernel you can check by looking at /proc/scsi/tmscsim/?.

You can also download the latest driver source code and overwrite the driver files in the kernel source tree, however, if you prefer this to patching your kernel tree, or if the latest driver is not available as patch against your kernel. Read the included README.tmscsim file for instructions.

File DateSize Description
README98/12/283k Some (old) info on the driver
README.tmscsim99/06/2120k The driver's README file
dc390-20f1.tar.gz 2001-11-1456k Linux DC390 driver version 2.0f1
dc390-20f.tar.gz 2000-12-2055k Linux DC390 driver version 2.0f
dc390-20e7.tar.gz 2000-11-2854k Linux DC390 driver version 2.0e7
dc390-20e.tar.gz 00/05/2453k Linux DC390 driver version 2.0e
dc390-20d28.tar.gz 00/02/1452k Linux DC390 driver version 2.0d28
dc390-20d25.tar.gz 00/01/1752k Linux DC390 driver version 2.0d25
dc390-20d24.tar.gz 99/11/1552k Linux DC390 driver version 2.0d24
dc390-20d23.tar.gz 99/08/2751k Linux DC390 driver version 2.0d23
dc390-20d20.tar.gz 99/07/1952k Linux DC390 driver version 2.0d20
dc390-20d10.tar.gz 99/06/2051k Linux DC390 driver version 2.0d10
dc390-20d.tar.gz 98/12/2548k Linux DC390 driver version 2.0d
dc390-20c.tar.gz 98/11/1947k Linux DC390 driver version 2.0c
dc390-20b.tar.gz 98/10/2446k Linux DC390 driver version 2.0b
dc390-120s.tar.gz 98/08/2041k Linux DC390 driver version 1.20s
dc390-2037p1-20d.diff.gz 98/12/2513k Linux DC390 driver 2.0d: patch against kernel 2.0.37pre1 (2.0b1)
dc390-2036p21-20b1.diff.gz 98/11/1454k Linux DC390 driver 2.0b1: patch against kernel 2.0.36pre21 (1.12)
dc390-21129-20d.diff.gz 98/12/2517k Linux DC390 driver 2.0d: patch against kernel 2.1.129 (2.0b)
dc390-21125-20b.diff.gz 98/10/2751k Linux DC390 driver 2.0b: patch against kernel 2.1.125 (1.12)
dc390-20f-20f1.diff.gz 2000-11-143k Linux DC390 driver: patch 2.0f -> 2.0f1
dc390-20d-20f.diff.gz 2000-12-2044k Linux DC390 driver: patch 2.0d -> 2.0f
dc390-20e-20f.diff.gz 2000-12-209k Linux DC390 driver: patch 2.0e -> 2.0f
dc390-20e7-20f.diff.gz 2000-12-202k Linux DC390 driver: patch 2.0e7 -> 2.0f
dc390-20e6-20e7.diff.gz 2000-11-285k Linux DC390 driver: patch 2.0e6 -> 2.0e7
dc390-20e5-20e6.diff.gz 2000-11-221k Linux DC390 driver: patch 2.0e5 -> 2.0e6
dc390-20e4-20e5.diff.gz 2000-11-171k Linux DC390 driver: patch 2.0e4 -> 2.0e5
dc390-20e3-20e4.diff.gz 00/10/141k Linux DC390 driver: patch 2.0e3 -> 2.0e4
dc390-20e-20e4.diff.gz 00/10/144k Linux DC390 driver: patch 2.0e -> 2.0e4
dc390-20e2-20e3.diff.gz 00/09/293k Linux DC390 driver: patch 2.0e2 -> 2.0e3
dc390-20e1-20e2.diff.gz 00/05/271k Linux DC390 driver: patch 2.0e1 -> 2.0e2
dc390-20e-20e1.diff.gz 00/05/251k Linux DC390 driver: patch 2.0e -> 2.0e1
dc390-20d28-20e.diff.gz 00/05/243k Linux DC390 driver: patch 2.0d28 -> 2.0e
dc390-20d-20e.diff.gz 00/05/2441k Linux DC390 driver: patch 2.0d -> 2.0e
dc390-20d25-20d28.diff.gz 00/02/1412k Linux DC390 driver: patch 2.0d25 -> 2.0d28
dc390-20d24-20d25.diff.gz 00/01/171k Linux DC390 driver: patch 2.0d24 -> 2.0d25
dc390-20d-20d25.diff.gz 00/01/1736k Linux DC390 driver: patch 2.0d -> 2.0d25
dc390-20d21-20d23.diff.gz 99/08/277k Linux DC390 driver: patch 2.0d21 -> 2.0d23
dc390-20d20-20d21.diff.gz 99/08/152k Linux DC390 driver: patch 2.0d20 -> 2.0d21
dc390-20d19-20d20.diff.gz 99/07/191k Linux DC390 driver: patch 2.0d19 -> 2.0d20
dc390-20d18-20d19.diff.gz 99/07/181k Linux DC390 driver: patch 2.0d18 -> 2.0d19
dc390-20d17-20d18.diff.gz 99/07/181k Linux DC390 driver: patch 2.0d17 -> 2.0d18
dc390-20d16-20d17.diff.gz 99/07/164k Linux DC390 driver: patch 2.0d16 -> 2.0d17
dc390-20d15-20d16.diff.gz 99/07/131.5k Linux DC390 driver: patch 2.0d15 -> 2.0d16
dc390-20d14-20d15.diff.gz 99/07/125k Linux DC390 driver: patch 2.0d14 -> 2.0d15
dc390-20d13-20d14.diff.gz 99/07/052k Linux DC390 driver: patch 2.0d13 -> 2.0d14
dc390-20d12-20d13.diff.gz 99/07/052k Linux DC390 driver: patch 2.0d12 -> 2.0d13
dc390-20d10-20d12.diff.gz 99/07/042k Linux DC390 driver: patch 2.0d10 -> 2.0d12
dc390-20d11-20d12.diff.gz 99/07/041k Linux DC390 driver: patch 2.0d11 -> 2.0d12
dc390-20d9-20d10.diff.gz 99/06/2014k Linux DC390 driver: patch 2.0d9 -> 2.0d10
dc390-20d8-20d9.diff.gz 99/06/062k Linux DC390 driver: patch 2.0d8 -> 2.0d9
dc390-20d-20d8.diff.gz 99/06/0419k Linux DC390 driver: patch 2.0d -> 2.0d8
dc390-20d2-20d8.diff.gz 99/06/0416k Linux DC390 driver: patch 2.0d2 -> 2.0d8
dc390-20d6-20d8.diff.gz 99/06/044k Linux DC390 driver: patch 2.0d6 -> 2.0d8
dc390-20d4-20d6.diff.gz 99/06/024k Linux DC390 driver: patch 2.0d4 -> 2.0d6
dc390-20d2-20d4.diff.gz 99/06/0112k Linux DC390 driver: patch 2.0d2 -> 2.0d4
dc390-20d-20d2.diff.gz 99/02/206k Linux DC390 driver: patch 2.0d -> 2.0d2
dc390-20d-ac8.diff.gz 99/07/051k Linux DC390 driver: patch 2.0d -> 2.0d-ac8 (bugfix for 2.2.10-ac8)
dc390-20c-20d.diff.gz 98/12/2513k Linux DC390 driver: patch 2.0c -> 2.0d
dc390-20c4-20d.diff.gz 98/12/256k Linux DC390 driver: patch 2.0c4 -> 2.0d
dc390-20c-20c4.diff.gz 98/12/0110k Linux DC390 driver: patch 2.0c -> 2.0c4
dc390-20b-20c.diff.gz 98/11/198k Linux DC390 driver: patch 2.0b -> 2.0c
dc390-20b-20b1.diff.gz 98/11/056k Linux DC390 driver: patch 2.0b -> 2.0b1
dc390-20a-20b.diff.gz 98/10/246k Linux DC390 driver: patch 2.0a -> 2.0b
dc390-120t-20a.diff.gz 98/10/148k Linux DC390 driver: patch 1.20t -> 2.0a
dc390-120s-120t.diff.gz 98/09/0714k Linux DC390 driver: patch 1.20s -> 1.20t
dc390-120r5-120s.diff.gz 98/08/207k Linux DC390 driver: patch 1.20r5 -> 1.20s

Browse directory

News (since driver rev. 2.0)

Version 2.0f1: Prevent OOps in exceptional situations. Merge Scatter-Gather segments if possible. Please test!
Version 2.0f: Really tested with 2.4.0-test1x finally: Also remove devices on failed INQUIRYs, as this is the new scanning code. Please test!
Version 2.0e7 (2.0f?): Allow overriding of EEprom settings.
Version 2.0e6: 2.4 setup with get_options() and pci device table.
Version 2.0e5: Store Inquiry flags in DCB to prevent Null Ptr on echo "INQUIRY" command.
Version 2.0e4: Fix static compilation into 2.4 kernel.
Version 2.0e3: Some 2.4 cleanups. Only try to do sync nego for devices that report it.
Version 2.0e2: Merged Geff Garzik's pci_enable_device() cleanup.
Version 2.0e1: 2.0e produced a compiler error with 2.3.99 due to a stupid typo. Fixed.
Version 2.0e: Finally released, as no more trouble could be found with 2.0d28 by testers. Only minor cleanups since 2.0d28. Will send to Linus ...
Version 2.0d28: More 2.3 compliance fixes. Prepared to new exception handling, now. Port some small fixes from DC395 driver and added "dump" special cmd. Delay after a reset is now handled by refusing to send commands and using a timer to be woken up, so the computer is not locked any more.
Version 2.0d25: Made the driver 2.3 compliant. (Thanks to Andreas Schultz for sending me a patch.) It still works with 2.2 and 2.0. Disabled RETRY debug msg.
Version 2.0d24: The statement below about memory wastage is not true ... So, the 2.1 series of the driver will be converted to static mem alloc, but not 2.0X. Fixed a bug WRT exception handling, should fix the cdrecord -scanbus problem.
Version 2.0d23: Use dev_id on IRQs. More cleanups. Will change to non-dynamic device control block allocation in the next rev. as it does wast one page of memory (4k on ix86) for each device, now.
Version 2.0d18: Thanks to Andreas Rick, the scanner problems are gone. Some error handling was made a little bit cleverer, too, so this should finally be 2.0e.
Version 2.0d14: Fixed IRQ processing in case of multiple conditions. Don't update fields in removed DCB (2.2.10-ac8 Slab-poisoning problems).
Version 2.0d10: Fixed minor bugs in abort() and in command queuing.
Version 2.0d8: Avoid copying of SCSI Command into SRB. This saves some memory and time. Fixed bug in module cleanup.
Version 2.0d6: Lots of cleanups. Found bug which caused maximal 16 Tags to work. Multi_LUN handling cleaned up. Much cleaner selection process. New ADD special command.
I get some money by SuSE GmbH, Nürnberg, FRG, for making Linux SCSI development, so I hope I can spend more time on this driver, in the future. Many thanks to SuSE!
Version 2.0d2: Made delay after SCSI bus reset configurable. Minor stuff (check for kmalloc success, check for extra params, docu, inclusion of scsi/scsicam.h). Thanks, Cord!
BTW: The d1 solved the Streamer's problems.
Version 2.0d1: Try to handle RESTORE POINTER correctly. Not needed for most devices, but the "HP Colorado T4000 s Streamer" issues such SCSI messages. Untested.
This has not much to do with my driver, but Linus released the awaited 2.2.0-pre1
Version 2.0d released. Only cleanups since 2.0c4: Added my new e-mail. Removed POLL_IRQ feature.
Created patches (dc390-2037p1-20d.diff.gz, dc390-21129-20d.diff.gz) for inclusion into the kernels. Sent to Linux and Alan. (2.0.37-pre4, 2.1.133-pre3)
Version 2.0c4. The experimental POLL_IRQ feature (optional) does work now. However it does not show any performance gain, as it takes too long for the next message bytes to arrive. Will be removed ...
Version 2.0c3. The new message handling strategy should finally work, now. There was some discrepancy between the documentation of the AM53C974 and the real behaviour. It has to trigger one IRQ per message byte. Added experimental POLL_IRQ (optional) for reading multibyte messages to prevent the IRQ in order to improve performance.
Version 2.0c2. Gerard Roudier pointed out that SAVE POINTER messages should be ignored rather than rejected.
Version 2.0c1. There was a problem when the target (disk) initiated a Sync negotiation (SDTR), reported by Andy Pevy. Completely rewrote message handling to fix it.
Version 2.0c released. Cleaned up version of 2.0b3.
Version 2.0b3. Save the state of the Erase on Read AM53C974 registers to allow debugging.
Version 2.0b2. Disabled the Erase on Write feature of the AM53C974's DMA engine, as it caused problems for Hubert Tonneau. Obviously, there's some difference in the real behaviour of the chip and what I expected from reading the docs. Finally Hubert's problems are solved.
Version 2.0b1. Reworked the adapter initialization code. Now SMP users are no longer flooded with (otherwise harmless) "DC390: Interrupt on uninitialized adapter!"
Created patch (dc390-2036p21-20b1.diff.gz) for Alan Cox for inclusion into 2.0.36. (Went into 2.0.37pre1.)
Version 2.0b released. Added check for illegal indices for the "INQUIRY" and "REMOVE" special commands.
Created patch (dc390-21125-20b.diff.gz) for Linus Torvalds for inclusion into the kernel. (Went into 2.1.127.)
Version 2.0a1. Only minor changes: Updated docu and corrected some messages.
Version 2.0a released. Now we are ready for kernel inclusion! Changed the behaviour of disk geometry reading function. Now, existing partition tables are respected and the driver does not insist on the old 64/32 or 255/63 mapping. If there's no partition table we default to the Symbios behaviour, i.e find an optimal mapping. (Use 64/32 or 255/63, if you want to be compatible with the MSD*S driver, when creating a partition table.)


Some of the changes from 1.12 to 2.0:

A little bit of history. Here's how it started:
I did not want to spend much money for an Adaptec, but I wanted to have SCSI. Moreover, I heard rumors, that Adaptec does not support the Linux driver development. So I had to look for another PCI SCSI adapter. I once had an Tekram DC680 IDE caching controller which I was very satisfied of, so I had the idea to buy the DC390. However, I had to find out, whether it is supported by Linux. I had some e-mails with a guy from Tekram (Philip Giang), who told me, that there is a general AM53C974 driver, but it has problems. After some emails, I knew, that I would have enough support from Tekram to fix the bugs in the driver. I bought a DC390.

So I started to try to understand the AM53C974 driver. Before I had finished, Philip told me, that an engineer at Tekram wrote a driver for the DC390 adapter. tmscsim-1.0 was released by him in April 1996. Thanks! Since then, we made many minor fixes and enhancements. I tried to convince the Linux folks to add it to the kernel source tree which was finally successful: 2.0.3x and 2.1.50+ contain the driver, so people do not have to apply patches to have the DC390 work.

Development goes on. The driver in the kernel was 1.11 resp. 1.12. There was a bunch of 1.20 versions, from 1.20a to 1.20t and now, the recent version is 2.0. I submitted it to Linus and Alan for inclusion. 2.1.127 has 2.0b and 2.0.37p1 will include 2.0b1 driver.

Note, that the driver is very well tested, now. But, normal care applies, so you should have a backup or at least a backup of your partition table. Telling the kernel to remount-readonly the filesystem in case of any error is also a good idea.(tune2fs -e remount-ro /dev/sdXX)
There's a README.tmscsim file included in the driver's distribution, which is worth reading. You may also want to read the README-file in this directory. It is a short version of README.tmscsim.

There are a lot of people that helped me testing the driver. I want to name some which contributed a lot: Chiaki Ishikawa, Andreas Haumer and Hubert Tonneau. Thank you!


If you have problems or think you found a bug, please read README.tmscsim. It's also worth reading the problems page. If you still think, that there's a bug, a problem or bad documentation, contact me: Kurt Garloff <>.

If you have some weird devices (CDRs such as Yamaha CD-RW 4416, Scanners, ...), which are not recognized during the device scan, this is probably due to the fact, that these devices need a very long time to recover from a SCSI bus reset. Please have a look at the problems page for hints how to handle this.

(R): PCscsi and PCnet are reg. trademarks of AMD.
(w) by KG, last change Dec 20th 2000