mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
r8169: set IRQF_NO_THREAD if MSI(X) is enabled
We had to remove flag IRQF_NO_THREAD because it conflicts with shared interrupts in case legacy interrupts are used. Following up on the linked discussion set IRQF_NO_THREAD if MSI or MSI-X is used, because both guarantee that interrupt won't be shared. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://www.spinics.net/lists/netdev/msg695341.html Link: https://lore.kernel.org/r/446cf5b8-dddd-197f-cb96-66783141ade4@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f06059c244
commit
870f531e17
1 changed files with 3 additions and 1 deletions
|
@ -4690,6 +4690,7 @@ static int rtl_open(struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct rtl8169_private *tp = netdev_priv(dev);
|
struct rtl8169_private *tp = netdev_priv(dev);
|
||||||
struct pci_dev *pdev = tp->pci_dev;
|
struct pci_dev *pdev = tp->pci_dev;
|
||||||
|
unsigned long irqflags;
|
||||||
int retval = -ENOMEM;
|
int retval = -ENOMEM;
|
||||||
|
|
||||||
pm_runtime_get_sync(&pdev->dev);
|
pm_runtime_get_sync(&pdev->dev);
|
||||||
|
@ -4714,8 +4715,9 @@ static int rtl_open(struct net_device *dev)
|
||||||
|
|
||||||
rtl_request_firmware(tp);
|
rtl_request_firmware(tp);
|
||||||
|
|
||||||
|
irqflags = pci_dev_msi_enabled(pdev) ? IRQF_NO_THREAD : IRQF_SHARED;
|
||||||
retval = request_irq(pci_irq_vector(pdev, 0), rtl8169_interrupt,
|
retval = request_irq(pci_irq_vector(pdev, 0), rtl8169_interrupt,
|
||||||
IRQF_SHARED, dev->name, tp);
|
irqflags, dev->name, tp);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
goto err_release_fw_2;
|
goto err_release_fw_2;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue