RDMA/nes: Fix adapter reset after PXE boot
After PXE boot, the iw_nes driver does a full reset to ensure the card is in a clean state. However, it doesn't wait for firmware to complete its work before issuing a port reset to enable the ports, which leads to problems bringing up the ports. The solution is to wait for firmware to complete its work before proceeding with port reset. This bug was flagged by Roland Dreier <rolandd@cisco.com>. Cc: <stable@kernel.org> Signed-off-by: Chien Tung <ctung@neteffect.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
此提交包含在:
@@ -636,6 +636,15 @@ static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_
|
||||
nes_debug(NES_DBG_INIT, "Did not see full soft reset done.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while ((nes_read_indexed(nesdev, NES_IDX_INT_CPU_STATUS) != 0x80) && i++ < 10000)
|
||||
mdelay(1);
|
||||
if (i >= 10000) {
|
||||
printk(KERN_ERR PFX "Internal CPU not ready, status = %02X\n",
|
||||
nes_read_indexed(nesdev, NES_IDX_INT_CPU_STATUS));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* port reset */
|
||||
@@ -684,17 +693,6 @@ static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
i = 0;
|
||||
while ((nes_read_indexed(nesdev, NES_IDX_INT_CPU_STATUS) != 0x80) && i++ < 10000)
|
||||
mdelay(1);
|
||||
if (i >= 10000) {
|
||||
printk(KERN_ERR PFX "Internal CPU not ready, status = %02X\n",
|
||||
nes_read_indexed(nesdev, NES_IDX_INT_CPU_STATUS));
|
||||
return 0;
|
||||
}
|
||||
|
||||
return port_count;
|
||||
}
|
||||
|
||||
|
新增問題並參考
封鎖使用者