/* $NetBSD: sc_mbmem.c,v 1.16 2023/08/04 11:18:18 rin Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Adam Glass, David Jones, Gordon W. Ross, and Matthew Fredette.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This file contains only the machine-dependent parts of the
* Sun-2 SCSI driver. (Autoconfig stuff and DMA functions.)
* The machine-independent parts are in sunscpal.c
*
* Supported hardware includes:
* Sun SCSI-2 on Multibus (Sun2/120,Sun2/170)
* Sun SCSI-2 on VME (Sun2/50,Sun3/160,Sun3/260,others?)
*
* Credits, history:
*
* Matthew Fredette took revision 1.15 of si_vme.c, and then heavily
* modified it to support the Sun sc. The remaining credits
* are from si_vme.c:
*
* David Jones wrote the initial version of this module, which
* included support for the VME adapter only. (no reselection).
*
* Gordon Ross added support for the OBIO adapter, and re-worked
* both the VME and OBIO code to support disconnect/reselect.
* (Required figuring out the hardware "features" noted above.)
*
* The autoconfiguration boilerplate came from Adam Glass.
*/
/*****************************************************************
* Multibus functions for sc
****************************************************************/
/* Do the common attach stuff. */
sunscpal_attach(sc, cf->cf_flags ? cf->cf_flags : sunsc_mbmem_options);
}
static int
sunsc_mbmem_intr(void *arg)
{
struct sunscpal_softc *sc = arg;
int claimed;
claimed = sunscpal_intr(sc);
#ifdef DEBUG
if (claimed == 0) {
printf("%s: spurious from SBC\n", __func__);
}
#endif
/* Yes, we DID cause this interrupt. */
claimed = 1;