From: Helin Zhang Date: Tue, 24 May 2016 06:23:04 +0000 (+0800) Subject: net/i40e/base: fix debug output of adminq commands X-Git-Tag: spdx-start~6510 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=cb878b2d6efc84df3f86533ff706bde727eaf7fd;p=dpdk.git net/i40e/base: fix debug output of adminq commands Fixes hex printout in the debug output Fixes: f388b435bc33 ("i40e/base: clean adminq debug") Signed-off-by: Helin Zhang Acked-by: Wenzhuo Lu --- diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c index ebc4ebbd2e..80d69ddc94 100644 --- a/drivers/net/i40e/base/i40e_common.c +++ b/drivers/net/i40e/base/i40e_common.c @@ -375,14 +375,16 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc, /* the most we could have left is 16 bytes, pad with zeros */ if (i < len) { char d_buf[16]; - int j; + int j, i_sav; + i_sav = i; memset(d_buf, 0, sizeof(d_buf)); for (j = 0; i < len; j++, i++) d_buf[j] = buf[i]; i40e_debug(hw, mask, "\t0x%04X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", - i, d_buf[0], d_buf[1], d_buf[2], d_buf[3], + i_sav, d_buf[0], d_buf[1], + d_buf[2], d_buf[3], d_buf[4], d_buf[5], d_buf[6], d_buf[7], d_buf[8], d_buf[9], d_buf[10], d_buf[11], d_buf[12], d_buf[13], d_buf[14], d_buf[15]);