]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/sky2-disable-msi-on-dell-inspiron-1545-and-gateway-p-79.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / queue-5.0 / sky2-disable-msi-on-dell-inspiron-1545-and-gateway-p-79.patch
1 From foo@baz Fri Mar 8 07:37:28 CET 2019
2 From: Kai-Heng Feng <kai.heng.feng@canonical.com>
3 Date: Mon, 4 Mar 2019 15:00:03 +0800
4 Subject: sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79
5
6 From: Kai-Heng Feng <kai.heng.feng@canonical.com>
7
8 [ Upstream commit b33b7cd6fd86478dd2890a9abeb6f036aa01fdf7 ]
9
10 Some sky2 chips fire IRQ after S3, before the driver is fully resumed:
11 [ 686.804877] do_IRQ: 1.37 No irq handler for vector
12
13 This is likely a platform bug that device isn't fully quiesced during
14 S3. Use MSI-X, maskable MSI or INTx can prevent this issue from
15 happening.
16
17 Since MSI-X and maskable MSI are not supported by this device, fallback
18 to use INTx on affected platforms.
19
20 BugLink: https://bugs.launchpad.net/bugs/1807259
21 BugLink: https://bugs.launchpad.net/bugs/1809843
22 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
23 Signed-off-by: David S. Miller <davem@davemloft.net>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 ---
26 drivers/net/ethernet/marvell/sky2.c | 24 +++++++++++++++++++++++-
27 1 file changed, 23 insertions(+), 1 deletion(-)
28
29 --- a/drivers/net/ethernet/marvell/sky2.c
30 +++ b/drivers/net/ethernet/marvell/sky2.c
31 @@ -46,6 +46,7 @@
32 #include <linux/mii.h>
33 #include <linux/of_device.h>
34 #include <linux/of_net.h>
35 +#include <linux/dmi.h>
36
37 #include <asm/irq.h>
38
39 @@ -93,7 +94,7 @@ static int copybreak __read_mostly = 128
40 module_param(copybreak, int, 0);
41 MODULE_PARM_DESC(copybreak, "Receive copy threshold");
42
43 -static int disable_msi = 0;
44 +static int disable_msi = -1;
45 module_param(disable_msi, int, 0);
46 MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
47
48 @@ -4917,6 +4918,24 @@ static const char *sky2_name(u8 chipid,
49 return buf;
50 }
51
52 +static const struct dmi_system_id msi_blacklist[] = {
53 + {
54 + .ident = "Dell Inspiron 1545",
55 + .matches = {
56 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
57 + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1545"),
58 + },
59 + },
60 + {
61 + .ident = "Gateway P-79",
62 + .matches = {
63 + DMI_MATCH(DMI_SYS_VENDOR, "Gateway"),
64 + DMI_MATCH(DMI_PRODUCT_NAME, "P-79"),
65 + },
66 + },
67 + {}
68 +};
69 +
70 static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
71 {
72 struct net_device *dev, *dev1;
73 @@ -5028,6 +5047,9 @@ static int sky2_probe(struct pci_dev *pd
74 goto err_out_free_pci;
75 }
76
77 + if (disable_msi == -1)
78 + disable_msi = !!dmi_check_system(msi_blacklist);
79 +
80 if (!disable_msi && pci_enable_msi(pdev) == 0) {
81 err = sky2_test_msi(hw);
82 if (err) {