require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&NFE_PCI_BA)) {
    sub NFE_PCI_BA () {	0x10;}
}
unless(defined(&NFE_RX_RING_COUNT)) {
    sub NFE_RX_RING_COUNT () {	128;}
}
unless(defined(&NFE_TX_RING_COUNT)) {
    sub NFE_TX_RING_COUNT () {	256;}
}
unless(defined(&NFE_JUMBO_FRAMELEN)) {
    sub NFE_JUMBO_FRAMELEN () {	9018;}
}
unless(defined(&NFE_JUMBO_MTU)) {
    sub NFE_JUMBO_MTU () {	( &NFE_JUMBO_FRAMELEN -  &ETHER_HDR_LEN -  &ETHER_CRC_LEN);}
}
unless(defined(&NFE_JBYTES)) {
    sub NFE_JBYTES () {	( &NFE_JUMBO_FRAMELEN +  &ETHER_ALIGN);}
}
unless(defined(&NFE_JPOOL_COUNT)) {
    sub NFE_JPOOL_COUNT () {	( &NFE_RX_RING_COUNT + 64);}
}
unless(defined(&NFE_JPOOL_SIZE)) {
    sub NFE_JPOOL_SIZE () {	( &NFE_JPOOL_COUNT *  &NFE_JBYTES);}
}
unless(defined(&NFE_MAX_SCATTER)) {
    sub NFE_MAX_SCATTER () {	( &NFE_TX_RING_COUNT - 2);}
}
unless(defined(&NFE_IRQ_STATUS)) {
    sub NFE_IRQ_STATUS () {	0x;}
}
unless(defined(&NFE_IRQ_MASK)) {
    sub NFE_IRQ_MASK () {	0x4;}
}
unless(defined(&NFE_SETUP_R6)) {
    sub NFE_SETUP_R6 () {	0x8;}
}
unless(defined(&NFE_IMTIMER)) {
    sub NFE_IMTIMER () {	0xc;}
}
unless(defined(&NFE_MISC1)) {
    sub NFE_MISC1 () {	0x80;}
}
unless(defined(&NFE_TX_CTL)) {
    sub NFE_TX_CTL () {	0x84;}
}
unless(defined(&NFE_TX_STATUS)) {
    sub NFE_TX_STATUS () {	0x88;}
}
unless(defined(&NFE_RXFILTER)) {
    sub NFE_RXFILTER () {	0x8c;}
}
unless(defined(&NFE_RXBUFSZ)) {
    sub NFE_RXBUFSZ () {	0x90;}
}
unless(defined(&NFE_RX_CTL)) {
    sub NFE_RX_CTL () {	0x94;}
}
unless(defined(&NFE_RX_STATUS)) {
    sub NFE_RX_STATUS () {	0x98;}
}
unless(defined(&NFE_RNDSEED)) {
    sub NFE_RNDSEED () {	0x9c;}
}
unless(defined(&NFE_SETUP_R1)) {
    sub NFE_SETUP_R1 () {	0xa0;}
}
unless(defined(&NFE_SETUP_R2)) {
    sub NFE_SETUP_R2 () {	0xa4;}
}
unless(defined(&NFE_MACADDR_HI)) {
    sub NFE_MACADDR_HI () {	0xa8;}
}
unless(defined(&NFE_MACADDR_LO)) {
    sub NFE_MACADDR_LO () {	0xac;}
}
unless(defined(&NFE_MULTIADDR_HI)) {
    sub NFE_MULTIADDR_HI () {	0xb0;}
}
unless(defined(&NFE_MULTIADDR_LO)) {
    sub NFE_MULTIADDR_LO () {	0xb4;}
}
unless(defined(&NFE_MULTIMASK_HI)) {
    sub NFE_MULTIMASK_HI () {	0xb8;}
}
unless(defined(&NFE_MULTIMASK_LO)) {
    sub NFE_MULTIMASK_LO () {	0xbc;}
}
unless(defined(&NFE_PHY_IFACE)) {
    sub NFE_PHY_IFACE () {	0xc0;}
}
unless(defined(&NFE_TX_RING_ADDR_LO)) {
    sub NFE_TX_RING_ADDR_LO () {	0x100;}
}
unless(defined(&NFE_RX_RING_ADDR_LO)) {
    sub NFE_RX_RING_ADDR_LO () {	0x104;}
}
unless(defined(&NFE_RING_SIZE)) {
    sub NFE_RING_SIZE () {	0x108;}
}
unless(defined(&NFE_TX_UNK)) {
    sub NFE_TX_UNK () {	0x10c;}
}
unless(defined(&NFE_LINKSPEED)) {
    sub NFE_LINKSPEED () {	0x110;}
}
unless(defined(&NFE_SETUP_R5)) {
    sub NFE_SETUP_R5 () {	0x130;}
}
unless(defined(&NFE_SETUP_R3)) {
    sub NFE_SETUP_R3 () {	0x13c;}
}
unless(defined(&NFE_SETUP_R7)) {
    sub NFE_SETUP_R7 () {	0x140;}
}
unless(defined(&NFE_RXTX_CTL)) {
    sub NFE_RXTX_CTL () {	0x144;}
}
unless(defined(&NFE_TX_RING_ADDR_HI)) {
    sub NFE_TX_RING_ADDR_HI () {	0x148;}
}
unless(defined(&NFE_RX_RING_ADDR_HI)) {
    sub NFE_RX_RING_ADDR_HI () {	0x14c;}
}
unless(defined(&NFE_PHY_STATUS)) {
    sub NFE_PHY_STATUS () {	0x180;}
}
unless(defined(&NFE_SETUP_R4)) {
    sub NFE_SETUP_R4 () {	0x184;}
}
unless(defined(&NFE_STATUS)) {
    sub NFE_STATUS () {	0x188;}
}
unless(defined(&NFE_PHY_SPEED)) {
    sub NFE_PHY_SPEED () {	0x18c;}
}
unless(defined(&NFE_PHY_CTL)) {
    sub NFE_PHY_CTL () {	0x190;}
}
unless(defined(&NFE_PHY_DATA)) {
    sub NFE_PHY_DATA () {	0x194;}
}
unless(defined(&NFE_WOL_CTL)) {
    sub NFE_WOL_CTL () {	0x200;}
}
unless(defined(&NFE_PATTERN_CRC)) {
    sub NFE_PATTERN_CRC () {	0x204;}
}
unless(defined(&NFE_PATTERN_MASK)) {
    sub NFE_PATTERN_MASK () {	0x208;}
}
unless(defined(&NFE_PWR_CAP)) {
    sub NFE_PWR_CAP () {	0x268;}
}
unless(defined(&NFE_PWR_STATE)) {
    sub NFE_PWR_STATE () {	0x26c;}
}
unless(defined(&NFE_VTAG_CTL)) {
    sub NFE_VTAG_CTL () {	0x300;}
}
unless(defined(&NFE_PHY_ERROR)) {
    sub NFE_PHY_ERROR () {	0x1;}
}
unless(defined(&NFE_PHY_WRITE)) {
    sub NFE_PHY_WRITE () {	0x400;}
}
unless(defined(&NFE_PHY_BUSY)) {
    sub NFE_PHY_BUSY () {	0x8000;}
}
unless(defined(&NFE_PHYADD_SHIFT)) {
    sub NFE_PHYADD_SHIFT () {	5;}
}
unless(defined(&NFE_STATUS_MAGIC)) {
    sub NFE_STATUS_MAGIC () {	0x140000;}
}
unless(defined(&NFE_R1_MAGIC)) {
    sub NFE_R1_MAGIC () {	0x16070f;}
}
unless(defined(&NFE_R2_MAGIC)) {
    sub NFE_R2_MAGIC () {	0x16;}
}
unless(defined(&NFE_R4_MAGIC)) {
    sub NFE_R4_MAGIC () {	0x8;}
}
unless(defined(&NFE_R6_MAGIC)) {
    sub NFE_R6_MAGIC () {	0x3;}
}
unless(defined(&NFE_WOL_ENABLE)) {
    sub NFE_WOL_ENABLE () {	0x1111;}
}
unless(defined(&NFE_RX_START)) {
    sub NFE_RX_START () {	0x1;}
}
unless(defined(&NFE_TX_START)) {
    sub NFE_TX_START () {	0x1;}
}
unless(defined(&NFE_IRQ_RXERR)) {
    sub NFE_IRQ_RXERR () {	0x1;}
}
unless(defined(&NFE_IRQ_RX)) {
    sub NFE_IRQ_RX () {	0x2;}
}
unless(defined(&NFE_IRQ_RX_NOBUF)) {
    sub NFE_IRQ_RX_NOBUF () {	0x4;}
}
unless(defined(&NFE_IRQ_TXERR)) {
    sub NFE_IRQ_TXERR () {	0x8;}
}
unless(defined(&NFE_IRQ_TX_DONE)) {
    sub NFE_IRQ_TX_DONE () {	0x10;}
}
unless(defined(&NFE_IRQ_TIMER)) {
    sub NFE_IRQ_TIMER () {	0x20;}
}
unless(defined(&NFE_IRQ_LINK)) {
    sub NFE_IRQ_LINK () {	0x40;}
}
unless(defined(&NFE_IRQ_TXERR2)) {
    sub NFE_IRQ_TXERR2 () {	0x80;}
}
unless(defined(&NFE_IRQ_TX1)) {
    sub NFE_IRQ_TX1 () {	0x100;}
}
unless(defined(&NFE_IRQ_WANTED)) {
    sub NFE_IRQ_WANTED () {	( &NFE_IRQ_RXERR |  &NFE_IRQ_RX_NOBUF |  &NFE_IRQ_RX |  &NFE_IRQ_TXERR |  &NFE_IRQ_TXERR2 |  &NFE_IRQ_TX_DONE |  &NFE_IRQ_LINK);}
}
unless(defined(&NFE_RXTX_KICKTX)) {
    sub NFE_RXTX_KICKTX () {	0x1;}
}
unless(defined(&NFE_RXTX_BIT1)) {
    sub NFE_RXTX_BIT1 () {	0x2;}
}
unless(defined(&NFE_RXTX_BIT2)) {
    sub NFE_RXTX_BIT2 () {	0x4;}
}
unless(defined(&NFE_RXTX_RESET)) {
    sub NFE_RXTX_RESET () {	0x10;}
}
unless(defined(&NFE_RXTX_VTAG_STRIP)) {
    sub NFE_RXTX_VTAG_STRIP () {	0x40;}
}
unless(defined(&NFE_RXTX_VTAG_INSERT)) {
    sub NFE_RXTX_VTAG_INSERT () {	0x80;}
}
unless(defined(&NFE_RXTX_RXCSUM)) {
    sub NFE_RXTX_RXCSUM () {	0x400;}
}
unless(defined(&NFE_RXTX_V2MAGIC)) {
    sub NFE_RXTX_V2MAGIC () {	0x2100;}
}
unless(defined(&NFE_RXTX_V3MAGIC)) {
    sub NFE_RXTX_V3MAGIC () {	0x2200;}
}
unless(defined(&NFE_RXFILTER_MAGIC)) {
    sub NFE_RXFILTER_MAGIC () {	0x7f0008;}
}
unless(defined(&NFE_U2M)) {
    sub NFE_U2M () {	(1<< 5);}
}
unless(defined(&NFE_PROMISC)) {
    sub NFE_PROMISC () {	(1<< 7);}
}
unless(defined(&NFE_IM_DEFAULT)) {
    sub NFE_IM_DEFAULT () {	((128* 100) / 1024);}
}
unless(defined(&NFE_VTAG_ENABLE)) {
    sub NFE_VTAG_ENABLE () {	(1<< 13);}
}
unless(defined(&NFE_PWR_VALID)) {
    sub NFE_PWR_VALID () {	(1<< 8);}
}
unless(defined(&NFE_PWR_WAKEUP)) {
    sub NFE_PWR_WAKEUP () {	(1<< 15);}
}
unless(defined(&NFE_MEDIA_SET)) {
    sub NFE_MEDIA_SET () {	0x10000;}
}
unless(defined(&NFE_MEDIA_1000T)) {
    sub NFE_MEDIA_1000T () {	0x32;}
}
unless(defined(&NFE_MEDIA_100TX)) {
    sub NFE_MEDIA_100TX () {	0x64;}
}
unless(defined(&NFE_MEDIA_10T)) {
    sub NFE_MEDIA_10T () {	0x3e8;}
}
unless(defined(&NFE_PHY_100TX)) {
    sub NFE_PHY_100TX () {	(1<< 0);}
}
unless(defined(&NFE_PHY_1000T)) {
    sub NFE_PHY_1000T () {	(1<< 1);}
}
unless(defined(&NFE_PHY_HDX)) {
    sub NFE_PHY_HDX () {	(1<< 8);}
}
unless(defined(&NFE_MISC1_MAGIC)) {
    sub NFE_MISC1_MAGIC () {	0x3b0f3c;}
}
unless(defined(&NFE_MISC1_HDX)) {
    sub NFE_MISC1_HDX () {	(1<< 1);}
}
unless(defined(&NFE_SEED_MASK)) {
    sub NFE_SEED_MASK () {	0x3ff00;}
}
unless(defined(&NFE_SEED_10T)) {
    sub NFE_SEED_10T () {	0x7f00;}
}
unless(defined(&NFE_SEED_100TX)) {
    sub NFE_SEED_100TX () {	0x2d00;}
}
unless(defined(&NFE_SEED_1000T)) {
    sub NFE_SEED_1000T () {	0x7400;}
}
unless(defined(&NFE_RX_FIXME_V1)) {
    sub NFE_RX_FIXME_V1 () {	0x6004;}
}
unless(defined(&NFE_RX_VALID_V1)) {
    sub NFE_RX_VALID_V1 () {	(1<< 0);}
}
unless(defined(&NFE_TX_ERROR_V1)) {
    sub NFE_TX_ERROR_V1 () {	0x7808;}
}
unless(defined(&NFE_TX_LASTFRAG_V1)) {
    sub NFE_TX_LASTFRAG_V1 () {	(1<< 0);}
}
unless(defined(&NFE_V1_TXERR)) {
    sub NFE_V1_TXERR () {	"\020" "\14TXERROR\13UNDERFLOW\12LATECOLLISION\11LOSTCARRIER\10DEFERRED" "\08FORCEDINT\03RETRY\00LASTPACKET";}
}
unless(defined(&NFE_RX_VTAG)) {
    sub NFE_RX_VTAG () {	(1<< 16);}
}
unless(defined(&NFE_TX_VTAG)) {
    sub NFE_TX_VTAG () {	(1<< 18);}
}
unless(defined(&NFE_RX_FIXME_V2)) {
    sub NFE_RX_FIXME_V2 () {	0x4300;}
}
unless(defined(&NFE_RX_VALID_V2)) {
    sub NFE_RX_VALID_V2 () {	(1<< 13);}
}
unless(defined(&NFE_TX_ERROR_V2)) {
    sub NFE_TX_ERROR_V2 () {	0x5c04;}
}
unless(defined(&NFE_TX_LASTFRAG_V2)) {
    sub NFE_TX_LASTFRAG_V2 () {	(1<< 13);}
}
unless(defined(&NFE_V2_TXERR)) {
    sub NFE_V2_TXERR () {	"\020" "\14FORCEDINT\13LASTPACKET\12UNDERFLOW\10LOSTCARRIER\09DEFERRED\02RETRY";}
}
unless(defined(&NFE_RX_UDP_CSUMOK)) {
    sub NFE_RX_UDP_CSUMOK () {	(1<< 10);}
}
unless(defined(&NFE_RX_TCP_CSUMOK)) {
    sub NFE_RX_TCP_CSUMOK () {	(1<< 11);}
}
unless(defined(&NFE_RX_IP_CSUMOK)) {
    sub NFE_RX_IP_CSUMOK () {	(1<< 12);}
}
unless(defined(&NFE_RX_ERROR)) {
    sub NFE_RX_ERROR () {	(1<< 14);}
}
unless(defined(&NFE_RX_READY)) {
    sub NFE_RX_READY () {	(1<< 15);}
}
unless(defined(&NFE_TX_TCP_UDP_CSUM)) {
    sub NFE_TX_TCP_UDP_CSUM () {	(1<< 10);}
}
unless(defined(&NFE_TX_IP_CSUM)) {
    sub NFE_TX_IP_CSUM () {	(1<< 11);}
}
unless(defined(&NFE_TX_VALID)) {
    sub NFE_TX_VALID () {	(1<< 15);}
}
unless(defined(&NFE_READ)) {
    sub NFE_READ {
	my($sc, $reg) = @_;
	eval q( &bus_space_read_4(($sc)-> &sc_memt, ($sc)-> &sc_memh, ($reg)));
    }
}
unless(defined(&NFE_WRITE)) {
    sub NFE_WRITE {
	my($sc, $reg, $val) = @_;
	eval q( &bus_space_write_4(($sc)-> &sc_memt, ($sc)-> &sc_memh, ($reg), ($val)));
    }
}
1;
