diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2012-07-25 21:21:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-26 17:29:51 -0400 |
commit | 9c50c0358f31f81dbcf7fa55089865f1efd9928d (patch) | |
tree | bd85aaf1b89ec65b6034aa2675f0051bc816e838 /drivers/net | |
parent | c297977ec18deb36b2c0a5ee57101f7ab736ec00 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 3b6784cf134a..c709eae58c63 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -396,11 +396,10 @@ static void ixgbe_dump(struct ixgbe_adapter *adapter) | |||
396 | pr_cont("\n"); | 396 | pr_cont("\n"); |
397 | 397 | ||
398 | if (netif_msg_pktdata(adapter) && | 398 | if (netif_msg_pktdata(adapter) && |
399 | dma_unmap_len(tx_buffer, len) != 0) | 399 | tx_buffer->skb) |
400 | print_hex_dump(KERN_INFO, "", | 400 | print_hex_dump(KERN_INFO, "", |
401 | DUMP_PREFIX_ADDRESS, 16, 1, | 401 | DUMP_PREFIX_ADDRESS, 16, 1, |
402 | phys_to_virt(dma_unmap_addr(tx_buffer, | 402 | tx_buffer->skb->data, |
403 | dma)), | ||
404 | dma_unmap_len(tx_buffer, len), | 403 | dma_unmap_len(tx_buffer, len), |
405 | true); | 404 | true); |
406 | } | 405 | } |
@@ -474,10 +473,12 @@ rx_ring_summary: | |||
474 | (u64)rx_buffer_info->dma, | 473 | (u64)rx_buffer_info->dma, |
475 | rx_buffer_info->skb); | 474 | rx_buffer_info->skb); |
476 | 475 | ||
477 | if (netif_msg_pktdata(adapter)) { | 476 | if (netif_msg_pktdata(adapter) && |
477 | rx_buffer_info->dma) { | ||
478 | print_hex_dump(KERN_INFO, "", | 478 | print_hex_dump(KERN_INFO, "", |
479 | DUMP_PREFIX_ADDRESS, 16, 1, | 479 | DUMP_PREFIX_ADDRESS, 16, 1, |
480 | phys_to_virt(rx_buffer_info->dma), | 480 | page_address(rx_buffer_info->page) + |
481 | rx_buffer_info->page_offset, | ||
481 | ixgbe_rx_bufsz(rx_ring), true); | 482 | ixgbe_rx_bufsz(rx_ring), true); |
482 | } | 483 | } |
483 | } | 484 | } |