提交 b3fd8220 编写于 作者: R Rahul Lakkireddy 提交者: David S. Miller

cxgb4: fix to bring link down after adapter crash

Use PORT_REG for T4 and T5_PORT_REG for > T4 to write to correct
register to bring down link during shutdown after adapter crash.
Signed-off-by: NRahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: NGanesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 772c344d
......@@ -7688,10 +7688,9 @@ int t4_shutdown_adapter(struct adapter *adapter)
t4_intr_disable(adapter);
t4_write_reg(adapter, DBG_GPIO_EN_A, 0);
for_each_port(adapter, port) {
u32 a_port_cfg = PORT_REG(port,
is_t4(adapter->params.chip)
? XGMAC_PORT_CFG_A
: MAC_PORT_CFG_A);
u32 a_port_cfg = is_t4(adapter->params.chip) ?
PORT_REG(port, XGMAC_PORT_CFG_A) :
T5_PORT_REG(port, MAC_PORT_CFG_A);
t4_write_reg(adapter, a_port_cfg,
t4_read_reg(adapter, a_port_cfg)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册