ixgbe: fix panic while dumping packets on Tx hang with IOMMU
This patch resolves a "BUG: unable to handle kernel paging request at ..." oops while dumping packet data. The issue occurs with IOMMU enabled due to the address provided by phys_to_virt(). This patch makes use of skb->data on Tx and the virtual address of the pages allocated for Rx. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c297977ec1
commit
9c50c0358f
@ -396,11 +396,10 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter)
|
|||||||
pr_cont("\n");
|
pr_cont("\n");
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter) &&
|
if (netif_msg_pktdata(adapter) &&
|
||||||
dma_unmap_len(tx_buffer, len) != 0)
|
tx_buffer->skb)
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
DUMP_PREFIX_ADDRESS, 16, 1,
|
DUMP_PREFIX_ADDRESS, 16, 1,
|
||||||
phys_to_virt(dma_unmap_addr(tx_buffer,
|
tx_buffer->skb->data,
|
||||||
dma)),
|
|
||||||
dma_unmap_len(tx_buffer, len),
|
dma_unmap_len(tx_buffer, len),
|
||||||
true);
|
true);
|
||||||
}
|
}
|
||||||
@ -474,10 +473,12 @@ rx_ring_summary:
|
|||||||
(u64)rx_buffer_info->dma,
|
(u64)rx_buffer_info->dma,
|
||||||
rx_buffer_info->skb);
|
rx_buffer_info->skb);
|
||||||
|
|
||||||
if (netif_msg_pktdata(adapter)) {
|
if (netif_msg_pktdata(adapter) &&
|
||||||
|
rx_buffer_info->dma) {
|
||||||
print_hex_dump(KERN_INFO, "",
|
print_hex_dump(KERN_INFO, "",
|
||||||
DUMP_PREFIX_ADDRESS, 16, 1,
|
DUMP_PREFIX_ADDRESS, 16, 1,
|
||||||
phys_to_virt(rx_buffer_info->dma),
|
page_address(rx_buffer_info->page) +
|
||||||
|
rx_buffer_info->page_offset,
|
||||||
ixgbe_rx_bufsz(rx_ring), true);
|
ixgbe_rx_bufsz(rx_ring), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user