From owner-p4-projects@FreeBSD.ORG Thu May 27 22:17:13 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E481B16A4D0; Thu, 27 May 2004 22:17:12 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C075916A4CE for ; Thu, 27 May 2004 22:17:12 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A735943D2F for ; Thu, 27 May 2004 22:17:12 -0700 (PDT) (envelope-from scottl@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4S5GJjA037583 for ; Thu, 27 May 2004 22:16:19 -0700 (PDT) (envelope-from scottl@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4S5GIdU037580 for perforce@freebsd.org; Thu, 27 May 2004 22:16:18 -0700 (PDT) (envelope-from scottl@freebsd.org) Date: Thu, 27 May 2004 22:16:18 -0700 (PDT) Message-Id: <200405280516.i4S5GIdU037580@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to scottl@freebsd.org using -f From: Scott Long To: Perforce Change Reviews Subject: PERFORCE change 53646 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 May 2004 05:17:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=53646 Change 53646 by scottl@scottl-esp-sparc64 on 2004/05/27 22:16:16 Hack the headers enough so that they compile without error. Start hacking up esp_sbus.c so that it will compile. Affected files ... .. //depot/projects/scottl-esp/src/sys/dev/esp/esp_sbus.c#3 edit .. //depot/projects/scottl-esp/src/sys/dev/esp/ncr53c9x.c#2 edit .. //depot/projects/scottl-esp/src/sys/dev/esp/ncr53c9xvar.h#3 edit Differences ... ==== //depot/projects/scottl-esp/src/sys/dev/esp/esp_sbus.c#3 (text+ko) ==== @@ -38,21 +38,26 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: esp_sbus.c,v 1.27 2002/12/10 13:44:47 pk Exp $"); #include #include -#include -#include -#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include #include #include #include -#include -#include - #include #include @@ -78,16 +83,24 @@ int sc_pri; /* SBUS priority */ }; -void espattach_sbus(struct device *, struct device *, void *); -void espattach_dma(struct device *, struct device *, void *); -int espmatch_sbus(struct device *, struct cfdata *, void *); +static int esp_sbus_probe(device_t); +static int esp_sbus_attach(device_t); +static device_method_t esp_sbus_methods[] = { + DEVMETHOD(device_probe, esp_sbus_probe), + DEVMETHOD(device_attach, esp_sbus_attach), +#if 0 + DEVMETHOD(device_detach, espdetach_sbus), + DEVMETHOD(device_suspend, espsuspend_sbus), + DEVMETHOD(device_resume, espresume_sbus), +#endif + {0, 0} +}; +#if 0 CFATTACH_DECL(esp_sbus, sizeof(struct esp_softc), espmatch_sbus, espattach_sbus, NULL, NULL); - -CFATTACH_DECL(esp_dma, sizeof(struct esp_softc), - espmatch_sbus, espattach_dma, NULL, NULL); +#endif /* * Functions and the switch for the MI code. @@ -133,11 +146,8 @@ static void espattach(struct esp_softc *, struct ncr53c9x_glue *); -int -espmatch_sbus(parent, cf, aux) - struct device *parent; - struct cfdata *cf; - void *aux; +static int +esp_sbus_probe(device_t dev) { int rv; struct sbus_attach_args *sa = aux; @@ -150,10 +160,8 @@ return (rv); } -void -espattach_sbus(parent, self, aux) - struct device *parent, *self; - void *aux; +static int +esp_sbus_attach(device_t dev) { struct esp_softc *esc = (void *)self; struct ncr53c9x_softc *sc = &esc->sc_ncr53c9x; @@ -531,10 +539,6 @@ icookie = bus_intr_establish(esc->sc_bustag, esc->sc_pri, IPL_BIO, ncr53c9x_intr, sc); - /* register interrupt stats */ - evcnt_attach_dynamic(&sc->sc_intrcnt, EVCNT_TYPE_INTR, NULL, - sc->sc_dev.dv_xname, "intr"); - /* Turn on target selection using the `dma' method */ if (sc->sc_rev != NCR_VARIANT_FAS366) sc->sc_features |= NCR_F_DMASELECT; ==== //depot/projects/scottl-esp/src/sys/dev/esp/ncr53c9x.c#2 (text+ko) ==== @@ -2080,8 +2080,6 @@ /* and what do the registers say... */ ncr53c9x_readregs(sc); - sc->sc_intrcnt.ev_count++; - /* * At the moment, only a SCSI Bus Reset or Illegal * Command are classed as errors. A disconnect is a ==== //depot/projects/scottl-esp/src/sys/dev/esp/ncr53c9xvar.h#3 (text+ko) ==== @@ -269,12 +269,13 @@ }; struct ncr53c9x_softc { - struct device sc_dev; /* us as a device */ + device_t sc_dev; /* us as a device */ - struct evcnt sc_intrcnt; /* intr count */ struct cam_sim *sim; /* our scsi adapter */ struct cam_path *path; /* our scsi channel */ +#if 0 struct device *sc_child; /* attached scsibus, if any */ +#endif struct callout sc_watchdog; /* periodic timer */ struct ncr53c9x_glue *sc_glue; /* glue to MD code */ @@ -342,7 +343,7 @@ int sc_minsync; /* Minimum sync period / 4 */ int sc_maxxfer; /* Maximum transfer size */ - struct simplelock sc_lock;/* driver mutex */ + struct mtx sc_lock; /* driver mutex */ }; /* values for sc_state */ @@ -445,7 +446,7 @@ void ncr53c9x_attach(struct ncr53c9x_softc *); int ncr53c9x_detach(struct ncr53c9x_softc *, int); -void ncr53c9x_action(struct cam_sim *, union *); +void ncr53c9x_action(struct cam_sim *, union ccb *); void ncr53c9x_reset(struct ncr53c9x_softc *); int ncr53c9x_intr(void *); void ncr53c9x_init(struct ncr53c9x_softc *, int);