* [PATCH] mwifiex: mask PCIe interrupts before removal
@ 2016-06-30 22:21 Brian Norris
2016-07-01 17:42 ` Doug Anderson
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Brian Norris @ 2016-06-30 22:21 UTC (permalink / raw)
To: Amitkumar Karwar, Nishant Sarmukadam
Cc: linux-kernel, Doug Anderson, Brian Norris, Stephen Barber,
Kalle Valo, linux-wireless, netdev, Brian Norris
The PCIe driver didn't mask the host interrupts before trying to tear
down. This causes lockups at reboot or rmmod when using MSI-X on 8997,
since the MSI handler gets confused and locks up the system.
Also tested on 8897, which does not support MSI-X (and wasn't
experiencing this same bug). No regressions seen there.
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 0c7937eb6b77..af98371dc2af 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -440,6 +440,11 @@ static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter)
return 0;
}
+static void mwifiex_pcie_disable_host_int_noerr(struct mwifiex_adapter *adapter)
+{
+ WARN_ON(mwifiex_pcie_disable_host_int(adapter));
+}
+
/*
* This function enables the host interrupt.
*
@@ -2945,6 +2950,7 @@ static struct mwifiex_if_ops pcie_ops = {
.register_dev = mwifiex_register_dev,
.unregister_dev = mwifiex_unregister_dev,
.enable_int = mwifiex_pcie_enable_host_int,
+ .disable_int = mwifiex_pcie_disable_host_int_noerr,
.process_int_status = mwifiex_process_int_status,
.host_to_card = mwifiex_pcie_host_to_card,
.wakeup = mwifiex_pm_wakeup_card,
--
2.8.0.rc3.226.g39d4020
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] mwifiex: mask PCIe interrupts before removal
2016-06-30 22:21 [PATCH] mwifiex: mask PCIe interrupts before removal Brian Norris
@ 2016-07-01 17:42 ` Doug Anderson
2016-07-07 18:16 ` Brian Norris
2016-07-08 13:48 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2016-07-01 17:42 UTC (permalink / raw)
To: Brian Norris
Cc: Amitkumar Karwar, Nishant Sarmukadam, linux-kernel, Brian Norris,
Stephen Barber, Kalle Valo, linux-wireless, netdev
Hi,
On Thu, Jun 30, 2016 at 3:21 PM, Brian Norris <briannorris@chromium.org> wrote:
> The PCIe driver didn't mask the host interrupts before trying to tear
> down. This causes lockups at reboot or rmmod when using MSI-X on 8997,
> since the MSI handler gets confused and locks up the system.
>
> Also tested on 8897, which does not support MSI-X (and wasn't
> experiencing this same bug). No regressions seen there.
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
> drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++++++
> 1 file changed, 6 insertions(+)
This looks very sane but isn't my area of expertise at all. However,
if my Reviewed-by is at all useful feel free to add it. I will say
that this fixes the issue of the crash at reboot time, so at least
I'll add:
Tested-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mwifiex: mask PCIe interrupts before removal
2016-06-30 22:21 [PATCH] mwifiex: mask PCIe interrupts before removal Brian Norris
2016-07-01 17:42 ` Doug Anderson
@ 2016-07-07 18:16 ` Brian Norris
2016-07-07 19:37 ` Kalle Valo
2016-07-08 13:48 ` Kalle Valo
2 siblings, 1 reply; 5+ messages in thread
From: Brian Norris @ 2016-07-07 18:16 UTC (permalink / raw)
To: Amitkumar Karwar, Nishant Sarmukadam
Cc: linux-kernel, Doug Anderson, Brian Norris, Stephen Barber,
Kalle Valo, linux-wireless, netdev, wnhuang
Hi,
On Thu, Jun 30, 2016 at 03:21:02PM -0700, Brian Norris wrote:
> The PCIe driver didn't mask the host interrupts before trying to tear
> down. This causes lockups at reboot or rmmod when using MSI-X on 8997,
> since the MSI handler gets confused and locks up the system.
>
> Also tested on 8897, which does not support MSI-X (and wasn't
> experiencing this same bug). No regressions seen there.
Ping? This is a bugfix, and it'd be nice to either know what's wrong
with it, or see it merged.
Regards,
Brian
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
> drivers/net/wireless/marvell/mwifiex/pcie.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
> index 0c7937eb6b77..af98371dc2af 100644
> --- a/drivers/net/wireless/marvell/mwifiex/pcie.c
> +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
> @@ -440,6 +440,11 @@ static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter)
> return 0;
> }
>
> +static void mwifiex_pcie_disable_host_int_noerr(struct mwifiex_adapter *adapter)
> +{
> + WARN_ON(mwifiex_pcie_disable_host_int(adapter));
> +}
> +
> /*
> * This function enables the host interrupt.
> *
> @@ -2945,6 +2950,7 @@ static struct mwifiex_if_ops pcie_ops = {
> .register_dev = mwifiex_register_dev,
> .unregister_dev = mwifiex_unregister_dev,
> .enable_int = mwifiex_pcie_enable_host_int,
> + .disable_int = mwifiex_pcie_disable_host_int_noerr,
> .process_int_status = mwifiex_process_int_status,
> .host_to_card = mwifiex_pcie_host_to_card,
> .wakeup = mwifiex_pm_wakeup_card,
> --
> 2.8.0.rc3.226.g39d4020
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mwifiex: mask PCIe interrupts before removal
2016-07-07 18:16 ` Brian Norris
@ 2016-07-07 19:37 ` Kalle Valo
0 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-07-07 19:37 UTC (permalink / raw)
To: Brian Norris
Cc: Amitkumar Karwar, Nishant Sarmukadam, linux-kernel,
Doug Anderson, Brian Norris, Stephen Barber, linux-wireless,
netdev, wnhuang
Brian Norris <briannorris@chromium.org> writes:
> Hi,
>
> On Thu, Jun 30, 2016 at 03:21:02PM -0700, Brian Norris wrote:
>> The PCIe driver didn't mask the host interrupts before trying to tear
>> down. This causes lockups at reboot or rmmod when using MSI-X on 8997,
>> since the MSI handler gets confused and locks up the system.
>>
>> Also tested on 8897, which does not support MSI-X (and wasn't
>> experiencing this same bug). No regressions seen there.
>
> Ping? This is a bugfix, and it'd be nice to either know what's wrong
> with it, or see it merged.
It's on my queue for 4.8:
https://patchwork.kernel.org/patch/9209027/
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mwifiex: mask PCIe interrupts before removal
2016-06-30 22:21 [PATCH] mwifiex: mask PCIe interrupts before removal Brian Norris
2016-07-01 17:42 ` Doug Anderson
2016-07-07 18:16 ` Brian Norris
@ 2016-07-08 13:48 ` Kalle Valo
2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-07-08 13:48 UTC (permalink / raw)
To: Brian Norris
Cc: Amitkumar Karwar, Nishant Sarmukadam, linux-kernel,
Doug Anderson, Brian Norris, Stephen Barber, linux-wireless,
netdev, Brian Norris
Brian Norris <briannorris@chromium.org> wrote:
> The PCIe driver didn't mask the host interrupts before trying to tear
> down. This causes lockups at reboot or rmmod when using MSI-X on 8997,
> since the MSI handler gets confused and locks up the system.
>
> Also tested on 8897, which does not support MSI-X (and wasn't
> experiencing this same bug). No regressions seen there.
>
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> Tested-by: Douglas Anderson <dianders@chromium.org>
Thanks, 1 patch applied to wireless-drivers-next.git:
d41376ca8ba7 mwifiex: mask PCIe interrupts before removal
--
Sent by pwcli
https://patchwork.kernel.org/patch/9209027/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-07-08 13:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-30 22:21 [PATCH] mwifiex: mask PCIe interrupts before removal Brian Norris
2016-07-01 17:42 ` Doug Anderson
2016-07-07 18:16 ` Brian Norris
2016-07-07 19:37 ` Kalle Valo
2016-07-08 13:48 ` Kalle Valo
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).