Index: README.tmscsim =================================================================== RCS file: /usr/local/cvsroot/dc390/README.tmscsim,v retrieving revision 2.21 retrieving revision 2.23 diff -u -r2.21 -r2.23 --- README.tmscsim 1999/06/21 07:02:08 2.21 +++ README.tmscsim 1999/07/16 08:29:31 2.23 @@ -144,20 +144,20 @@ Here's an example: garloff@kg1:/home/garloff > cat /proc/scsi/tmscsim/0 -Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0d10 1999/06/20 +Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0d17 1999/07/16 SCSI Host Nr 1, AM53C974 Adapter Nr 0 -IOPortBase 0xe800, IRQ 17 -MaxID 7, MaxLUN 8, AdapterID 7, SelTimeout 250 ms, DelayReset 1 s +IOPortBase 0xb000, IRQ 10 +MaxID 8, MaxLUN 8, AdapterID 6, SelTimeout 250 ms, DelayReset 1 s TagMaxNum 16, Status 0x00, ACBFlag 0x00, GlitchEater 24 ns -Statistics: Cmnds 39563, Cmnds not sent directly 0, Out of SRB conds 0 - Lost arbitrations 0, Connected: No +Statistics: Cmnds 1470165, Cmnds not sent directly 0, Out of SRB conds 0 + Lost arbitrations 587, Sel. connected 0, Connected: No Nr of attached devices: 4, Nr of DCBs: 4 -Map of attached LUNs: 01 01 00 01 00 01 00 00 +Map of attached LUNs: 01 00 00 03 01 00 00 00 Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs MaxCmd -00 00 00 Yes Yes Yes Yes Yes 100 ns 10.0 M 15 32 -01 01 00 Yes Yes Yes Yes Yes 100 ns 10.0 M 15 16 -02 03 00 Yes Yes Yes Yes No 100 ns 10.0 M 15 1 -03 05 00 Yes No Yes Yes No (200 ns) 1 +00 00 00 Yes Yes Yes Yes Yes 100 ns 10.0 M 15 16 +01 03 00 Yes Yes Yes Yes No 100 ns 10.0 M 15 01 +02 03 01 Yes Yes Yes Yes No 100 ns 10.0 M 15 01 +03 04 00 Yes Yes Yes Yes No 100 ns 10.0 M 15 01 Note that the settings MaxID and MaxLUN are not zero- but one-based, which means that a setting MaxLUN=4, will result in the support of LUNs 0..3. This @@ -356,16 +356,18 @@ * Driver hangs with sync readcdda (xcdroast) (most probably VIA PCI error) -Known problems: +Known problems: +Please see http://www.garloff.de/kurt/linux/dc390/problems.html * Changing the parameters of multi-lun by the tmscsim/? interface will cause problems, cause these settings are mostly per Target and not per LUN and should be updated accordingly. -* There was a report that with a certain Scanner, the last SCSI command - won't be finished correctly. This might be a bug in the SCSI - implementation of the scanner. Issueing another command to the scanner - seems to help. (Try echo "INQUIRY x" >/proc/scsi/tmscsim/?, where - x is the index (not the SCSI ID!) of the scanner. See 4.(3).) +* CDRs (eg Yam CRW4416) not recognized, because some buggy devices don't + recover from a SCSI reset in time. See problems page. +* Scanners (eg. Astra UMAX 1220S) don't work: Disable Sync Negotiation. + If this does not help, try echo "INQUIRY t" >/proc/scsi/tmscsim/? (t + replaced by the dev index of your scanner). You may try to reset your SCSI + bus afterwards (echo "RESET" >/proc/scsi/tmscsim/?). * If there is a valid partition table, the driver will use it for determing the mapping. Other operating systems may not like this mapping, though it's consistent with the BIOS' behaviour. Old DC390 drivers ignored the @@ -409,6 +411,7 @@ The latest version of the driver can be found at: http://www.garloff.de/kurt/linux/dc390/ + ftp://ftp.suse.com/pub/people/garloff/linux/dc390/ 8. Acknowledgements @@ -422,7 +425,7 @@ Thanks to a lot of people (espec. Chiaki Ishikawa, Andreas Haumer, Hubert Tonneau) for intensively testing the driver (and even risking data loss doing this during early revisions). -Lately, SuSE GmbH, Nuernberg, FRG, has been paying me for the driver +Recently, SuSE GmbH, Nuernberg, FRG, has been paying me for the driver development and maintenance. Special thanks! @@ -432,10 +435,10 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. If you want to use any later version of the GNU GPL, you will probably - be allowed to, but you have to ask me and Tekram + be allowed to, but you have to ask me and Tekram before. ------------------------------------------------------------------------- Written by Kurt Garloff 1998/06/11 -Last updated 1999/06/20, driver revision 2.0d10 -$Id: README.tmscsim,v 2.21 1999/06/21 07:02:08 garloff Exp $ +Last updated 1999/07/16, driver revision 2.0d17 +$Id: README.tmscsim,v 2.23 1999/07/16 08:29:31 garloff Exp $ Index: dc390.h =================================================================== RCS file: /usr/local/cvsroot/dc390/dc390.h,v retrieving revision 2.34 retrieving revision 2.36 diff -u -r2.34 -r2.36 --- dc390.h 1999/07/13 05:55:14 2.34 +++ dc390.h 1999/07/16 08:23:02 2.36 @@ -4,7 +4,7 @@ * Description: Device Driver for Tekram DC-390(T) PCI SCSI * * Bus Master Host Adapter * ***********************************************************************/ -/* $Id: dc390.h,v 2.34 1999/07/13 05:55:14 garloff Exp $ */ +/* $Id: dc390.h,v 2.36 1999/07/16 08:23:02 garloff Exp $ */ /* * DC390/AMD 53C974 driver, header file @@ -19,7 +19,7 @@ #endif #define DC390_BANNER "Tekram DC390/AM53C974" -#define DC390_VERSION "2.0d16 1999/07/13" +#define DC390_VERSION "2.0d17 1999/07/16" #if defined(HOSTS_C) || defined(MODULE) Index: scsiiom.c =================================================================== RCS file: /usr/local/cvsroot/dc390/scsiiom.c,v retrieving revision 2.45 retrieving revision 2.47 diff -u -r2.45 -r2.47 --- scsiiom.c 1999/07/13 05:49:54 2.45 +++ scsiiom.c 1999/07/16 08:23:02 2.47 @@ -4,7 +4,7 @@ * Description: Device Driver for Tekram DC-390 (T) PCI SCSI * * Bus Master Host Adapter * ***********************************************************************/ -/* $Id: scsiiom.c,v 2.45 1999/07/13 05:49:54 garloff Exp $ */ +/* $Id: scsiiom.c,v 2.47 1999/07/16 08:23:02 garloff Exp $ */ static void __inline__ dc390_freetag (PDCB pDCB, PSRB pSRB) @@ -25,10 +25,11 @@ if (pACB->Connected) { - DEBUG0(printk (KERN_WARNING "DC390: Can't select when connected! (%08x,%02x)\n", - pSRB->SRBState, pSRB->SRBFlag);) + // Should not happen normally + printk (KERN_WARNING "DC390: Can't select when connected! (%08x,%02x)\n", + pSRB->SRBState, pSRB->SRBFlag); pSRB->SRBState = SRB_READY; - pACB->SelLost++; + pACB->SelConn++; return 1; } @@ -126,10 +127,11 @@ if (DC390_read8 (Scsi_Status) & INTERRUPT) { dc390_freetag (pDCB, pSRB); - printk ("DC390: Interrupt during Start SCSI (pid %li, target %02i-%02i)\n", - pSRB->pcmd->pid, pSRB->pcmd->target, pSRB->pcmd->lun); + DEBUG0(printk ("DC390: Interrupt during Start SCSI (pid %li, target %02i-%02i)\n", + pSRB->pcmd->pid, pSRB->pcmd->target, pSRB->pcmd->lun);) pSRB->SRBState = SRB_READY; //DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD); + pACB->SelLost++; return 1; }; DC390_write8 (ScsiCmd, cmd); Index: tmscsim.c =================================================================== RCS file: /usr/local/cvsroot/dc390/tmscsim.c,v retrieving revision 2.49 retrieving revision 2.50 diff -u -r2.49 -r2.50 --- tmscsim.c 1999/07/13 05:48:06 2.49 +++ tmscsim.c 1999/07/16 08:23:02 2.50 @@ -7,7 +7,7 @@ ***********************************************************************/ /* (C) Copyright: put under GNU GPL in 10/96 (see README.tmscsim) * *************************************************************************/ -/* $Id: tmscsim.c,v 2.49 1999/07/13 05:48:06 garloff Exp $ */ +/* $Id: tmscsim.c,v 2.50 1999/07/16 08:23:02 garloff Exp $ */ /* Enhancements and bugfixes by * * Kurt Garloff * ***********************************************************************/ @@ -127,6 +127,8 @@ * 2.0d1599/07/12 KG use_new_eh_code: 0, ULONG -> UINT where * * appropriate * * 2.0d1699/07/13 KG Reenable StartSCSI interrupt, Retry msg * + * 2.0d1799/07/15 KG Remove debug msg. Disable recfg. when * + * there are queued cmnds * ***********************************************************************/ /* Uncomment SA_INTERRUPT, if the driver refuses to share its IRQ with other devices */ @@ -1879,7 +1881,8 @@ pACB->DCBmap[i] = 0; pACB->sel_timeout = SEL_TIMEOUT; pACB->glitch_cfg = EATER_25NS; - pACB->Cmds = pACB->CmdInQ = pACB->CmdOutOfSRB = pACB->SelLost = 0; + pACB->Cmds = pACB->CmdInQ = pACB->CmdOutOfSRB = 0; + pACB->SelLost = pACB->SelConn = 0; } @@ -2364,6 +2367,13 @@ goto einv2; }; + if (pDCB->pWaitingSRB || pDCB->pGoingSRB) + { + printk ("DC390: Cannot change dev (%i-%i) cfg: Pending requests\n", + pDCB->UnitSCSIID, pDCB->UnitSCSILUN); + goto einv; + }; + olddevmode = pDCB->DevMode; YESNO (pos, pDCB->DevMode, PARITY_CHK_); needs_inquiry++; @@ -2628,8 +2638,8 @@ SPRINTF("Statistics: Cmnds %li, Cmnds not sent directly %i, Out of SRB conds %i\n", pACB->Cmds, pACB->CmdInQ, pACB->CmdOutOfSRB); - SPRINTF(" Lost arbitrations %i, Connected: %s\n", - pACB->SelLost, pACB->Connected? "Yes": "No"); + SPRINTF(" Lost arbitrations %i, Sel. connected %i, Connected: %s\n", + pACB->SelLost, pACB->SelConn, pACB->Connected? "Yes": "No"); SPRINTF("Nr of attached devices: %i, Nr of DCBs: %i\n", pACB->DeviceCnt, pACB->DCBCnt); SPRINTF("Map of attached LUNs: %02x %02x %02x %02x %02x %02x %02x %02x\n", Index: tmscsim.h =================================================================== RCS file: /usr/local/cvsroot/dc390/tmscsim.h,v retrieving revision 2.13 retrieving revision 2.14 diff -u -r2.13 -r2.14 --- tmscsim.h 1999/07/12 11:43:39 2.13 +++ tmscsim.h 1999/07/16 08:23:03 2.14 @@ -3,7 +3,7 @@ ;* TEKRAM DC-390(T) PCI SCSI Bus Master Host Adapter * ;* Device Driver * ;***********************************************************************/ -/* $Id: tmscsim.h,v 2.13 1999/07/12 11:43:39 garloff Exp $ */ +/* $Id: tmscsim.h,v 2.14 1999/07/16 08:23:03 garloff Exp $ */ #ifndef _TMSCSIM_H #define _TMSCSIM_H @@ -233,15 +233,16 @@ /* 0x4c/0x48: */ ULONG Cmds; UINT SelLost; +UINT SelConn; UINT CmdInQ; UINT CmdOutOfSRB; -/* 0x5c/0x58: */ +/* 0x60/0x5c: */ DC390_SRB TmpSRB; -/* 0xc0/0xbc: */ +/* 0xc4/0xc0: */ DC390_SRB SRB_array[MAX_SRB_CNT]; /* 50 SRBs */ -/* 0xf98/0xf94: */ +/* 0xf9c/0xf98: */ }; typedef struct _ACB DC390_ACB, *PACB;