patch-2.4.11-dontuse linux/drivers/message/fusion/mptbase.c

Next file: linux/drivers/message/fusion/mptbase.h
Previous file: linux/drivers/media/video/zr36120_mem.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/drivers/message/fusion/mptbase.c linux/drivers/message/fusion/mptbase.c
@@ -42,7 +42,7 @@
  *  Originally By: Steven J. Ralston
  *  (mailto:Steve.Ralston@lsil.com)
  *
- *  $Id: mptbase.c,v 1.53.4.1 2001/08/24 20:07:05 sralston Exp $
+ *  $Id: mptbase.c,v 1.53.4.3 2001/09/18 03:54:54 sralston Exp $
  */
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 /*
@@ -108,6 +108,8 @@
 
 MODULE_AUTHOR(MODULEAUTHOR);
 MODULE_DESCRIPTION(my_NAME);
+MODULE_LICENSE("GPL");
+
 
 /*
  *  cmd line parameters
@@ -1435,10 +1437,14 @@
 {
 	if (this != NULL) {
 		int sz;
+		u32 state;
 
 		/* Disable the FW */
-		if (SendIocReset(this, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET) != 0)
-			(void) KickStart(this, 1);
+		state = GetIocState(this, 1);
+		if (state == MPI_IOC_STATE_OPERATIONAL) {
+			if (SendIocReset(this, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET) != 0)
+				(void) KickStart(this, 1);
+		}
 
 		/* Disable adapter interrupts! */
 		CHIPREG_WRITE32(&this->chip->IntMask, 0xFFFFFFFF);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)