From a8580db029ca643bdca66559c7f25d18d0afb765 Mon Sep 17 00:00:00 2001 From: minoura Date: Sun, 30 Apr 2000 16:06:20 +0000 Subject: [PATCH] Revert 1.18 change. Hopefully this is a temporary fix; something might be missing in the SCSI negotiation. --- sys/arch/x68k/dev/mha.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/sys/arch/x68k/dev/mha.c b/sys/arch/x68k/dev/mha.c index a39f5b9abda0..ea9bdb0aa114 100644 --- a/sys/arch/x68k/dev/mha.c +++ b/sys/arch/x68k/dev/mha.c @@ -1,4 +1,4 @@ -/* $NetBSD: mha.c,v 1.19 2000/03/23 06:47:33 thorpej Exp $ */ +/* $NetBSD: mha.c,v 1.20 2000/04/30 16:06:20 minoura Exp $ */ /*- * Copyright (c) 1996-1999 The NetBSD Foundation, Inc. @@ -240,6 +240,7 @@ int mhamatch __P((struct device *, struct cfdata *, void *)); void mhaattach __P((struct device *, struct device *, void *)); void mhaselect __P((struct mha_softc *, u_char, u_char, u_char *, u_char)); +void mha_scsi_reset __P((struct mha_softc *)); void mha_reset __P((struct mha_softc *)); void mha_free_acb __P((struct mha_softc *, struct acb *, int)); void mha_sense __P((struct mha_softc *, struct acb *)); @@ -345,6 +346,8 @@ mhaattach(parent, self, aux) mha_init(sc); /* Init chip and driver */ + mha_scsi_reset(sc); /* XXX: some devices need this. */ + sc->sc_phase = BUSFREE_PHASE; /* @@ -429,6 +432,19 @@ printf("done.\n"); } #endif +/* + * Pull the SCSI RST line for 500us. + */ +void +mha_scsi_reset(sc) /* FINISH? */ + struct mha_softc *sc; +{ + + CMR = CMD_SCSI_RESET; /* SCSI RESET */ + while (!(SSR&SS_IREQUEST)) + delay(10); +} + /* * Initialize mha SCSI driver. */