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

📄 tmscsim.txt

📁 linux 内核源代码
💻 TXT
📖 第 1 页 / 共 2 页
字号:
The tmscsim driver==================1. Purpose and history2. Installation3. Features4. Configuration via /proc/scsi/tmscsim/?5. Configuration via boot/module params6. Potential improvements7. Bug reports, debugging and updates8. Acknowledgements9. Copyright1. Purpose and history----------------------The tmscsim driver supports PCI SCSI Host Adapters based on the AM53C974chip. AM53C974 based SCSI adapters include:  Tekram DC390, DC390T Dawicontrol 2974 QLogic Fast! PCI Basic some on-board adapters(This is most probably not a complete list)It has originally written by C.L. Huang from the Tekram corp. to support theTekram DC390(T) adapter. This is where the name comes from: tm = Tekramscsi = SCSI driver, m = AMD (?) as opposed to w for the DC390W/U/F(NCR53c8X5, X=2/7) driver. Yes, there was also a driver for the latter,tmscsiw, which supported DC390W/U/F adapters. It's not maintained any more,as the ncr53c8xx is perfectly supporting these adapters since some time.The driver first appeared in April 1996, exclusively supported the DC390 and has been enhanced since then in various steps. In May 1998 support for general AM53C974 based adapters and some possibilities to configure it wereadded. The non-DC390 support works by assuming some values for the datanormally taken from the DC390 EEPROM. See below (chapter 5) for details.When using the DC390, the configuration is still be done using the DC390BIOS setup. The DC390 EEPROM is read and used by the driver, any boot ormodule parameters (chapter 5) are ignored! However, you can change settingsdynamically, as described in chapter 4. For a more detailed description of the driver's history, see the first linesof tmscsim.c.The numbering scheme isn't consistent. The first versions went from 1.00 to1.12, then 1.20a to 1.20t. Finally I decided to use the ncr53c8xx scheme. Sothe next revisions will be 2.0a to 2.0X (stable), 2.1a to 2.1X (experimental),2.2a to 2.2X (stable, again) etc. (X = anything between a and z.) If I sendfixes to people for testing, I create intermediate versions with a digit appended, e.g. 2.0c3.2. Installation---------------If you got any recent kernel with this driver and document included inlinux/drivers/scsi, you basically have to do nothing special to use thisdriver. Of course you have to choose to compile SCSI support and DC390(T)support into your kernel or as module when configuring your kernel forcompiling.NEW: You may as well compile this module outside your kernel, using thesupplied Makefile. If you got an old kernel (pre 2.1.127, pre 2.0.37p1) with an old version of this driver: Get dc390-21125-20b.diff.gz or dc390-2036p21-20b1.diff.gz from my web page and apply the patch. Apply further patches to upgrade to the  latest version of the driver. If you want to do it manually, you should copy the files (dc390.h, tmscsim.h, tmscsim.c, scsiiom.c and README.tmscsim) from this directory to linux/drivers/scsi. You have to recompile your kernel/module of course. You should apply the three patches included in dc390-120-kernel.diff (Applying them: cd /usr/src; patch -p0 <~/dc390-120-kernel.diff) The patches are against 2.1.125, so you might have to manually resolve rejections when applying to another kernel version. The patches will update the kernel startup code to allow boot parameters to be passed to the driver, update the Documentation and finally offer you the possibility to omit the non-DC390 parts of the driver. (By selecting "Omit support for non DC390" you basically disable the emulation of a DC390 EEPROM for non DC390 adapters. This saves a few bytes of memory.)If you got a very old kernel without the tmscsim driver (pre 2.0.31)I recommend upgrading your kernel. However, if you don't want to, pleasecontact me to get the appropriate patches.Upgrading a SCSI driver is always a delicate thing to do. The 2.0 driver hasproven stable on many systems, but it's still a good idea to take someprecautions. In an ideal world you would have a full backup of your disks.The world isn't ideal and most people don't have full backups (me neither).So take at least the following measures:* make your kernel remount the FS read-only on detecting an error:  tune2fs -e remount-ro /dev/sd??* have copies of your SCSI disk's partition tables on some safe location:  dd if=/dev/sda of=/mnt/floppy/sda bs=512 count=1  or just print it with:  fdisk -l | lpr* make sure you are able to boot Linux (e.g. from floppy disk using InitRD)  if your SCSI disk gets corrupted. You can use   ftp://student.physik.uni-dortmund.de/pub/linux/kernel/bootdisk.gzOne more warning: I used to overclock my PCI bus to 41.67 MHz. My TekramDC390F (Sym53c875) accepted this as well as my Millenium. But the Am53C974produced errors and started to corrupt my disks. So don't do that! A 37.50MHz PCI bus works for me, though, but I don't recommend using higher clocksthan the 33.33 MHz being in the PCI spec.If you want to share the IRQ with another device and the driver refuses todo so, you might succeed with changing the DC390_IRQ type in tmscsim.c to IRQF_SHARED | IRQF_DISABLED.3.Features----------- SCSI * Tagged command queueing * Sync speed up to 10 MHz * Disconnection * Multiple LUNs- General / Linux interface * Support for up to 4 AM53C974 adapters. * DC390 EEPROM usage or boot/module params * Information via cat /proc/scsi/tmscsim/? * Dynamically configurable by writing to /proc/scsi/tmscsim/? * Dynamic allocation of resources * SMP support: Locking on io_request lock (Linux 2.1/2.2) or adapter     specific locks (Linux 2.5?) * Uniform source code for Linux-2.x.y * Support for dyn. addition/removal of devices via add/remove-single-device   (Try: echo "scsi add-single-device C B T U" >/proc/scsi/scsi     C = Controller, B = Bus, T = Target SCSI ID, U = Unit SCSI LUN.)     Use with care! * Try to use the partition table for the determination of the mapping4. Configuration via /proc/scsi/tmscsim/?-----------------------------------------First of all look at the output of /proc/scsi/tmscsim/? by typing cat /proc/scsi/tmscsim/?The "?" should be replaced by the SCSI host number. (The shell might do thisfor you.)You will see some info regarding the adapter and, at the end, a listing ofthe attached devices and their settings.Here's an example:garloff@kurt:/home/garloff > cat /proc/scsi/tmscsim/0Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0e7 2000-11-28SCSI Host Nr 1, AM53C974 Adapter Nr 0IOPortBase 0xb000, IRQ 10MaxID 8, MaxLUN 8, AdapterID 6, SelTimeout 250 ms, DelayReset 1 sTagMaxNum 16, Status 0x00, ACBFlag 0x00, GlitchEater 24 nsStatistics: Cmnds 1470165, Cmnds not sent directly 0, Out of SRB conds 0            Lost arbitrations 587,  Sel. connected 0, Connected: NoNr of attached devices: 4, Nr of DCBs: 4Map of attached LUNs: 01 00 00 03 01 00 00 00Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs MaxCmd00  00  00  Yes  Yes  Yes  Yes  Yes   100 ns    10.0 M      15      1601  03  00  Yes  Yes  Yes  Yes  No    100 ns    10.0 M      15      0102  03  01  Yes  Yes  Yes  Yes  No    100 ns    10.0 M      15      0103  04  00  Yes  Yes  Yes  Yes  No    100 ns    10.0 M      15      01Note that the settings MaxID and MaxLUN are not zero- but one-based, whichmeans that a setting MaxLUN=4, will result in the support of LUNs 0..3. Thisis somehow inconvenient, but the way the mid-level SCSI code expects it to be.ACB and DCB are acronyms for Adapter Control Block and Device Control Block.These are data structures of the driver containing information about theadapter and the connected SCSI devices respectively.Idx is the device index (just a consecutive number for the driver), ID andLUN are the SCSI ID and LUN, Prty means Parity checking, Sync synchronousnegotiation, DsCn Disconnection, SndS Send Start command on startup (notused by the driver) and TagQ Tagged Command Queueing. NegoPeriod andSyncSpeed are somehow redundant, because they are reciprocal values (1 / 112 ns = 8.9 MHz). At least in theory. The driver is able to adjust theNegoPeriod more accurate (4ns) than the SyncSpeed (1 / 25ns). I don't knowif certain devices will have problems with this discrepancy. Max. speed is10 MHz corresp. to a min. NegoPeriod of 100 ns. (The driver allows slightly higher speeds if the devices (Ultra SCSI) acceptit, but that's out of adapter spec, on your own risk and unlikely to improveperformance. You're likely to crash your disks.) SyncOffs is the offset used for synchronous negotiations; max. is 15. The last values are only shown, if Sync is enabled. (NegoPeriod is stilldisplayed in brackets to show the values which will be used after enablingSync.)MaxCmd ist the number of commands (=tags) which can be processed at the sametime by the device.If you want to change a setting, you can do that by writing to/proc/scsi/tmscsim/?. Basically you have to imitate the output of driver.(Don't use the brackets for NegoPeriod on Sync disabled devices.)You don't have to care about capitalisation. The driver will accept space,tab, comma, = and : as separators.There are three kinds of changes: (1) Change driver settings:     You type the names of the parameters and the params following it.    Example:     echo "MaxLUN=8 seltimeout 200" >/proc/scsi/tmscsim/0    Note that you can only change MaxID, MaxLUN, AdapterID, SelTimeOut,    TagMaxNum, ACBFlag, GlitchEater and DelayReset. Don't change ACBFlag    unless you want to see what happens, if the driver hangs.(2) Change device settings: You write a config line to the driver. The Nr    must match the ID and LUN given. If you give "-" as parameter, it is    ignored and the corresponding setting won't be changed.     You can use "y" or "n" instead of "Yes" and "No" if you want to.    You don't need to specify a full line. The driver automatically performs    an INQUIRY on the device if necessary to check if it is capable to operate    with the given settings (Sync, TagQ).    Examples:     echo "0 0 0 y y y - y - 10 " >/proc/scsi/tmscsim/0     echo "3 5 0 y n y " >/proc/scsi/tmscsim/0    To give a short explanation of the first example:     The first three numbers, "0 0 0" (Device index 0, SCSI ID 0, SCSI LUN 0),    select the device to which the following parameters apply. Note that it    would be sufficient to use the index or both SCSI ID and LUN, but I chose    to require all three to have a syntax similar to the output.    The following "y y y - y" enables Parity checking, enables Synchronous

⌨️ 快捷键说明

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