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: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
772c344dbb
commit
b3fd82207e
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user