lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 16 Jun 2013 21:41:52 +0200
From:	Johannes Berg <johannes@...solutions.net>
To:	Johannes Stezenbach <js@...21.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] alx: add a simple AR816x/AR817x device driver


> --- ./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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ