require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_PCI_IF_STGEREG_H_)) {
    eval 'sub _DEV_PCI_IF_STGEREG_H_ () {1;}' unless defined(&_DEV_PCI_IF_STGEREG_H_);
    eval 'sub CSR_WRITE_4 {
        my($_sc, $reg, $val) = @_;
	    eval q( &bus_space_write_4(($_sc)-> &sc_st, ($_sc)-> &sc_sh, ($reg), ($val)));
    }' unless defined(&CSR_WRITE_4);
    eval 'sub CSR_WRITE_2 {
        my($_sc, $reg, $val) = @_;
	    eval q( &bus_space_write_2(($_sc)-> &sc_st, ($_sc)-> &sc_sh, ($reg), ($val)));
    }' unless defined(&CSR_WRITE_2);
    eval 'sub CSR_WRITE_1 {
        my($_sc, $reg, $val) = @_;
	    eval q( &bus_space_write_1(($_sc)-> &sc_st, ($_sc)-> &sc_sh, ($reg), ($val)));
    }' unless defined(&CSR_WRITE_1);
    eval 'sub CSR_READ_4 {
        my($_sc, $reg) = @_;
	    eval q( &bus_space_read_4(($_sc)-> &sc_st, ($_sc)-> &sc_sh, ($reg)));
    }' unless defined(&CSR_READ_4);
    eval 'sub CSR_READ_2 {
        my($_sc, $reg) = @_;
	    eval q( &bus_space_read_2(($_sc)-> &sc_st, ($_sc)-> &sc_sh, ($reg)));
    }' unless defined(&CSR_READ_2);
    eval 'sub CSR_READ_1 {
        my($_sc, $reg) = @_;
	    eval q( &bus_space_read_1(($_sc)-> &sc_st, ($_sc)-> &sc_sh, ($reg)));
    }' unless defined(&CSR_READ_1);
    eval 'sub FRAG_ADDR {
        my($x) = @_;
	    eval q(((( &uint64_t)($x)) << 0));
    }' unless defined(&FRAG_ADDR);
    eval 'sub FRAG_ADDR_MASK () { &FRAG_ADDR(68719476735);}' unless defined(&FRAG_ADDR_MASK);
    eval 'sub FRAG_LEN {
        my($x) = @_;
	    eval q(((( &uint64_t)($x)) << 48));
    }' unless defined(&FRAG_LEN);
    eval 'sub FRAG_LEN_MASK () { &FRAG_LEN(0xffff);}' unless defined(&FRAG_LEN_MASK);
    eval 'sub STGE_NTXFRAGS () {12;}' unless defined(&STGE_NTXFRAGS);
    eval 'sub TFD_FrameId {
        my($x) = @_;
	    eval q((($x) << 0));
    }' unless defined(&TFD_FrameId);
    eval 'sub TFD_FrameId_MAX () {0xffff;}' unless defined(&TFD_FrameId_MAX);
    eval 'sub TFD_WordAlign {
        my($x) = @_;
	    eval q((($x) << 16));
    }' unless defined(&TFD_WordAlign);
    eval 'sub TFD_WordAlign_dword () {0;}' unless defined(&TFD_WordAlign_dword);
    eval 'sub TFD_WordAlign_word () {2;}' unless defined(&TFD_WordAlign_word);
    eval 'sub TFD_WordAlign_disable () {1;}' unless defined(&TFD_WordAlign_disable);
    eval 'sub TFD_TCPChecksumEnable () {(1 << 18);}' unless defined(&TFD_TCPChecksumEnable);
    eval 'sub TFD_UDPChecksumEnable () {(1 << 19);}' unless defined(&TFD_UDPChecksumEnable);
    eval 'sub TFD_IPChecksumEnable () {(1 << 20);}' unless defined(&TFD_IPChecksumEnable);
    eval 'sub TFD_FcsAppendDisable () {(1 << 21);}' unless defined(&TFD_FcsAppendDisable);
    eval 'sub TFD_TxIndicate () {(1 << 22);}' unless defined(&TFD_TxIndicate);
    eval 'sub TFD_TxDMAIndicate () {(1 << 23);}' unless defined(&TFD_TxDMAIndicate);
    eval 'sub TFD_FragCount {
        my($x) = @_;
	    eval q((($x) << 24));
    }' unless defined(&TFD_FragCount);
    eval 'sub TFD_VLANTagInsert () {(1 << 28);}' unless defined(&TFD_VLANTagInsert);
    eval 'sub TFD_TFDDone () {(1 << 31);}' unless defined(&TFD_TFDDone);
    eval 'sub TFD_VID {
        my($x) = @_;
	    eval q(((( &uint64_t)($x)) << 32));
    }' unless defined(&TFD_VID);
    eval 'sub TFD_CFI () {(1 << 44);}' unless defined(&TFD_CFI);
    eval 'sub TFD_UserPriority {
        my($x) = @_;
	    eval q(((( &uint64_t)($x)) << 45));
    }' unless defined(&TFD_UserPriority);
    eval 'sub RFD_RxDMAFrameLen {
        my($x) = @_;
	    eval q((($x) & 0xffff));
    }' unless defined(&RFD_RxDMAFrameLen);
    eval 'sub RFD_RxFIFOOverrun () {(1 << 16);}' unless defined(&RFD_RxFIFOOverrun);
    eval 'sub RFD_RxRuntFrame () {(1 << 17);}' unless defined(&RFD_RxRuntFrame);
    eval 'sub RFD_RxAlignmentError () {(1 << 18);}' unless defined(&RFD_RxAlignmentError);
    eval 'sub RFD_RxFCSError () {(1 << 19);}' unless defined(&RFD_RxFCSError);
    eval 'sub RFD_RxOversizedFrame () {(1 << 20);}' unless defined(&RFD_RxOversizedFrame);
    eval 'sub RFD_RxLengthError () {(1 << 21);}' unless defined(&RFD_RxLengthError);
    eval 'sub RFD_VLANDetected () {(1 << 22);}' unless defined(&RFD_VLANDetected);
    eval 'sub RFD_TCPDetected () {(1 << 23);}' unless defined(&RFD_TCPDetected);
    eval 'sub RFD_TCPError () {(1 << 24);}' unless defined(&RFD_TCPError);
    eval 'sub RFD_UDPDetected () {(1 << 25);}' unless defined(&RFD_UDPDetected);
    eval 'sub RFD_UDPError () {(1 << 26);}' unless defined(&RFD_UDPError);
    eval 'sub RFD_IPDetected () {(1 << 27);}' unless defined(&RFD_IPDetected);
    eval 'sub RFD_IPError () {(1 << 28);}' unless defined(&RFD_IPError);
    eval 'sub RFD_FrameStart () {(1 << 29);}' unless defined(&RFD_FrameStart);
    eval 'sub RFD_FrameEnd () {(1 << 30);}' unless defined(&RFD_FrameEnd);
    eval 'sub RFD_RFDDone () {(1 << 31);}' unless defined(&RFD_RFDDone);
    eval 'sub RFD_TCI {
        my($x) = @_;
	    eval q((((( &uint64_t)($x)) >> 32) & 0xffff));
    }' unless defined(&RFD_TCI);
    eval 'sub STGE_PCI_IOBA () {( &PCI_MAPREG_START + 0x);}' unless defined(&STGE_PCI_IOBA);
    eval 'sub STGE_PCI_MMBA () {( &PCI_MAPREG_START + 0x4);}' unless defined(&STGE_PCI_MMBA);
    eval 'sub STGE_EEPROM_ConfigParam () {0x;}' unless defined(&STGE_EEPROM_ConfigParam);
    eval 'sub STGE_EEPROM_AsicCtrl () {0x1;}' unless defined(&STGE_EEPROM_AsicCtrl);
    eval 'sub STGE_EEPROM_SubSystemVendorId () {0x2;}' unless defined(&STGE_EEPROM_SubSystemVendorId);
    eval 'sub STGE_EEPROM_SubSystemId () {0x3;}' unless defined(&STGE_EEPROM_SubSystemId);
    eval 'sub STGE_EEPROM_StationAddress0 () {0x10;}' unless defined(&STGE_EEPROM_StationAddress0);
    eval 'sub STGE_EEPROM_StationAddress1 () {0x11;}' unless defined(&STGE_EEPROM_StationAddress1);
    eval 'sub STGE_EEPROM_StationAddress2 () {0x12;}' unless defined(&STGE_EEPROM_StationAddress2);
    eval 'sub STGE_DMACtrl () {0x;}' unless defined(&STGE_DMACtrl);
    eval 'sub DMAC_RxDMAComplete () {(1 << 3);}' unless defined(&DMAC_RxDMAComplete);
    eval 'sub DMAC_RxDMAPollNow () {(1 << 4);}' unless defined(&DMAC_RxDMAPollNow);
    eval 'sub DMAC_TxDMAComplete () {(1 << 11);}' unless defined(&DMAC_TxDMAComplete);
    eval 'sub DMAC_TxDMAPollNow () {(1 << 12);}' unless defined(&DMAC_TxDMAPollNow);
    eval 'sub DMAC_TxDMAInProg () {(1 << 15);}' unless defined(&DMAC_TxDMAInProg);
    eval 'sub DMAC_RxEarlyDisable () {(1 << 16);}' unless defined(&DMAC_RxEarlyDisable);
    eval 'sub DMAC_MWIDisable () {(1 << 18);}' unless defined(&DMAC_MWIDisable);
    eval 'sub DMAC_TxWiteBackDisable () {(1 << 19);}' unless defined(&DMAC_TxWiteBackDisable);
    eval 'sub DMAC_TxBurstLimit {
        my($x) = @_;
	    eval q((($x) << 20));
    }' unless defined(&DMAC_TxBurstLimit);
    eval 'sub DMAC_TargetAbort () {(1 << 30);}' unless defined(&DMAC_TargetAbort);
    eval 'sub DMAC_MasterAbort () {(1 << 31);}' unless defined(&DMAC_MasterAbort);
    eval 'sub STGE_RxDMAStatus () {0x8;}' unless defined(&STGE_RxDMAStatus);
    eval 'sub STGE_TFDListPtrLo () {0x10;}' unless defined(&STGE_TFDListPtrLo);
    eval 'sub STGE_TFDListPtrHi () {0x14;}' unless defined(&STGE_TFDListPtrHi);
    eval 'sub STGE_TxDMABurstThresh () {0x18;}' unless defined(&STGE_TxDMABurstThresh);
    eval 'sub STGE_TxDMAUrgentThresh () {0x19;}' unless defined(&STGE_TxDMAUrgentThresh);
    eval 'sub STGE_TxDMAPollPeriod () {0x1a;}' unless defined(&STGE_TxDMAPollPeriod);
    eval 'sub STGE_RFDListPtrLo () {0x1c;}' unless defined(&STGE_RFDListPtrLo);
    eval 'sub STGE_RFDListPtrHi () {0x20;}' unless defined(&STGE_RFDListPtrHi);
    eval 'sub STGE_RxDMABurstThresh () {0x24;}' unless defined(&STGE_RxDMABurstThresh);
    eval 'sub STGE_RxDMAUrgentThresh () {0x25;}' unless defined(&STGE_RxDMAUrgentThresh);
    eval 'sub STGE_RxDMAPollPeriod () {0x26;}' unless defined(&STGE_RxDMAPollPeriod);
    eval 'sub STGE_RxDMAIntCtrl () {0x28;}' unless defined(&STGE_RxDMAIntCtrl);
    eval 'sub RDIC_RxFrameCount {
        my($x) = @_;
	    eval q((($x) & 0xff));
    }' unless defined(&RDIC_RxFrameCount);
    eval 'sub RDIC_PriorityThresh {
        my($x) = @_;
	    eval q((($x) << 10));
    }' unless defined(&RDIC_PriorityThresh);
    eval 'sub RDIC_RxDMAWaitTime {
        my($x) = @_;
	    eval q((($x) << 16));
    }' unless defined(&RDIC_RxDMAWaitTime);
    eval 'sub STGE_DebugCtrl () {0x2c;}' unless defined(&STGE_DebugCtrl);
    eval 'sub DC_GPIO0Ctrl () {(1 << 0);}' unless defined(&DC_GPIO0Ctrl);
    eval 'sub DC_GPIO1Ctrl () {(1 << 1);}' unless defined(&DC_GPIO1Ctrl);
    eval 'sub DC_GPIO0 () {(1 << 2);}' unless defined(&DC_GPIO0);
    eval 'sub DC_GPIO1 () {(1 << 3);}' unless defined(&DC_GPIO1);
    eval 'sub STGE_AsicCtrl () {0x30;}' unless defined(&STGE_AsicCtrl);
    eval 'sub AC_ExpRomDisable () {(1 << 0);}' unless defined(&AC_ExpRomDisable);
    eval 'sub AC_ExpRomSize () {(1 << 1);}' unless defined(&AC_ExpRomSize);
    eval 'sub AC_PhySpeed10 () {(1 << 4);}' unless defined(&AC_PhySpeed10);
    eval 'sub AC_PhySpeed100 () {(1 << 5);}' unless defined(&AC_PhySpeed100);
    eval 'sub AC_PhySpeed1000 () {(1 << 6);}' unless defined(&AC_PhySpeed1000);
    eval 'sub AC_PhyMedia () {(1 << 7);}' unless defined(&AC_PhyMedia);
    eval 'sub AC_ForcedConfig {
        my($x) = @_;
	    eval q((($x) << 8));
    }' unless defined(&AC_ForcedConfig);
    eval 'sub AC_ForcedConfig_MASK () { &AC_ForcedConfig(7);}' unless defined(&AC_ForcedConfig_MASK);
    eval 'sub AC_D3ResetDisable () {(1 << 11);}' unless defined(&AC_D3ResetDisable);
    eval 'sub AC_SpeedupMode () {(1 << 13);}' unless defined(&AC_SpeedupMode);
    eval 'sub AC_LEDMode () {(1 << 14);}' unless defined(&AC_LEDMode);
    eval 'sub AC_RstOutPolarity () {(1 << 15);}' unless defined(&AC_RstOutPolarity);
    eval 'sub AC_GlobalReset () {(1 << 16);}' unless defined(&AC_GlobalReset);
    eval 'sub AC_RxReset () {(1 << 17);}' unless defined(&AC_RxReset);
    eval 'sub AC_TxReset () {(1 << 18);}' unless defined(&AC_TxReset);
    eval 'sub AC_DMA () {(1 << 19);}' unless defined(&AC_DMA);
    eval 'sub AC_FIFO () {(1 << 20);}' unless defined(&AC_FIFO);
    eval 'sub AC_Network () {(1 << 21);}' unless defined(&AC_Network);
    eval 'sub AC_Host () {(1 << 22);}' unless defined(&AC_Host);
    eval 'sub AC_AutoInit () {(1 << 23);}' unless defined(&AC_AutoInit);
    eval 'sub AC_RstOut () {(1 << 24);}' unless defined(&AC_RstOut);
    eval 'sub AC_InterruptRequest () {(1 << 25);}' unless defined(&AC_InterruptRequest);
    eval 'sub AC_ResetBusy () {(1 << 26);}' unless defined(&AC_ResetBusy);
    eval 'sub STGE_FIFOCtrl () {0x38;}' unless defined(&STGE_FIFOCtrl);
    eval 'sub FC_RAMTestMode () {(1 << 0);}' unless defined(&FC_RAMTestMode);
    eval 'sub FC_Transmitting () {(1 << 14);}' unless defined(&FC_Transmitting);
    eval 'sub FC_Receiving () {(1 << 15);}' unless defined(&FC_Receiving);
    eval 'sub STGE_RxEarlyThresh () {0x3a;}' unless defined(&STGE_RxEarlyThresh);
    eval 'sub STGE_FlowOffThresh () {0x3c;}' unless defined(&STGE_FlowOffThresh);
    eval 'sub STGE_FlowOnTresh () {0x3e;}' unless defined(&STGE_FlowOnTresh);
    eval 'sub STGE_TxStartThresh () {0x44;}' unless defined(&STGE_TxStartThresh);
    eval 'sub STGE_EepromData () {0x48;}' unless defined(&STGE_EepromData);
    eval 'sub STGE_EepromCtrl () {0x4a;}' unless defined(&STGE_EepromCtrl);
    eval 'sub EC_EepromAddress {
        my($x) = @_;
	    eval q((($x) & 0xff));
    }' unless defined(&EC_EepromAddress);
    eval 'sub EC_EepromOpcode {
        my($x) = @_;
	    eval q((($x) << 8));
    }' unless defined(&EC_EepromOpcode);
    eval 'sub EC_OP_WE () {0;}' unless defined(&EC_OP_WE);
    eval 'sub EC_OP_WR () {1;}' unless defined(&EC_OP_WR);
    eval 'sub EC_OP_RR () {2;}' unless defined(&EC_OP_RR);
    eval 'sub EC_OP_ER () {3;}' unless defined(&EC_OP_ER);
    eval 'sub EC_EepromBusy () {(1 << 15);}' unless defined(&EC_EepromBusy);
    eval 'sub STGE_ExpRomAddr () {0x4c;}' unless defined(&STGE_ExpRomAddr);
    eval 'sub STGE_ExpRomData () {0x50;}' unless defined(&STGE_ExpRomData);
    eval 'sub STGE_WakeEvent () {0x51;}' unless defined(&STGE_WakeEvent);
    eval 'sub STGE_Countdown () {0x54;}' unless defined(&STGE_Countdown);
    eval 'sub CD_Count {
        my($x) = @_;
	    eval q((($x) & 0xffff));
    }' unless defined(&CD_Count);
    eval 'sub CD_CountdownSpeed () {(1 << 24);}' unless defined(&CD_CountdownSpeed);
    eval 'sub CD_CountdownMode () {(1 << 25);}' unless defined(&CD_CountdownMode);
    eval 'sub CD_CountdownIntEnabled () {(1 << 26);}' unless defined(&CD_CountdownIntEnabled);
    eval 'sub STGE_IntStatusAck () {0x5a;}' unless defined(&STGE_IntStatusAck);
    eval 'sub STGE_IntStatus () {0x5e;}' unless defined(&STGE_IntStatus);
    eval 'sub STGE_IntEnable () {0x5c;}' unless defined(&STGE_IntEnable);
    eval 'sub IS_InterruptStatus () {(1 << 0);}' unless defined(&IS_InterruptStatus);
    eval 'sub IS_HostError () {(1 << 1);}' unless defined(&IS_HostError);
    eval 'sub IS_TxComplete () {(1 << 2);}' unless defined(&IS_TxComplete);
    eval 'sub IS_MACControlFrame () {(1 << 3);}' unless defined(&IS_MACControlFrame);
    eval 'sub IS_RxComplete () {(1 << 4);}' unless defined(&IS_RxComplete);
    eval 'sub IS_RxEarly () {(1 << 5);}' unless defined(&IS_RxEarly);
    eval 'sub IS_InRequested () {(1 << 6);}' unless defined(&IS_InRequested);
    eval 'sub IS_UpdateStats () {(1 << 7);}' unless defined(&IS_UpdateStats);
    eval 'sub IS_LinkEvent () {(1 << 8);}' unless defined(&IS_LinkEvent);
    eval 'sub IS_TxDMAComplete () {(1 << 9);}' unless defined(&IS_TxDMAComplete);
    eval 'sub IS_RxDMAComplete () {(1 << 10);}' unless defined(&IS_RxDMAComplete);
    eval 'sub IS_RFDListEnd () {(1 << 11);}' unless defined(&IS_RFDListEnd);
    eval 'sub IS_RxDMAPriority () {(1 << 12);}' unless defined(&IS_RxDMAPriority);
    eval 'sub STGE_TxStatus () {0x60;}' unless defined(&STGE_TxStatus);
    eval 'sub TS_TxError () {(1 << 0);}' unless defined(&TS_TxError);
    eval 'sub TS_LateCollision () {(1 << 2);}' unless defined(&TS_LateCollision);
    eval 'sub TS_MaxCollisions () {(1 << 3);}' unless defined(&TS_MaxCollisions);
    eval 'sub TS_TxUnderrun () {(1 << 4);}' unless defined(&TS_TxUnderrun);
    eval 'sub TS_TxIndicateReqd () {(1 << 6);}' unless defined(&TS_TxIndicateReqd);
    eval 'sub TS_TxComplete () {(1 << 7);}' unless defined(&TS_TxComplete);
    eval 'sub TS_TxFrameId_get {
        my($x) = @_;
	    eval q((($x) >> 16));
    }' unless defined(&TS_TxFrameId_get);
    eval 'sub STGE_MACCtrl () {0x6c;}' unless defined(&STGE_MACCtrl);
    eval 'sub MC_IFSSelect {
        my($x) = @_;
	    eval q((($x) & 3));
    }' unless defined(&MC_IFSSelect);
    eval 'sub MC_DuplexSelect () {(1 << 5);}' unless defined(&MC_DuplexSelect);
    eval 'sub MC_RcvLargeFrames () {(1 << 6);}' unless defined(&MC_RcvLargeFrames);
    eval 'sub MC_TxFlowControlEnable () {(1 << 7);}' unless defined(&MC_TxFlowControlEnable);
    eval 'sub MC_RxFlowControlEnable () {(1 << 8);}' unless defined(&MC_RxFlowControlEnable);
    eval 'sub MC_RcvFCS () {(1 << 9);}' unless defined(&MC_RcvFCS);
    eval 'sub MC_FIFOLoopback () {(1 << 10);}' unless defined(&MC_FIFOLoopback);
    eval 'sub MC_MACLoopback () {(1 << 11);}' unless defined(&MC_MACLoopback);
    eval 'sub MC_AutoVLANtagging () {(1 << 12);}' unless defined(&MC_AutoVLANtagging);
    eval 'sub MC_AutoVLANuntagging () {(1 << 13);}' unless defined(&MC_AutoVLANuntagging);
    eval 'sub MC_CollisionDetect () {(1 << 16);}' unless defined(&MC_CollisionDetect);
    eval 'sub MC_CarrierSense () {(1 << 17);}' unless defined(&MC_CarrierSense);
    eval 'sub MC_StatisticsEnable () {(1 << 21);}' unless defined(&MC_StatisticsEnable);
    eval 'sub MC_StatisticsDisable () {(1 << 22);}' unless defined(&MC_StatisticsDisable);
    eval 'sub MC_StatisticsEnabled () {(1 << 23);}' unless defined(&MC_StatisticsEnabled);
    eval 'sub MC_TxEnable () {(1 << 24);}' unless defined(&MC_TxEnable);
    eval 'sub MC_TxDisable () {(1 << 25);}' unless defined(&MC_TxDisable);
    eval 'sub MC_TxEnabled () {(1 << 26);}' unless defined(&MC_TxEnabled);
    eval 'sub MC_RxEnable () {(1 << 27);}' unless defined(&MC_RxEnable);
    eval 'sub MC_RxDisable () {(1 << 28);}' unless defined(&MC_RxDisable);
    eval 'sub MC_RxEnabled () {(1 << 29);}' unless defined(&MC_RxEnabled);
    eval 'sub MC_Paused () {(1 << 30);}' unless defined(&MC_Paused);
    eval 'sub STGE_VLANTag () {0x70;}' unless defined(&STGE_VLANTag);
    eval 'sub STGE_PhyCtrl () {0x76;}' unless defined(&STGE_PhyCtrl);
    eval 'sub PC_MgmtClk () {(1 << 0);}' unless defined(&PC_MgmtClk);
    eval 'sub PC_MgmtData () {(1 << 1);}' unless defined(&PC_MgmtData);
    eval 'sub PC_MgmtDir () {(1 << 2);}' unless defined(&PC_MgmtDir);
    eval 'sub PC_PhyDuplexPolarity () {(1 << 3);}' unless defined(&PC_PhyDuplexPolarity);
    eval 'sub PC_PhyDuplexStatus () {(1 << 4);}' unless defined(&PC_PhyDuplexStatus);
    eval 'sub PC_PhyLnkPolarity () {(1 << 5);}' unless defined(&PC_PhyLnkPolarity);
    eval 'sub PC_LinkSpeed {
        my($x) = @_;
	    eval q(((($x) >> 6) & 3));
    }' unless defined(&PC_LinkSpeed);
    eval 'sub PC_LinkSpeed_Down () {0;}' unless defined(&PC_LinkSpeed_Down);
    eval 'sub PC_LinkSpeed_10 () {1;}' unless defined(&PC_LinkSpeed_10);
    eval 'sub PC_LinkSpeed_100 () {2;}' unless defined(&PC_LinkSpeed_100);
    eval 'sub PC_LinkSpeed_1000 () {3;}' unless defined(&PC_LinkSpeed_1000);
    eval 'sub STGE_StationAddress0 () {0x78;}' unless defined(&STGE_StationAddress0);
    eval 'sub STGE_StationAddress1 () {0x7a;}' unless defined(&STGE_StationAddress1);
    eval 'sub STGE_StationAddress2 () {0x7c;}' unless defined(&STGE_StationAddress2);
    eval 'sub STGE_VLANHashTable () {0x7e;}' unless defined(&STGE_VLANHashTable);
    eval 'sub STGE_VLANId () {0x80;}' unless defined(&STGE_VLANId);
    eval 'sub STGE_MaxFrameSize () {0x86;}' unless defined(&STGE_MaxFrameSize);
    eval 'sub STGE_ReceiveMode () {0x88;}' unless defined(&STGE_ReceiveMode);
    eval 'sub RM_ReceiveUnicast () {(1 << 0);}' unless defined(&RM_ReceiveUnicast);
    eval 'sub RM_ReceiveMulticast () {(1 << 1);}' unless defined(&RM_ReceiveMulticast);
    eval 'sub RM_ReceiveBroadcast () {(1 << 2);}' unless defined(&RM_ReceiveBroadcast);
    eval 'sub RM_ReceiveAllFrames () {(1 << 3);}' unless defined(&RM_ReceiveAllFrames);
    eval 'sub RM_ReceiveMulticastHash () {(1 << 4);}' unless defined(&RM_ReceiveMulticastHash);
    eval 'sub RM_ReceiveIPMulticast () {(1 << 5);}' unless defined(&RM_ReceiveIPMulticast);
    eval 'sub RM_ReceiveVLANMatch () {(1 << 8);}' unless defined(&RM_ReceiveVLANMatch);
    eval 'sub RM_ReceiveVLANHash () {(1 << 9);}' unless defined(&RM_ReceiveVLANHash);
    eval 'sub STGE_HashTable0 () {0x8c;}' unless defined(&STGE_HashTable0);
    eval 'sub STGE_HashTable1 () {0x90;}' unless defined(&STGE_HashTable1);
    eval 'sub STGE_RMONStatisticsMask () {0x98;}' unless defined(&STGE_RMONStatisticsMask);
    eval 'sub STGE_StatisticsMask () {0x9c;}' unless defined(&STGE_StatisticsMask);
    eval 'sub STGE_RxJumboFrames () {0xbc;}' unless defined(&STGE_RxJumboFrames);
    eval 'sub STGE_TCPCheckSumErrors () {0xc0;}' unless defined(&STGE_TCPCheckSumErrors);
    eval 'sub STGE_IPCheckSumErrors () {0xc2;}' unless defined(&STGE_IPCheckSumErrors);
    eval 'sub STGE_UDPCheckSumErrors () {0xc4;}' unless defined(&STGE_UDPCheckSumErrors);
    eval 'sub STGE_TxJumboFrames () {0xf4;}' unless defined(&STGE_TxJumboFrames);
    eval 'sub STGE_OctetRcvOk () {0xa8;}' unless defined(&STGE_OctetRcvOk);
    eval 'sub STGE_McstOctetRcvdOk () {0xac;}' unless defined(&STGE_McstOctetRcvdOk);
    eval 'sub STGE_BcstOctetRcvdOk () {0xb0;}' unless defined(&STGE_BcstOctetRcvdOk);
    eval 'sub STGE_FramesRcvdOk () {0xb4;}' unless defined(&STGE_FramesRcvdOk);
    eval 'sub STGE_McstFramesRcvdOk () {0xb8;}' unless defined(&STGE_McstFramesRcvdOk);
    eval 'sub STGE_BcstFramesRcvdOk () {0xbe;}' unless defined(&STGE_BcstFramesRcvdOk);
    eval 'sub STGE_MacControlFramesRcvd () {0xc6;}' unless defined(&STGE_MacControlFramesRcvd);
    eval 'sub STGE_FrameTooLongErrors () {0xc8;}' unless defined(&STGE_FrameTooLongErrors);
    eval 'sub STGE_InRangeLengthErrors () {0xca;}' unless defined(&STGE_InRangeLengthErrors);
    eval 'sub STGE_FramesCheckSeqErrors () {0xcc;}' unless defined(&STGE_FramesCheckSeqErrors);
    eval 'sub STGE_FramesLostRxErrors () {0xce;}' unless defined(&STGE_FramesLostRxErrors);
    eval 'sub STGE_OctetXmtdOk () {0xd0;}' unless defined(&STGE_OctetXmtdOk);
    eval 'sub STGE_McstOctetXmtdOk () {0xd4;}' unless defined(&STGE_McstOctetXmtdOk);
    eval 'sub STGE_BcstOctetXmtdOk () {0xd8;}' unless defined(&STGE_BcstOctetXmtdOk);
    eval 'sub STGE_FramesXmtdOk () {0xdc;}' unless defined(&STGE_FramesXmtdOk);
    eval 'sub STGE_McstFramesXmtdOk () {0xe0;}' unless defined(&STGE_McstFramesXmtdOk);
    eval 'sub STGE_FramesWDeferredXmt () {0xe4;}' unless defined(&STGE_FramesWDeferredXmt);
    eval 'sub STGE_LateCollisions () {0xe8;}' unless defined(&STGE_LateCollisions);
    eval 'sub STGE_MultiColFrames () {0xec;}' unless defined(&STGE_MultiColFrames);
    eval 'sub STGE_SingleColFrames () {0xf0;}' unless defined(&STGE_SingleColFrames);
    eval 'sub STGE_BcstFramesXmtdOk () {0xf6;}' unless defined(&STGE_BcstFramesXmtdOk);
    eval 'sub STGE_CarrierSenseErrors () {0xf8;}' unless defined(&STGE_CarrierSenseErrors);
    eval 'sub STGE_MacControlFramesXmtd () {0xfa;}' unless defined(&STGE_MacControlFramesXmtd);
    eval 'sub STGE_FramesAbortXSColls () {0xfc;}' unless defined(&STGE_FramesAbortXSColls);
    eval 'sub STGE_FramesWEXDeferal () {0xfe;}' unless defined(&STGE_FramesWEXDeferal);
    eval 'sub STGE_EtherStatsCollisions () {0x100;}' unless defined(&STGE_EtherStatsCollisions);
    eval 'sub STGE_EtherStatsOctetsTransmit () {0x104;}' unless defined(&STGE_EtherStatsOctetsTransmit);
    eval 'sub STGE_EtherStatsPktsTransmit () {0x108;}' unless defined(&STGE_EtherStatsPktsTransmit);
    eval 'sub STGE_EtherStatsPkts64OctetsTransmit () {0x10c;}' unless defined(&STGE_EtherStatsPkts64OctetsTransmit);
    eval 'sub STGE_EtherStatsPkts64to127OctetsTransmit () {0x110;}' unless defined(&STGE_EtherStatsPkts64to127OctetsTransmit);
    eval 'sub STGE_EtherStatsPkts128to255OctetsTransmit () {0x114;}' unless defined(&STGE_EtherStatsPkts128to255OctetsTransmit);
    eval 'sub STGE_EtherStatsPkts256to511OctetsTransmit () {0x118;}' unless defined(&STGE_EtherStatsPkts256to511OctetsTransmit);
    eval 'sub STGE_EtherStatsPkts512to1023OctetsTransmit () {0x11c;}' unless defined(&STGE_EtherStatsPkts512to1023OctetsTransmit);
    eval 'sub STGE_EtherStatsPkts1024to1518OctetsTransmit () {0x120;}' unless defined(&STGE_EtherStatsPkts1024to1518OctetsTransmit);
    eval 'sub STGE_EtherStatsCRCAlignErrors () {0x124;}' unless defined(&STGE_EtherStatsCRCAlignErrors);
    eval 'sub STGE_EtherStatsUndersizePkts () {0x128;}' unless defined(&STGE_EtherStatsUndersizePkts);
    eval 'sub STGE_EtherStatsFragments () {0x12c;}' unless defined(&STGE_EtherStatsFragments);
    eval 'sub STGE_EtherStatsJabbers () {0x130;}' unless defined(&STGE_EtherStatsJabbers);
    eval 'sub STGE_EtherStatsOctets () {0x134;}' unless defined(&STGE_EtherStatsOctets);
    eval 'sub STGE_EtherStatsPkts () {0x138;}' unless defined(&STGE_EtherStatsPkts);
    eval 'sub STGE_EtherStatsPkts64Octets () {0x13c;}' unless defined(&STGE_EtherStatsPkts64Octets);
    eval 'sub STGE_EtherStatsPkts65to127Octets () {0x140;}' unless defined(&STGE_EtherStatsPkts65to127Octets);
    eval 'sub STGE_EtherStatsPkts128to255Octets () {0x144;}' unless defined(&STGE_EtherStatsPkts128to255Octets);
    eval 'sub STGE_EtherStatsPkts256to511Octets () {0x148;}' unless defined(&STGE_EtherStatsPkts256to511Octets);
    eval 'sub STGE_EtherStatsPkts512to1023Octets () {0x14c;}' unless defined(&STGE_EtherStatsPkts512to1023Octets);
    eval 'sub STGE_EtherStatsPkts1024to1518Octets () {0x150;}' unless defined(&STGE_EtherStatsPkts1024to1518Octets);
    eval 'sub STGE_NTXDESC () {256;}' unless defined(&STGE_NTXDESC);
    eval 'sub STGE_NTXDESC_MASK () {( &STGE_NTXDESC - 1);}' unless defined(&STGE_NTXDESC_MASK);
    eval 'sub STGE_NEXTTX {
        my($x) = @_;
	    eval q(((($x) + 1) &  &STGE_NTXDESC_MASK));
    }' unless defined(&STGE_NEXTTX);
    eval 'sub STGE_NRXDESC () {256;}' unless defined(&STGE_NRXDESC);
    eval 'sub STGE_NRXDESC_MASK () {( &STGE_NRXDESC - 1);}' unless defined(&STGE_NRXDESC_MASK);
    eval 'sub STGE_NEXTRX {
        my($x) = @_;
	    eval q(((($x) + 1) &  &STGE_NRXDESC_MASK));
    }' unless defined(&STGE_NEXTRX);
    eval 'sub STGE_TXINTR_SPACING () {16;}' unless defined(&STGE_TXINTR_SPACING);
    eval 'sub STGE_TXINTR_SPACING_MASK () {( &STGE_TXINTR_SPACING - 1);}' unless defined(&STGE_TXINTR_SPACING_MASK);
    eval 'sub STGE_JUMBO_FRAMELEN () {9022;}' unless defined(&STGE_JUMBO_FRAMELEN);
    eval 'sub STGE_JUMBO_MTU () {( &STGE_JUMBO_FRAMELEN -  &ETHER_HDR_LEN -  &ETHER_CRC_LEN);}' unless defined(&STGE_JUMBO_MTU);
    eval 'sub STGE_CDOFF {
        my($x) = @_;
	    eval q( &offsetof(\'struct stge_control_data\', $x));
    }' unless defined(&STGE_CDOFF);
    eval 'sub STGE_CDTXOFF {
        my($x) = @_;
	    eval q( &STGE_CDOFF( $scd_txdescs[($x)]));
    }' unless defined(&STGE_CDTXOFF);
    eval 'sub STGE_CDRXOFF {
        my($x) = @_;
	    eval q( &STGE_CDOFF( $scd_rxdescs[($x)]));
    }' unless defined(&STGE_CDRXOFF);
    eval 'sub sc_cddma () { ($sc_cddmamap->{dm_segs[0]}->{ds_addr});}' unless defined(&sc_cddma);
    eval 'sub sc_txdescs () { ($sc_control_data->{scd_txdescs});}' unless defined(&sc_txdescs);
    eval 'sub sc_rxdescs () { ($sc_control_data->{scd_rxdescs});}' unless defined(&sc_rxdescs);
    eval 'sub STGE_RXCHAIN_RESET {
        my($sc) = @_;
	    eval q( &do { ($sc)-> &sc_rxtailp = ($sc)-> &sc_rxhead; *($sc)-> &sc_rxtailp =  &NULL; ($sc)-> &sc_rxlen = 0; }  &while ( 0));
    }' unless defined(&STGE_RXCHAIN_RESET);
    eval 'sub STGE_RXCHAIN_LINK {
        my($sc, $m) = @_;
	    eval q( &do { *($sc)-> &sc_rxtailp = ($sc)-> &sc_rxtail = ($m); ($sc)-> &sc_rxtailp = ($m)-> &m_next; }  &while ( 0));
    }' unless defined(&STGE_RXCHAIN_LINK);
    eval 'sub STGE_CDTXADDR {
        my($sc, $x) = @_;
	    eval q((($sc)-> &sc_cddma +  &STGE_CDTXOFF(($x))));
    }' unless defined(&STGE_CDTXADDR);
    eval 'sub STGE_CDRXADDR {
        my($sc, $x) = @_;
	    eval q((($sc)-> &sc_cddma +  &STGE_CDRXOFF(($x))));
    }' unless defined(&STGE_CDRXADDR);
    eval 'sub STGE_CDTXSYNC {
        my($sc, $x, $ops) = @_;
	    eval q( &bus_dmamap_sync(($sc)-> &sc_dmat, ($sc)-> &sc_cddmamap,  &STGE_CDTXOFF(($x)), $sizeof{\'struct stge_tfd\'}, ($ops)));
    }' unless defined(&STGE_CDTXSYNC);
    eval 'sub STGE_CDRXSYNC {
        my($sc, $x, $ops) = @_;
	    eval q( &bus_dmamap_sync(($sc)-> &sc_dmat, ($sc)-> &sc_cddmamap,  &STGE_CDRXOFF(($x)), $sizeof{\'struct stge_rfd\'}, ($ops)));
    }' unless defined(&STGE_CDRXSYNC);
    eval 'sub STGE_INIT_RXDESC {
        my($sc, $x) = @_;
	    eval q( &do { \'struct stge_descsoft\' * &__ds = ($sc)-> $sc_rxsoft[($x)]; \'struct stge_rfd\' * &__rfd = ($sc)-> $sc_rxdescs[($x)];  ($__rfd->{rfd_frag}->{frag_word0}) =  &htole64( &FRAG_ADDR( ($__ds->{ds_dmamap}->{dm_segs[0]}->{ds_addr}) + 2) |  &FRAG_LEN( &MCLBYTES - 2));  ($__rfd->{rfd_next}) =  &htole64(( &uint64_t) &STGE_CDRXADDR(($sc),  &STGE_NEXTRX(($x))));  ($__rfd->{rfd_status}) = 0;  &STGE_CDRXSYNC(($sc), ($x),  &BUS_DMASYNC_PREREAD| &BUS_DMASYNC_PREWRITE); }  &while ( 0));
    }' unless defined(&STGE_INIT_RXDESC);
    eval 'sub STGE_TIMEOUT () {1000;}' unless defined(&STGE_TIMEOUT);
}
1;
