Commit e625f71b authored by Shannon Nelson's avatar Shannon Nelson Committed by Jeff Kirsher

i40e: more print_hex_dump use

Take advantage of print_hex_dump() in another couple places to
clean up the code.

Change-Id: Ib618e75f928308c0afd0d8d74105da0c6577a024
Signed-off-by: default avatarShannon Nelson <shannon.nelson@intel.com>
Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 2706a20e
...@@ -362,7 +362,7 @@ static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer, ...@@ -362,7 +362,7 @@ static ssize_t i40e_dbg_command_read(struct file *filp, char __user *buffer,
} }
/** /**
* i40e_dbg_dump_vsi_seid - handles dump vsi seid write into pokem datum * i40e_dbg_dump_vsi_seid - handles dump vsi seid write into command datum
* @pf: the i40e_pf created in command write * @pf: the i40e_pf created in command write
* @seid: the seid the user put in * @seid: the seid the user put in
**/ **/
...@@ -707,8 +707,13 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf) ...@@ -707,8 +707,13 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf)
{ {
struct i40e_adminq_ring *ring; struct i40e_adminq_ring *ring;
struct i40e_hw *hw = &pf->hw; struct i40e_hw *hw = &pf->hw;
char hdr[32];
int i; int i;
snprintf(hdr, sizeof(hdr), "%s %s: ",
dev_driver_string(&pf->pdev->dev),
dev_name(&pf->pdev->dev));
/* first the send (command) ring, then the receive (event) ring */ /* first the send (command) ring, then the receive (event) ring */
dev_info(&pf->pdev->dev, "AdminQ Tx Ring\n"); dev_info(&pf->pdev->dev, "AdminQ Tx Ring\n");
ring = &(hw->aq.asq); ring = &(hw->aq.asq);
...@@ -718,14 +723,8 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf) ...@@ -718,14 +723,8 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf)
" at[%02d] flags=0x%04x op=0x%04x dlen=0x%04x ret=0x%04x cookie_h=0x%08x cookie_l=0x%08x\n", " at[%02d] flags=0x%04x op=0x%04x dlen=0x%04x ret=0x%04x cookie_h=0x%08x cookie_l=0x%08x\n",
i, d->flags, d->opcode, d->datalen, d->retval, i, d->flags, d->opcode, d->datalen, d->retval,
d->cookie_high, d->cookie_low); d->cookie_high, d->cookie_low);
dev_info(&pf->pdev->dev, print_hex_dump(KERN_INFO, hdr, DUMP_PREFIX_NONE,
" %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", 16, 1, d->params.raw, 16, 0);
d->params.raw[0], d->params.raw[1], d->params.raw[2],
d->params.raw[3], d->params.raw[4], d->params.raw[5],
d->params.raw[6], d->params.raw[7], d->params.raw[8],
d->params.raw[9], d->params.raw[10], d->params.raw[11],
d->params.raw[12], d->params.raw[13],
d->params.raw[14], d->params.raw[15]);
} }
dev_info(&pf->pdev->dev, "AdminQ Rx Ring\n"); dev_info(&pf->pdev->dev, "AdminQ Rx Ring\n");
...@@ -736,14 +735,8 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf) ...@@ -736,14 +735,8 @@ static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf)
" ar[%02d] flags=0x%04x op=0x%04x dlen=0x%04x ret=0x%04x cookie_h=0x%08x cookie_l=0x%08x\n", " ar[%02d] flags=0x%04x op=0x%04x dlen=0x%04x ret=0x%04x cookie_h=0x%08x cookie_l=0x%08x\n",
i, d->flags, d->opcode, d->datalen, d->retval, i, d->flags, d->opcode, d->datalen, d->retval,
d->cookie_high, d->cookie_low); d->cookie_high, d->cookie_low);
dev_info(&pf->pdev->dev, print_hex_dump(KERN_INFO, hdr, DUMP_PREFIX_NONE,
" %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n", 16, 1, d->params.raw, 16, 0);
d->params.raw[0], d->params.raw[1], d->params.raw[2],
d->params.raw[3], d->params.raw[4], d->params.raw[5],
d->params.raw[6], d->params.raw[7], d->params.raw[8],
d->params.raw[9], d->params.raw[10], d->params.raw[11],
d->params.raw[12], d->params.raw[13],
d->params.raw[14], d->params.raw[15]);
} }
} }
...@@ -973,8 +966,7 @@ static void i40e_dbg_dump_veb_seid(struct i40e_pf *pf, int seid) ...@@ -973,8 +966,7 @@ static void i40e_dbg_dump_veb_seid(struct i40e_pf *pf, int seid)
veb = i40e_dbg_find_veb(pf, seid); veb = i40e_dbg_find_veb(pf, seid);
if (!veb) { if (!veb) {
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev, "can't find veb %d\n", seid);
"%d: can't find veb\n", seid);
return; return;
} }
dev_info(&pf->pdev->dev, dev_info(&pf->pdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment