Commit 97159c98 authored by Hannes Frederic Sowa's avatar Hannes Frederic Sowa Committed by Ben Hutchings

atl1e: drop pci-msi support because of packet corruption

[ Upstream commit 188ab1b1 ]

Usage of pci-msi results in corrupted dma packet transfers to the host.
Reported-by: default avatarrebelyouth <rebelyouth.hacklab@gmail.com>
Cc: Huang, Xiong <xiong@qca.qualcomm.com>
Tested-by: default avatarChristian Sünkenberg <christian.suenkenberg@student.kit.edu>
Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 9fc00369
...@@ -438,7 +438,6 @@ struct atl1e_adapter { ...@@ -438,7 +438,6 @@ struct atl1e_adapter {
struct atl1e_hw hw; struct atl1e_hw hw;
struct atl1e_hw_stats hw_stats; struct atl1e_hw_stats hw_stats;
bool have_msi;
u32 wol; u32 wol;
u16 link_speed; u16 link_speed;
u16 link_duplex; u16 link_duplex;
......
...@@ -1867,37 +1867,19 @@ static void atl1e_free_irq(struct atl1e_adapter *adapter) ...@@ -1867,37 +1867,19 @@ static void atl1e_free_irq(struct atl1e_adapter *adapter)
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
free_irq(adapter->pdev->irq, 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) static int atl1e_request_irq(struct atl1e_adapter *adapter)
{ {
struct pci_dev *pdev = adapter->pdev; struct pci_dev *pdev = adapter->pdev;
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
int flags = 0;
int err = 0; int err = 0;
adapter->have_msi = true; err = request_irq(pdev->irq, atl1e_intr, IRQF_SHARED,
err = pci_enable_msi(adapter->pdev);
if (err) {
netdev_dbg(adapter->netdev,
"Unable to allocate MSI interrupt Error: %d\n", err);
adapter->have_msi = false;
} else
netdev->irq = pdev->irq;
if (!adapter->have_msi)
flags |= IRQF_SHARED;
err = request_irq(adapter->pdev->irq, atl1e_intr, flags,
netdev->name, netdev); netdev->name, netdev);
if (err) { if (err) {
netdev_dbg(adapter->netdev, netdev_dbg(adapter->netdev,
"Unable to allocate interrupt Error: %d\n", err); "Unable to allocate interrupt Error: %d\n", err);
if (adapter->have_msi)
pci_disable_msi(adapter->pdev);
return err; return err;
} }
netdev_dbg(adapter->netdev, "atl1e_request_irq OK\n"); netdev_dbg(adapter->netdev, "atl1e_request_irq OK\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment