438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Copyright (c) 2011 Jason King.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Copyright (c) 2000 Berkeley Software Design, Inc.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Copyright (c) 1997, 1998, 1999, 2000
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Redistribution and use in source and binary forms, with or without
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * modification, are permitted provided that the following conditions
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 1. Redistributions of source code must retain the above copyright
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * notice, this list of conditions and the following disclaimer.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 2. Redistributions in binary form must reproduce the above copyright
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * notice, this list of conditions and the following disclaimer in the
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * documentation and/or other materials provided with the distribution.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 3. All advertising materials mentioning features or use of this software
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * must display the following acknowledgement:
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * This product includes software developed by Bill Paul.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * 4. Neither the name of the author nor the names of any co-contributors
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * may be used to endorse or promote products derived from this software
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * without specific prior written permission.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * THE POSSIBILITY OF SUCH DAMAGE.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_RXSTAT_BAM 0x0008 /* broadcast address match */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_RXSTAT_LAFM 0x0010 /* logical address filter match */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_RXSTAT_PAM 0x0020 /* physical address match */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_RXSTAT_BPE 0x0080 /* bus parity error */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_RXSTAT_STP 0x0200 /* start of packet */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_RXSTAT_FRAM 0x2000 /* framing error */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\005LAFM" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\013BUFF" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\015OFLOW" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\016FRAM" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_TXCTL_ERR 0x40000000 /* error summary */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define PCN_TXCTL_ADD_FCS 0x20000000 /* add FCS to pkt */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\036ADD_FCS" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\035MORE_LTINT" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King/* Constants, do not change */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King/* Number of descriptor entries */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Register and DMA access
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Receive descriptors.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Transmit descriptors.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King * Address management.
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\001RUNNING" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\002SUSPENDED" \
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King "\003INTR_ENABLED"
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define IS_RUNNING(p) ((p)->pcn_flags & PCN_RUNNING)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#define IS_SUSPENDED(p) ((p)->pcn_flags & PCN_SUSPENDED)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King (index * sizeof (pcn_tx_desc_t)), sizeof (pcn_tx_desc_t), who)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King (index * sizeof (pcn_rx_desc_t)), sizeof (pcn_rx_desc_t), who)
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#endif /* _KERNEL */
438b5f69eb4f998015cc0835f19f2f80663f2f53Jason King#endif /* _PCNIMPL_H */