FCP-101: Remove bm(4).

Relnotes:	yes
FCP:		https://github.com/freebsd/fcp/blob/master/fcp-0101.md
Reviewed by:	jhb, imp
Differential Revision:	https://reviews.freebsd.org/D20230
This commit is contained in:
Brooks Davis 2019-05-17 15:20:51 +00:00
parent ebcf740a32
commit 9e774e5340
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347908
11 changed files with 1 additions and 1695 deletions

View file

@ -39,6 +39,7 @@
# done
# 20190518: Remove obsolete 10 and 10/100 ethernet drivers.
OLD_FILES+=usr/share/man/man4/bm.4
# 20190513: libcap_sysctl interface change
OLD_FILES+=lib/casper/libcap_sysctl.1
# 20190509: tests/sys/opencrypto requires the net/py-dpkt package.

View file

@ -6,7 +6,6 @@ MAN= adb.4 \
akbd.4 \
abtn.4 \
ams.4 \
bm.4 \
cuda.4 \
dtsec.4 \
llan.4 \

View file

@ -1,93 +0,0 @@
.\"-
.\" Copyright (c) 2008 Nathan Whitehorn <nwhitehorn@FreeBSD.org>
.\" 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 ``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.
.\"
.\" $FreeBSD$
.\"
.Dd October 24, 2018
.Dt BM 4
.Os
.Sh NAME
.Nm bm
.Nd BMAC 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 miibus"
.Cd "device bm"
.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_bm_load="YES"
.Ed
.Sh DEPRECATION NOTICE
The
.Nm
driver is not present in
.Fx 13.0
and later.
See https://github.com/freebsd/fcp/blob/master/fcp-0101.md for more
information.
.Sh DESCRIPTION
The
.Nm
driver provides support for the BMac ethernet hardware found mostly in
G3-based Apple hardware.
It is a close relative of the Sun HME controller found in contemporary
Sun workstations.
.Sh HARDWARE
Chips supported by the
.Nm
driver include:
.Pp
.Bl -bullet -compact
.It
Apple BMAC Onboard Ethernet
.It
Apple BMAC+ Onboard Ethernet
.El
.Sh SEE ALSO
.Xr altq 4 ,
.Xr hme 4 ,
.Xr miibus 4 ,
.Xr netintro 4 ,
.Xr ifconfig 8
.Sh HISTORY
The
.Nm
device driver appeared in
.Fx 7.1 .
.Sh AUTHORS
.An -nosplit
The
.Nm
driver was written by
.An Nathan Whitehorn Aq Mt nwhitehorn@FreeBSD.org
based on work by
.An Peter Grehan Aq Mt grehan@FreeBSD.org .

View file

@ -22,7 +22,6 @@ cddl/dev/dtrace/powerpc/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}
cddl/dev/fbt/powerpc/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}"
crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support
crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb
dev/bm/if_bm.c optional bm powermac
dev/adb/adb_bus.c optional adb
dev/adb/adb_kbd.c optional adb
dev/adb/adb_mouse.c optional adb

File diff suppressed because it is too large Load diff

View file

@ -1,172 +0,0 @@
/*-
* Copyright 1991-1998 by Open Software Foundation, Inc.
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appears in all copies and
* that both the copyright notice and this permission notice appear in
* supporting documentation.
*
* OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
*
* IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
* NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright 2003 by Peter Grehan. 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.
* 3. 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.
*
* $FreeBSD$
*/
/*
* BMAC resource indices
*/
#define BM_MAIN_REGISTERS 0
#define BM_TXDMA_REGISTERS 1
#define BM_RXDMA_REGISTERS 2
#define BM_MAIN_INTERRUPT 0
#define BM_TXDMA_INTERRUPT 1
#define BM_RXDMA_INTERRUPT 2
/*
* BMAC/BMAC+ register offsets
*/
#define BM_TX_IFC 0x0000 /* interface control */
#define BM_TXFIFO_CSR 0x0100 /* TX FIFO control/status */
#define BM_TX_THRESH 0x0110 /* TX threshold */
#define BM_RXFIFO_CSR 0x0120 /* receive FIFO control/status */
#define BM_MEMADD 0x0130 /* unused */
#define BM_MEMDATA_HI 0x0140 /* unused */
#define BM_MEMDATA_LO 0x0150 /* unused */
#define BM_XCVR 0x0160 /* transceiver control register */
#define BM_CHIPID 0x0170 /* chip ID */
#define BM_MII_CSR 0x0180 /* MII control register */
#define BM_SROM_CSR 0x0190 /* unused, OFW provides enet addr */
#define BM_TX_PTR 0x01A0 /* unused */
#define BM_RX_PTR 0x01B0 /* unused */
#define BM_STATUS 0x01C0 /* status register */
#define BM_INTR_DISABLE 0x0200 /* interrupt control register */
#define BM_TX_RESET 0x0420 /* TX reset */
#define BM_TX_CONFIG 0x0430 /* TX config */
#define BM_IPG1 0x0440 /* inter-packet gap hi */
#define BM_IPG2 0x0450 /* inter-packet gap lo */
#define BM_TX_ALIMIT 0x0460 /* TX attempt limit */
#define BM_TX_STIME 0x0470 /* TX slot time */
#define BM_TX_PASIZE 0x0480 /* TX preamble size */
#define BM_TX_PAPAT 0x0490 /* TX preamble pattern */
#define BM_TX_SFD 0x04A0 /* TX start-frame delimiter */
#define BM_JAMSIZE 0x04B0 /* collision jam size */
#define BM_TX_MAXLEN 0x04C0 /* max TX packet length */
#define BM_TX_MINLEN 0x04D0 /* min TX packet length */
#define BM_TX_PEAKCNT 0x04E0 /* TX peak attempts count */
#define BM_TX_DCNT 0x04F0 /* TX defer timer */
#define BM_TX_NCCNT 0x0500 /* TX normal collision cnt */
#define BM_TX_FCCNT 0x0510 /* TX first collision cnt */
#define BM_TX_EXCNT 0x0520 /* TX excess collision cnt */
#define BM_TX_LTCNT 0x0530 /* TX late collision cnt */
#define BM_TX_RANDSEED 0x0540 /* TX random seed */
#define BM_TXSM 0x0550 /* TX state machine */
#define BM_RX_RESET 0x0620 /* RX reset */
#define BM_RX_CONFIG 0x0630 /* RX config */
#define BM_RX_MAXLEN 0x0640 /* max RX packet length */
#define BM_RX_MINLEN 0x0650 /* min RX packet length */
#define BM_MACADDR2 0x0660 /* MAC address */
#define BM_MACADDR1 0x0670
#define BM_MACADDR0 0x0680
#define BM_RX_FRCNT 0x0690 /* RX frame count */
#define BM_RX_LECNT 0x06A0 /* RX too-long frame count */
#define BM_RX_AECNT 0x06B0 /* RX misaligned frame count */
#define BM_RX_FECNT 0x06C0 /* RX CRC error count */
#define BM_RXSM 0x06D0 /* RX state machine */
#define BM_RXCV 0x06E0 /* RX code violations */
#define BM_HASHTAB3 0x0700 /* Address hash table */
#define BM_HASHTAB2 0x0710
#define BM_HASHTAB1 0x0720
#define BM_HASHTAB0 0x0730
#define BM_AFILTER2 0x0740 /* Address filter */
#define BM_AFILTER1 0x0750
#define BM_AFILTER0 0x0760
#define BM_AFILTER_MASK 0x0770
/*
* MII control register bits
*/
#define BM_MII_CLK 0x0001 /* MDIO clock */
#define BM_MII_DATAOUT 0x0002 /* MDIO data out */
#define BM_MII_OENABLE 0x0004 /* MDIO output enable */
#define BM_MII_DATAIN 0x0008 /* MDIO data in */
/*
* Various flags
*/
#define BM_ENABLE 0x0001
#define BM_CRC_ENABLE 0x0100
#define BM_HASH_FILTER_ENABLE 0x0200
#define BM_REJECT_OWN_PKTS 0x0800
#define BM_PROMISC 0x0040
#define BM_TX_FULLDPX 0x0200
#define BM_TX_IGNORECOLL 0x0040
#define BM_INTR_PKT_RX 0x0001
#define BM_INTR_PKT_TX 0x0100
#define BM_INTR_TX_UNDERRUN 0x0200
#define BM_INTR_NORMAL ~(BM_INTR_PKT_TX | BM_INTR_TX_UNDERRUN)
#define BM_INTR_NONE 0xffff
/*
* register space access macros
*/
#define CSR_WRITE_4(sc, reg, val) \
bus_write_4(sc->sc_memr, reg, val)
#define CSR_WRITE_2(sc, reg, val) \
bus_write_2(sc->sc_memr, reg, val)
#define CSR_WRITE_1(sc, reg, val) \
bus_write_1(sc->sc_memr, reg, val)
#define CSR_READ_4(sc, reg) \
bus_read_4(sc->sc_memr, reg)
#define CSR_READ_2(sc, reg) \
bus_read_2(sc->sc_memr, reg)
#define CSR_READ_1(sc, reg) \
bus_read_1(sc->sc_memr, reg)
#define CSR_BARRIER(sc, reg, length, flags) \
bus_barrier(sc->sc_memr, reg, length, flags)

View file

@ -1,115 +0,0 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2008 Nathan Whitehorn
* Copyright (c) 2003 Peter Grehan
* 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$
*/
/*
* Number of transmit/receive DBDMA descriptors.
* XXX allow override with a tuneable ?
*/
#define BM_MAX_DMA_COMMANDS 256
#define BM_NTXSEGS 16
#define BM_MAX_TX_PACKETS 100
#define BM_MAX_RX_PACKETS 100
/*
* Mutex macros
*/
#define BM_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx)
#define BM_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx)
/*
* software state for transmit job mbufs (may be elements of mbuf chains)
*/
struct bm_txsoft {
struct mbuf *txs_mbuf; /* head of our mbuf chain */
bus_dmamap_t txs_dmamap; /* our DMA map */
int txs_firstdesc; /* first descriptor in packet */
int txs_lastdesc; /* last descriptor in packet */
int txs_stopdesc; /* the location of the closing STOP */
int txs_ndescs; /* number of descriptors */
STAILQ_ENTRY(bm_txsoft) txs_q;
};
STAILQ_HEAD(bm_txsq, bm_txsoft);
/*
* software state for receive jobs
*/
struct bm_rxsoft {
struct mbuf *rxs_mbuf; /* head of our mbuf chain */
bus_dmamap_t rxs_dmamap; /* our DMA map */
int dbdma_slot;
bus_dma_segment_t segment;
};
struct bm_softc {
struct ifnet *sc_ifp;
struct mtx sc_mtx;
u_char sc_enaddr[ETHER_ADDR_LEN];
int sc_streaming;
int sc_ifpflags;
int sc_duplex;
int sc_wdog_timer;
struct callout sc_tick_ch;
device_t sc_dev; /* back ptr to dev */
struct resource *sc_memr; /* macio bus mem resource */
int sc_memrid;
device_t sc_miibus;
struct mii_data *sc_mii;
struct resource *sc_txdmar, *sc_rxdmar;
int sc_txdmarid, sc_rxdmarid;
struct resource *sc_txdmairq, *sc_rxdmairq;
void *sc_txihtx, *sc_rxih;
int sc_txdmairqid, sc_rxdmairqid;
bus_dma_tag_t sc_pdma_tag;
bus_dma_tag_t sc_tdma_tag;
struct bm_txsoft sc_txsoft[BM_MAX_TX_PACKETS];
int first_used_txdma_slot, next_txdma_slot;
struct bm_txsq sc_txfreeq;
struct bm_txsq sc_txdirtyq;
bus_dma_tag_t sc_rdma_tag;
struct bm_rxsoft sc_rxsoft[BM_MAX_TX_PACKETS];
int next_rxdma_slot, rxdma_loop_slot;
dbdma_channel_t *sc_txdma, *sc_rxdma;
};

View file

@ -68,7 +68,6 @@ SUBDIR= \
${_bios} \
${_bktr} \
${_blake2} \
${_bm} \
bnxt \
bridgestp \
bwi \
@ -766,7 +765,6 @@ _cpsw= cpsw
.if ${MACHINE_CPUARCH} == "powerpc"
_agp= agp
_an= an
_bm= bm
_cardbus= cardbus
_cbb= cbb
_cfi= cfi

View file

@ -1,9 +0,0 @@
# $FreeBSD$
.PATH: ${SRCTOP}/sys/dev/bm
KMOD= if_bm
SRCS= if_bm.c
SRCS+= bus_if.h device_if.h miibus_if.h ofw_bus_if.h
.include <bsd.kmod.mk>

View file

@ -155,7 +155,6 @@ device fwe # Ethernet over FireWire (non-standard!)
# PCI Ethernet NICs that use the common MII bus controller code.
device miibus # MII bus support
device bge # Broadcom BCM570xx Gigabit Ethernet
device bm # Apple BMAC Ethernet
device gem # Sun GEM/Sun ERI/Apple GMAC
device dc # DEC/Intel 21143 and various workalikes
device fxp # Intel EtherExpress PRO/100B (82557, 82558)

View file

@ -54,7 +54,6 @@ device cpufreq
# Standard busses
device agp
device bm # Apple BMAC (Big Mac Ethernet)
device glc # Sony Playstation 3 Ethernet
device kiic # Apple Keywest I2C Controller
device ofwd # Open Firmware disks