patch-1.3.22 linux/drivers/scsi/53c7,8xx.c

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

diff -u --recursive --new-file v1.3.21/linux/drivers/scsi/53c7,8xx.c linux/drivers/scsi/53c7,8xx.c
@@ -1,6 +1,7 @@
 /* 
  * Set these options for all host adapters.
- * 	- Memory mapped IO does not work.
+ * 	- Memory mapped IO does not work on x86 because of cache
+ *	  problems.
  *	- Test 1 does a bus mastering test, which will help
  *	  weed out brain damaged main boards.
  */
@@ -3857,8 +3858,10 @@
     save_flags(flags);
     ncr_halt (host);
     NCR53c7x0_write8(SCNTL1_REG, SCNTL1_RST);
+    mb();
     udelay(25);	/* Minimum amount of time to assert RST */
     NCR53c7x0_write8(SCNTL1_REG, SCNTL1_RST);
+    mb();
     for (c = (struct NCR53c7x0_cmd *) hostdata->running_list, found = 0; c; 
     	c = (struct NCR53c7x0_cmd *) c->next)  {
 	tmp = c->cmd;
@@ -3938,8 +3941,10 @@
  *	reset.  
  */
     NCR53c7x0_write8(SCNTL1_REG, SCNTL1_RST);
+    mb();
     udelay(25);	/* Minimum amount of time to assert RST */
     NCR53c7x0_write8(SCNTL1_REG, SCNTL1_RST);
+    mb();
     restore_flags (flags);
     return 0;
 }
@@ -3968,6 +3973,7 @@
     save_flags(flags);
     cli();
     NCR53c7x0_write8(hostdata->istat, ISTAT_ABRT);
+    mb();
     /* Eat interrupts until we find what we're looking for */
     for (;;) {
 	istat = NCR53c7x0_read8 (hostdata->istat);
@@ -3981,6 +3987,7 @@
 	    }
 	} else if (istat & ISTAT_DIP) {
 	    NCR53c7x0_write8(hostdata->istat, 0);
+	    mb();
 	    tmp = NCR53c7x0_read8(DSTAT_REG);
 	    if (tmp & DSTAT_ABRT)
 		break;

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected] with Sam's (original) version
of this