patch-2.0.18 linux/drivers/scsi/ncr53c8xx.c

Next file: linux/drivers/sound/lowlevel/Makefile
Previous file: linux/drivers/net/ac3200.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.17/linux/drivers/scsi/ncr53c8xx.c linux/drivers/scsi/ncr53c8xx.c
@@ -4325,6 +4325,7 @@
 	lcb_p lp;
 	int target, lun;
 	int i;
+	u_char scntl3;
 
 	printf("%s: releasing host resources\n", ncr_name(np));
 
@@ -4371,12 +4372,15 @@
 
 	/*
 	**	Reset NCR chip
+	**	Preserve scntl3 for automatic clock detection.
 	*/
 
 	printf("%s: resetting chip\n", ncr_name(np));
+	scntl3 = INB (nc_scntl3);
 	OUTB (nc_istat,  SRST);
 	DELAY (1000);
 	OUTB (nc_istat,  0   );
+	OUTB (nc_scntl3, scntl3);
 
 	/*
 	**	Release Memory mapped IO region and IO mapped region
@@ -7353,7 +7357,7 @@
 	 */
 
 	if ((scntl3 & 7) < 3) {
-		printf ("%s: assuming 40MHz clock", ncr_name(np));
+		printf ("%s: assuming 40MHz clock\n", ncr_name(np));
 		scntl3 = 3; /* assume 40MHz if no value supplied by BIOS */
 	}
 

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