require '_h2ph_pre.ph';

unless(defined(&__LINUX_IBMTR_H__)) {
    eval 'sub __LINUX_IBMTR_H__ () {1;}' unless defined(&__LINUX_IBMTR_H__);
    eval 'sub TR_RETRY_INTERVAL () {(30* &HZ);}' unless defined(&TR_RETRY_INTERVAL);
    eval 'sub TR_RST_TIME () {( &HZ/20);}' unless defined(&TR_RST_TIME);
    eval 'sub TR_BUSY_INTERVAL () {( &HZ/5);}' unless defined(&TR_BUSY_INTERVAL);
    eval 'sub TR_SPIN_INTERVAL () {(3* &HZ);}' unless defined(&TR_SPIN_INTERVAL);
    eval 'sub TR_ISA () {1;}' unless defined(&TR_ISA);
    eval 'sub TR_MCA () {2;}' unless defined(&TR_MCA);
    eval 'sub TR_ISAPNP () {3;}' unless defined(&TR_ISAPNP);
    eval 'sub NOTOK () {0;}' unless defined(&NOTOK);
    eval 'sub IBMTR_SHARED_RAM_SIZE () {0x10000;}' unless defined(&IBMTR_SHARED_RAM_SIZE);
    eval 'sub IBMTR_IO_EXTENT () {4;}' unless defined(&IBMTR_IO_EXTENT);
    eval 'sub IBMTR_MAX_ADAPTERS () {4;}' unless defined(&IBMTR_MAX_ADAPTERS);
    eval 'sub CHANNEL_ID () {0x1f30;}' unless defined(&CHANNEL_ID);
    eval 'sub AIP () {0x1f00;}' unless defined(&AIP);
    eval 'sub AIPADAPTYPE () {0x1fa0;}' unless defined(&AIPADAPTYPE);
    eval 'sub AIPDATARATE () {0x1fa2;}' unless defined(&AIPDATARATE);
    eval 'sub AIPEARLYTOKEN () {0x1fa4;}' unless defined(&AIPEARLYTOKEN);
    eval 'sub AIPAVAILSHRAM () {0x1fa6;}' unless defined(&AIPAVAILSHRAM);
    eval 'sub AIPSHRAMPAGE () {0x1fa8;}' unless defined(&AIPSHRAMPAGE);
    eval 'sub AIP4MBDHB () {0x1faa;}' unless defined(&AIP4MBDHB);
    eval 'sub AIP16MBDHB () {0x1fac;}' unless defined(&AIP16MBDHB);
    eval 'sub AIPFID () {0x1fba;}' unless defined(&AIPFID);
    eval 'sub ADAPTRESET () {0x1;}' unless defined(&ADAPTRESET);
    eval 'sub ADAPTRESETREL () {0x2;}' unless defined(&ADAPTRESETREL);
    eval 'sub ADAPTINTREL () {0x3;}' unless defined(&ADAPTINTREL);
    eval 'sub GLOBAL_INT_ENABLE () {0x2f0;}' unless defined(&GLOBAL_INT_ENABLE);
    eval 'sub RRR_EVEN () {0x;}' unless defined(&RRR_EVEN);
    eval 'sub RRR_ODD () {0x1;}' unless defined(&RRR_ODD);
    eval 'sub WRBR_EVEN () {0x2;}' unless defined(&WRBR_EVEN);
    eval 'sub WRBR_ODD () {0x3;}' unless defined(&WRBR_ODD);
    eval 'sub WWOR_EVEN () {0x4;}' unless defined(&WWOR_EVEN);
    eval 'sub WWOR_ODD () {0x5;}' unless defined(&WWOR_ODD);
    eval 'sub WWCR_EVEN () {0x6;}' unless defined(&WWCR_EVEN);
    eval 'sub WWCR_ODD () {0x7;}' unless defined(&WWCR_ODD);
    eval 'sub ISRP_EVEN () {0x8;}' unless defined(&ISRP_EVEN);
    eval 'sub TCR_INT () {0x10;}' unless defined(&TCR_INT);
    eval 'sub ERR_INT () {0x8;}' unless defined(&ERR_INT);
    eval 'sub ACCESS_INT () {0x4;}' unless defined(&ACCESS_INT);
    eval 'sub INT_ENABLE () {0x40;}' unless defined(&INT_ENABLE);
    eval 'sub ISRP_ODD () {0x9;}' unless defined(&ISRP_ODD);
    eval 'sub ADAP_CHK_INT () {0x40;}' unless defined(&ADAP_CHK_INT);
    eval 'sub SRB_RESP_INT () {0x20;}' unless defined(&SRB_RESP_INT);
    eval 'sub ASB_FREE_INT () {0x10;}' unless defined(&ASB_FREE_INT);
    eval 'sub ARB_CMD_INT () {0x8;}' unless defined(&ARB_CMD_INT);
    eval 'sub SSB_RESP_INT () {0x4;}' unless defined(&SSB_RESP_INT);
    eval 'sub ISRA_EVEN () {0xa;}' unless defined(&ISRA_EVEN);
    eval 'sub ISRA_ODD () {0xb;}' unless defined(&ISRA_ODD);
    eval 'sub CMD_IN_SRB () {0x20;}' unless defined(&CMD_IN_SRB);
    eval 'sub RESP_IN_ASB () {0x10;}' unless defined(&RESP_IN_ASB);
    eval 'sub ARB_FREE () {0x2;}' unless defined(&ARB_FREE);
    eval 'sub SSB_FREE () {0x1;}' unless defined(&SSB_FREE);
    eval 'sub TCR_EVEN () {0xc;}' unless defined(&TCR_EVEN);
    eval 'sub TCR_ODD () {0xd;}' unless defined(&TCR_ODD);
    eval 'sub TVR_EVEN () {0xe;}' unless defined(&TVR_EVEN);
    eval 'sub TVR_ODD () {0xf;}' unless defined(&TVR_ODD);
    eval 'sub SRPR_EVEN () {0x18;}' unless defined(&SRPR_EVEN);
    eval 'sub SRPR_ENABLE_PAGING () {0xc0;}' unless defined(&SRPR_ENABLE_PAGING);
    eval 'sub SRPR_ODD () {0x19;}' unless defined(&SRPR_ODD);
    eval 'sub TOKREAD () {0x60;}' unless defined(&TOKREAD);
    eval 'sub TOKOR () {0x40;}' unless defined(&TOKOR);
    eval 'sub TOKAND () {0x20;}' unless defined(&TOKAND);
    eval 'sub TOKWRITE () {0x;}' unless defined(&TOKWRITE);
    eval 'sub PCCHANNELID () {5049434 &F3631313039393020;}' unless defined(&PCCHANNELID);
    eval 'sub MCCHANNELID () {4 &D4152533633583435313820;}' unless defined(&MCCHANNELID);
    eval 'sub ACA_OFFSET () {0x1e00;}' unless defined(&ACA_OFFSET);
    eval 'sub ACA_SET () {0x40;}' unless defined(&ACA_SET);
    eval 'sub ACA_RESET () {0x20;}' unless defined(&ACA_RESET);
    eval 'sub ACA_RW () {0x;}' unless defined(&ACA_RW);
    if(defined(&ENABLE_PAGING)) {
	eval 'sub SET_PAGE {
	    local($x) = @_;
    	    eval q(( &writeb(($x),  ($ti->{mmio}) +  &ACA_OFFSET+  &ACA_RW +  &SRPR_EVEN)));
	}' unless defined(&SET_PAGE);
    } else {
	eval 'sub SET_PAGE {
	    local($x) = @_;
    	    eval q();
	}' unless defined(&SET_PAGE);
    }
    eval 'sub FIRST_INT () {1;}' unless defined(&FIRST_INT);
    eval 'sub NOT_FIRST () {2;}' unless defined(&NOT_FIRST);
    eval("sub CLOSED () { 0; }") unless defined(&CLOSED);
    eval("sub OPEN () { 1; }") unless defined(&OPEN);
    eval("sub MANUAL () { 0; }") unless defined(&MANUAL);
    eval("sub AUTOMATIC () { 1; }") unless defined(&AUTOMATIC);
    eval("sub FAIL () { 0; }") unless defined(&FAIL);
    eval("sub RESTART () { 1; }") unless defined(&RESTART);
    eval("sub REOPEN () { 2; }") unless defined(&REOPEN);
    eval("sub NO () { 0; }") unless defined(&NO);
    eval("sub YES () { 1; }") unless defined(&YES);
    eval 'sub DIR_INTERRUPT () {0x;}' unless defined(&DIR_INTERRUPT);
    eval 'sub DIR_MOD_OPEN_PARAMS () {0x1;}' unless defined(&DIR_MOD_OPEN_PARAMS);
    eval 'sub DIR_OPEN_ADAPTER () {0x3;}' unless defined(&DIR_OPEN_ADAPTER);
    eval 'sub DIR_CLOSE_ADAPTER () {0x4;}' unless defined(&DIR_CLOSE_ADAPTER);
    eval 'sub DIR_SET_GRP_ADDR () {0x6;}' unless defined(&DIR_SET_GRP_ADDR);
    eval 'sub DIR_SET_FUNC_ADDR () {0x7;}' unless defined(&DIR_SET_FUNC_ADDR);
    eval 'sub DIR_READ_LOG () {0x8;}' unless defined(&DIR_READ_LOG);
    eval 'sub DLC_OPEN_SAP () {0x15;}' unless defined(&DLC_OPEN_SAP);
    eval 'sub DLC_CLOSE_SAP () {0x16;}' unless defined(&DLC_CLOSE_SAP);
    eval 'sub DATA_LOST () {0x20;}' unless defined(&DATA_LOST);
    eval 'sub REC_DATA () {0x81;}' unless defined(&REC_DATA);
    eval 'sub XMIT_DATA_REQ () {0x82;}' unless defined(&XMIT_DATA_REQ);
    eval 'sub DLC_STATUS () {0x83;}' unless defined(&DLC_STATUS);
    eval 'sub RING_STAT_CHANGE () {0x84;}' unless defined(&RING_STAT_CHANGE);
    eval 'sub OPEN_PASS_BCON_MAC () {0x100;}' unless defined(&OPEN_PASS_BCON_MAC);
    eval 'sub NUM_RCV_BUF () {2;}' unless defined(&NUM_RCV_BUF);
    eval 'sub RCV_BUF_LEN () {1024;}' unless defined(&RCV_BUF_LEN);
    eval 'sub DHB_LENGTH () {2048;}' unless defined(&DHB_LENGTH);
    eval 'sub NUM_DHB () {2;}' unless defined(&NUM_DHB);
    eval 'sub DLC_MAX_SAP () {2;}' unless defined(&DLC_MAX_SAP);
    eval 'sub DLC_MAX_STA () {1;}' unless defined(&DLC_MAX_STA);
    eval 'sub MAX_I_FIELD () {0x88;}' unless defined(&MAX_I_FIELD);
    eval 'sub SAP_OPEN_IND_SAP () {0x4;}' unless defined(&SAP_OPEN_IND_SAP);
    eval 'sub SAP_OPEN_PRIORITY () {0x20;}' unless defined(&SAP_OPEN_PRIORITY);
    eval 'sub SAP_OPEN_STATION_CNT () {0x1;}' unless defined(&SAP_OPEN_STATION_CNT);
    eval 'sub XMIT_DIR_FRAME () {0xa;}' unless defined(&XMIT_DIR_FRAME);
    eval 'sub XMIT_UI_FRAME () {0xd;}' unless defined(&XMIT_UI_FRAME);
    eval 'sub XMIT_XID_CMD () {0xe;}' unless defined(&XMIT_XID_CMD);
    eval 'sub XMIT_TEST_CMD () {0x11;}' unless defined(&XMIT_TEST_CMD);
    eval 'sub SIGNAL_LOSS () {0x8000;}' unless defined(&SIGNAL_LOSS);
    eval 'sub HARD_ERROR () {0x4000;}' unless defined(&HARD_ERROR);
    eval 'sub XMIT_BEACON () {0x1000;}' unless defined(&XMIT_BEACON);
    eval 'sub LOBE_FAULT () {0x800;}' unless defined(&LOBE_FAULT);
    eval 'sub AUTO_REMOVAL () {0x400;}' unless defined(&AUTO_REMOVAL);
    eval 'sub REMOVE_RECV () {0x100;}' unless defined(&REMOVE_RECV);
    eval 'sub LOG_OVERFLOW () {0x80;}' unless defined(&LOG_OVERFLOW);
    eval 'sub RING_RECOVER () {0x20;}' unless defined(&RING_RECOVER);
}
1;
