ncr53c9x_attach(): if sc_rev is NCR53C90_86C01, set it to ESP100 once

the variant name is printed.
This fixes a problem that the card would be treated as ESP100 in
ncr53c9x_reset(), but not on couple other places (pointed out by
Andy Doran in private e-mail).

g/c now redundant case entry in ncr53c9x_reset()
This commit is contained in:
jdolecek 2002-03-24 17:16:19 +00:00
parent 269b3925f6
commit 9977ae0589
1 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr53c9x.c,v 1.90 2002/03/08 20:48:38 thorpej Exp $ */
/* $NetBSD: ncr53c9x.c,v 1.91 2002/03/24 17:16:19 jdolecek Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.90 2002/03/08 20:48:38 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ncr53c9x.c,v 1.91 2002/03/24 17:16:19 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -230,6 +230,13 @@ ncr53c9x_attach(sc)
printf(": %s, %dMHz, SCSI ID %d\n",
ncr53c9x_variant_names[sc->sc_rev], sc->sc_freq, sc->sc_id);
/*
* Treat NCR53C90 with the 86C01 DMA chip exactly as ESP100
* from now on.
*/
if (sc->sc_rev == NCR_VARIANT_NCR53C90_86C01)
sc->sc_rev = NCR_VARIANT_ESP100;
sc->sc_ccf = FREQTOCCF(sc->sc_freq);
/* The value *must not* be == 1. Make it 2 */
@ -354,7 +361,6 @@ ncr53c9x_reset(sc)
case NCR_VARIANT_ESP100A:
sc->sc_features |= NCR_F_SELATN3;
NCR_WRITE_REG(sc, NCR_CFG2, sc->sc_cfg2);
case NCR_VARIANT_NCR53C90_86C01:
case NCR_VARIANT_ESP100:
NCR_WRITE_REG(sc, NCR_CFG1, sc->sc_cfg1);
NCR_WRITE_REG(sc, NCR_CCF, sc->sc_ccf);