summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2003-03-30 21:04:19 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2003-03-30 21:04:19 +0000
commit84c6eb065a701f81e8598b52ffb5bd4836107ee5 (patch)
tree68bd2c08512b3e8571a7f5d6dfc0c9dfb81155b4
parentd0cb1325fcee2851986d29913723f539f13e54ae (diff)
Fix probing of dual channel 7899 with some fixes from current FreeBSD
code, plus an extra ahc_flush_device_writes(). ok deraadt@ tdeval@
-rw-r--r--sys/dev/ic/aic7xxx.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/ic/aic7xxx.c b/sys/dev/ic/aic7xxx.c
index 29c979c0634..98c16e4479e 100644
--- a/sys/dev/ic/aic7xxx.c
+++ b/sys/dev/ic/aic7xxx.c
@@ -28,10 +28,10 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7xxx.c,v 1.45 2003/03/21 14:58:06 drahn Exp $
+ * $Id: aic7xxx.c,v 1.46 2003/03/30 21:04:18 krw Exp $
*
* $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.80 2001/12/16 17:38:30 gibbs Exp $
- * $OpenBSD: aic7xxx.c,v 1.45 2003/03/21 14:58:06 drahn Exp $
+ * $OpenBSD: aic7xxx.c,v 1.46 2003/03/30 21:04:18 krw Exp $
*/
#ifdef __OpenBSD__
@@ -1389,11 +1389,15 @@ void
ahc_clear_intstat(struct ahc_softc *ahc)
{
/* Clear any interrupt conditions this may have caused */
+ ahc_flush_device_writes(ahc);
ahc_outb(ahc, CLRSINT1, CLRSELTIMEO|CLRATNO|CLRSCSIRSTI
|CLRBUSFREE|CLRSCSIPERR|CLRPHASECHG|
CLRREQINIT);
+ ahc_flush_device_writes(ahc);
ahc_outb(ahc, CLRSINT0, CLRSELDO|CLRSELDI|CLRSELINGO);
+ ahc_flush_device_writes(ahc);
ahc_outb(ahc, CLRINT, CLRSCSIINT);
+ ahc_flush_device_writes(ahc);
}
/**************************** Debugging Routines ******************************/
@@ -5627,6 +5631,7 @@ ahc_reset_current_bus(struct ahc_softc *ahc)
ahc_outb(ahc, SIMODE1, ahc_inb(ahc, SIMODE1) & ~ENSCSIRST);
scsiseq = ahc_inb(ahc, SCSISEQ);
ahc_outb(ahc, SCSISEQ, scsiseq | SCSIRSTO);
+ ahc_flush_device_writes(ahc);
ahc_delay(AHC_BUSRESET_DELAY);
/* Turn off the bus reset */
ahc_outb(ahc, SCSISEQ, scsiseq & ~SCSIRSTO);