From fdb562a960df06dfc8a4ba8c151c5a8d60e04082 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Tue, 12 Apr 2016 21:17:19 +0000 Subject: [PATCH] cxgbe(4): Always read the entire mailbox into the reply buffer. The size of the reply can be different from the size of the command in case a debug firmware asserts. fw_asrt() needs the entire reply in order to decode the location of the assert. Sponsored by: Chelsio Communications --- sys/dev/cxgbe/common/t4_hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c index 588f6fda030..89735510b44 100644 --- a/sys/dev/cxgbe/common/t4_hw.c +++ b/sys/dev/cxgbe/common/t4_hw.c @@ -381,7 +381,7 @@ int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd, /* * Retrieve the command reply and release the mailbox. */ - get_mbox_rpl(adap, cmd_rpl, size/8, data_reg); + get_mbox_rpl(adap, cmd_rpl, MBOX_LEN/8, data_reg); t4_write_reg(adap, ctl_reg, V_MBOWNER(X_MBOWNER_NONE)); CH_DUMP_MBOX(adap, mbox, data_reg);