diff options
author | Eric Blossom | 2009-09-01 18:43:07 -0700 |
---|---|---|
committer | Eric Blossom | 2009-09-01 18:43:07 -0700 |
commit | 7e013c464ce04a7dc559a3f2798559c0716ccae8 (patch) | |
tree | 697d9c86e1dfaf287ae517a62e244781d85f581e /usrp2/firmware/lib | |
parent | 7eea883c377f64862a4d83f1b33a83fdf3cfc392 (diff) | |
download | gnuradio-7e013c464ce04a7dc559a3f2798559c0716ccae8.tar.gz gnuradio-7e013c464ce04a7dc559a3f2798559c0716ccae8.tar.bz2 gnuradio-7e013c464ce04a7dc559a3f2798559c0716ccae8.zip |
tell s/w link is up. additional debugging output
Diffstat (limited to 'usrp2/firmware/lib')
-rw-r--r-- | usrp2/firmware/lib/eth_mac.c | 7 | ||||
-rw-r--r-- | usrp2/firmware/lib/ethernet.c | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/usrp2/firmware/lib/eth_mac.c b/usrp2/firmware/lib/eth_mac.c index 41690af95..f38ea65f9 100644 --- a/usrp2/firmware/lib/eth_mac.c +++ b/usrp2/firmware/lib/eth_mac.c @@ -118,8 +118,9 @@ eth_mac_miim_read(int addr) while((eth_mac->miistatus & MIIS_BUSY) != 0) ; - printf("MIIM-READ ADDR %d DATA %d\n",addr, eth_mac->miirx_data); - return eth_mac->miirx_data; + int r = eth_mac->miirx_data; + printf("MIIM-READ ADDR 0x%x DATA 0x%x\n",addr, r); + return r; } void @@ -130,7 +131,7 @@ eth_mac_miim_write(int addr, int value) eth_mac->miitx_data = value; eth_mac->miicommand = MIIC_WCTRLDATA; - printf("MIIM-WRITE ADDR %d VAL %d\n",addr,value); + printf("MIIM-WRITE ADDR 0x%x VAL 0x%x\n",addr,value); while((eth_mac->miistatus & MIIS_BUSY) != 0) ; } diff --git a/usrp2/firmware/lib/ethernet.c b/usrp2/firmware/lib/ethernet.c index 32d2e39bd..f554e0179 100644 --- a/usrp2/firmware/lib/ethernet.c +++ b/usrp2/firmware/lib/ethernet.c @@ -259,6 +259,10 @@ ethernet_init(void) t &= ~(NWAY_AR_10T_HD_CAPS | NWAY_AR_10T_FD_CAPS | NWAY_AR_100TX_HD_CAPS | NWAY_AR_100TX_FD_CAPS); eth_mac_miim_write(PHY_AUTONEG_ADV, t); + int r = eth_mac_miim_read(PHY_AUTONEG_ADV); // DEBUG, read back + if (t != r){ + printf("PHY_AUTONEG_ADV: wrote 0x%x, got 0x%x\n", t, r); + } // Restart autonegotation. // We want to ensure that we're advertising our PAUSE capabilities. |