[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1406227350.27221.63.camel@joe-AO725>
Date: Thu, 24 Jul 2014 11:42:30 -0700
From: Joe Perches <joe@...ches.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Cc: davem@...emloft.net, Shannon Nelson <shannon.nelson@...el.com>,
netdev@...r.kernel.org, nhorman@...hat.com, sassmann@...hat.com
Subject: Re: [net-next 14/14] i40e: always print aqtx answer
On Thu, 2014-07-24 at 06:13 -0700, Jeff Kirsher wrote:
> From: Shannon Nelson <shannon.nelson@...el.com>
>
> Sometimes the AQTX answer comes back with no data, but we still want to print
> the descriptor that got written back.
Maybe this does some reads from buffer beyond its size
in i40e_debug_aq? Is that always safe?
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq.c b/drivers/net/ethernet/intel/i40e/i40e_adminq.c
[]
> @@ -889,11 +889,9 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,
> hw->aq.asq_last_status = (enum i40e_admin_queue_err)retval;
> }
>
> - if (le16_to_cpu(desc->datalen) == buff_size) {
> - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
> - "AQTX: desc and buffer writeback:\n");
> - i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff);
> - }
> + i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
> + "AQTX: desc and buffer writeback:\n");
> + i40e_debug_aq(hw, I40E_DEBUG_AQ_COMMAND, (void *)desc, buff);
void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
void *buffer)
{
struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;
u8 *aq_buffer = (u8 *)buffer;
[]
for (i = 0; i < le16_to_cpu(aq_desc->datalen); i++) {
data[((i % 16) / 4)] |=
((u32)aq_buffer[i]) << (8 * (i % 4));
if ((i % 16) == 15) {
i40e_debug(hw, mask,
"\t0x%04X %08X %08X %08X %08X\n",
i - 15, data[0], data[1], data[2],
data[3]);
memset(data, 0, sizeof(data));
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists