Message ID | 20190613173100.18178-2-kai.heng.feng@canonical.com |
---|---|
State | New |
Headers | show |
Series | [B/C,1/1] sky2: Disable MSI on Dell Inspiron 1545 and Gateway P-79 | expand |
On 6/13/19 7:31 PM, Kai-Heng Feng wrote: > Some sky2 chips fire IRQ after S3, before the driver is fully resumed: > [ 686.804877] do_IRQ: 1.37 No irq handler for vector > > This is likely a platform bug that device isn't fully quiesced during > S3. Use MSI-X, maskable MSI or INTx can prevent this issue from > happening. > > Since MSI-X and maskable MSI are not supported by this device, fallback > to use INTx on affected platforms. > > BugLink: https://bugs.launchpad.net/bugs/1807259 > BugLink: https://bugs.launchpad.net/bugs/1809843 > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> > Signed-off-by: David S. Miller <davem@davemloft.net> > (cherry picked from commit b33b7cd6fd86478dd2890a9abeb6f036aa01fdf7) > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> As mentioned, already in Disco for some time. Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> Thank you, Kleber > --- > drivers/net/ethernet/marvell/sky2.c | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c > index ae2f35039343..1485f66cf7b0 100644 > --- a/drivers/net/ethernet/marvell/sky2.c > +++ b/drivers/net/ethernet/marvell/sky2.c > @@ -46,6 +46,7 @@ > #include <linux/mii.h> > #include <linux/of_device.h> > #include <linux/of_net.h> > +#include <linux/dmi.h> > > #include <asm/irq.h> > > @@ -93,7 +94,7 @@ static int copybreak __read_mostly = 128; > module_param(copybreak, int, 0); > MODULE_PARM_DESC(copybreak, "Receive copy threshold"); > > -static int disable_msi = 0; > +static int disable_msi = -1; > module_param(disable_msi, int, 0); > MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); > > @@ -4931,6 +4932,24 @@ static const char *sky2_name(u8 chipid, char *buf, int sz) > return buf; > } > > +static const struct dmi_system_id msi_blacklist[] = { > + { > + .ident = "Dell Inspiron 1545", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), > + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1545"), > + }, > + }, > + { > + .ident = "Gateway P-79", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "Gateway"), > + DMI_MATCH(DMI_PRODUCT_NAME, "P-79"), > + }, > + }, > + {} > +}; > + > static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > { > struct net_device *dev, *dev1; > @@ -5042,6 +5061,9 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) > goto err_out_free_pci; > } > > + if (disable_msi == -1) > + disable_msi = !!dmi_check_system(msi_blacklist); > + > if (!disable_msi && pci_enable_msi(pdev) == 0) { > err = sky2_test_msi(hw); > if (err) { >
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index ae2f35039343..1485f66cf7b0 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c @@ -46,6 +46,7 @@ #include <linux/mii.h> #include <linux/of_device.h> #include <linux/of_net.h> +#include <linux/dmi.h> #include <asm/irq.h> @@ -93,7 +94,7 @@ static int copybreak __read_mostly = 128; module_param(copybreak, int, 0); MODULE_PARM_DESC(copybreak, "Receive copy threshold"); -static int disable_msi = 0; +static int disable_msi = -1; module_param(disable_msi, int, 0); MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); @@ -4931,6 +4932,24 @@ static const char *sky2_name(u8 chipid, char *buf, int sz) return buf; } +static const struct dmi_system_id msi_blacklist[] = { + { + .ident = "Dell Inspiron 1545", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1545"), + }, + }, + { + .ident = "Gateway P-79", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Gateway"), + DMI_MATCH(DMI_PRODUCT_NAME, "P-79"), + }, + }, + {} +}; + static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { struct net_device *dev, *dev1; @@ -5042,6 +5061,9 @@ static int sky2_probe(struct pci_dev *pdev, const struct pci_device_id *ent) goto err_out_free_pci; } + if (disable_msi == -1) + disable_msi = !!dmi_check_system(msi_blacklist); + if (!disable_msi && pci_enable_msi(pdev) == 0) { err = sky2_test_msi(hw); if (err) {