linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wcn36xx: Close SMD channel on device removal
@ 2017-05-09  4:36 Bjorn Andersson
  2017-05-09  6:17 ` Kalle Valo
  2017-05-23 15:23 ` Kalle Valo
  0 siblings, 2 replies; 7+ messages in thread
From: Bjorn Andersson @ 2017-05-09  4:36 UTC (permalink / raw)
  To: Eugene Krasnikov, Kalle Valo, Eyal Ilsar
  Cc: wcn36xx, linux-wireless, netdev, linux-kernel, linux-arm-msm

The SMD channel is not the primary WCNSS channel and must explicitly be
closed as the device is removed, or the channel will already by open on
a subsequent probe call in e.g. the case of reloading the kernel module.

This issue was introduced because I simplified the underlying SMD
implementation while the SMD adaptions of the driver sat on the mailing
list, but missed to update these patches. The patch does however only
apply back to the transition to rpmsg, hence the limited Fixes.

Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
Reported-by: Eyal Ilsar <c_eilsar@qti.qualcomm.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index d5e993dc9b23..517a315e259b 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1271,6 +1271,8 @@ static int wcn36xx_remove(struct platform_device *pdev)
 	qcom_smem_state_put(wcn->tx_enable_state);
 	qcom_smem_state_put(wcn->tx_rings_empty_state);
 
+	rpmsg_destroy_ept(wcn->smd_channel);
+
 	iounmap(wcn->dxe_base);
 	iounmap(wcn->ccu_base);
 
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] wcn36xx: Close SMD channel on device removal
  2017-05-09  4:36 [PATCH] wcn36xx: Close SMD channel on device removal Bjorn Andersson
@ 2017-05-09  6:17 ` Kalle Valo
  2017-05-09 23:03   ` Bjorn Andersson
  2017-05-23 15:23 ` Kalle Valo
  1 sibling, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2017-05-09  6:17 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Eugene Krasnikov, Eyal Ilsar, wcn36xx, linux-wireless, netdev,
	linux-kernel, linux-arm-msm

Bjorn Andersson <bjorn.andersson@linaro.org> writes:

> The SMD channel is not the primary WCNSS channel and must explicitly be
> closed as the device is removed, or the channel will already by open on
> a subsequent probe call in e.g. the case of reloading the kernel module.
>
> This issue was introduced because I simplified the underlying SMD
> implementation while the SMD adaptions of the driver sat on the mailing
> list, but missed to update these patches. The patch does however only
> apply back to the transition to rpmsg, hence the limited Fixes.
>
> Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
> Reported-by: Eyal Ilsar <c_eilsar@qti.qualcomm.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

As this is a regression I'll queue this to 4.12.

But if this is an older bug (didn't quite understand your description
though) should there be a separate patch for stable releases?

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] wcn36xx: Close SMD channel on device removal
  2017-05-09  6:17 ` Kalle Valo
@ 2017-05-09 23:03   ` Bjorn Andersson
  2017-05-10  7:27     ` Arend van Spriel
  0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Andersson @ 2017-05-09 23:03 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Eugene Krasnikov, Eyal Ilsar, wcn36xx, linux-wireless, netdev,
	linux-kernel, linux-arm-msm

On Mon 08 May 23:17 PDT 2017, Kalle Valo wrote:

> Bjorn Andersson <bjorn.andersson@linaro.org> writes:
> 
> > The SMD channel is not the primary WCNSS channel and must explicitly be
> > closed as the device is removed, or the channel will already by open on
> > a subsequent probe call in e.g. the case of reloading the kernel module.
> >
> > This issue was introduced because I simplified the underlying SMD
> > implementation while the SMD adaptions of the driver sat on the mailing
> > list, but missed to update these patches. The patch does however only
> > apply back to the transition to rpmsg, hence the limited Fixes.
> >
> > Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
> > Reported-by: Eyal Ilsar <c_eilsar@qti.qualcomm.com>
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> 
> As this is a regression I'll queue this to 4.12.
> 

Thanks.

> But if this is an older bug (didn't quite understand your description
> though) should there be a separate patch for stable releases?
> 

AFAICT this never worked, as it seems I did the rework in SMD while we
tried to figure out the dependency issues we had with moving to SMD. So
v4.9 through v4.11 has SMD support - with this bug.

How do I proceed, do you want me to write up a fix for stable@? Do I
send that out as an ordinary patch?

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] wcn36xx: Close SMD channel on device removal
  2017-05-09 23:03   ` Bjorn Andersson
@ 2017-05-10  7:27     ` Arend van Spriel
  2017-05-10 17:52       ` Bjorn Andersson
  0 siblings, 1 reply; 7+ messages in thread
From: Arend van Spriel @ 2017-05-10  7:27 UTC (permalink / raw)
  To: Bjorn Andersson, Kalle Valo
  Cc: Eugene Krasnikov, Eyal Ilsar, wcn36xx, linux-wireless, netdev,
	linux-kernel, linux-arm-msm

On 5/10/2017 1:03 AM, Bjorn Andersson wrote:
> On Mon 08 May 23:17 PDT 2017, Kalle Valo wrote:
> 
>> Bjorn Andersson <bjorn.andersson@linaro.org> writes:
>>
>>> The SMD channel is not the primary WCNSS channel and must explicitly be
>>> closed as the device is removed, or the channel will already by open on
>>> a subsequent probe call in e.g. the case of reloading the kernel module.
>>>
>>> This issue was introduced because I simplified the underlying SMD
>>> implementation while the SMD adaptions of the driver sat on the mailing
>>> list, but missed to update these patches. The patch does however only
>>> apply back to the transition to rpmsg, hence the limited Fixes.
>>>
>>> Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
>>> Reported-by: Eyal Ilsar <c_eilsar@qti.qualcomm.com>
>>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>>
>> As this is a regression I'll queue this to 4.12.
>>
> 
> Thanks.
> 
>> But if this is an older bug (didn't quite understand your description
>> though) should there be a separate patch for stable releases?
>>
> 
> AFAICT this never worked, as it seems I did the rework in SMD while we
> tried to figure out the dependency issues we had with moving to SMD. So
> v4.9 through v4.11 has SMD support - with this bug.
> 
> How do I proceed, do you want me to write up a fix for stable@? Do I
> send that out as an ordinary patch?

If the patch applies cleanly on branches linux-4.9.y through 
linux-4.11.y in the stable repository you can go for '--- Option 1 ---' 
as described in <linux-repo>/Documentation/stable_kernel_rules.txt.

Regards,
Arend

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] wcn36xx: Close SMD channel on device removal
  2017-05-10  7:27     ` Arend van Spriel
@ 2017-05-10 17:52       ` Bjorn Andersson
  2017-05-11 12:11         ` Kalle Valo
  0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Andersson @ 2017-05-10 17:52 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Kalle Valo, Eugene Krasnikov, Eyal Ilsar, wcn36xx,
	linux-wireless, netdev, linux-kernel, linux-arm-msm

On Wed 10 May 00:27 PDT 2017, Arend van Spriel wrote:

> On 5/10/2017 1:03 AM, Bjorn Andersson wrote:
> > On Mon 08 May 23:17 PDT 2017, Kalle Valo wrote:
> > 
> > > Bjorn Andersson <bjorn.andersson@linaro.org> writes:
> > > 
> > > > The SMD channel is not the primary WCNSS channel and must explicitly be
> > > > closed as the device is removed, or the channel will already by open on
> > > > a subsequent probe call in e.g. the case of reloading the kernel module.
> > > > 
> > > > This issue was introduced because I simplified the underlying SMD
> > > > implementation while the SMD adaptions of the driver sat on the mailing
> > > > list, but missed to update these patches. The patch does however only
> > > > apply back to the transition to rpmsg, hence the limited Fixes.
> > > > 
> > > > Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
> > > > Reported-by: Eyal Ilsar <c_eilsar@qti.qualcomm.com>
> > > > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > > 
> > > As this is a regression I'll queue this to 4.12.
> > > 
> > 
> > Thanks.
> > 
> > > But if this is an older bug (didn't quite understand your description
> > > though) should there be a separate patch for stable releases?
> > > 
> > 
> > AFAICT this never worked, as it seems I did the rework in SMD while we
> > tried to figure out the dependency issues we had with moving to SMD. So
> > v4.9 through v4.11 has SMD support - with this bug.
> > 
> > How do I proceed, do you want me to write up a fix for stable@? Do I
> > send that out as an ordinary patch?
> 
> If the patch applies cleanly on branches linux-4.9.y through linux-4.11.y in
> the stable repository you can go for '--- Option 1 ---' as described in
> <linux-repo>/Documentation/stable_kernel_rules.txt.
> 

It does not, before v4.12 it's a completely different function to call
to close the channel.

But "Option 3" describes the situation, thanks for the reference. I'll
try to find the time to verify the patch on v4.11 and send it to
stable@.

Regards,
Bjorn

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] wcn36xx: Close SMD channel on device removal
  2017-05-10 17:52       ` Bjorn Andersson
@ 2017-05-11 12:11         ` Kalle Valo
  0 siblings, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2017-05-11 12:11 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Arend van Spriel, Eugene Krasnikov, Eyal Ilsar, wcn36xx,
	linux-wireless, netdev, linux-kernel, linux-arm-msm

Bjorn Andersson <bjorn.andersson@linaro.org> writes:

> On Wed 10 May 00:27 PDT 2017, Arend van Spriel wrote:
>
>> On 5/10/2017 1:03 AM, Bjorn Andersson wrote:
>>
>> > AFAICT this never worked, as it seems I did the rework in SMD while we
>> > tried to figure out the dependency issues we had with moving to SMD. So
>> > v4.9 through v4.11 has SMD support - with this bug.
>> > 
>> > How do I proceed, do you want me to write up a fix for stable@? Do I
>> > send that out as an ordinary patch?
>> 
>> If the patch applies cleanly on branches linux-4.9.y through linux-4.11.y in
>> the stable repository you can go for '--- Option 1 ---' as described in
>> <linux-repo>/Documentation/stable_kernel_rules.txt.
>> 
>
> It does not, before v4.12 it's a completely different function to call
> to close the channel.
>
> But "Option 3" describes the situation, thanks for the reference. I'll
> try to find the time to verify the patch on v4.11 and send it to
> stable@.

Great, thanks. This seems to be that serious that better to fix this
also in older releases.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wcn36xx: Close SMD channel on device removal
  2017-05-09  4:36 [PATCH] wcn36xx: Close SMD channel on device removal Bjorn Andersson
  2017-05-09  6:17 ` Kalle Valo
@ 2017-05-23 15:23 ` Kalle Valo
  1 sibling, 0 replies; 7+ messages in thread
From: Kalle Valo @ 2017-05-23 15:23 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Eugene Krasnikov, Kalle Valo, Eyal Ilsar, wcn36xx,
	linux-wireless, netdev, linux-kernel, linux-arm-msm

Bjorn Andersson <bjorn.andersson@linaro.org> wrote:
> The SMD channel is not the primary WCNSS channel and must explicitly be
> closed as the device is removed, or the channel will already by open on
> a subsequent probe call in e.g. the case of reloading the kernel module.
> 
> This issue was introduced because I simplified the underlying SMD
> implementation while the SMD adaptions of the driver sat on the mailing
> list, but missed to update these patches. The patch does however only
> apply back to the transition to rpmsg, hence the limited Fixes.
> 
> Fixes: 5052de8deff5 ("soc: qcom: smd: Transition client drivers from smd to rpmsg")
> Reported-by: Eyal Ilsar <c_eilsar@qti.qualcomm.com>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Patch applied to ath-current branch of ath.git, thanks.

efad8396e906 wcn36xx: Close SMD channel on device removal

-- 
https://patchwork.kernel.org/patch/9717027/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-23 15:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-09  4:36 [PATCH] wcn36xx: Close SMD channel on device removal Bjorn Andersson
2017-05-09  6:17 ` Kalle Valo
2017-05-09 23:03   ` Bjorn Andersson
2017-05-10  7:27     ` Arend van Spriel
2017-05-10 17:52       ` Bjorn Andersson
2017-05-11 12:11         ` Kalle Valo
2017-05-23 15:23 ` 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).