netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net 0/3][pull request] Intel Wired LAN Driver Updates
@ 2012-08-09  9:39 Peter P Waskiewicz Jr
  2012-08-09  9:39 ` [net 1/3] igb: fix panic while dumping packets on Tx hang with IOMMU Peter P Waskiewicz Jr
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Peter P Waskiewicz Jr @ 2012-08-09  9:39 UTC (permalink / raw)
  To: davem; +Cc: Peter P Waskiewicz Jr, netdev, gospo, sassmann

This series contains bugfixes to the igb and e1000e drivers.

The following are changes since commit 36471012e2ae28ca3178f84d4687a2d88a36593e:
  
and are available in the git repository at:
  git://git.kernel.org/pub/scm/linux/kernel/git/ppwaskie/net master

Alexander Duyck (1):
  igb: Fix register defines for all non-82575 hardware

Emil Tantilov (2):
  igb: fix panic while dumping packets on Tx hang with IOMMU
  e1000e: fix panic while dumping packets on Tx hang with IOMMU

 drivers/net/ethernet/intel/e1000e/netdev.c  | 36 +++++++++++++++++++++--------
 drivers/net/ethernet/intel/igb/e1000_regs.h |  8 +++++--
 drivers/net/ethernet/intel/igb/igb_main.c   | 19 ++++++++-------
 3 files changed, 41 insertions(+), 22 deletions(-)

-- 
1.7.11.2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [net 1/3] igb: fix panic while dumping packets on Tx hang with IOMMU
  2012-08-09  9:39 [net 0/3][pull request] Intel Wired LAN Driver Updates Peter P Waskiewicz Jr
@ 2012-08-09  9:39 ` Peter P Waskiewicz Jr
  2012-08-09  9:39 ` [net 2/3] e1000e: " Peter P Waskiewicz Jr
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peter P Waskiewicz Jr @ 2012-08-09  9:39 UTC (permalink / raw)
  To: davem; +Cc: Emil Tantilov, netdev, gospo, sassmann, Peter P Waskiewicz Jr

From: Emil Tantilov <emil.s.tantilov@intel.com>

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 avoids phys_to_virt() by making using skb->data and the address
of the pages allocated for Rx.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_main.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index b7c2d50..48cc4fb 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -462,10 +462,10 @@ static void igb_dump(struct igb_adapter *adapter)
 				(u64)buffer_info->time_stamp,
 				buffer_info->skb, next_desc);
 
-			if (netif_msg_pktdata(adapter) && buffer_info->dma != 0)
+			if (netif_msg_pktdata(adapter) && buffer_info->skb)
 				print_hex_dump(KERN_INFO, "",
 					DUMP_PREFIX_ADDRESS,
-					16, 1, phys_to_virt(buffer_info->dma),
+					16, 1, buffer_info->skb->data,
 					buffer_info->length, true);
 		}
 	}
@@ -547,18 +547,17 @@ rx_ring_summary:
 					(u64)buffer_info->dma,
 					buffer_info->skb, next_desc);
 
-				if (netif_msg_pktdata(adapter)) {
+				if (netif_msg_pktdata(adapter) &&
+				    buffer_info->dma && buffer_info->skb) {
 					print_hex_dump(KERN_INFO, "",
-						DUMP_PREFIX_ADDRESS,
-						16, 1,
-						phys_to_virt(buffer_info->dma),
-						IGB_RX_HDR_LEN, true);
+						  DUMP_PREFIX_ADDRESS,
+						  16, 1, buffer_info->skb->data,
+						  IGB_RX_HDR_LEN, true);
 					print_hex_dump(KERN_INFO, "",
 					  DUMP_PREFIX_ADDRESS,
 					  16, 1,
-					  phys_to_virt(
-					    buffer_info->page_dma +
-					    buffer_info->page_offset),
+					  page_address(buffer_info->page) +
+						      buffer_info->page_offset,
 					  PAGE_SIZE/2, true);
 				}
 			}
-- 
1.7.11.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [net 2/3] e1000e: fix panic while dumping packets on Tx hang with IOMMU
  2012-08-09  9:39 [net 0/3][pull request] Intel Wired LAN Driver Updates Peter P Waskiewicz Jr
  2012-08-09  9:39 ` [net 1/3] igb: fix panic while dumping packets on Tx hang with IOMMU Peter P Waskiewicz Jr
@ 2012-08-09  9:39 ` Peter P Waskiewicz Jr
  2012-08-09  9:39 ` [net 3/3] igb: Fix register defines for all non-82575 hardware Peter P Waskiewicz Jr
  2012-08-09 10:42 ` [net 0/3][pull request] Intel Wired LAN Driver Updates David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Peter P Waskiewicz Jr @ 2012-08-09  9:39 UTC (permalink / raw)
  To: davem; +Cc: Emil Tantilov, netdev, gospo, sassmann, Peter P Waskiewicz Jr

From: Emil Tantilov <emil.s.tantilov@intel.com>

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 avoids phys_to_virt() by using skb->data and the address of the
pages allocated for Rx.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
---
 drivers/net/ethernet/intel/e1000e/netdev.c | 36 +++++++++++++++++++++---------
 1 file changed, 26 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index 95b2453..46c3b1f 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -178,6 +178,24 @@ static void e1000_regdump(struct e1000_hw *hw, struct e1000_reg_info *reginfo)
 	pr_info("%-15s %08x %08x\n", rname, regs[0], regs[1]);
 }
 
+static void e1000e_dump_ps_pages(struct e1000_adapter *adapter,
+				 struct e1000_buffer *bi)
+{
+	int i;
+	struct e1000_ps_page *ps_page;
+
+	for (i = 0; i < adapter->rx_ps_pages; i++) {
+		ps_page = &bi->ps_pages[i];
+
+		if (ps_page->page) {
+			pr_info("packet dump for ps_page %d:\n", i);
+			print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS,
+				       16, 1, page_address(ps_page->page),
+				       PAGE_SIZE, true);
+		}
+	}
+}
+
 /*
  * e1000e_dump - Print registers, Tx-ring and Rx-ring
  */
@@ -299,10 +317,10 @@ static void e1000e_dump(struct e1000_adapter *adapter)
 			(unsigned long long)buffer_info->time_stamp,
 			buffer_info->skb, next_desc);
 
-		if (netif_msg_pktdata(adapter) && buffer_info->dma != 0)
+		if (netif_msg_pktdata(adapter) && buffer_info->skb)
 			print_hex_dump(KERN_INFO, "", DUMP_PREFIX_ADDRESS,
-				       16, 1, phys_to_virt(buffer_info->dma),
-				       buffer_info->length, true);
+				       16, 1, buffer_info->skb->data,
+				       buffer_info->skb->len, true);
 	}
 
 	/* Print Rx Ring Summary */
@@ -381,10 +399,8 @@ rx_ring_summary:
 					buffer_info->skb, next_desc);
 
 				if (netif_msg_pktdata(adapter))
-					print_hex_dump(KERN_INFO, "",
-						DUMP_PREFIX_ADDRESS, 16, 1,
-						phys_to_virt(buffer_info->dma),
-						adapter->rx_ps_bsize0, true);
+					e1000e_dump_ps_pages(adapter,
+							     buffer_info);
 			}
 		}
 		break;
@@ -444,12 +460,12 @@ rx_ring_summary:
 					(unsigned long long)buffer_info->dma,
 					buffer_info->skb, next_desc);
 
-				if (netif_msg_pktdata(adapter))
+				if (netif_msg_pktdata(adapter) &&
+				    buffer_info->skb)
 					print_hex_dump(KERN_INFO, "",
 						       DUMP_PREFIX_ADDRESS, 16,
 						       1,
-						       phys_to_virt
-						       (buffer_info->dma),
+						       buffer_info->skb->data,
 						       adapter->rx_buffer_len,
 						       true);
 			}
-- 
1.7.11.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [net 3/3] igb: Fix register defines for all non-82575 hardware
  2012-08-09  9:39 [net 0/3][pull request] Intel Wired LAN Driver Updates Peter P Waskiewicz Jr
  2012-08-09  9:39 ` [net 1/3] igb: fix panic while dumping packets on Tx hang with IOMMU Peter P Waskiewicz Jr
  2012-08-09  9:39 ` [net 2/3] e1000e: " Peter P Waskiewicz Jr
@ 2012-08-09  9:39 ` Peter P Waskiewicz Jr
  2012-08-09 10:42 ` [net 0/3][pull request] Intel Wired LAN Driver Updates David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: Peter P Waskiewicz Jr @ 2012-08-09  9:39 UTC (permalink / raw)
  To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Peter P Waskiewicz Jr

From: Alexander Duyck <alexander.h.duyck@intel.com>

It looks like the register defines for DCA were never updated after going from
82575 to 82576.  This change addresses that by updating the defines.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
---
 drivers/net/ethernet/intel/igb/e1000_regs.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/igb/e1000_regs.h b/drivers/net/ethernet/intel/igb/e1000_regs.h
index 10efcd8..28394be 100644
--- a/drivers/net/ethernet/intel/igb/e1000_regs.h
+++ b/drivers/net/ethernet/intel/igb/e1000_regs.h
@@ -156,8 +156,12 @@
 				    : (0x0E018 + ((_n) * 0x40)))
 #define E1000_TXDCTL(_n)  ((_n) < 4 ? (0x03828 + ((_n) * 0x100)) \
 				    : (0x0E028 + ((_n) * 0x40)))
-#define E1000_DCA_TXCTRL(_n) (0x03814 + (_n << 8))
-#define E1000_DCA_RXCTRL(_n) (0x02814 + (_n << 8))
+#define E1000_RXCTL(_n)	  ((_n) < 4 ? (0x02814 + ((_n) * 0x100)) : \
+				      (0x0C014 + ((_n) * 0x40)))
+#define E1000_DCA_RXCTRL(_n)	E1000_RXCTL(_n)
+#define E1000_TXCTL(_n)   ((_n) < 4 ? (0x03814 + ((_n) * 0x100)) : \
+				      (0x0E014 + ((_n) * 0x40)))
+#define E1000_DCA_TXCTRL(_n) E1000_TXCTL(_n)
 #define E1000_TDWBAL(_n)  ((_n) < 4 ? (0x03838 + ((_n) * 0x100)) \
 				    : (0x0E038 + ((_n) * 0x40)))
 #define E1000_TDWBAH(_n)  ((_n) < 4 ? (0x0383C + ((_n) * 0x100)) \
-- 
1.7.11.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [net 0/3][pull request] Intel Wired LAN Driver Updates
  2012-08-09  9:39 [net 0/3][pull request] Intel Wired LAN Driver Updates Peter P Waskiewicz Jr
                   ` (2 preceding siblings ...)
  2012-08-09  9:39 ` [net 3/3] igb: Fix register defines for all non-82575 hardware Peter P Waskiewicz Jr
@ 2012-08-09 10:42 ` David Miller
  3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2012-08-09 10:42 UTC (permalink / raw)
  To: peter.p.waskiewicz.jr; +Cc: netdev, gospo, sassmann

From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Date: Thu,  9 Aug 2012 02:39:09 -0700

> This series contains bugfixes to the igb and e1000e drivers.
> 
> The following are changes since commit 36471012e2ae28ca3178f84d4687a2d88a36593e:
>   
> and are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/ppwaskie/net master
> 
> Alexander Duyck (1):
>   igb: Fix register defines for all non-82575 hardware
> 
> Emil Tantilov (2):
>   igb: fix panic while dumping packets on Tx hang with IOMMU
>   e1000e: fix panic while dumping packets on Tx hang with IOMMU

Pulled, thanks PJ.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-09 10:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-09  9:39 [net 0/3][pull request] Intel Wired LAN Driver Updates Peter P Waskiewicz Jr
2012-08-09  9:39 ` [net 1/3] igb: fix panic while dumping packets on Tx hang with IOMMU Peter P Waskiewicz Jr
2012-08-09  9:39 ` [net 2/3] e1000e: " Peter P Waskiewicz Jr
2012-08-09  9:39 ` [net 3/3] igb: Fix register defines for all non-82575 hardware Peter P Waskiewicz Jr
2012-08-09 10:42 ` [net 0/3][pull request] Intel Wired LAN Driver Updates David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).