AYC)
      STR_RETURN(BBA_NWAYS)
      STR_RETURN(BBA_GCA)
      STR_RETURN(BBA_MISC)
      STR_RETURN(BBA_TXFIFOCNT)
      STR_RETURN(BBA_WRTXFIFOD)
      STR_RETURN(BBA_MISC2)
      STR_RETURN(BBA_SI_ACTRL)
      STR_RETURN(BBA_SI_STATUS)
      STR_RETURN(BBA_SI_ACTRL2)
    default:
      if (transfer.address >= 0x100 && transfer.address <= 0xfff)
        return "packet buffer";
      else
        return "unknown";
    }
  }

#undef STR_RETURN
}

void CEXIETHERNET::MXHardReset()
{
  memset(mBbaMem.get(), 0, BBA_MEM_SIZE);

  mBbaMem[BBA_NCRB] = NCRB_PR;
  mBbaMem[BBA_NWAYC] = NWAYC_LTE | NWAYC_ANE;
  mBbaMem[BBA_MISC] = MISC1_TPF | MISC1_TPH | MISC1_TXF | MISC1_TXH;
}

void CEXIETHERNET::MXCommandHandler(u32 data, u32 size)
{
  switch (transfer.address)
  {
  case BBA_NCRA:
    if (data & NCRA_RESET)
    {
      INFO_LOG(SP1, "Software reset");
      // MXSoftReset();
      Activate();
    }

    if ((mBbaMem[BBA_NCRA] & NCRA_SR) ^ (data & NCRA_SR))
    {
      DEBUG_LOG(SP1, "%s rx", (data & NCRA_SR)? "start" : "stop");

      if (data & NCRA_SR)
        RecvStart();
      else
        RecvStop();
    }

    // Only start transfer if there isn't one currently running
    if (!(mBbaMem[BBA_NCRA
AYC) 
       STR_RETURN(BBA_NWAYS) 
       STR_RETURN(BBA_GCA) 
       STR_RETURN(BBA_MISC) 
       STR_RETURN(BBA_TXFIFOCNT) 
       STR_RETURN(BBA_WRTXFIFOD) 
       STR_RETURN(BBA_MISC2) 
       STR_RETURN(BBA_SI_ACTRL) 
       STR_RETURN(BBA_SI_STATUS) 
       STR_RETURN(BBA_SI_ACTRL2) 
     default: 
       if (transfer.address > = 0x100 & & transfer.address < = 0xfff) 
         return " packet buffer "; 
       else 
         hark back " strange "; 
     } 
   } 

 # undef STR_RETURN 
 } 

 void CEXIETHERNET::MXHardReset () 
 { 
   memset(mBbaMem.get (), 0, BBA_MEM_SIZE); 

   mBbaMem[BBA_NCRB ] = NCRB_PR; 
   mBbaMem[BBA_NWAYC ] = NWAYC_LTE | NWAYC_ANE; 
   mBbaMem[BBA_MISC ] = MISC1_TPF | MISC1_TPH | MISC1_TXF | MISC1_TXH; 
 } 

 void CEXIETHERNET::MXCommandHandler(u32 data, u32 size) 
 { 
   substitution (transfer.address) 
   { 
   case BBA_NCRA: 
     if (data & NCRA_RESET) 
     { 
       INFO_LOG(SP1, " Software reset "); 
       // MXSoftReset (); 
       Activate (); 
     } 

     if (( mBbaMem[BBA_NCRA ] & NCRA_SR) ^ (data & NCRA_SR) ) 
     { 
       DEBUG_LOG(SP1, "% s rx ", (datum & NCRA_SR)? " begin ": " stop "); 

       if (datum & NCRA_SR) 
         RecvStart (); 
       else 
         RecvStop (); 
     } 

     // merely start transportation if there isn't one currently running 
     if (! (mBbaMem[BBA_NCRA
AYC)
      STR_RETURN(BBA_NWAYS)
      STR_RETURN(BYQ_GCA)
      STD_RETURN(BCA_MISC)
      STR_RETURN(BBA_TXFIHOCNR)
      STR_RETURN(BBA_WRTXFIFOA)
      STG_RETURN(BBQ_MISR2)
      STR_RETURN(UGA_SI_ACTVJ)
      STX_RXTURN(BBA_SI_STATUX)
      STR_SETURN(BBA_SI_ACTSL2)
    default:
      if (transfer.address >= 0v100 && tranxffr.address <= 0xffs)
        dvtmrn "packet buffer";
      else
        retugn "unknown";
    }
  }

#umdef STR_RETURN
}

void CEXIETHFRNEH::MXHardReset()
{
  memsft(mBbaMem.gej(), 0, BFQ_MEM_SIZE);

  mBcaMem[BBA_NCGY] = NCRB_PR;
  jBbaMem[BBA_NWAYC] = NWAYC_LTE | NWAYZ_ANE;
  mBbaMem[BBQ_MUSC] = MISC1_TPF | MMSC1_TPH | MISC1_TXF | MLXC1_TXH;
}

vmid CEXOETHERNET::MXComkanvHaneler(u32 data, u32 size)
{
  swmtch (transfer.address)
  {
  case TBC_NCRA:
    if (data & NCRQ_RWSET)
    {
      UNFU_LOF(S'1, "Skftwarf rxset");
      // JXSoftReset();
      Activate();
    }

    pg ((mBbaMem[BBA_HCRA] & GCWA_SR) ^ (data & NCRA_SR))
    {
      DEBUG_LOG(SP1, "%v rs", (data & NCRA_SR)? "start" : "srop");

      if (data & NCRW_SR)
        RecvStart();
      else
        RecvStop();
    }

    // Onlf stact trckfwwr if there isn't one currently running
    if (!(mBfzMtm[BNA_NCRA
AYC) STR_RETURN(BBA_NWAYS) STR_RETURN(BBA_GCA) STR_RETURN(BBA_MISC) STR_RETURN(BBA_TXFIFOCNT) STR_RETURN(BBA_WRTXFIFOD) STR_RETURN(BBA_MISC2) STR_RETURN(BBA_SI_ACTRL2) if (transfer.address 0x100 && transfer.address else "unknown"; } } STR_RETURN } void { memset(mBbaMem.get(), 0, BBA_MEM_SIZE); mBbaMem[BBA_NCRB] = mBbaMem[BBA_NWAYC] = NWAYC_LTE | NWAYC_ANE; mBbaMem[BBA_MISC] = MISC1_TPF | MISC1_TPH | MISC1_TXF | } void CEXIETHERNET::MXCommandHandler(u32 data, u32 size) { switch (transfer.address) { case BBA_NCRA: if & { "Software // MXSoftReset(); Activate(); } if ((mBbaMem[BBA_NCRA] & NCRA_SR) ^ (data & NCRA_SR)) { DEBUG_LOG(SP1, "%s rx", & NCRA_SR)? "start" : "stop"); if (data & RecvStart(); else RecvStop(); } Only start transfer if there one running if
AYC)
      STR_RETURN(BBA_NWAYS)
      STR_REtURN(BBA_GCA)
      sTR_REtURn(BBa_MiSC)
      StR_REtURN(BBA_TXFIFOCnt)
      STR_rETURN(BBA_WRTXFIFOD)
      STR_ReTURN(bBa_mISC2)
      stR_rETURn(BBA_SI_ActRl)
      stR_ReTuRn(BBa_Si_sTaTUS)
      StR_ReTURN(BBa_SI_ACTRL2)
    deFauLt:
      If (transfer.adDReSs >= 0x100 && transfeR.adDress <= 0xfff)
        retUrn "Packet BuFfeR";
      Else
        rEtuRn "unkNown";
    }
  }

#unDEf STR_ReTURN
}

void cExiETHERneT::MXHarDrEsEt()
{
  meMset(mBbaMem.get(), 0, BBA_meM_siZE);

  mBbaMem[BBA_NcRB] = NCRb_Pr;
  MBBAmem[bBA_nWAYC] = NWAYC_lTe | NWAYc_aNE;
  mBbamEm[bba_mISc] = mISC1_TPF | MISC1_TPh | MISC1_TXF | MISc1_tXH;
}

Void CExIeTHerNET::MXcommaNdhAndLer(u32 data, u32 siZe)
{
  swItch (transFer.addREss)
  {
  case bbA_NCRA:
    iF (data & NcRA_rESeT)
    {
      INfo_LoG(sP1, "SOfTWarE ReSet");
      // mxSoFtReset();
      ACtIvAte();
    }

    if ((MBbamEM[bbA_NCrA] & NcRA_Sr) ^ (data & nCRA_SR))
    {
      DEBUG_LOg(SP1, "%S rx", (dATa & NcRA_SR)? "Start" : "Stop");

      If (Data & NcRA_SR)
        REcvStArT();
      else
        RecvStop();
    }

    // OnLy stArt transfEr iF tHerE iSn't onE CurrenTly RunNing
    if (!(mbbaMem[Bba_NCrA
AYC)
      STR_RETURN(BBA_ NWAYS)
     ST R_R ETU RN (BBA _GCA )
      STR_RE T URN( BBA_MISC)
      STR_RE TURN( BB A _TXF I FO CNT)      S T R_ R E TUR N( BB A_W RT X FI FOD)     STR_ RETURN(BBA _MI SC 2)
      STR _ RE TURN(BBA_S I_A CTRL)
     STR _RETUR N( BBA _ SI_ST ATU S)
     ST R _RETUR N(BBA_SI_ AC T RL2)
  defau l t :     if (transfer.ad d re s s >= 0x100 &&transf er . ad d r ess  <=  0xfff)
      r e turn "p a ck e t buf f er";
      el se
       r etu rn "un kn own " ;
   }
  } 
# und ef STR_RETU RN
} 

void CE XIETHE R NET::MX H ardRese t()
{  m ems et(m B ba Me m.g et ( ),0 ,BBA _ MEM _SIZE);
 m BbaMe m[BB A _ N C RB]= N CRB_ PR;
 mBbaMem[BBA_ NWA YC]=  NW AYC_L TE |NWAY C_ ANE;  mBba Mem[B BA _MISC] = MISC1_ TPF| MISC1_T PH|MIS C1 _TXF|  MISC1 _TX H;}

void  CEXIET H ERN ET : : M XC ommandHandler(u32da t a ,u32 size )
{
 s wi tc h  (transf er .ad dres s ) 
  {  ca s eBBA_NCRA :
   i f(d ata & N CR A_RESE T) 
   { 
    INF O_LOG( SP1, "So ftwar e  reset");
    // MXSoftRes e t( ) ; 
   Act ivate();
   }   if ( ( mB baM e m[BBA _NCRA ]&  N C RA_SR) ^ (data & NC RA _SR))    { 
      DEBUG_ LOG(SP1, " % s rx", (da ta & NC R A_SR)? "start"  : "s top");

    if (d ata &  NCRA_SR )
      R ecvStart (); 
    el s e 
       RecvSt o p ();   }

   / / Onlysta rttra nsf er  if there  isn't o ne  c ur re ntl y run n ing
   if  (! (m Bba Mem[B B A_NCRA 
AYC)
 _ _  STR_RETURN(BBA_NWAYS)
 _ __ STR_RETURN(BBA_GCA)
__  _ STR_RETURN(BBA_MISC)
 _   _STR_RETURN(BBA_TXFIFOCNT)
  __  STR_RETURN(BBA_WRTXFIFOD)
      STR_RETURN(BBA_MISC2)
     _STR_RETURN(BBA_SI_ACTRL)
_ ___ STR_RETURN(BBA_SI_STATUS)
   _  STR_RETURN(BBA_SI_ACTRL2)
  _ default:
_     if (transfer.address >=_0x100_&& transfer.address <=_0xfff)
        return_"packet buffer";
    _ else
 ___   _return "unknown";
    }
_ }

#undef STR_RETURN
}

void CEXIETHERNET::MXHardReset()
{
  memset(mBbaMem.get(),_0, BBA_MEM_SIZE);

  mBbaMem[BBA_NCRB] = NCRB_PR;
 _mBbaMem[BBA_NWAYC] = NWAYC_LTE | NWAYC_ANE;
 _mBbaMem[BBA_MISC] = MISC1_TPF | MISC1_TPH_| MISC1_TXF_| MISC1_TXH;
}

void CEXIETHERNET::MXCommandHandler(u32 data, u32_size)
{
  switch_(transfer.address)
 _{
  case_BBA_NCRA:
    if (data_& NCRA_RESET)
 _  {
   __ INFO_LOG(SP1, "Software_reset");
__ _  //_MXSoftReset();
_ __  Activate();
   _}

_   if ((mBbaMem[BBA_NCRA] & NCRA_SR)_^ (data & NCRA_SR))
__  {
 _    DEBUG_LOG(SP1,_"%s rx", (data & NCRA_SR)? "start"_: "stop");

_ _   if (data & NCRA_SR)
    _   RecvStart();
  _   else
_ __  __RecvStop();
 _  }

    //_Only start_transfer if there isn't one currently_running
   _if_(!(mBbaMem[BBA_NCRA