I wrote code to reconfigure the SerDes lane used by MAC9 (I'm switching from XFI to SGMII), but I can't send or receive network packets. Is suspect that MAC9 is not running properly after reconfiguration.
Questions:
- How can I properly disable the MAC?
- In particular: How to "Disable FM_BMI proper port etc" as stated in LS1046A DPAA Manual)?
- How can I properly enable the MAC again?
Additional information:
Before reconfiguring SerDes I stop the MAC as follows:
COMMAND_CONFIG[RXSTP] = 1
Wait until IEVENT[RX_EMPTY] == 1
COMMAND_CONFIG[RX_EN] = 0
Wait until IEVENT[TX_EMPTY] == 1
COMMAND_CONFIG[TX_EN] = 0
After reconfiguration I start the MAC as follows:
COMMAND_CONFIG[SWR] = 1, COMMAND_CONFIG[RXSTP] = 1
IF_MODE = 0x9002
STATN_CONFIG[CLR] = 1
Wait 1 µs
IEVENT = 0x0
IMASK = 0x0
COMMAND_CONFIG[RX_EN] = 1, COMMAND_CONFIG[TX_EN] = 1