Deleted Added
full compact
if_ngereg.h (192506) if_ngereg.h (226995)
1/*-
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001
4 * Bill Paul <wpaul@bsdi.com>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 16 unchanged lines hidden (view full) ---

25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 *
1/*-
2 * Copyright (c) 2001 Wind River Systems
3 * Copyright (c) 1997, 1998, 1999, 2000, 2001
4 * Bill Paul <wpaul@bsdi.com>. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 16 unchanged lines hidden (view full) ---

25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * $FreeBSD: head/sys/dev/nge/if_ngereg.h 192506 2009-05-21 02:12:10Z yongari $
33 * $FreeBSD: head/sys/dev/nge/if_ngereg.h 226995 2011-11-01 16:13:59Z marius $
34 */
35
36#define NGE_CSR 0x00
37#define NGE_CFG 0x04
38#define NGE_MEAR 0x08
39#define NGE_PCITST 0x0C
40#define NGE_ISR 0x10
41#define NGE_IMR 0x14

--- 564 unchanged lines hidden (view full) ---

606/*
607 * 83820/83821 PCI device IDs
608 */
609#define NGE_DEVICEID 0x0022
610
611struct nge_type {
612 uint16_t nge_vid;
613 uint16_t nge_did;
34 */
35
36#define NGE_CSR 0x00
37#define NGE_CFG 0x04
38#define NGE_MEAR 0x08
39#define NGE_PCITST 0x0C
40#define NGE_ISR 0x10
41#define NGE_IMR 0x14

--- 564 unchanged lines hidden (view full) ---

606/*
607 * 83820/83821 PCI device IDs
608 */
609#define NGE_DEVICEID 0x0022
610
611struct nge_type {
612 uint16_t nge_vid;
613 uint16_t nge_did;
614 char *nge_name;
614 const char *nge_name;
615};
616
615};
616
617struct nge_mii_frame {
618 uint8_t mii_stdelim;
619 uint8_t mii_opcode;
620 uint8_t mii_phyaddr;
621 uint8_t mii_regaddr;
622 uint8_t mii_turnaround;
623 uint16_t mii_data;
624};
625
626/*
627 * MII constants
628 */
629#define NGE_MII_STARTDELIM 0x01
630#define NGE_MII_READOP 0x02
631#define NGE_MII_WRITEOP 0x01
632#define NGE_MII_TURNAROUND 0x02
633
634#define NGE_JUMBO_FRAMELEN 9022
635#define NGE_JUMBO_MTU \
636 (NGE_JUMBO_FRAMELEN - sizeof(struct ether_vlan_header) - ETHER_CRC_LEN)
637
638/* Statistics counters. */
639struct nge_stats {
640 uint32_t rx_pkts_errs;
641 uint32_t rx_crc_errs;

--- 44 unchanged lines hidden (view full) ---

686#define NGE_UNLOCK(_sc) mtx_unlock(&(_sc)->nge_mtx)
687#define NGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->nge_mtx)
688
689/*
690 * register space access macros
691 */
692#define CSR_WRITE_4(sc, reg, val) \
693 bus_write_4((sc)->nge_res, reg, val)
617#define NGE_JUMBO_FRAMELEN 9022
618#define NGE_JUMBO_MTU \
619 (NGE_JUMBO_FRAMELEN - sizeof(struct ether_vlan_header) - ETHER_CRC_LEN)
620
621/* Statistics counters. */
622struct nge_stats {
623 uint32_t rx_pkts_errs;
624 uint32_t rx_crc_errs;

--- 44 unchanged lines hidden (view full) ---

669#define NGE_UNLOCK(_sc) mtx_unlock(&(_sc)->nge_mtx)
670#define NGE_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->nge_mtx)
671
672/*
673 * register space access macros
674 */
675#define CSR_WRITE_4(sc, reg, val) \
676 bus_write_4((sc)->nge_res, reg, val)
694#define CSR_BARRIER_WRITE_4(sc, reg) \
695 bus_barrier((sc)->nge_res, reg, 4, BUS_SPACE_BARRIER_WRITE)
696
677
678#define CSR_BARRIER_4(sc, reg, flags) \
679 bus_barrier((sc)->nge_res, reg, 4, flags)
680
697#define CSR_READ_4(sc, reg) \
698 bus_read_4((sc)->nge_res, reg)
699
700#define NGE_TIMEOUT 1000
701
702#define NGE_INT_HOLDOFF_DEFAULT 1
703#define NGE_INT_HOLDOFF_MIN 0
704#define NGE_INT_HOLDOFF_MAX 255

--- 38 unchanged lines hidden ---
681#define CSR_READ_4(sc, reg) \
682 bus_read_4((sc)->nge_res, reg)
683
684#define NGE_TIMEOUT 1000
685
686#define NGE_INT_HOLDOFF_DEFAULT 1
687#define NGE_INT_HOLDOFF_MIN 0
688#define NGE_INT_HOLDOFF_MAX 255

--- 38 unchanged lines hidden ---