From: Johannes Berg <johannes@sipsolutions.net>
To: Johannes Stezenbach <js@sig21.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] alx: add a simple AR816x/AR817x device driver
Date: Sun, 16 Jun 2013 21:41:52 +0200 [thread overview]
Message-ID: <1371411712.8365.2.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20130616184220.GA5469@sig21.net>
> --- ./drivers/net/ethernet/atheros/alx/main.c.orig 2013-06-16 11:13:30.763491166 +0200
> +++ ./drivers/net/ethernet/atheros/alx/main.c 2013-06-16 20:34:24.351045235 +0200
> @@ -722,6 +722,7 @@ static int alx_init_sw(struct alx_priv *
> ALX_MAC_CTRL_TXFC_EN |
> 7 << ALX_MAC_CTRL_PRMBLEN_SHIFT;
>
> + pdev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
Heh, ok.
> The compat-wireless-3.6.8-1-snpc driver applied this
> flag for AR8161 and AR8162 if I got it correctly.
I can't download that any more it seems.
I think it should be like this then:
diff --git a/drivers/net/ethernet/atheros/alx/alx.h b/drivers/net/ethernet/atheros/alx/alx.h
index e367eb2..50b3ae2 100644
--- a/drivers/net/ethernet/atheros/alx/alx.h
+++ b/drivers/net/ethernet/atheros/alx/alx.h
@@ -72,6 +72,10 @@ struct alx_tx_queue {
#define ALX_DEFAULT_TX_WORK 128
+enum alx_device_quirks {
+ ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG = BIT(0),
+};
+
struct alx_priv {
struct net_device *dev;
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index 3476e38..418de8b 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1322,6 +1322,9 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
netdev->irq = pdev->irq;
netdev->watchdog_timeo = ALX_WATCHDOG_TIME;
+ if (ent->driver_data & ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG)
+ pdev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
+
err = alx_init_sw(alx);
if (err) {
dev_err(&pdev->dev, "net device private data init failed\n");
@@ -1592,9 +1595,12 @@ static SIMPLE_DEV_PM_OPS(alx_pm_ops, alx_suspend, alx_resume);
#endif
static DEFINE_PCI_DEVICE_TABLE(alx_pci_tbl) = {
- { PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_AR8161) },
- { PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_E2200) },
- { PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_AR8162) },
+ { PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_AR8161),
+ .driver_data = ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG },
+ { PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_E2200),
+ .driver_data = ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG },
+ { PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_AR8162),
+ .driver_data = ALX_DEV_QUIRK_MSI_INTX_DISABLE_BUG },
{ PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_AR8171) },
{ PCI_VDEVICE(ATTANSIC, ALX_DEV_ID_AR8172) },
{}
Can you try that? Full driver patch here:
http://p.sipsolutions.net/f8e6f95ff0894d89.txt
johannes
next prev parent reply other threads:[~2013-06-16 19:41 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 21:26 [PATCH 0/1] alx driver Johannes Berg
2013-06-10 21:26 ` [PATCH 1/1] alx: add a simple AR816x/AR817x device driver Johannes Berg
2013-06-10 21:29 ` [PATCH v2 " Johannes Berg
2013-06-11 22:23 ` Francois Romieu
2013-06-12 18:02 ` Johannes Berg
2013-06-18 1:18 ` Ben Hutchings
2013-06-20 21:40 ` Johannes Berg
2013-06-20 21:58 ` Ben Hutchings
2013-06-20 22:09 ` Johannes Berg
2013-06-21 12:45 ` Ben Hutchings
2013-06-21 20:42 ` Johannes Berg
2013-06-21 21:39 ` Ben Hutchings
2013-06-22 10:17 ` Johannes Stezenbach
2013-06-22 14:21 ` Ben Hutchings
2013-06-25 18:24 ` Johannes Berg
2013-06-12 7:11 ` [PATCH 0/1] alx driver Johannes Stezenbach
2013-06-12 18:00 ` Johannes Berg
2013-06-12 20:33 ` [PATCH] alx: add a simple AR816x/AR817x device driver Johannes Berg
2013-06-12 20:48 ` Stephen Hemminger
2013-06-12 20:51 ` Johannes Berg
2013-06-12 23:02 ` Francois Romieu
2013-06-13 3:46 ` Joe Perches
2013-06-13 6:47 ` Francois Romieu
2013-06-13 21:52 ` Johannes Berg
2013-06-13 23:03 ` Francois Romieu
2013-06-15 18:38 ` Johannes Berg
2013-06-13 22:24 ` Johannes Stezenbach
2013-06-13 22:29 ` Johannes Berg
2013-06-14 5:53 ` Johannes Stezenbach
2013-06-15 18:26 ` Johannes Berg
2013-06-15 20:15 ` Johannes Berg
2013-06-16 9:49 ` Johannes Stezenbach
2013-06-16 11:17 ` Johannes Berg
2013-06-16 17:48 ` Johannes Stezenbach
2013-06-16 18:06 ` Johannes Stezenbach
2013-06-16 18:42 ` Johannes Stezenbach
2013-06-16 19:41 ` Johannes Berg [this message]
2013-06-16 20:37 ` Johannes Stezenbach
2013-06-16 12:14 ` Johannes Berg
2013-06-17 20:44 ` [PATCH v4] " Johannes Berg
2013-06-17 23:05 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371411712.8365.2.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=js@sig21.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).