patch-2.0.36 linux/drivers/scsi/BusLogic.c

Next file: linux/drivers/scsi/Config.in
Previous file: linux/drivers/pci/pci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.35/linux/drivers/scsi/BusLogic.c linux/drivers/scsi/BusLogic.c
@@ -26,8 +26,8 @@
 */
 
 
-#define BusLogic_DriverVersion		"2.0.14"
-#define BusLogic_DriverDate		"29 April 1998"
+#define BusLogic_DriverVersion		"2.0.15"
+#define BusLogic_DriverDate		"17 August 1998"
 
 
 #include <linux/version.h>
@@ -1190,7 +1190,8 @@
 		    BusLogic_ProbeInfoCount - FlashPointCount;
 		  memcpy(SavedProbeInfo,
 			 BusLogic_ProbeInfoList,
-			 sizeof(BusLogic_ProbeInfoList));
+			 BusLogic_ProbeInfoCount
+			 * sizeof(BusLogic_ProbeInfo_T));
 		  memcpy(&BusLogic_ProbeInfoList[0],
 			 &SavedProbeInfo[FlashPointCount],
 			 MultiMasterCount * sizeof(BusLogic_ProbeInfo_T));
@@ -3149,25 +3150,25 @@
 		  HostAdapter->TargetStatistics[CCB->TargetID]
 			       .CommandsCompleted++;
 		  if (BusLogic_GlobalOptions.TraceErrors)
-		      {
-			int i;
-			BusLogic_Notice("CCB #%ld Target %d: Result %X Host "
-					"Adapter Status %02X "
-					"Target Status %02X\n",
-					HostAdapter, CCB->SerialNumber,
-					CCB->TargetID, Command->result,
-					CCB->HostAdapterStatus,
-					CCB->TargetDeviceStatus);
-			BusLogic_Notice("CDB   ", HostAdapter);
-			for (i = 0; i < CCB->CDB_Length; i++)
-			  BusLogic_Notice(" %02X", HostAdapter, CCB->CDB[i]);
-			BusLogic_Notice("\n", HostAdapter);
-			BusLogic_Notice("Sense ", HostAdapter);
-			for (i = 0; i < CCB->SenseDataLength; i++)
-			  BusLogic_Notice(" %02X", HostAdapter,
-					  Command->sense_buffer[i]);
-			BusLogic_Notice("\n", HostAdapter);
-		      }
+		    {
+		      int i;
+		      BusLogic_Notice("CCB #%ld Target %d: Result %X Host "
+				      "Adapter Status %02X "
+				      "Target Status %02X\n",
+				      HostAdapter, CCB->SerialNumber,
+				      CCB->TargetID, Command->result,
+				      CCB->HostAdapterStatus,
+				      CCB->TargetDeviceStatus);
+		      BusLogic_Notice("CDB   ", HostAdapter);
+		      for (i = 0; i < CCB->CDB_Length; i++)
+			BusLogic_Notice(" %02X", HostAdapter, CCB->CDB[i]);
+		      BusLogic_Notice("\n", HostAdapter);
+		      BusLogic_Notice("Sense ", HostAdapter);
+		      for (i = 0; i < CCB->SenseDataLength; i++)
+			BusLogic_Notice(" %02X", HostAdapter,
+					Command->sense_buffer[i]);
+		      BusLogic_Notice("\n", HostAdapter);
+		    }
 		}
 	      break;
 	    }
@@ -4219,7 +4220,6 @@
   BusLogic_TargetStatistics_T *TargetStatistics;
   int TargetID, Length;
   char *Buffer;
-  if (WriteFlag) return 0;
   for (HostAdapter = BusLogic_FirstRegisteredHostAdapter;
        HostAdapter != NULL;
        HostAdapter = HostAdapter->Next)
@@ -4231,6 +4231,14 @@
       return 0;
     }
   TargetStatistics = HostAdapter->TargetStatistics;
+  if (WriteFlag)
+    {
+      HostAdapter->ExternalHostAdapterResets = 0;
+      HostAdapter->HostAdapterInternalErrors = 0;
+      memset(TargetStatistics, 0,
+	     BusLogic_MaxTargetDevices * sizeof(BusLogic_TargetStatistics_T));
+      return 0;
+    }
   Buffer = HostAdapter->MessageBuffer;
   Length = HostAdapter->MessageBufferLength;
   Length += sprintf(&Buffer[Length], "\n\

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