? .dc395x_trm.o.flags ? .kversion ? Rules.make ? dc395x_trm.c.126 ? dc395x_trm.c.131 ? dc395x_trm.c.debug_nmi ? dc395x_trm.c.new ? dc395x_trm.h.131 Index: dc395x_trm.c =================================================================== RCS file: /home/cvsroot/dc395/dc395x_trm.c,v retrieving revision 1.79 diff -u -r1.79 dc395x_trm.c --- dc395x_trm.c 2002/03/11 02:34:37 1.79 +++ dc395x_trm.c 2002/04/27 16:23:20 @@ -12,7 +12,7 @@ //* Kurt Garloff //* (C) 1999-2000 Kurt Garloff //* License: GNU GPL -//* $Id: dc395x_trm.c,v 1.79 2002/03/11 02:34:37 garloff Exp $ +//* $Id: dc395x_trm.c,v 1.80 2002/04/24 00:02:59 garloff Exp $ //*********************************************************************** //* Tekram PCI SCSI adapter (DC395/U/UW/F or DC315/U) revision history //* @@ -106,6 +106,8 @@ //* Correctly clean up SG list after REQUEST_SENSE. //* kfree() DCBs on module exit. //* Fix inconsistency SRB_array[] size vs. DC395x_MAX_SRB_CNT +//* 1.39 02/04/24 KG PAGE_ADDRESS for pre2.4.16 kernels +//* Locking in IRQ handler (thx to Paul Rolland) //*********************************************************************** /* ************************************************************************* @@ -387,6 +389,7 @@ # define PCI_DMA_SYNC_SG(hw,sg,n,dir) # define BUS_ADDR(sg) (virt_to_bus((sg).address)) # define CPU_ADDR(sg) ((sg).address) +# define PAGE_ADDRESS(sg) ((sg)->address) # define SET_DIR(dir,pcmd) dir = PCI_DMA_BIDIRECTIONAL #endif @@ -1561,7 +1564,7 @@ /* Read the parameters from the command line */ #if !defined(MODULE) # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13) -void __init DC395x_trm_setup (char *str) +static int DC395x_trm_setup (char *str) { int i, im; int ints[8]; @@ -1580,6 +1583,9 @@ for (i = 0; i < im; i++) dc395x_trm[i] = ints[i+1]; /* DC395x_checkparams (); */ +# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,13) + return 1; +#endif }; #if 0 // For the editor's indenting :-) } @@ -2111,8 +2117,10 @@ printk ("DC395x: SRB %i (%p): debugtrace %p corrupt!\n", (pSRB - pDCB->pDCBACB->SRB_array) / sizeof(DC395X_TRM_SRB), pSRB, pSRB->debugtrace); +#endif +#ifdef DC395x_TRACEDEBUG + pSRB->debugpos = 0; pSRB->debugtrace = 0; #endif - pSRB->debugpos = 0; TRACEPRINTF ("pid %li(%li):%02x %02x..(%i-%i) *", pcmd->pid, jiffies, pcmd->cmnd[0], pcmd->cmnd[1], pcmd->target, pcmd->lun); pSRB->TagNumber = TAG_NONE; @@ -2891,6 +2899,7 @@ } +#if 0 /* Timer to work around chip flaw: When selecting and the bus is * busy, we sometimes miss a Selection timeout IRQ */ void DC395x_selection_timeout_missed (unsigned long ptr); @@ -2923,7 +2932,7 @@ DC395x_Disconnect (pACB); DC395x_UNLOCK_IO(pACB->pScsiHost); } - +#endif /* ********************************************************************** @@ -3172,15 +3181,12 @@ printk(KERN_INFO "DC395x_Interrupt..............\n "); #endif - pACB = DC395x_pACB_start; if( pACB == NULL ) { printk(KERN_WARNING "DC395x: Interrupt on uninitialized pACB!\n"); return; } - DC395x_LOCK_IO(pACB->pScsiHost); - DEBUGRECURSION(if (in_driver++ > NORM_REC_LVL) printk ("DC395x: %i interrupt recursion?\n", in_driver);) //DC395x_DRV_LOCK(drv_flags); @@ -3228,8 +3234,10 @@ if( pACB == (PACB)-1 ) { //printk("DC395x_Interrupt: Spurious interrupt detected!\n"); - goto out_unlock; + goto out; } + DC395x_LOCK_IO(pACB->pScsiHost); + /* This acknowledges the IRQ */ scsi_intstatus = DC395x_read8(TRM_S1040_SCSI_INTSTATUS ); if ((scsi_status & 0x2007) == 0x2002) @@ -3334,8 +3342,9 @@ DC395x_stateV( pACB, pSRB, &scsi_status ); } out_unlock: - DEBUGRECURSION(in_driver--;) DC395x_UNLOCK_IO(pACB->pScsiHost); + out: + DEBUGRECURSION(in_driver--;) //printk ("... done\n"); //DC395x_ACB_UNLOCK(pACB,acb_flags); return; @@ -6851,7 +6860,7 @@ UINT io_port; #ifndef USE_NEW_EH - DWORD flags; + //DWORD flags; //DC395x_LOCK_IO; // Don't lock for new EH #endif Index: dc395x_trm.h =================================================================== RCS file: /home/cvsroot/dc395/dc395x_trm.h,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- dc395x_trm.h 2002/03/11 02:34:37 1.39 +++ dc395x_trm.h 2002/04/24 00:03:00 1.40 @@ -8,7 +8,7 @@ ** ********************************************************************** */ -/* $Id: dc395x_trm.h,v 1.39 2002/03/11 02:34:37 garloff Exp $ */ +/* $Id: dc395x_trm.h,v 1.40 2002/04/24 00:03:00 garloff Exp $ */ /* ***************************************************** ** Tekram TRM_S1040 for DC395x driver, header file @@ -20,7 +20,7 @@ #include #define DC395x_BANNER "Tekram DC395U/UW/F DC315/U" -#define DC395x_VERSION "1.38, 2002-03-11" +#define DC395x_VERSION "1.39, 2002-04-24" /* Kernel version autodetection */ #include