if_nf10bmacreg.h revision 264601
1/*- 2 * Copyright (c) 2014 Bjoern A. Zeeb 3 * All rights reserved. 4 * 5 * This software was developed by SRI International and the University of 6 * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249 7 * ("MRC2"), as part of the DARPA MRC research programme. 8 * 9 * Redistribution and use in source and binary forms, with or without 10 * modification, are permitted provided that the following conditions 11 * are met: 12 * 1. Redistributions of source code must retain the above copyright 13 * notice, this list of conditions and the following disclaimer. 14 * 2. Redistributions in binary form must reproduce the above copyright 15 * notice, this list of conditions and the following disclaimer in the 16 * documentation and/or other materials provided with the distribution. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * $FreeBSD: head/sys/dev/netfpga10g/nf10bmac/if_nf10bmacreg.h 264601 2014-04-17 12:33:26Z bz $ 31 */ 32 33#ifndef _DEV_IF_NF10BMACREG_H 34#define _DEV_IF_NF10BMACREG_H 35 36struct nf10bmac_softc { 37 struct ifnet *nf10bmac_ifp; 38 struct resource *nf10bmac_tx_mem_res; 39 struct resource *nf10bmac_rx_mem_res; 40 struct resource *nf10bmac_mem_res; 41 uint8_t *nf10bmac_tx_buf; 42 device_t nf10bmac_dev; 43 int nf10bmac_unit; 44 int nf10bmac_tx_mem_rid; 45 int nf10bmac_rx_mem_rid; 46 int nf10bmac_mem_rid; 47 int nf10bmac_if_flags; 48 uint32_t nf10bmac_flags; 49#define NF10BMAC_FLAGS_LINK 0x00000001 50 uint8_t nf10bmac_eth_addr[ETHER_ADDR_LEN]; 51#ifdef ENABLE_WATCHDOG 52 uint16_t nf10bmac_watchdog_timer; 53 struct callout nf10bmac_tick; 54#endif 55 struct ifmedia nf10bmac_media; /* to fake it. */ 56 struct mtx nf10bmac_mtx; 57}; 58 59int nf10bmac_attach(device_t); 60int nf10bmac_detach_dev(device_t); 61void nf10bmac_detach_resources(device_t); 62 63extern devclass_t nf10bmac_devclass; 64 65#endif /* _DEV_IF_NF10BMACREG_H */ 66 67/* end */ 68