All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] atl1e: drop pci-msi support because of packet corruption
@ 2013-03-29  4:10 Hannes Frederic Sowa
  2013-03-29  5:03 ` Huang, Xiong
  2013-03-29 19:35 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Hannes Frederic Sowa @ 2013-03-29  4:10 UTC (permalink / raw)
  To: netdev; +Cc: rebelyouth.hacklab, xiong, christian.suenkenberg, sven

Usage of pci-msi results in corrupted dma packet transfers to the host.

Reported-by: rebelyouth <rebelyouth.hacklab@gmail.com>
Cc: Huang, Xiong <xiong@qca.qualcomm.com>
Tested-by: Christian Sünkenberg <christian.suenkenberg@student.kit.edu>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
I think this is material for -stable.

 drivers/net/ethernet/atheros/atl1e/atl1e.h      |  1 -
 drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 19 ++-----------------
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e.h b/drivers/net/ethernet/atheros/atl1e/atl1e.h
index 829b5ad..edfdf6b 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e.h
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e.h
@@ -438,7 +438,6 @@ struct atl1e_adapter {
 	struct atl1e_hw        hw;
 	struct atl1e_hw_stats  hw_stats;
 
-	bool have_msi;
 	u32 wol;
 	u16 link_speed;
 	u16 link_duplex;
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index e1f1b2a..7e0a822 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -1847,34 +1847,19 @@ static void atl1e_free_irq(struct atl1e_adapter *adapter)
 	struct net_device *netdev = adapter->netdev;
 
 	free_irq(adapter->pdev->irq, netdev);
-
-	if (adapter->have_msi)
-		pci_disable_msi(adapter->pdev);
 }
 
 static int atl1e_request_irq(struct atl1e_adapter *adapter)
 {
 	struct pci_dev    *pdev   = adapter->pdev;
 	struct net_device *netdev = adapter->netdev;
-	int flags = 0;
 	int err = 0;
 
-	adapter->have_msi = true;
-	err = pci_enable_msi(pdev);
-	if (err) {
-		netdev_dbg(netdev,
-			   "Unable to allocate MSI interrupt Error: %d\n", err);
-		adapter->have_msi = false;
-	}
-
-	if (!adapter->have_msi)
-		flags |= IRQF_SHARED;
-	err = request_irq(pdev->irq, atl1e_intr, flags, netdev->name, netdev);
+	err = request_irq(pdev->irq, atl1e_intr, IRQF_SHARED, netdev->name,
+			  netdev);
 	if (err) {
 		netdev_dbg(adapter->netdev,
 			   "Unable to allocate interrupt Error: %d\n", err);
-		if (adapter->have_msi)
-			pci_disable_msi(pdev);
 		return err;
 	}
 	netdev_dbg(netdev, "atl1e_request_irq OK\n");
-- 
1.8.1.4

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

* RE: [PATCH net] atl1e: drop pci-msi support because of packet corruption
  2013-03-29  4:10 [PATCH net] atl1e: drop pci-msi support because of packet corruption Hannes Frederic Sowa
@ 2013-03-29  5:03 ` Huang, Xiong
  2013-03-29  5:24   ` Hannes Frederic Sowa
  2013-03-29 19:35 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Huang, Xiong @ 2013-03-29  5:03 UTC (permalink / raw)
  To: Hannes Frederic Sowa, netdev
  Cc: rebelyouth.hacklab, christian.suenkenberg, sven



> -----Original Message-----
> From: Hannes Frederic Sowa [mailto:hannes@stressinduktion.org]
> Sent: Friday, March 29, 2013 12:11 PM
> To: netdev@vger.kernel.org
> Cc: rebelyouth.hacklab@gmail.com; Huang, Xiong;
> christian.suenkenberg@student.kit.edu; sven@svenhartge.de
> Subject: [PATCH net] atl1e: drop pci-msi support because of packet
> corruption
> 
> Usage of pci-msi results in corrupted dma packet transfers to the host.
> 
> Reported-by: rebelyouth <rebelyouth.hacklab@gmail.com>
> Cc: Huang, Xiong <xiong@qca.qualcomm.com>
> Tested-by: Christian Sünkenberg <christian.suenkenberg@student.kit.edu>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> ---
> I think this is material for -stable.
> 
Hi  Hannes, 

you can try to enable rx-checksum offload if DMA issue disappear, as windows driver enable this feature.


Thanks
-Xiong


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

* Re: [PATCH net] atl1e: drop pci-msi support because of packet corruption
  2013-03-29  5:03 ` Huang, Xiong
@ 2013-03-29  5:24   ` Hannes Frederic Sowa
  0 siblings, 0 replies; 4+ messages in thread
From: Hannes Frederic Sowa @ 2013-03-29  5:24 UTC (permalink / raw)
  To: Huang, Xiong; +Cc: netdev, rebelyouth.hacklab, christian.suenkenberg, sven

On Fri, Mar 29, 2013 at 05:03:43AM +0000, Huang, Xiong wrote:
> you can try to enable rx-checksum offload if DMA issue disappear, as windows driver enable this feature.

We tested each change separately. So we had rx-checksum offload enabled
the whole time while testing this patch and it had not caused any
problems.

Greetings,

  Hannes

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

* Re: [PATCH net] atl1e: drop pci-msi support because of packet corruption
  2013-03-29  4:10 [PATCH net] atl1e: drop pci-msi support because of packet corruption Hannes Frederic Sowa
  2013-03-29  5:03 ` Huang, Xiong
@ 2013-03-29 19:35 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2013-03-29 19:35 UTC (permalink / raw)
  To: hannes; +Cc: netdev, rebelyouth.hacklab, xiong, christian.suenkenberg, sven

From: Hannes Frederic Sowa <hannes@stressinduktion.org>
Date: Fri, 29 Mar 2013 05:10:50 +0100

> Usage of pci-msi results in corrupted dma packet transfers to the host.
> 
> Reported-by: rebelyouth <rebelyouth.hacklab@gmail.com>
> Cc: Huang, Xiong <xiong@qca.qualcomm.com>
> Tested-by: Christian Sünkenberg <christian.suenkenberg@student.kit.edu>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

Applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2013-03-29 19:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-29  4:10 [PATCH net] atl1e: drop pci-msi support because of packet corruption Hannes Frederic Sowa
2013-03-29  5:03 ` Huang, Xiong
2013-03-29  5:24   ` Hannes Frederic Sowa
2013-03-29 19:35 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.