Author: eb
Date: 2008-01-04 22:56:42 -0700 (Fri, 04 Jan 2008)
New Revision: 7355
Modified:
usrp2/trunk/firmware/lib/ethernet.c
Log:
Now properly advertising PAUSE capabilities during PHY
autonegotiation. tx_samples now works OK on Opteron using
forcedeth ethernet driver.
Modified: usrp2/trunk/firmware/lib/ethernet.c
===================================================================
--- usrp2/trunk/firmware/lib/ethernet.c 2008-01-05 04:45:31 UTC (rev 7354)
+++ usrp2/trunk/firmware/lib/ethernet.c 2008-01-05 05:56:42 UTC (rev 7355)
@@ -183,24 +183,19 @@
| PHY_INT_SPD_CNG // speed changed
);
- putchar('$');
-
eth_mac_miim_write(PHY_INT_CLEAR, ~0); // clear all pending interrupts
eth_mac_miim_write(PHY_INT_MASK, mask); // enable the ones we want
-#if 0
- unsigned read_back = eth_mac_miim_read(PHY_INT_MASK);
-
- putstr("ethernet: wr INT_MASK = ");
- puthex16_nl(mask);
- putstr("ethernet: rd INT_MASK = ");
- puthex16_nl(read_back);
-#endif
-
pic_register_handler(IRQ_PHY, eth_phy_irq_handler);
- // FIXME not sure where we want to make the first check of the link state
- ed_check_phy_state();
+ // Advertise that we handle PAUSE frames and asymmetric pause direction.
+ int t = eth_mac_miim_read(PHY_AUTONEG_ADV);
+ eth_mac_miim_write(PHY_AUTONEG_ADV, t | NWAY_AR_PAUSE | NWAY_AR_ASM_DIR);
+
+ // Restart autonegotation.
+ // We want to ensure that we're advertising our PAUSE capabilities.
+ t = eth_mac_miim_read(PHY_CTRL);
+ eth_mac_miim_write(PHY_CTRL, t | MII_CR_RESTART_AUTO_NEG);
}
const char *
_______________________________________________
Commit-gnuradio mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnuradio