if_nf10bmacreg.h revision 265766
1264601Sbz/*- 2264601Sbz * Copyright (c) 2014 Bjoern A. Zeeb 3264601Sbz * All rights reserved. 4264601Sbz * 5264601Sbz * This software was developed by SRI International and the University of 6264601Sbz * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-11-C-0249 7264601Sbz * ("MRC2"), as part of the DARPA MRC research programme. 8264601Sbz * 9264601Sbz * Redistribution and use in source and binary forms, with or without 10264601Sbz * modification, are permitted provided that the following conditions 11264601Sbz * are met: 12264601Sbz * 1. Redistributions of source code must retain the above copyright 13264601Sbz * notice, this list of conditions and the following disclaimer. 14264601Sbz * 2. Redistributions in binary form must reproduce the above copyright 15264601Sbz * notice, this list of conditions and the following disclaimer in the 16264601Sbz * documentation and/or other materials provided with the distribution. 17264601Sbz * 18264601Sbz * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 19264601Sbz * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20264601Sbz * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21264601Sbz * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 22264601Sbz * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23264601Sbz * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24264601Sbz * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25264601Sbz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26264601Sbz * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27264601Sbz * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28264601Sbz * SUCH DAMAGE. 29264601Sbz * 30264601Sbz * $FreeBSD: head/sys/dev/netfpga10g/nf10bmac/if_nf10bmacreg.h 265766 2014-05-09 12:59:38Z bz $ 31264601Sbz */ 32264601Sbz 33264601Sbz#ifndef _DEV_IF_NF10BMACREG_H 34264601Sbz#define _DEV_IF_NF10BMACREG_H 35264601Sbz 36264601Sbzstruct nf10bmac_softc { 37264601Sbz struct ifnet *nf10bmac_ifp; 38265766Sbz struct resource *nf10bmac_ctrl_res; 39264601Sbz struct resource *nf10bmac_tx_mem_res; 40264601Sbz struct resource *nf10bmac_rx_mem_res; 41265766Sbz struct resource *nf10bmac_intr_res; 42265766Sbz struct resource *nf10bmac_rx_irq_res; 43265766Sbz void *nf10bmac_rx_intrhand; 44264601Sbz uint8_t *nf10bmac_tx_buf; 45264601Sbz device_t nf10bmac_dev; 46264601Sbz int nf10bmac_unit; 47265766Sbz int nf10bmac_ctrl_rid; 48264601Sbz int nf10bmac_tx_mem_rid; 49264601Sbz int nf10bmac_rx_mem_rid; 50265766Sbz int nf10bmac_intr_rid; 51265766Sbz int nf10bmac_rx_irq_rid; 52264601Sbz int nf10bmac_if_flags; 53264601Sbz uint32_t nf10bmac_flags; 54264601Sbz#define NF10BMAC_FLAGS_LINK 0x00000001 55264601Sbz uint8_t nf10bmac_eth_addr[ETHER_ADDR_LEN]; 56264601Sbz#ifdef ENABLE_WATCHDOG 57264601Sbz uint16_t nf10bmac_watchdog_timer; 58264601Sbz struct callout nf10bmac_tick; 59264601Sbz#endif 60264601Sbz struct ifmedia nf10bmac_media; /* to fake it. */ 61264601Sbz struct mtx nf10bmac_mtx; 62264601Sbz}; 63264601Sbz 64264601Sbzint nf10bmac_attach(device_t); 65264601Sbzint nf10bmac_detach_dev(device_t); 66264601Sbzvoid nf10bmac_detach_resources(device_t); 67264601Sbz 68264601Sbzextern devclass_t nf10bmac_devclass; 69264601Sbz 70264601Sbz#endif /* _DEV_IF_NF10BMACREG_H */ 71264601Sbz 72264601Sbz/* end */ 73