Changeset 2123

Show
Ignore:
Timestamp:
04/18/12 11:39:57 (9 years ago)
Author:
adi
Message:

DICE EAP Use the correct value of offset in EAP::showFullRouter()

The correction allows to read the content of the current router config
hardware depending on the samplerate in use.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/dice/dice_eap.cpp

    r2103 r2123  
    731731    printMessage(" %d entries to read\n", m_router_nb_entries); 
    732732 
     733    unsigned int offset; 
     734    switch(m_device.getCurrentConfig()) { 
     735        case Device::eDC_Low: offset = DICE_EAP_CURRCFG_LOW_ROUTER; break; 
     736        case Device::eDC_Mid: offset = DICE_EAP_CURRCFG_MID_ROUTER; break; 
     737        case Device::eDC_High: offset = DICE_EAP_CURRCFG_HIGH_ROUTER; break; 
     738        default: offset = 0; break; 
     739    } 
     740 
    733741    // Current config 
    734742    printMessage("  Current Configuration:\n"); 
    735743    // First bloc is the effective number of routes 
    736744    uint32_t nb_routes; 
    737     if(!readRegBlock(eRT_CurrentCfg, 0, &nb_routes, 4)) { 
     745    if(!readRegBlock(eRT_CurrentCfg, offset, &nb_routes, 4)) { 
    738746        printMessage("Failed to read number of entries\n"); 
    739747        return; 
     
    743751    // read the route info 
    744752    uint32_t tmp_entries[m_router_nb_entries]; 
    745     if(!readRegBlock(eRT_CurrentCfg, 4, tmp_entries, m_router_nb_entries*4)) { 
     753    if(!readRegBlock(eRT_CurrentCfg, offset+4, tmp_entries, m_router_nb_entries*4)) { 
    746754        printMessage("Failed to read router config block information\n"); 
    747755        return;