Index: README.tmscsim =================================================================== RCS file: /home/cvsroot/dc390/README.tmscsim,v retrieving revision 2.25 retrieving revision 2.25.2.1 diff -u -r2.25 -r2.25.2.1 --- README.tmscsim 1999/08/26 19:48:56 2.25 +++ README.tmscsim 2000/01/17 22:34:36 2.25.2.1 @@ -368,6 +368,7 @@ a SCSI bus reset on driver initialization. See problems page. For the CRW4416S, this seems to be solved with firmware 1.0g (reported by Jean-Yves Barbier). +* TEAC CD-532S not being recognized. (Works with 1.11). * 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 @@ -437,5 +438,5 @@ ------------------------------------------------------------------------- Written by Kurt Garloff 1998/06/11 -Last updated 1999/08/26, driver revision 2.0e -$Id: README.tmscsim,v 2.25 1999/08/26 19:48:56 garloff Exp $ +Last updated 2000/01/17, driver revision 2.0d25 +$Id: README.tmscsim,v 2.25.2.1 2000/01/17 22:34:36 garloff Exp $ Index: dc390.h =================================================================== RCS file: /home/cvsroot/dc390/dc390.h,v retrieving revision 2.43.2.1 retrieving revision 2.43.2.4 diff -u -r2.43.2.1 -r2.43.2.4 --- dc390.h 1999/11/14 19:43:50 2.43.2.1 +++ dc390.h 2000/01/17 22:23:35 2.43.2.4 @@ -4,7 +4,7 @@ * Description: Device Driver for Tekram DC-390(T) PCI SCSI * * Bus Master Host Adapter * ***********************************************************************/ -/* $Id: dc390.h,v 2.43.2.1 1999/11/14 19:43:50 garloff Exp $ */ +/* $Id: dc390.h,v 2.43.2.4 2000/01/17 22:23:35 garloff Exp $ */ /* * DC390/AMD 53C974 driver, header file @@ -19,7 +19,7 @@ #endif #define DC390_BANNER "Tekram DC390/AM53C974" -#define DC390_VERSION "2.0d24 1999/11/14" +#define DC390_VERSION "2.0d25 2000/01/17" #if defined(HOSTS_C) || defined(MODULE) @@ -35,7 +35,9 @@ # define DC390_release NULL #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,30) extern struct proc_dir_entry DC390_proc_scsi_tmscsim; +#endif extern int DC390_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout); #if LINUX_VERSION_CODE < KERNEL_VERSION (2,1,70) @@ -44,7 +46,27 @@ # define NO_NEW_EH use_new_eh_code: 0, #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,30) #define DC390_T { \ + proc_name: "tmscsim", \ + proc_info: DC390_proc_info, \ + name: DC390_BANNER " V" DC390_VERSION, \ + detect: DC390_detect, \ + release: DC390_release, \ + queuecommand: DC390_queue_command, \ + abort: DC390_abort, \ + reset: DC390_reset, \ + bios_param: DC390_bios_param, \ + can_queue: 42, \ + this_id: 7, \ + sg_tablesize: SG_ALL, \ + cmd_per_lun: 8, \ + NO_NEW_EH \ + unchecked_isa_dma: 0, \ + use_clustering: DISABLE_CLUSTERING \ + } +#else +#define DC390_T { \ proc_dir: &DC390_proc_scsi_tmscsim, \ proc_info: DC390_proc_info, \ name: DC390_BANNER " V" DC390_VERSION, \ @@ -62,7 +84,7 @@ unchecked_isa_dma: 0, \ use_clustering: DISABLE_CLUSTERING \ } - +#endif #endif /* defined(HOSTS_C) || defined(MODULE) */ #endif /* DC390_H */ Index: scsiiom.c =================================================================== RCS file: /home/cvsroot/dc390/scsiiom.c,v retrieving revision 2.55 retrieving revision 2.55.2.1 diff -u -r2.55 -r2.55.2.1 --- scsiiom.c 1999/08/28 10:57:34 2.55 +++ scsiiom.c 2000/01/17 22:23:03 2.55.2.1 @@ -4,7 +4,7 @@ * Description: Device Driver for Tekram DC-390 (T) PCI SCSI * * Bus Master Host Adapter * ***********************************************************************/ -/* $Id: scsiiom.c,v 2.55 1999/08/28 10:57:34 garloff Exp $ */ +/* $Id: scsiiom.c,v 2.55.2.1 2000/01/17 22:23:03 garloff Exp $ */ static void __inline__ dc390_freetag (PDCB pDCB, PSRB pSRB) @@ -1407,7 +1407,7 @@ SET_RES_DRV(pcmd->result,DRIVER_SENSE); pSRB->SGcount = (UCHAR) pSRB->SavedSGCount; //pSRB->ScsiCmdLen = (UCHAR) (pSRB->Segment1[0] >> 8); - printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->target, pcmd->lun); + DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->target, pcmd->lun);) pSRB->SGIndex = 0; pSRB->TotalXferredLen = 0; pSRB->SGToBeXferLen = 0; Index: tmscsim.c =================================================================== RCS file: /home/cvsroot/dc390/tmscsim.c,v retrieving revision 2.60.2.3 retrieving revision 2.60.2.7 diff -u -r2.60.2.3 -r2.60.2.7 --- tmscsim.c 1999/11/21 18:10:47 2.60.2.3 +++ tmscsim.c 2000/01/17 22:23:03 2.60.2.7 @@ -7,7 +7,7 @@ ***********************************************************************/ /* (C) Copyright: put under GNU GPL in 10/96 (see README.tmscsim) * *************************************************************************/ -/* $Id: tmscsim.c,v 2.60.2.3 1999/11/21 18:10:47 garloff Exp $ */ +/* $Id: tmscsim.c,v 2.60.2.7 2000/01/17 22:23:03 garloff Exp $ */ /* Enhancements and bugfixes by * * Kurt Garloff * ***********************************************************************/ @@ -141,6 +141,8 @@ * 2.0d2499/11/14 KG Unreg. I/O if failed IRQ alloc. Call * * done () w/ DID_BAD_TARGET in case of * * missing DCB. We are old EH!! * + * 2.0d2500/01/15 KG 2.3.3x compat from Andreas Schultz * + * set dev_id. Disable RETRY message. * ***********************************************************************/ /* Uncomment SA_INTERRUPT, if the driver refuses to share its IRQ with other devices */ @@ -233,12 +235,16 @@ * undef : traditional save_flags; cli; restore_flags; */ -//#define DEBUG_SPINLOCKS 2 /* Set to 0, 1 or 2 in include/asm/spinlock.h */ +//#define DEBUG_SPINLOCKS 2 /* Set to 0, 1 or 2 in include/linux/spinlock.h */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30) # include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,30) +# include +#else # include #endif +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93) @@ -362,7 +368,11 @@ # define PCI_PRESENT pci_present () # define PCI_SET_MASTER pci_set_master (pdev) # define PCI_FIND_DEVICE(vend, id) (pdev = pci_find_device (vend, id, pdev)) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,10) +# define PCI_GET_IO_AND_IRQ io_port = pdev->resource[0].start; irq = pdev->irq +#else # define PCI_GET_IO_AND_IRQ io_port = pdev->base_address[0] & PCI_BASE_ADDRESS_IO_MASK; irq = pdev->irq +#endif #else # include # define PDEV pbus, pdevfn @@ -524,11 +534,12 @@ UCHAR dc390_eepromBuf[MAX_ADAPTER_NUM][EE_LEN]; UCHAR dc390_clock_period1[] = {4, 5, 6, 7, 8, 10, 13, 20}; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,30) struct proc_dir_entry DC390_proc_scsi_tmscsim ={ PROC_SCSI_DC390T, 7 ,"tmscsim", S_IFDIR | S_IRUGO | S_IXUGO, 2 }; - +#endif /*********************************************************************** * Functions for access to DC390 EEPROM @@ -1131,6 +1142,7 @@ printk (KERN_ERR "DC390: kmalloc for DCB failed, target %02x lun %02x\n", cmd->target, cmd->lun); DC390_UNLOCK_ACB; + printk ("DC390: No DCB in queuecommand!\n"); done(cmd); return(0); }; @@ -1152,6 +1164,7 @@ printk (KERN_ERR "DC390: no DCB failed, target %02x lun %02x\n", cmd->target, cmd->lun); DC390_UNLOCK_ACB; + printk ("DC390: No DCB in queuecommand (2)!\n"); done(cmd); return(0); }; @@ -1853,7 +1866,9 @@ psh->io_port = io_port; psh->n_io_port = 0x80; psh->irq = Irq; - + psh->base = (char*)io_port; + psh->dma_channel = -1; + pACB = (PACB) psh->hostdata; DC390_LOCKA_INIT; DC390_LOCK_ACB; @@ -2154,8 +2169,11 @@ printk (KERN_ERR "DC390: No PCI BIOS found!\n"); if (dc390_adapterCnt) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,30) + psht->proc_name = "tmscsim"; +#else psht->proc_dir = &DC390_proc_scsi_tmscsim; - +#endif printk(KERN_INFO "DC390: %i adapters found\n", dc390_adapterCnt); DC390_UNLOCK_DRV; return( dc390_adapterCnt );