require '_h2ph_pre.ph';

unless(defined(&SIOP_DEFAULT_TARGET)) {
    eval 'sub SIOP_DEFAULT_TARGET () {7;}' unless defined(&SIOP_DEFAULT_TARGET);
}
unless(defined(&SIOP_NSG)) {
    sub SIOP_NSG () {	( &MAXPHYS/ &NBPG + 1);}
}
unless(defined(&SIOP_NTAG)) {
    sub SIOP_NTAG () {	16;}
}
unless(defined(&SIOP_OPENINGS)) {
    sub SIOP_OPENINGS () {	2;}
}
unless(defined(&SCSI_SIOP_NOCHECK)) {
    sub SCSI_SIOP_NOCHECK () {	0xfe;}
}
unless(defined(&SCSI_SIOP_NOSTATUS)) {
    sub SCSI_SIOP_NOSTATUS () {	0xff;}
}
unless(defined(&siop_tables)) {
    sub siop_tables () {	 ($siop_xfer->{tables});}
}
unless(defined(&CMDST_FREE)) {
    sub CMDST_FREE () {	0;}
}
unless(defined(&CMDST_READY)) {
    sub CMDST_READY () {	1;}
}
unless(defined(&CMDST_ACTIVE)) {
    sub CMDST_ACTIVE () {	2;}
}
unless(defined(&CMDST_SENSE)) {
    sub CMDST_SENSE () {	3;}
}
unless(defined(&CMDST_SENSE_ACTIVE)) {
    sub CMDST_SENSE_ACTIVE () {	4;}
}
unless(defined(&CMDST_SENSE_DONE)) {
    sub CMDST_SENSE_DONE () {	5;}
}
unless(defined(&CMDST_DONE)) {
    sub CMDST_DONE () {	6;}
}
unless(defined(&CMDFL_TIMEOUT)) {
    sub CMDFL_TIMEOUT () {	0x0001;}
}
unless(defined(&CMDFL_TAG)) {
    sub CMDFL_TAG () {	0x0002;}
}
unless(defined(&SIOP_LUNF_FULL)) {
    sub SIOP_LUNF_FULL () {	0x01;}
}
unless(defined(&TARST_PROBING)) {
    sub TARST_PROBING () {	0;}
}
unless(defined(&TARST_ASYNC)) {
    sub TARST_ASYNC () {	1;}
}
unless(defined(&TARST_WIDE_NEG)) {
    sub TARST_WIDE_NEG () {	2;}
}
unless(defined(&TARST_SYNC_NEG)) {
    sub TARST_SYNC_NEG () {	3;}
}
unless(defined(&TARST_PPR_NEG)) {
    sub TARST_PPR_NEG () {	4;}
}
unless(defined(&TARST_OK)) {
    sub TARST_OK () {	5;}
}
unless(defined(&TARF_SYNC)) {
    sub TARF_SYNC () {	0x01;}
}
unless(defined(&TARF_WIDE)) {
    sub TARF_WIDE () {	0x02;}
}
unless(defined(&TARF_TAG)) {
    sub TARF_TAG () {	0x04;}
}
unless(defined(&TARF_PPR)) {
    sub TARF_PPR () {	0x08;}
}
unless(defined(&TARF_ISWIDE)) {
    sub TARF_ISWIDE () {	0x10;}
}
unless(defined(&TARF_ISIUS)) {
    sub TARF_ISIUS () {	0x20;}
}
unless(defined(&TARF_ISDT)) {
    sub TARF_ISDT () {	0x40;}
}
unless(defined(&TARF_ISQAS)) {
    sub TARF_ISQAS () {	0x80;}
}
if(defined(&__HAS_NEW_BUS_DMAMAP_SYNC)) {
    eval 'sub siop_bus_dmamap_sync {
        local($tag, $map, $off, $len, $op) = @_;
	    eval q( &bus_dmamap_sync(($tag), ($map), ($off), ($len), ($op)));
    }' unless defined(&siop_bus_dmamap_sync);
} else {
    eval 'sub siop_bus_dmamap_sync {
        local($tag, $map, $off, $len, $op) = @_;
	    eval q( &bus_dmamap_sync(($tag), ($map), ($op)));
    }' unless defined(&siop_bus_dmamap_sync);
}
unless(defined(&SIOP_NEG_NOP)) {
    sub SIOP_NEG_NOP () {	0x0;}
}
unless(defined(&SIOP_NEG_MSGOUT)) {
    sub SIOP_NEG_MSGOUT () {	0x1;}
}
unless(defined(&SIOP_NEG_ACK)) {
    sub SIOP_NEG_ACK () {	0x2;}
}
unless(defined(&SIOP_NEG_MSGREJ)) {
    sub SIOP_NEG_MSGREJ () {	0x3;}
}
1;
