require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&TWE_MAX_UNITS)) {
    sub TWE_MAX_UNITS () {	16;}
}
unless(defined(&TWE_MAXOFFSETS)) {
    sub TWE_MAXOFFSETS () {	62;}
}
unless(defined(&TWE_MAXCMDS)) {
    sub TWE_MAXCMDS () {	255;}
}
unless(defined(&TWE_SECTOR_SIZE)) {
    sub TWE_SECTOR_SIZE () {	512;}
}
unless(defined(&TWE_ALIGN)) {
    sub TWE_ALIGN () {	512;}
}
unless(defined(&TWE_MAXFER)) {
    sub TWE_MAXFER () {	( &TWE_MAXOFFSETS *  &PAGE_SIZE);}
}
unless(defined(&TWE_CONTROL)) {
    sub TWE_CONTROL () {	0x;}
}
unless(defined(&TWE_CTRL_CHOSTI)) {
    sub TWE_CTRL_CHOSTI () {	0x80000;}
}
unless(defined(&TWE_CTRL_CATTNI)) {
    sub TWE_CTRL_CATTNI () {	0x40000;}
}
unless(defined(&TWE_CTRL_MCMDI)) {
    sub TWE_CTRL_MCMDI () {	0x20000;}
}
unless(defined(&TWE_CTRL_MRDYI)) {
    sub TWE_CTRL_MRDYI () {	0x10000;}
}
unless(defined(&TWE_CTRL_ECMDI)) {
    sub TWE_CTRL_ECMDI () {	0x8000;}
}
unless(defined(&TWE_CTRL_ERDYI)) {
    sub TWE_CTRL_ERDYI () {	0x4000;}
}
unless(defined(&TWE_CTRL_CERR)) {
    sub TWE_CTRL_CERR () {	0x200;}
}
unless(defined(&TWE_CTRL_SRST)) {
    sub TWE_CTRL_SRST () {	0x100;}
}
unless(defined(&TWE_CTRL_EINT)) {
    sub TWE_CTRL_EINT () {	0x80;}
}
unless(defined(&TWE_CTRL_MINT)) {
    sub TWE_CTRL_MINT () {	0x40;}
}
unless(defined(&TWE_CTRL_HOSTI)) {
    sub TWE_CTRL_HOSTI () {	0x20;}
}
unless(defined(&TWE_STATUS)) {
    sub TWE_STATUS () {	0x4;}
}
unless(defined(&TWE_STAT_MAJV)) {
    sub TWE_STAT_MAJV () {	0xf0000000;}
}
unless(defined(&TWE_MAJV)) {
    sub TWE_MAJV {
	my($st) = @_;
	eval q(((($st) >> 28) & 0xf));
    }
}
unless(defined(&TWE_STAT_MINV)) {
    sub TWE_STAT_MINV () {	0xf000000;}
}
unless(defined(&TWE_MINV)) {
    sub TWE_MINV {
	my($st) = @_;
	eval q(((($st) >> 24) & 0xf));
    }
}
unless(defined(&TWE_STAT_PCIPAR)) {
    sub TWE_STAT_PCIPAR () {	0x800000;}
}
unless(defined(&TWE_STAT_QUEUEE)) {
    sub TWE_STAT_QUEUEE () {	0x400000;}
}
unless(defined(&TWE_STAT_CPUERR)) {
    sub TWE_STAT_CPUERR () {	0x200000;}
}
unless(defined(&TWE_STAT_PCIABR)) {
    sub TWE_STAT_PCIABR () {	0x100000;}
}
unless(defined(&TWE_STAT_HOSTI)) {
    sub TWE_STAT_HOSTI () {	0x80000;}
}
unless(defined(&TWE_STAT_ATTNI)) {
    sub TWE_STAT_ATTNI () {	0x40000;}
}
unless(defined(&TWE_STAT_CMDI)) {
    sub TWE_STAT_CMDI () {	0x20000;}
}
unless(defined(&TWE_STAT_RDYI)) {
    sub TWE_STAT_RDYI () {	0x10000;}
}
unless(defined(&TWE_STAT_CQF)) {
    sub TWE_STAT_CQF () {	0x8000;}
}
unless(defined(&TWE_STAT_RQE)) {
    sub TWE_STAT_RQE () {	0x4000;}
}
unless(defined(&TWE_STAT_CPURDY)) {
    sub TWE_STAT_CPURDY () {	0x2000;}
}
unless(defined(&TWE_STAT_CQR)) {
    sub TWE_STAT_CQR () {	0x1000;}
}
unless(defined(&TWE_STAT_FLAGS)) {
    sub TWE_STAT_FLAGS () {	0xfff000;}
}
unless(defined(&TWE_STAT_BITS)) {
    sub TWE_STAT_BITS () {	"\020\015cqr\016cpurdy\017rqe\20cqf" "\021rdyi\022cmdi\023attni\024hosti\025pciabr\026cpuerr\027queuee\030pcipar";}
}
unless(defined(&TWE_COMMANDQUEUE)) {
    sub TWE_COMMANDQUEUE () {	0x8;}
}
unless(defined(&TWE_CMD_NOP)) {
    sub TWE_CMD_NOP () {	0x200;}
}
unless(defined(&TWE_CMD_INIT)) {
    sub TWE_CMD_INIT () {	0x301;}
}
unless(defined(&TWE_CMD_READ)) {
    sub TWE_CMD_READ () {	0x362;}
}
unless(defined(&TWE_CMD_WRITE)) {
    sub TWE_CMD_WRITE () {	0x363;}
}
unless(defined(&TWE_CMD_RDVRFY)) {
    sub TWE_CMD_RDVRFY () {	0x364;}
}
unless(defined(&TWE_CMD_VERIFY)) {
    sub TWE_CMD_VERIFY () {	0x365;}
}
unless(defined(&TWE_CMD_ZRFUNIT)) {
    sub TWE_CMD_ZRFUNIT () {	0x208;}
}
unless(defined(&TWE_CMD_RPLUNIT)) {
    sub TWE_CMD_RPLUNIT () {	0x209;}
}
unless(defined(&TWE_CMD_HOTSWAP)) {
    sub TWE_CMD_HOTSWAP () {	0x20a;}
}
unless(defined(&TWE_CMD_SETATA)) {
    sub TWE_CMD_SETATA () {	0x20c;}
}
unless(defined(&TWE_CMD_FLUSH)) {
    sub TWE_CMD_FLUSH () {	0x20e;}
}
unless(defined(&TWE_CMD_ABORT)) {
    sub TWE_CMD_ABORT () {	0x20f;}
}
unless(defined(&TWE_CMD_QSTAT)) {
    sub TWE_CMD_QSTAT () {	0x210;}
}
unless(defined(&TWE_CMD_GPARAM)) {
    sub TWE_CMD_GPARAM () {	0x252;}
}
unless(defined(&TWE_CMD_SPARAM)) {
    sub TWE_CMD_SPARAM () {	0x253;}
}
unless(defined(&TWE_CMD_NEWUNIT)) {
    sub TWE_CMD_NEWUNIT () {	0x214;}
}
unless(defined(&TWE_CMD_DELUNIT)) {
    sub TWE_CMD_DELUNIT () {	0x215;}
}
unless(defined(&TWE_CMD_RBLUNIT)) {
    sub TWE_CMD_RBLUNIT () {	0x217;}
}
unless(defined(&TWE_CMD_SECINF)) {
    sub TWE_CMD_SECINF () {	0x21a;}
}
unless(defined(&TWE_CMD_AEN)) {
    sub TWE_CMD_AEN () {	0x21c;}
}
unless(defined(&TWE_CMD_CMDPK)) {
    sub TWE_CMD_CMDPK () {	0x21d;}
}
unless(defined(&TWE_READYQUEUE)) {
    sub TWE_READYQUEUE () {	0xc;}
}
unless(defined(&TWE_READYID)) {
    sub TWE_READYID {
	my($u) = @_;
	eval q(((($u) >> 4) & 0xff));
    }
}
unless(defined(&TWE_PARAM_ALL)) {
    sub TWE_PARAM_ALL () {	0x;}
}
unless(defined(&TWE_PARAM_DSUM)) {
    sub TWE_PARAM_DSUM () {	0x2;}
}
unless(defined(&TWE_PARAM_UC)) {
    sub TWE_PARAM_UC () {	0x3;}
}
unless(defined(&TWE_PARAM_DC)) {
    sub TWE_PARAM_DC () {	0x200;}
}
unless(defined(&TWE_PARAM_UI)) {
    sub TWE_PARAM_UI () {	0x300;}
}
unless(defined(&TWE_PARAM_AEN)) {
    sub TWE_PARAM_AEN () {	0x401;}
}
unless(defined(&TWE_PARAM_VER)) {
    sub TWE_PARAM_VER () {	0x402;}
}
unless(defined(&TWE_PARAM_CTRL)) {
    sub TWE_PARAM_CTRL () {	0x403;}
}
unless(defined(&TWE_PARAM_FTRS)) {
    sub TWE_PARAM_FTRS () {	0x404;}
}
unless(defined(&TWE_PARAM_DIR)) {
    sub TWE_PARAM_DIR () {	0xffff;}
}
unless(defined(&TWE_AEN_QEMPTY)) {
    sub TWE_AEN_QEMPTY () {	0x;}
}
unless(defined(&TWE_AEN_SRST)) {
    sub TWE_AEN_SRST () {	0x1;}
}
unless(defined(&TWE_AEN_DMIRROR)) {
    sub TWE_AEN_DMIRROR () {	0x2;}
}
unless(defined(&TWE_AEN_CERROR)) {
    sub TWE_AEN_CERROR () {	0x3;}
}
unless(defined(&TWE_AEN_RBFAIL)) {
    sub TWE_AEN_RBFAIL () {	0x4;}
}
unless(defined(&TWE_AEN_RBDONE)) {
    sub TWE_AEN_RBDONE () {	0x5;}
}
unless(defined(&TWE_AEN_ILLUN)) {
    sub TWE_AEN_ILLUN () {	0x6;}
}
unless(defined(&TWE_AEN_INDONE)) {
    sub TWE_AEN_INDONE () {	0x7;}
}
unless(defined(&TWE_AEN_DSHUT)) {
    sub TWE_AEN_DSHUT () {	0x8;}
}
unless(defined(&TWE_AEN_APORT)) {
    sub TWE_AEN_APORT () {	0x9;}
}
unless(defined(&TWE_AEN_DRVERR)) {
    sub TWE_AEN_DRVERR () {	0xa;}
}
unless(defined(&TWE_AEN_RBSTART)) {
    sub TWE_AEN_RBSTART () {	0xb;}
}
unless(defined(&TWE_AEN_ISTART)) {
    sub TWE_AEN_ISTART () {	0xc;}
}
unless(defined(&TWE_AEN_TUN)) {
    sub TWE_AEN_TUN () {	0x15;}
}
unless(defined(&TWE_AEN_QFULL)) {
    sub TWE_AEN_QFULL () {	0xff;}
}
unless(defined(&TWE_UNITHOST)) {
    sub TWE_UNITHOST {
	my($u, $h) = @_;
	eval q(((($u) & 0xf) | (($h) << 4)));
    }
}
unless(defined(&TWE_FLAGS_CACHEDISABLE)) {
    sub TWE_FLAGS_CACHEDISABLE () {	0x1;}
}
unless(defined(&cmd_io)) {
    sub cmd_io () {	 ($_->{_cmd_io});}
}
unless(defined(&cmd_param)) {
    sub cmd_param () {	 ($_->{_cmd_param});}
}
unless(defined(&cmd_init)) {
    sub cmd_init () {	 ($_->{_cmd_init});}
}
unless(defined(&TWE_HSWAP_REMOVE)) {
    sub TWE_HSWAP_REMOVE () {	0;}
}
unless(defined(&TWE_HSWAP_ADDCBOD)) {
    sub TWE_HSWAP_ADDCBOD () {	1;}
}
unless(defined(&TWE_HSWAP_ADDSPARE)) {
    sub TWE_HSWAP_ADDSPARE () {	2;}
}
unless(defined(&cmd_hswap)) {
    sub cmd_hswap () {	 ($_->{_cmd_hswap});}
}
unless(defined(&TWE_ATA_WCE)) {
    sub TWE_ATA_WCE () {	0x2;}
}
unless(defined(&TWE_ATA_NWCE)) {
    sub TWE_ATA_NWCE () {	0x82;}
}
unless(defined(&cmd_ata)) {
    sub cmd_ata () {	 ($_->{_cmd_ata});}
}
unless(defined(&TWE_REBUILD_NOP)) {
    sub TWE_REBUILD_NOP () {	0;}
}
unless(defined(&TWE_REBUILD_STOP)) {
    sub TWE_REBUILD_STOP () {	2;}
}
unless(defined(&TWE_REBUILD_START)) {
    sub TWE_REBUILD_START () {	4;}
}
unless(defined(&TWE_REBUILD_STARTU)) {
    sub TWE_REBUILD_STARTU () {	5;}
}
unless(defined(&TWE_REBUILD_CS)) {
    sub TWE_REBUILD_CS () {	0x80;}
}
unless(defined(&cmd_rebuild)) {
    sub cmd_rebuild () {	 ($_->{_cmd_rebuild});}
}
1;
