From 122b0bd68fd3a7e6c21d1523a681717193f48ce8 Mon Sep 17 00:00:00 2001 From: ad Date: Fri, 15 Nov 2002 13:51:29 +0000 Subject: [PATCH] Cosmetic changes. --- sys/dev/i2o/iop.c | 26 +++++++++++++------------- sys/dev/i2o/iopvar.h | 8 ++++---- sys/dev/pci/iop_pci.c | 23 ++++++++++++++--------- 3 files changed, 31 insertions(+), 26 deletions(-) diff --git a/sys/dev/i2o/iop.c b/sys/dev/i2o/iop.c index 6f089aa7e3e8..4403bf23ff57 100644 --- a/sys/dev/i2o/iop.c +++ b/sys/dev/i2o/iop.c @@ -1,7 +1,7 @@ -/* $NetBSD: iop.c,v 1.29 2002/11/08 05:47:35 msaitoh Exp $ */ +/* $NetBSD: iop.c,v 1.30 2002/11/15 13:51:29 ad Exp $ */ /*- - * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. + * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.29 2002/11/08 05:47:35 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iop.c,v 1.30 2002/11/15 13:51:29 ad Exp $"); #include "opt_i2o.h" #include "iop.h" @@ -219,7 +219,7 @@ static inline u_int32_t iop_inl(struct iop_softc *, int); static inline void iop_outl(struct iop_softc *, int, u_int32_t); static inline u_int32_t iop_inl_msg(struct iop_softc *, int); -static inline void iop_outl_rep(struct iop_softc *, int, u_int32_t); +static inline void iop_outl_msg(struct iop_softc *, int, u_int32_t); static void iop_config_interrupts(struct device *); static void iop_configure_devices(struct iop_softc *, int, int); @@ -280,11 +280,11 @@ iop_inl_msg(struct iop_softc *sc, int off) } static inline void -iop_outl_rep(struct iop_softc *sc, int off, u_int32_t val) +iop_outl_msg(struct iop_softc *sc, int off, u_int32_t val) { - bus_space_write_4(sc->sc_rep_iot, sc->sc_rep_ioh, off, val); - bus_space_barrier(sc->sc_rep_iot, sc->sc_rep_ioh, off, 4, + bus_space_write_4(sc->sc_msg_iot, sc->sc_msg_ioh, off, val); + bus_space_barrier(sc->sc_msg_iot, sc->sc_msg_ioh, off, 4, BUS_SPACE_BARRIER_WRITE); } @@ -2130,9 +2130,9 @@ iop_post(struct iop_softc *sc, u_int32_t *mb) sc->sc_rep_size, BUS_DMASYNC_PREREAD); /* Copy out the message frame. */ - bus_space_write_region_4(sc->sc_rep_iot, sc->sc_rep_ioh, mfa, mb, + bus_space_write_region_4(sc->sc_msg_iot, sc->sc_msg_ioh, mfa, mb, mb[0] >> 16); - bus_space_barrier(sc->sc_rep_iot, sc->sc_rep_ioh, mfa, + bus_space_barrier(sc->sc_msg_iot, sc->sc_msg_ioh, mfa, (mb[0] >> 14) & ~3, BUS_SPACE_BARRIER_WRITE); /* Post the MFA back to the IOP. */ @@ -2268,10 +2268,10 @@ iop_release_mfa(struct iop_softc *sc, u_int32_t mfa) { /* Use the frame to issue a no-op. */ - iop_outl_rep(sc, mfa, I2O_VERSION_11 | (4 << 16)); - iop_outl_rep(sc, mfa + 4, I2O_MSGFUNC(I2O_TID_IOP, I2O_UTIL_NOP)); - iop_outl_rep(sc, mfa + 8, 0); - iop_outl_rep(sc, mfa + 12, 0); + iop_outl_msg(sc, mfa, I2O_VERSION_11 | (4 << 16)); + iop_outl_msg(sc, mfa + 4, I2O_MSGFUNC(I2O_TID_IOP, I2O_UTIL_NOP)); + iop_outl_msg(sc, mfa + 8, 0); + iop_outl_msg(sc, mfa + 12, 0); iop_outl(sc, IOP_REG_IFIFO, mfa); } diff --git a/sys/dev/i2o/iopvar.h b/sys/dev/i2o/iopvar.h index a88917416ba1..7cf8c9bc092e 100644 --- a/sys/dev/i2o/iopvar.h +++ b/sys/dev/i2o/iopvar.h @@ -1,7 +1,7 @@ -/* $NetBSD: iopvar.h,v 1.11 2002/11/08 05:47:36 msaitoh Exp $ */ +/* $NetBSD: iopvar.h,v 1.12 2002/11/15 13:51:30 ad Exp $ */ /*- - * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. + * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -112,8 +112,8 @@ struct iop_softc { bus_space_handle_t sc_ioh; /* Bus space handle */ bus_space_tag_t sc_iot; /* Bus space tag */ bus_dma_tag_t sc_dmat; /* Bus DMA tag */ - bus_space_handle_t sc_rep_ioh; /* Bus space handle */ - bus_space_tag_t sc_rep_iot; /* Bus space tag */ + bus_space_handle_t sc_msg_ioh; /* Message queue bus space handle */ + bus_space_tag_t sc_msg_iot; /* Message queue bus space tag */ void *sc_ih; /* Interrupt handler cookie */ struct iop_msg *sc_ims; /* Message wrappers */ diff --git a/sys/dev/pci/iop_pci.c b/sys/dev/pci/iop_pci.c index f93863272bcb..7d22a5888e29 100644 --- a/sys/dev/pci/iop_pci.c +++ b/sys/dev/pci/iop_pci.c @@ -1,7 +1,7 @@ -/* $NetBSD: iop_pci.c,v 1.11 2002/11/08 05:47:35 msaitoh Exp $ */ +/* $NetBSD: iop_pci.c,v 1.12 2002/11/15 13:51:29 ad Exp $ */ /*- - * Copyright (c) 2000 The NetBSD Foundation, Inc. + * Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: iop_pci.c,v 1.11 2002/11/08 05:47:35 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: iop_pci.c,v 1.12 2002/11/15 13:51:29 ad Exp $"); #include "opt_i2o.h" @@ -88,9 +88,13 @@ iop_pci_match(struct device *parent, struct cfdata *match, void *aux) PCI_SUBCLASS(pa->pa_class) == PCI_SUBCLASS_I2O_STANDARD && PCI_INTERFACE(pa->pa_class) == PCI_INTERFACE_I2O_INTRDRIVEN) return (1); + + /* + * Match DPT/Adaptec boards that don't conform exactly to the spec. + */ if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_DPT && - ((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_2000S) - || (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_2005S))) + (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_I20 || + PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_DPT_RAID_2005S)) return (1); return (0); @@ -149,14 +153,15 @@ iop_pci_attach(struct device *parent, struct device *self, void *aux) printf("subid %x, %x\n", PCI_VENDOR(reg), PCI_PRODUCT(reg)); #endif if (pci_mapreg_map(pa, i, PCI_MAPREG_TYPE_MEM, 0, - &sc->sc_rep_iot, &sc->sc_rep_ioh, NULL, NULL)) { - printf("%s: can't map 2nd register window\n", sc->sc_dv.dv_xname); + &sc->sc_msg_iot, &sc->sc_msg_ioh, NULL, NULL)) { + printf("%s: can't map 2nd register window\n", + sc->sc_dv.dv_xname); return; } } else { /* iop devices other than 2005S */ - sc->sc_rep_iot = sc->sc_iot; - sc->sc_rep_ioh = sc->sc_ioh; + sc->sc_msg_iot = sc->sc_iot; + sc->sc_msg_ioh = sc->sc_ioh; } sc->sc_pcibus = pa->pa_bus;