Allow per-target control over disconnect/reselect.
This commit is contained in:
parent
9f53f9825f
commit
07b4e45308
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: si.c,v 1.33 1997/01/27 19:40:53 gwr Exp $ */
|
||||
/* $NetBSD: si.c,v 1.34 1997/02/26 22:26:01 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -153,14 +153,19 @@ si_attach(sc)
|
||||
|
||||
/*
|
||||
* Support the "options" (config file flags).
|
||||
* Disconnect/reselect is a per-target mask.
|
||||
* Interrupts and DMA are per-controller.
|
||||
*/
|
||||
if ((sc->sc_options & SI_DO_RESELECT) != 0)
|
||||
ncr_sc->sc_flags |= NCR5380_PERMIT_RESELECT;
|
||||
if ((sc->sc_options & SI_DMA_INTR) == 0)
|
||||
ncr_sc->sc_no_disconnect =
|
||||
(sc->sc_options & SI_NO_DISCONNECT);
|
||||
ncr_sc->sc_parity_disable =
|
||||
(sc->sc_options & SI_NO_PARITY_CHK) >> 8;
|
||||
if (sc->sc_options & SI_FORCE_POLLING)
|
||||
ncr_sc->sc_flags |= NCR5380_FORCE_POLLING;
|
||||
|
||||
#if 1 /* XXX - Temporary */
|
||||
/* XXX - In case we think DMA is completely broken... */
|
||||
if ((sc->sc_options & SI_ENABLE_DMA) == 0) {
|
||||
if (sc->sc_options & SI_DISABLE_DMA) {
|
||||
/* Override this function pointer. */
|
||||
ncr_sc->sc_dma_alloc = NULL;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: si_obio.c,v 1.10 1997/01/27 19:54:06 gwr Exp $ */
|
||||
/* $NetBSD: si_obio.c,v 1.11 1997/02/26 22:26:02 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -135,12 +135,14 @@ struct cfattach si_obio_ca = {
|
||||
};
|
||||
|
||||
/*
|
||||
* Options. Interesting values are: 1,3,5,7
|
||||
* Some people report good behavior with: 5
|
||||
* so maybe it's a DMA interrupt bug...
|
||||
* Options for disconnect/reselect, DMA, and interrupts.
|
||||
* By default, allow disconnect/reselect on targets 4-6.
|
||||
* Those are normally tapes that really need it enabled.
|
||||
*
|
||||
* XXX - Leave interrupts disabled for now, to avoid the
|
||||
* not-yet-identified "everything dumps core" bug...
|
||||
*/
|
||||
/* XXX: Using 1 for now to mask an unidentified bug... */
|
||||
int si_obio_options = 1; /* XXX */
|
||||
int si_obio_options = SI_FORCE_POLLING | 0x0f;
|
||||
|
||||
|
||||
static int
|
||||
@ -172,9 +174,13 @@ si_obio_attach(parent, self, args)
|
||||
struct cfdata *cf = self->dv_cfdata;
|
||||
struct confargs *ca = args;
|
||||
|
||||
/* Get options from config flags... */
|
||||
sc->sc_options = cf->cf_flags | si_obio_options;
|
||||
printf(": options=%d\n", sc->sc_options);
|
||||
/* Get options from config flags if specified. */
|
||||
if (cf->cf_flags)
|
||||
sc->sc_options = cf->cf_flags;
|
||||
else
|
||||
sc->sc_options = si_obio_options;
|
||||
|
||||
printf(": options=0x%x\n", sc->sc_options);
|
||||
|
||||
sc->sc_adapter_type = ca->ca_bustype;
|
||||
sc->sc_regs = (struct si_regs *)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: si_vme.c,v 1.9 1997/01/27 19:40:55 gwr Exp $ */
|
||||
/* $NetBSD: si_vme.c,v 1.10 1997/02/26 22:26:03 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -124,8 +124,12 @@ struct cfattach si_vmes_ca = {
|
||||
sizeof(struct si_softc), si_vmes_match, si_vmes_attach
|
||||
};
|
||||
|
||||
/* Options. Interesting values are: 1,3,7 */
|
||||
int si_vme_options = 3;
|
||||
/*
|
||||
* Options for disconnect/reselect, DMA, and interrupts.
|
||||
* By default, allow disconnect/reselect on targets 4-6.
|
||||
* Those are normally tapes that really need it enabled.
|
||||
*/
|
||||
int si_vme_options = 0x0f;
|
||||
|
||||
|
||||
static int
|
||||
@ -190,9 +194,13 @@ si_vmes_attach(parent, self, args)
|
||||
struct cfdata *cf = self->dv_cfdata;
|
||||
struct confargs *ca = args;
|
||||
|
||||
/* Get options from config flags... */
|
||||
sc->sc_options = cf->cf_flags | si_vme_options;
|
||||
printf(": options=%d\n", sc->sc_options);
|
||||
/* Get options from config flags if specified. */
|
||||
if (cf->cf_flags)
|
||||
sc->sc_options = cf->cf_flags;
|
||||
else
|
||||
sc->sc_options = si_vme_options;
|
||||
|
||||
printf(": options=0x%x\n", sc->sc_options);
|
||||
|
||||
sc->sc_adapter_type = ca->ca_bustype;
|
||||
sc->sc_regs = (struct si_regs *)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sivar.h,v 1.4 1997/01/27 19:40:56 gwr Exp $ */
|
||||
/* $NetBSD: sivar.h,v 1.5 1997/02/26 22:26:00 gwr Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
@ -83,10 +83,11 @@ struct si_softc {
|
||||
void *sc_dmacmd;
|
||||
};
|
||||
|
||||
/* Options. Interesting values are: 1,3,7 */
|
||||
#define SI_ENABLE_DMA 1 /* Use DMA (maybe polled) */
|
||||
#define SI_DMA_INTR 2 /* DMA completion interrupts */
|
||||
#define SI_DO_RESELECT 4 /* Allow disconnect/reselect */
|
||||
/* Options for disconnect/reselect, DMA, and interrupts. */
|
||||
#define SI_NO_DISCONNECT 0xff
|
||||
#define SI_NO_PARITY_CHK 0xff00
|
||||
#define SI_FORCE_POLLING 0x10000
|
||||
#define SI_DISABLE_DMA 0x20000
|
||||
/* The options are taken from the config file (PR#1929) */
|
||||
|
||||
extern int si_debug;
|
||||
|
Loading…
Reference in New Issue
Block a user