Index: head/share/man/man4/cm.4 =================================================================== --- head/share/man/man4/cm.4 (revision 331829) +++ head/share/man/man4/cm.4 (revision 331830) @@ -1,173 +1,179 @@ .\" .\" Copyright (c) 2004 Tom Rhodes .\" All rights reserved. .\" .\" 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 AUTHOR 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 AUTHOR 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. .\" .\" $FreeBSD$ .\" -.Dd July 16, 2005 +.Dd March 29, 2018 .Dt CM 4 .Os .Sh NAME .Nm cm .Nd "SMC Arcnet Ethernet device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: .Bd -ragged -offset indent .Cd "device isa" .Cd "device cm" .Ed .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : .Bd -literal -offset indent if_cm_load="YES" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 12.0 +and later. .Sh DESCRIPTION The .Nm driver provides support for the .Tn Arcnet .Tn ISA network adapters. .Pp This driver also has quirks preset in the .Xr device.hints 5 file for card detection. .Sh HARDWARE The .Nm driver supports the following card models: .Pp .Bl -bullet -compact .It SMC90c26 .It SMC90c56 .It SMC90c66 in '56 compatibility mode. .El .Sh IMPLEMENTATION NOTES When the .Va NOARP flag is set on the .Nm interface, it does not employ the address resolution protocol described in .Xr arp 4 to dynamically map between Internet and Ethernet addresses on the local network. Instead it uses the least significant 8 bits of the .Tn IP address as the hardware address like described in .Tn RFC 1051 and .Tn RFC 1201. .Pp With the .Dv IFF_LINK0 flag cleared .Tn IP/ARP/RARP encoding is done according to .Tn RFC 1201 that is, with Packet Header Definition Standard header and packet type 212 / 213. The .Tn MTU is normally 1500. The .Dv IFF_LINK0 flag is cleared by default. .Pp With the .Dv IFF_LINK0 flag set, .Tn IP and .Tn ARP encoding is done according to the deprecated .Tn RFC 1051 encoding, that is with simple header, packet type 240 / 241, and the .Tn MTU is 507. .Pp When switching between the two modes, use .Dl ifconfig interfacename down up to switch the .Tn MTU . .Sh DIAGNOSTICS The following driver specific error messages may be reported: .Bl -diag .It "reset: card reset, link addr = 0x%02x (cm%d)" The card is being reset and a new link address assigned. .It "srint: restarted rx on buf cm%d" The rx buffer has been emptied and will be reset. .El .Sh SEE ALSO .Xr netintro 4 , .Xr watchdog 4 , .Xr device.hints 5 , .Xr ifconfig 8 , .Xr watchdog 8 .Sh HISTORY The .Nm device was ported from .Nx by .An Max Khon Aq Mt fjoe@FreeBSD.org and first appeared in .Fx 4.6 . This manual page first appeared in .Fx 5.3 . .Sh AUTHORS This manual page was written by .An Tom Rhodes Aq Mt trhodes@FreeBSD.org . The .Sx IMPLEMENTATION NOTES section was submitted by .An Max Khon Aq Mt fjoe@FreeBSD.org and originated from .Nx . .Sh BUGS The .Nm driver code could do with a bit of improvement, it would be nice if some one could come along and take care of this. .Pp The .Sx IMPLEMENTATION NOTES section is specific to all Arcnet devices (see .Pa sys/net/if_arcsubr.c ) and should be moved to a more generic location. Index: head/share/man/man4/fpa.4 =================================================================== --- head/share/man/man4/fpa.4 (revision 331829) +++ head/share/man/man4/fpa.4 (revision 331830) @@ -1,38 +1,44 @@ .\" .\" Copyright (c) 1995, Matt Thomas .\" All rights reserved. .\" .\" $FreeBSD$ .\" -.Dd February 15, 2017 +.Dd March 29, 2018 .Dt FPA 4 .Os .Sh NAME .Nm fpa .Nd device drivers for DEC FDDI controllers .Sh SYNOPSIS .Cd "device fpa" .Pp .Fx only: .Cd "device fddi" +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 12.0 +and later. .Sh DESCRIPTION The .Nm device driver provide support for the DEC DEFPA PCI FDDI Controller. All variants of the controller are supported including the DAS and SAS configurations. .Sh SEE ALSO .Xr arp 4 , .Xr netintro 4 , .Xr ifconfig 8 .Sh AUTHORS The .Nm device driver and this manual page were written by .An Matt Thomas . .Sh CAVEATS Normally, the device driver will not enable the reception of SMT frames. However if the IFF_LINK1 flag is set, the device driver will enable the reception of SMT frames and pass them up to the Berkeley Packet Filter for processing. Index: head/sys/dev/cm/if_cm_isa.c =================================================================== --- head/sys/dev/cm/if_cm_isa.c (revision 331829) +++ head/sys/dev/cm/if_cm_isa.c (revision 331830) @@ -1,165 +1,166 @@ /* $NetBSD: if_bah_zbus.c,v 1.6 2000/01/23 21:06:12 aymeric Exp $ */ #include __FBSDID("$FreeBSD$"); /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD * * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Ignatios Souvatzis. * * 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. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include static int cm_isa_probe (device_t); static int cm_isa_attach (device_t); static int cm_isa_probe(dev) device_t dev; { struct cm_softc *sc = device_get_softc(dev); int rid; rid = 0; sc->port_res = bus_alloc_resource_anywhere( dev, SYS_RES_IOPORT, &rid, CM_IO_PORTS, RF_ACTIVE); if (sc->port_res == NULL) return (ENOENT); if (GETREG(CMSTAT) == 0xff) { cm_release_resources(dev); return (ENXIO); } rid = 0; sc->mem_res = bus_alloc_resource_anywhere( dev, SYS_RES_MEMORY, &rid, CM_MEM_SIZE, RF_ACTIVE); if (sc->mem_res == NULL) { cm_release_resources(dev); return (ENOENT); } rid = 0; sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (sc->irq_res == NULL) { cm_release_resources(dev); return (ENOENT); } return (0); } static int cm_isa_attach(dev) device_t dev; { struct cm_softc *sc = device_get_softc(dev); int error; /* init mtx and setup interrupt */ mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE, NULL, cmintr, sc, &sc->irq_handle); if (error) goto err; /* attach */ error = cm_attach(dev); if (error) goto err; + gone_in_dev(dev, 12, "cm(4) driver"); return 0; err: mtx_destroy(&sc->sc_mtx); cm_release_resources(dev); return (error); } static int cm_isa_detach(device_t dev) { struct cm_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->sc_ifp; /* stop and detach */ CM_LOCK(sc); cm_stop_locked(sc); ifp->if_drv_flags &= ~IFF_DRV_RUNNING; CM_UNLOCK(sc); callout_drain(&sc->sc_recon_ch); arc_ifdetach(ifp); /* teardown interrupt, destroy mtx and release resources */ bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); mtx_destroy(&sc->sc_mtx); if_free(ifp); cm_release_resources(dev); bus_generic_detach(dev); return (0); } static device_method_t cm_isa_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cm_isa_probe), DEVMETHOD(device_attach, cm_isa_attach), DEVMETHOD(device_detach, cm_isa_detach), { 0, 0 } }; static driver_t cm_isa_driver = { "cm", cm_isa_methods, sizeof(struct cm_softc) }; DRIVER_MODULE(cm, isa, cm_isa_driver, cm_devclass, 0, 0); MODULE_DEPEND(cm, isa, 1, 1, 1); Index: head/sys/dev/pdq/if_fpa.c =================================================================== --- head/sys/dev/pdq/if_fpa.c (revision 331829) +++ head/sys/dev/pdq/if_fpa.c (revision 331830) @@ -1,210 +1,211 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-NetBSD * * Copyright (c) 1995, 1996 Matt Thomas * All rights reserved. * * 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. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. * * */ #include __FBSDID("$FreeBSD$"); /* * DEC PDQ FDDI Controller; code for BSD derived operating systems * * This module supports the DEC DEFPA PCI FDDI Controller */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define DEC_VENDORID 0x1011 #define DEFPA_CHIPID 0x000F #define DEFPA_LATENCY 0x88 #define PCI_CFLT 0x0C /* Configuration Latency */ #define PCI_CBMA 0x10 /* Configuration Base Memory Address */ #define PCI_CBIO 0x14 /* Configuration Base I/O Address */ static int pdq_pci_probe (device_t); static int pdq_pci_attach (device_t); static int pdq_pci_detach (device_t); static int pdq_pci_shutdown (device_t); static void pdq_pci_ifintr (void *); static void pdq_pci_ifintr(void *arg) { pdq_softc_t *sc; sc = arg; PDQ_LOCK(sc); (void) pdq_interrupt(sc->sc_pdq); PDQ_UNLOCK(sc); return; } /* * This is the PCI configuration support. */ static int pdq_pci_probe(device_t dev) { if (pci_get_vendor(dev) == DEC_VENDORID && pci_get_device(dev) == DEFPA_CHIPID) { device_set_desc(dev, "Digital DEFPA PCI FDDI Controller"); return (BUS_PROBE_DEFAULT); } return (ENXIO); } static int pdq_pci_attach(device_t dev) { pdq_softc_t *sc; u_int32_t command; int error; sc = device_get_softc(dev); sc->dev = dev; /* * Map control/status registers. */ pci_enable_busmaster(dev); command = pci_read_config(dev, PCIR_LATTIMER, 1); if (command < DEFPA_LATENCY) { command = DEFPA_LATENCY; pci_write_config(dev, PCIR_LATTIMER, command, 1); } sc->mem_rid = PCI_CBMA; sc->mem_type = SYS_RES_MEMORY; sc->mem = bus_alloc_resource_any(dev, sc->mem_type, &sc->mem_rid, RF_ACTIVE); if (!sc->mem) { device_printf(dev, "Unable to allocate I/O space resource.\n"); error = ENXIO; goto bad; } sc->mem_bsh = rman_get_bushandle(sc->mem); sc->mem_bst = rman_get_bustag(sc->mem); sc->irq_rid = 0; sc->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, RF_SHAREABLE | RF_ACTIVE); if (!sc->irq) { device_printf(dev, "Unable to allocate interrupt resource.\n"); error = ENXIO; goto bad; } error = pdq_ifattach(sc, sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, PDQ_DEFPA); if (error) goto bad; error = bus_setup_intr(dev, sc->irq, INTR_TYPE_NET | INTR_MPSAFE, NULL, pdq_pci_ifintr, sc, &sc->irq_ih); if (error) { device_printf(dev, "Failed to setup interrupt handler.\n"); pdq_ifdetach(sc); return (error); } + gone_in_dev(dev, 12, "fpa(4) driver"); return (0); bad: pdq_free(dev); return (error); } static int pdq_pci_detach (dev) device_t dev; { pdq_softc_t *sc; sc = device_get_softc(dev); pdq_ifdetach(sc); return (0); } static int pdq_pci_shutdown(device_t dev) { pdq_softc_t *sc; sc = device_get_softc(dev); PDQ_LOCK(sc); pdq_hwreset(sc->sc_pdq); PDQ_UNLOCK(sc); return (0); } static device_method_t pdq_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, pdq_pci_probe), DEVMETHOD(device_attach, pdq_pci_attach), DEVMETHOD(device_detach, pdq_pci_detach), DEVMETHOD(device_shutdown, pdq_pci_shutdown), { 0, 0 } }; static driver_t pdq_pci_driver = { "fpa", pdq_pci_methods, sizeof(pdq_softc_t), }; DRIVER_MODULE(fpa, pci, pdq_pci_driver, pdq_devclass, 0, 0); MODULE_DEPEND(fpa, pci, 1, 1, 1); MODULE_DEPEND(fpa, fddi, 1, 1, 1);