patch-1.3.59 linux/drivers/scsi/aha152x.c

Next file: linux/drivers/scsi/aha152x.h
Previous file: linux/drivers/scsi/README.AM53C974
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.58/linux/drivers/scsi/aha152x.c linux/drivers/scsi/aha152x.c
@@ -20,9 +20,12 @@
  * General Public License for more details.
  *
  *
- * $Id: aha152x.c,v 1.13 1996/01/09 02:15:53 fischer Exp $
+ * $Id: aha152x.c,v 1.14 1996/01/17 15:11:20 fischer Exp fischer $
  *
  * $Log: aha152x.c,v $
+ * Revision 1.14  1996/01/17  15:11:20  fischer
+ * - fixed lockup in MESSAGE IN phase after reconnection
+ *
  * Revision 1.13  1996/01/09  02:15:53  fischer
  * - some cleanups
  * - moved request_irq behind controller initialization
@@ -1402,8 +1405,6 @@
           aha152x_panic(shpnt, "unknown lun");
 	}
 
-      make_acklow(shpnt);
-      getphase(shpnt);
 
 #if defined(DEBUG_QUEUES)
       if(HOSTDATA(shpnt)->debug & debug_queues)
@@ -1430,6 +1431,8 @@
       CURRENT_SC->SCp.phase &= ~disconnected;
       restore_flags(flags);
 
+      make_acklow(shpnt);
+      if(getphase(shpnt)!=P_MSGI) {
       SETPORT(SIMODE0, 0);
       SETPORT(SIMODE1, ENPHASEMIS|ENBUSFREE);
 #if defined(DEBUG_RACE)
@@ -1438,6 +1441,7 @@
       SETBITS(DMACNTRL0, INTEN);
       return;
     }
+    }
   
   /* Check, if we aren't busy with a command */
   if(!CURRENT_SC)
@@ -1946,6 +1950,7 @@
 	    printk("d+, ");
 #endif
             append_SC(&DISCONNECTED_SC, CURRENT_SC);
+            CURRENT_SC->SCp.phase |= 1<<16;
             CURRENT_SC = NULL;
 	  restore_flags(flags);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this