patch-2.1.89 linux/drivers/scsi/tmscsim.c

Next file: linux/drivers/scsi/tmscsim.h
Previous file: linux/drivers/scsi/st.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.88/linux/drivers/scsi/tmscsim.c linux/drivers/scsi/tmscsim.c
@@ -24,6 +24,9 @@
  *	1.09  11/30/96	KG	Added register the allocated IO space	*
  *	1.10  12/05/96	CLH	Modified tmscsim_proc_info(), and reset *
  *				pending interrupt in DC390_detect()	*
+ * 	1.11  02/05/97	KG/CLH	Fixeds problem with partitions greater	*
+ * 				than 1GB				*
+ * 	1.12  25/02/98	KG	Cleaned up ifdefs for 2.1 kernel	*
  ***********************************************************************/
 
 
@@ -32,7 +35,7 @@
 #define SCSI_MALLOC
 
 #ifdef MODULE
-#include <linux/module.h>
+# include <linux/module.h>
 #endif
 
 #include <asm/dma.h>
@@ -677,11 +680,11 @@
     sectors = 32;
     cylinders = disk->capacity / (heads * sectors);
 
-    if ( cylinders > 1024)
+    if ( (pACB->Gmode2 & GREATER_1G) && (cylinders > 1024) )
     {
       heads = 255;
       sectors = 63;
-      cylinders = disk->capacity / (255 * 63);
+      cylinders = disk->capacity / (heads * sectors);
     }
 
     geom[0] = heads;
@@ -898,11 +901,7 @@
  * Returns : 0 on success.
  ***********************************************************************/
 
-#ifdef	VERSION_2_0_0
 int DC390_reset(Scsi_Cmnd *cmd, unsigned int resetFlags)
-#else
-int DC390_reset (Scsi_Cmnd *cmd)
-#endif
 {
     USHORT   ioport;
     unsigned long flags;
@@ -1161,7 +1160,7 @@
 
     if( !used_irq )
     {
-	if( request_irq(Irq, DC390_Interrupt, SA_INTERRUPT, "tmscsim", NULL))
+	if( request_irq(Irq, DC390_Interrupt, SA_INTERRUPT | SA_SHIRQ, "tmscsim", NULL))
 	{
 	    printk("DC390: register IRQ error!\n");
 	    return( -1 );
@@ -1763,11 +1762,11 @@
   if (acbpnt == (PACB)-1) return(-ESRCH);
   if(!shpnt) return(-ESRCH);
 
-  if(inout) // Has data been written to the file ?
+  if(inout) /* Has data been written to the file ? */
     return(tmscsim_set_info(buffer, length, shpnt));
 
   SPRINTF("Tekram DC390(T) PCI SCSI Host Adadpter, ");
-  SPRINTF("Driver Version 1.10, 1996/12/05\n");
+  SPRINTF("Driver Version 1.12, 1998/02/25\n");
 
   save_flags(flags);
   cli();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov