LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] brcmfmac: avoid duplicated suspend/resume operation
@ 2015-01-26 2:46 Fu, Zhonghui
2015-02-03 13:08 ` Kalle Valo
2015-02-05 11:34 ` Fu, Zhonghui
0 siblings, 2 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2015-01-26 2:46 UTC (permalink / raw)
To: brudley, Arend van Spriel, Franky Lin, meuleman, Kalle Valo,
linville, pieterpg, hdegoede, wens, linux-wireless,
brcm80211-dev-list, netdev, linux-kernel
>From ff39ed4af9f1c50358fe92ec4c8eaac9db183e00 Mon Sep 17 00:00:00 2001
From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
Date: Mon, 26 Jan 2015 10:13:21 +0800
Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
WiFi chip has 2 SDIO functions, and PM core will trigger
twice suspend/resume operations for one WiFi chip to do
the same things. This patch avoid this case.
Acked-by: Arend van Spriel<arend@broadcom.com>
Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 9880dae..618b545 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -1139,11 +1139,17 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
static int brcmf_ops_sdio_suspend(struct device *dev)
{
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
+ struct brcmf_sdio_dev *sdiodev;
mmc_pm_flag_t sdio_flags;
+ struct sdio_func *func = dev_to_sdio_func(dev);
brcmf_dbg(SDIO, "Enter\n");
+ if (func->num == 2)
+ return 0;
+
+ sdiodev = bus_if->bus_priv.sdio;
+
atomic_set(&sdiodev->suspend, true);
if (sdiodev->wowl_enabled) {
@@ -1164,9 +1170,16 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
static int brcmf_ops_sdio_resume(struct device *dev)
{
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
+ struct brcmf_sdio_dev *sdiodev;
+ struct sdio_func *func = dev_to_sdio_func(dev);
brcmf_dbg(SDIO, "Enter\n");
+
+ if (func->num == 2)
+ return 0;
+
+ sdiodev = bus_if->bus_priv.sdio;
+
if (sdiodev->pdata && sdiodev->pdata->oob_irq_supported)
disable_irq_wake(sdiodev->pdata->oob_irq_nr);
brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
-- 1.7.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-26 2:46 [PATCH] brcmfmac: avoid duplicated suspend/resume operation Fu, Zhonghui
@ 2015-02-03 13:08 ` Kalle Valo
2015-02-05 11:56 ` Fu, Zhonghui
2015-02-05 11:34 ` Fu, Zhonghui
1 sibling, 1 reply; 27+ messages in thread
From: Kalle Valo @ 2015-02-03 13:08 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: brudley, Arend van Spriel, Franky Lin, meuleman, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
"Fu, Zhonghui" <zhonghui.fu@linux.intel.com> writes:
>>From ff39ed4af9f1c50358fe92ec4c8eaac9db183e00 Mon Sep 17 00:00:00 2001
> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> Date: Mon, 26 Jan 2015 10:13:21 +0800
> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>
> WiFi chip has 2 SDIO functions, and PM core will trigger
> twice suspend/resume operations for one WiFi chip to do
> the same things. This patch avoid this case.
>
> Acked-by: Arend van Spriel<arend@broadcom.com>
> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
This doesn't apply:
Applying: brcmfmac: avoid duplicated suspend/resume operation
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
CONFLICT (content): Merge conflict in drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
Failed to merge in the changes.
Patch failed at 0001 brcmfmac: avoid duplicated suspend/resume operation
BTW, when you resend a patch please use "[PATCH v2]" (or v3, v4...) in
the Subject field.
--
Kalle Valo
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-26 2:46 [PATCH] brcmfmac: avoid duplicated suspend/resume operation Fu, Zhonghui
2015-02-03 13:08 ` Kalle Valo
@ 2015-02-05 11:34 ` Fu, Zhonghui
2015-02-05 11:46 ` Arend van Spriel
1 sibling, 1 reply; 27+ messages in thread
From: Fu, Zhonghui @ 2015-02-05 11:34 UTC (permalink / raw)
To: brudley, Arend van Spriel, Franky Lin, meuleman, Kalle Valo,
linville, pieterpg, hdegoede, wens, linux-wireless,
brcm80211-dev-list, netdev, linux-kernel
What comments about the new patch? Can this new patch be accepted?
Thanks,
Zhonghui
On 2015/1/26 10:46, Fu, Zhonghui wrote:
> From ff39ed4af9f1c50358fe92ec4c8eaac9db183e00 Mon Sep 17 00:00:00 2001
> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> Date: Mon, 26 Jan 2015 10:13:21 +0800
> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>
> WiFi chip has 2 SDIO functions, and PM core will trigger
> twice suspend/resume operations for one WiFi chip to do
> the same things. This patch avoid this case.
>
> Acked-by: Arend van Spriel<arend@broadcom.com>
> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 17 +++++++++++++++--
> 1 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> index 9880dae..618b545 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> @@ -1139,11 +1139,17 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
> static int brcmf_ops_sdio_suspend(struct device *dev)
> {
> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
> + struct brcmf_sdio_dev *sdiodev;
> mmc_pm_flag_t sdio_flags;
> + struct sdio_func *func = dev_to_sdio_func(dev);
>
> brcmf_dbg(SDIO, "Enter\n");
>
> + if (func->num == 2)
> + return 0;
> +
> + sdiodev = bus_if->bus_priv.sdio;
> +
> atomic_set(&sdiodev->suspend, true);
>
> if (sdiodev->wowl_enabled) {
> @@ -1164,9 +1170,16 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
> static int brcmf_ops_sdio_resume(struct device *dev)
> {
> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
> + struct brcmf_sdio_dev *sdiodev;
> + struct sdio_func *func = dev_to_sdio_func(dev);
>
> brcmf_dbg(SDIO, "Enter\n");
> +
> + if (func->num == 2)
> + return 0;
> +
> + sdiodev = bus_if->bus_priv.sdio;
> +
> if (sdiodev->pdata && sdiodev->pdata->oob_irq_supported)
> disable_irq_wake(sdiodev->pdata->oob_irq_nr);
> brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
> -- 1.7.1
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-02-05 11:34 ` Fu, Zhonghui
@ 2015-02-05 11:46 ` Arend van Spriel
2015-02-09 4:49 ` Fu, Zhonghui
0 siblings, 1 reply; 27+ messages in thread
From: Arend van Spriel @ 2015-02-05 11:46 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: brudley, Franky Lin, meuleman, Kalle Valo, linville, pieterpg,
hdegoede, wens, linux-wireless, brcm80211-dev-list, netdev,
linux-kernel
On 02/05/15 12:34, Fu, Zhonghui wrote:
> What comments about the new patch? Can this new patch be accepted?
Hi Zhonghui
Last reply from Kalle was that it did not apply to his tree and
recommended to use version numbering so "[PATCH V2] <subject>".
> Thanks,
> Zhonghui
>
> On 2015/1/26 10:46, Fu, Zhonghui wrote:
>> From ff39ed4af9f1c50358fe92ec4c8eaac9db183e00 Mon Sep 17 00:00:00 2001
>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>> Date: Mon, 26 Jan 2015 10:13:21 +0800
>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>
>> WiFi chip has 2 SDIO functions, and PM core will trigger
>> twice suspend/resume operations for one WiFi chip to do
>> the same things. This patch avoid this case.
>>
>> Acked-by: Arend van Spriel<arend@broadcom.com>
>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>> ---
And when using version info a change log here is even better. Although
admittedly I lost track which version this would be ;-)
Regards,
Arend
---
>> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 17 +++++++++++++++--
>> 1 files changed, 15 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> index 9880dae..618b545 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> @@ -1139,11 +1139,17 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
>> static int brcmf_ops_sdio_suspend(struct device *dev)
>> {
>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>> + struct brcmf_sdio_dev *sdiodev;
>> mmc_pm_flag_t sdio_flags;
>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>
>> brcmf_dbg(SDIO, "Enter\n");
>>
>> + if (func->num == 2)
>> + return 0;
>> +
>> + sdiodev = bus_if->bus_priv.sdio;
>> +
>> atomic_set(&sdiodev->suspend, true);
>>
>> if (sdiodev->wowl_enabled) {
>> @@ -1164,9 +1170,16 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
>> static int brcmf_ops_sdio_resume(struct device *dev)
>> {
>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>> + struct brcmf_sdio_dev *sdiodev;
>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>
>> brcmf_dbg(SDIO, "Enter\n");
>> +
>> + if (func->num == 2)
>> + return 0;
>> +
>> + sdiodev = bus_if->bus_priv.sdio;
>> +
>> if (sdiodev->pdata&& sdiodev->pdata->oob_irq_supported)
>> disable_irq_wake(sdiodev->pdata->oob_irq_nr);
>> brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
>> -- 1.7.1
>>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-02-03 13:08 ` Kalle Valo
@ 2015-02-05 11:56 ` Fu, Zhonghui
0 siblings, 0 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2015-02-05 11:56 UTC (permalink / raw)
To: Kalle Valo
Cc: brudley, Arend van Spriel, Franky Lin, meuleman, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
On 2015/2/3 21:08, Kalle Valo wrote:
> "Fu, Zhonghui" <zhonghui.fu@linux.intel.com> writes:
>
>> >From ff39ed4af9f1c50358fe92ec4c8eaac9db183e00 Mon Sep 17 00:00:00 2001
>> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>> Date: Mon, 26 Jan 2015 10:13:21 +0800
>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>
>> WiFi chip has 2 SDIO functions, and PM core will trigger
>> twice suspend/resume operations for one WiFi chip to do
>> the same things. This patch avoid this case.
>>
>> Acked-by: Arend van Spriel<arend@broadcom.com>
>> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> This doesn't apply:
>
> Applying: brcmfmac: avoid duplicated suspend/resume operation
> Using index info to reconstruct a base tree...
> Falling back to patching base and 3-way merge...
> Auto-merging drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> CONFLICT (content): Merge conflict in drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> Failed to merge in the changes.
> Patch failed at 0001 brcmfmac: avoid duplicated suspend/resume operation
>
> BTW, when you resend a patch please use "[PATCH v2]" (or v3, v4...) in
> the Subject field.
Just see your comments, so please ignore my inquiry in last mail. I will re-base this patch again.
Thanks,
Zhonghui
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-02-05 11:46 ` Arend van Spriel
@ 2015-02-09 4:49 ` Fu, Zhonghui
0 siblings, 0 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2015-02-09 4:49 UTC (permalink / raw)
To: Arend van Spriel
Cc: brudley, Franky Lin, meuleman, Kalle Valo, linville, pieterpg,
hdegoede, wens, linux-wireless, brcm80211-dev-list, netdev,
linux-kernel
I have re-sent the patch with the subject "[PATCH v2] brcmfmac: avoid duplicated suspend/resume operation" in another mail.
If this patch can be accepted, please tell me.
Thanks,
Zhonghui
On 2015/2/5 19:46, Arend van Spriel wrote:
> On 02/05/15 12:34, Fu, Zhonghui wrote:
>> What comments about the new patch? Can this new patch be accepted?
>
> Hi Zhonghui
>
> Last reply from Kalle was that it did not apply to his tree and recommended to use version numbering so "[PATCH V2] <subject>".
>
>> Thanks,
>> Zhonghui
>>
>> On 2015/1/26 10:46, Fu, Zhonghui wrote:
>>> From ff39ed4af9f1c50358fe92ec4c8eaac9db183e00 Mon Sep 17 00:00:00 2001
>>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>> Date: Mon, 26 Jan 2015 10:13:21 +0800
>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>>
>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>> twice suspend/resume operations for one WiFi chip to do
>>> the same things. This patch avoid this case.
>>>
>>> Acked-by: Arend van Spriel<arend@broadcom.com>
>>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>> ---
> And when using version info a change log here is even better. Although admittedly I lost track which version this would be ;-)
>
> Regards,
> Arend
> ---
>>> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 17 +++++++++++++++--
>>> 1 files changed, 15 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>> index 9880dae..618b545 100644
>>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>> @@ -1139,11 +1139,17 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
>>> static int brcmf_ops_sdio_suspend(struct device *dev)
>>> {
>>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>>> + struct brcmf_sdio_dev *sdiodev;
>>> mmc_pm_flag_t sdio_flags;
>>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>>
>>> brcmf_dbg(SDIO, "Enter\n");
>>>
>>> + if (func->num == 2)
>>> + return 0;
>>> +
>>> + sdiodev = bus_if->bus_priv.sdio;
>>> +
>>> atomic_set(&sdiodev->suspend, true);
>>>
>>> if (sdiodev->wowl_enabled) {
>>> @@ -1164,9 +1170,16 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
>>> static int brcmf_ops_sdio_resume(struct device *dev)
>>> {
>>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>>> + struct brcmf_sdio_dev *sdiodev;
>>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>>
>>> brcmf_dbg(SDIO, "Enter\n");
>>> +
>>> + if (func->num == 2)
>>> + return 0;
>>> +
>>> + sdiodev = bus_if->bus_priv.sdio;
>>> +
>>> if (sdiodev->pdata&& sdiodev->pdata->oob_irq_supported)
>>> disable_irq_wake(sdiodev->pdata->oob_irq_nr);
>>> brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
>>> -- 1.7.1
>>>
>>
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-27 5:35 ` Fu, Zhonghui
@ 2015-02-02 1:58 ` Fu, Zhonghui
0 siblings, 0 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2015-02-02 1:58 UTC (permalink / raw)
To: Arend van Spriel, Kalle Valo
Cc: Sergei Shtylyov, brudley, Franky Lin, meuleman, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
On 2015/1/27 13:35, Fu, Zhonghui wrote:
> On 2015/1/24 2:09, Arend van Spriel wrote:
>> On 01/23/15 16:29, Kalle Valo wrote:
>>> Arend van Spriel<arend@broadcom.com> writes:
>>>
>>>> On 01/22/15 14:54, Sergei Shtylyov wrote:
>>>>> Hello.
>>>>>
>>>>> On 1/22/2015 4:49 PM, Kalle Valo wrote:
>>>>>
>>>>>>>> From 04d3fa673897ca4ccbea6c76836d0092dba2484a Mon Sep 17 00:00:00 2001
>>>>>>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>>>>>> Date: Tue, 20 Jan 2015 11:14:13 +0800
>>>>>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>>>>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>>>>>> twice suspend/resume operations for one WiFi chip to do
>>>>>>> the same things. This patch avoid this case.
>>>>>>> Acked-by: Arend van Spriel<arend@broadcom.com>
>>>>>>> Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
>>>>>>> Acked-by: Kalle Valo<kvalo@codeaurora.org>
>>>>>>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>>>>> I don't remember giving Acked-by to this (or for matter to anything for
>>>>>> a long time). What about Sergei or Arend?
>>>>> I haven't ACK'ed this patch either.
>>>> I did ACK the initial patch and felt it still valid for this 'V2' patch.
>>> Ok, thanks. So the patch is good, Zhonghui just needs to remove the two
>>> acked-by lines.
>> Indeed.
> I have removed the two acked-by lines and sent the new patch in another mail.
>
> Thanks,
> Zhonghui
What comments about the new patch? Can this new patch be accepted?
Thanks,
Zhonghui
>> Regards,
>> Arend
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-23 18:09 ` Arend van Spriel
@ 2015-01-27 5:35 ` Fu, Zhonghui
2015-02-02 1:58 ` Fu, Zhonghui
0 siblings, 1 reply; 27+ messages in thread
From: Fu, Zhonghui @ 2015-01-27 5:35 UTC (permalink / raw)
To: Arend van Spriel, Kalle Valo
Cc: Sergei Shtylyov, brudley, Franky Lin, meuleman, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
On 2015/1/24 2:09, Arend van Spriel wrote:
> On 01/23/15 16:29, Kalle Valo wrote:
>> Arend van Spriel<arend@broadcom.com> writes:
>>
>>> On 01/22/15 14:54, Sergei Shtylyov wrote:
>>>> Hello.
>>>>
>>>> On 1/22/2015 4:49 PM, Kalle Valo wrote:
>>>>
>>>>>> > From 04d3fa673897ca4ccbea6c76836d0092dba2484a Mon Sep 17 00:00:00 2001
>>>>>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>>>>> Date: Tue, 20 Jan 2015 11:14:13 +0800
>>>>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>>>
>>>>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>>>>> twice suspend/resume operations for one WiFi chip to do
>>>>>> the same things. This patch avoid this case.
>>>>
>>>>>> Acked-by: Arend van Spriel<arend@broadcom.com>
>>>>>> Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
>>>>>> Acked-by: Kalle Valo<kvalo@codeaurora.org>
>>>>>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>>>
>>>>> I don't remember giving Acked-by to this (or for matter to anything for
>>>>> a long time). What about Sergei or Arend?
>>>>
>>>> I haven't ACK'ed this patch either.
>>>
>>> I did ACK the initial patch and felt it still valid for this 'V2' patch.
>>
>> Ok, thanks. So the patch is good, Zhonghui just needs to remove the two
>> acked-by lines.
>
> Indeed.
I have removed the two acked-by lines and sent the new patch in another mail.
Thanks,
Zhonghui
>
> Regards,
> Arend
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-23 15:29 ` Kalle Valo
@ 2015-01-23 18:09 ` Arend van Spriel
2015-01-27 5:35 ` Fu, Zhonghui
0 siblings, 1 reply; 27+ messages in thread
From: Arend van Spriel @ 2015-01-23 18:09 UTC (permalink / raw)
To: Kalle Valo
Cc: Sergei Shtylyov, Fu, Zhonghui, brudley, Franky Lin, meuleman,
linville, pieterpg, hdegoede, wens, linux-wireless,
brcm80211-dev-list, netdev, linux-kernel
On 01/23/15 16:29, Kalle Valo wrote:
> Arend van Spriel<arend@broadcom.com> writes:
>
>> On 01/22/15 14:54, Sergei Shtylyov wrote:
>>> Hello.
>>>
>>> On 1/22/2015 4:49 PM, Kalle Valo wrote:
>>>
>>>>> > From 04d3fa673897ca4ccbea6c76836d0092dba2484a Mon Sep 17 00:00:00 2001
>>>>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>>>> Date: Tue, 20 Jan 2015 11:14:13 +0800
>>>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>>
>>>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>>>> twice suspend/resume operations for one WiFi chip to do
>>>>> the same things. This patch avoid this case.
>>>
>>>>> Acked-by: Arend van Spriel<arend@broadcom.com>
>>>>> Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
>>>>> Acked-by: Kalle Valo<kvalo@codeaurora.org>
>>>>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>>
>>>> I don't remember giving Acked-by to this (or for matter to anything for
>>>> a long time). What about Sergei or Arend?
>>>
>>> I haven't ACK'ed this patch either.
>>
>> I did ACK the initial patch and felt it still valid for this 'V2' patch.
>
> Ok, thanks. So the patch is good, Zhonghui just needs to remove the two
> acked-by lines.
Indeed.
Regards,
Arend
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-22 20:58 ` Arend van Spriel
@ 2015-01-23 15:29 ` Kalle Valo
2015-01-23 18:09 ` Arend van Spriel
0 siblings, 1 reply; 27+ messages in thread
From: Kalle Valo @ 2015-01-23 15:29 UTC (permalink / raw)
To: Arend van Spriel
Cc: Sergei Shtylyov, Fu, Zhonghui, brudley, Franky Lin, meuleman,
linville, pieterpg, hdegoede, wens, linux-wireless,
brcm80211-dev-list, netdev, linux-kernel
Arend van Spriel <arend@broadcom.com> writes:
> On 01/22/15 14:54, Sergei Shtylyov wrote:
>> Hello.
>>
>> On 1/22/2015 4:49 PM, Kalle Valo wrote:
>>
>>>> >From 04d3fa673897ca4ccbea6c76836d0092dba2484a Mon Sep 17 00:00:00 2001
>>>> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>>>> Date: Tue, 20 Jan 2015 11:14:13 +0800
>>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>
>>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>>> twice suspend/resume operations for one WiFi chip to do
>>>> the same things. This patch avoid this case.
>>
>>>> Acked-by: Arend van Spriel <arend@broadcom.com>
>>>> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>>> Acked-by: Kalle Valo <kvalo@codeaurora.org>
>>>> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>>
>>> I don't remember giving Acked-by to this (or for matter to anything for
>>> a long time). What about Sergei or Arend?
>>
>> I haven't ACK'ed this patch either.
>
> I did ACK the initial patch and felt it still valid for this 'V2' patch.
Ok, thanks. So the patch is good, Zhonghui just needs to remove the two
acked-by lines.
--
Kalle Valo
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-22 13:54 ` Sergei Shtylyov
@ 2015-01-22 20:58 ` Arend van Spriel
2015-01-23 15:29 ` Kalle Valo
0 siblings, 1 reply; 27+ messages in thread
From: Arend van Spriel @ 2015-01-22 20:58 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Kalle Valo, Fu, Zhonghui, brudley, Franky Lin, meuleman,
linville, pieterpg, hdegoede, wens, linux-wireless,
brcm80211-dev-list, netdev, linux-kernel
On 01/22/15 14:54, Sergei Shtylyov wrote:
> Hello.
>
> On 1/22/2015 4:49 PM, Kalle Valo wrote:
>
>>> >From 04d3fa673897ca4ccbea6c76836d0092dba2484a Mon Sep 17 00:00:00 2001
>>> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>>> Date: Tue, 20 Jan 2015 11:14:13 +0800
>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>
>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>> twice suspend/resume operations for one WiFi chip to do
>>> the same things. This patch avoid this case.
>
>>> Acked-by: Arend van Spriel <arend@broadcom.com>
>>> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>> Acked-by: Kalle Valo <kvalo@codeaurora.org>
>>> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>
>> I don't remember giving Acked-by to this (or for matter to anything for
>> a long time). What about Sergei or Arend?
>
> I haven't ACK'ed this patch either.
I did ACK the initial patch and felt it still valid for this 'V2' patch.
Regards,
Arend
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-22 13:49 ` Kalle Valo
@ 2015-01-22 13:54 ` Sergei Shtylyov
2015-01-22 20:58 ` Arend van Spriel
0 siblings, 1 reply; 27+ messages in thread
From: Sergei Shtylyov @ 2015-01-22 13:54 UTC (permalink / raw)
To: Kalle Valo, Fu, Zhonghui
Cc: brudley, Arend van Spriel, Franky Lin, meuleman, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
Hello.
On 1/22/2015 4:49 PM, Kalle Valo wrote:
>> >From 04d3fa673897ca4ccbea6c76836d0092dba2484a Mon Sep 17 00:00:00 2001
>> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>> Date: Tue, 20 Jan 2015 11:14:13 +0800
>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>> WiFi chip has 2 SDIO functions, and PM core will trigger
>> twice suspend/resume operations for one WiFi chip to do
>> the same things. This patch avoid this case.
>> Acked-by: Arend van Spriel <arend@broadcom.com>
>> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>> Acked-by: Kalle Valo <kvalo@codeaurora.org>
>> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> I don't remember giving Acked-by to this (or for matter to anything for
> a long time). What about Sergei or Arend?
I haven't ACK'ed this patch either.
WBR, Sergei
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-20 3:31 Fu, Zhonghui
@ 2015-01-22 13:49 ` Kalle Valo
2015-01-22 13:54 ` Sergei Shtylyov
0 siblings, 1 reply; 27+ messages in thread
From: Kalle Valo @ 2015-01-22 13:49 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: brudley, Arend van Spriel, Franky Lin, meuleman, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
"Fu, Zhonghui" <zhonghui.fu@linux.intel.com> writes:
>>From 04d3fa673897ca4ccbea6c76836d0092dba2484a Mon Sep 17 00:00:00 2001
> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> Date: Tue, 20 Jan 2015 11:14:13 +0800
> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>
> WiFi chip has 2 SDIO functions, and PM core will trigger
> twice suspend/resume operations for one WiFi chip to do
> the same things. This patch avoid this case.
>
> Acked-by: Arend van Spriel <arend@broadcom.com>
> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> Acked-by: Kalle Valo <kvalo@codeaurora.org>
> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
I don't remember giving Acked-by to this (or for matter to anything for
a long time). What about Sergei or Arend?
Please do not add Acked-by, Signed-off-by or any other tags unless
explicitly specified by the person in question. I'm dropping this,
please resend with real Acked-by lines.
--
Kalle Valo
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-15 12:52 ` Kalle Valo
@ 2015-01-20 3:34 ` Fu, Zhonghui
0 siblings, 0 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2015-01-20 3:34 UTC (permalink / raw)
To: Kalle Valo, Arend van Spriel
Cc: brudley, Franky Lin, meuleman, linville, pieterpg, hdegoede,
wens, linux-wireless, brcm80211-dev-list, netdev, linux-kernel
On 2015/1/15 20:52, Kalle Valo wrote:
> Arend van Spriel <arend@broadcom.com> writes:
>
>> On 01/12/15 07:41, Fu, Zhonghui wrote:
>>> From 8685c3c2746b4275fc808d9db23c364b2f54b52a Mon Sep 17 00:00:00 2001
>>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>> Date: Mon, 12 Jan 2015 14:25:46 +0800
>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>>
>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>> twice suspend/resume operations for one WiFi chip to do
>>> the same things. This patch avoid this case.
>>>
>>> Acked-by: Arend van Spriel<arend@broadcom.com>
>>> Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
>>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>> This patch needs to be rebased.
>>
>> Kalle,
>>
>> Please drop this one.
> Ok, dropped. I'll wait for the rebase.
I have re-based this patch and sent it in another mail with the same subject.
Thanks,
Zhonghui
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH] brcmfmac: avoid duplicated suspend/resume operation
@ 2015-01-20 3:31 Fu, Zhonghui
2015-01-22 13:49 ` Kalle Valo
0 siblings, 1 reply; 27+ messages in thread
From: Fu, Zhonghui @ 2015-01-20 3:31 UTC (permalink / raw)
To: brudley, Arend van Spriel, Franky Lin, meuleman, kvalo, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
>From 04d3fa673897ca4ccbea6c76836d0092dba2484a Mon Sep 17 00:00:00 2001
From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
Date: Tue, 20 Jan 2015 11:14:13 +0800
Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
WiFi chip has 2 SDIO functions, and PM core will trigger
twice suspend/resume operations for one WiFi chip to do
the same things. This patch avoid this case.
Acked-by: Arend van Spriel <arend@broadcom.com>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 9880dae..618b545 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -1139,11 +1139,17 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
static int brcmf_ops_sdio_suspend(struct device *dev)
{
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
+ struct brcmf_sdio_dev *sdiodev;
mmc_pm_flag_t sdio_flags;
+ struct sdio_func *func = dev_to_sdio_func(dev);
brcmf_dbg(SDIO, "Enter\n");
+ if (func->num == 2)
+ return 0;
+
+ sdiodev = bus_if->bus_priv.sdio;
+
atomic_set(&sdiodev->suspend, true);
if (sdiodev->wowl_enabled) {
@@ -1164,9 +1170,16 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
static int brcmf_ops_sdio_resume(struct device *dev)
{
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
+ struct brcmf_sdio_dev *sdiodev;
+ struct sdio_func *func = dev_to_sdio_func(dev);
brcmf_dbg(SDIO, "Enter\n");
+
+ if (func->num == 2)
+ return 0;
+
+ sdiodev = bus_if->bus_priv.sdio;
+
if (sdiodev->pdata && sdiodev->pdata->oob_irq_supported)
disable_irq_wake(sdiodev->pdata->oob_irq_nr);
brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
-- 1.7.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-12 10:00 ` Arend van Spriel
@ 2015-01-15 12:52 ` Kalle Valo
2015-01-20 3:34 ` Fu, Zhonghui
0 siblings, 1 reply; 27+ messages in thread
From: Kalle Valo @ 2015-01-15 12:52 UTC (permalink / raw)
To: Arend van Spriel
Cc: Fu, Zhonghui, brudley, Franky Lin, meuleman, linville, pieterpg,
hdegoede, wens, linux-wireless, brcm80211-dev-list, netdev,
linux-kernel
Arend van Spriel <arend@broadcom.com> writes:
> On 01/12/15 07:41, Fu, Zhonghui wrote:
>> From 8685c3c2746b4275fc808d9db23c364b2f54b52a Mon Sep 17 00:00:00 2001
>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>> Date: Mon, 12 Jan 2015 14:25:46 +0800
>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>
>> WiFi chip has 2 SDIO functions, and PM core will trigger
>> twice suspend/resume operations for one WiFi chip to do
>> the same things. This patch avoid this case.
>>
>> Acked-by: Arend van Spriel<arend@broadcom.com>
>> Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>
> This patch needs to be rebased.
>
> Kalle,
>
> Please drop this one.
Ok, dropped. I'll wait for the rebase.
--
Kalle Valo
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-12 14:06 ` Sergei Shtylyov
@ 2015-01-12 16:24 ` Arend van Spriel
0 siblings, 0 replies; 27+ messages in thread
From: Arend van Spriel @ 2015-01-12 16:24 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Fu, Zhonghui, brudley, Franky Lin, meuleman, kvalo, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
On 01/12/15 15:06, Sergei Shtylyov wrote:
> Hello.
>
> On 1/12/2015 9:41 AM, Fu, Zhonghui wrote:
>
>> From 8685c3c2746b4275fc808d9db23c364b2f54b52a Mon Sep 17 00:00:00 2001
>> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>> Date: Mon, 12 Jan 2015 14:25:46 +0800
>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>
> The lines above are not needed.
>
>> WiFi chip has 2 SDIO functions, and PM core will trigger
>> twice suspend/resume operations for one WiFi chip to do
>> the same things. This patch avoid this case.
>
>> Acked-by: Arend van Spriel<arend@broadcom.com>
>> Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
>> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>> ---
>> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 21
>> +++++++++++++++++----
>> 1 files changed, 17 insertions(+), 4 deletions(-)
>
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> index 9880dae..8f71485 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> @@ -1070,7 +1070,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func
>> *func,
>> */
>> if ((sdio_get_host_pm_caps(sdiodev->func[1]) & MMC_PM_KEEP_POWER) &&
>> ((sdio_get_host_pm_caps(sdiodev->func[1]) & MMC_PM_WAKE_SDIO_IRQ) ||
>> - (sdiodev->pdata && sdiodev->pdata->oob_irq_supported)))
>> + (sdiodev->pdata->oob_irq_supported)))
>
> Inner parens not needed on this line.
Well, actually this patch should not affect those line as it would
reintroduce a recently fixed issue.
Regards,
Arend
> [...]
>
> WBR, Sergei
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-12 6:41 Fu, Zhonghui
2015-01-12 10:00 ` Arend van Spriel
@ 2015-01-12 14:06 ` Sergei Shtylyov
2015-01-12 16:24 ` Arend van Spriel
1 sibling, 1 reply; 27+ messages in thread
From: Sergei Shtylyov @ 2015-01-12 14:06 UTC (permalink / raw)
To: Fu, Zhonghui, brudley,
arend@broadcom.com >> Arend van Spriel, Franky Lin,
meuleman, kvalo, linville, pieterpg, hdegoede, wens,
linux-wireless, brcm80211-dev-list, netdev, linux-kernel
Hello.
On 1/12/2015 9:41 AM, Fu, Zhonghui wrote:
> From 8685c3c2746b4275fc808d9db23c364b2f54b52a Mon Sep 17 00:00:00 2001
> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> Date: Mon, 12 Jan 2015 14:25:46 +0800
> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
The lines above are not needed.
> WiFi chip has 2 SDIO functions, and PM core will trigger
> twice suspend/resume operations for one WiFi chip to do
> the same things. This patch avoid this case.
> Acked-by: Arend van Spriel<arend@broadcom.com>
> Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 21 +++++++++++++++++----
> 1 files changed, 17 insertions(+), 4 deletions(-)
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> index 9880dae..8f71485 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> @@ -1070,7 +1070,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
> */
> if ((sdio_get_host_pm_caps(sdiodev->func[1]) & MMC_PM_KEEP_POWER) &&
> ((sdio_get_host_pm_caps(sdiodev->func[1]) & MMC_PM_WAKE_SDIO_IRQ) ||
> - (sdiodev->pdata && sdiodev->pdata->oob_irq_supported)))
> + (sdiodev->pdata->oob_irq_supported)))
Inner parens not needed on this line.
[...]
WBR, Sergei
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-12 6:41 Fu, Zhonghui
@ 2015-01-12 10:00 ` Arend van Spriel
2015-01-15 12:52 ` Kalle Valo
2015-01-12 14:06 ` Sergei Shtylyov
1 sibling, 1 reply; 27+ messages in thread
From: Arend van Spriel @ 2015-01-12 10:00 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: brudley, Franky Lin, meuleman, kvalo, linville, pieterpg,
hdegoede, wens, linux-wireless, brcm80211-dev-list, netdev,
linux-kernel
On 01/12/15 07:41, Fu, Zhonghui wrote:
> From 8685c3c2746b4275fc808d9db23c364b2f54b52a Mon Sep 17 00:00:00 2001
> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
> Date: Mon, 12 Jan 2015 14:25:46 +0800
> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>
> WiFi chip has 2 SDIO functions, and PM core will trigger
> twice suspend/resume operations for one WiFi chip to do
> the same things. This patch avoid this case.
>
> Acked-by: Arend van Spriel<arend@broadcom.com>
> Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
This patch needs to be rebased.
Kalle,
Please drop this one.
Regards,
Arend
> ---
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 21 +++++++++++++++++----
> 1 files changed, 17 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> index 9880dae..8f71485 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> @@ -1070,7 +1070,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
> */
> if ((sdio_get_host_pm_caps(sdiodev->func[1])& MMC_PM_KEEP_POWER)&&
> ((sdio_get_host_pm_caps(sdiodev->func[1])& MMC_PM_WAKE_SDIO_IRQ) ||
> - (sdiodev->pdata&& sdiodev->pdata->oob_irq_supported)))
> + (sdiodev->pdata->oob_irq_supported)))
> bus_if->wowl_supported = true;
> #endif
>
> @@ -1139,11 +1139,17 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
> static int brcmf_ops_sdio_suspend(struct device *dev)
> {
> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
> + struct brcmf_sdio_dev *sdiodev;
> mmc_pm_flag_t sdio_flags;
> + struct sdio_func *func = dev_to_sdio_func(dev);
>
> brcmf_dbg(SDIO, "Enter\n");
>
> + if (func->num == 2)
> + return 0;
> +
> + sdiodev = bus_if->bus_priv.sdio;
> +
> atomic_set(&sdiodev->suspend, true);
>
> if (sdiodev->wowl_enabled) {
> @@ -1164,10 +1170,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
> static int brcmf_ops_sdio_resume(struct device *dev)
> {
> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
> + struct brcmf_sdio_dev *sdiodev;
> + struct sdio_func *func = dev_to_sdio_func(dev);
>
> brcmf_dbg(SDIO, "Enter\n");
> - if (sdiodev->pdata&& sdiodev->pdata->oob_irq_supported)
> +
> + if (func->num == 2)
> + return 0;
> +
> + sdiodev = bus_if->bus_priv.sdio;
> +
> + if (sdiodev->pdata->oob_irq_supported)
> disable_irq_wake(sdiodev->pdata->oob_irq_nr);
> brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
> atomic_set(&sdiodev->suspend, false);
> -- 1.7.1
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-05 10:48 ` Arend van Spriel
@ 2015-01-12 6:43 ` Fu, Zhonghui
0 siblings, 0 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2015-01-12 6:43 UTC (permalink / raw)
To: Arend van Spriel
Cc: brudley, Franky Lin, meuleman, kvalo, linville, pieterpg,
hdegoede, wens, linux-wireless, brcm80211-dev-list, netdev,
linux-kernel
I sent a new version of this patch in another mail.
Thanks,
Zhonghui
On 2015/1/5 18:48, Arend van Spriel wrote:
> On 01/05/15 03:34, Fu, Zhonghui wrote:
>> Hi Arend,
>>
>> Where to find your patch for this?
>
> Well, we did not submit it. Hence my "Acked-by:" to your patch below.
>
> Regards,
> Arend
>
>>
>> Thanks,
>> Zhonghui
>>
>> On 2014/12/31 17:56, Arend van Spriel wrote:
>>> On 12/31/14 09:20, Fu, Zhonghui wrote:
>>>> From e34419970a07bfcd365f9c66bdfa552188a0cd26 Mon Sep 17 00:00:00 2001
>>>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>>> Date: Mon, 29 Dec 2014 21:25:31 +0800
>>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>>>
>>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>>> twice suspend/resume operations for one WiFi chip to do
>>>> the same things. This patch avoid this case.
>>>
>>> We have a patch queued up for this as well, but this one looks good enough although I personally prefer container_of() instead of dev_to_sdio_func().
>>>
>>> Acked-by: Arend van Spriel<arend@broadcom.com>
>>>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>>> ---
>>>> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 +++++++++++++++++--
>>>> 1 files changed, 17 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>>> index 3c06e93..eee7818 100644
>>>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>>> @@ -1139,11 +1139,18 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
>>>> static int brcmf_ops_sdio_suspend(struct device *dev)
>>>> {
>>>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>>>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>>>> + struct brcmf_sdio_dev *sdiodev;
>>>> mmc_pm_flag_t sdio_flags;
>>>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>>>
>>>> brcmf_dbg(SDIO, "Enter\n");
>>>>
>>>> + if (func->num == 2) {
>>>> + return 0;
>>>> + }
>>>> +
>>>> + sdiodev = bus_if->bus_priv.sdio;
>>>> +
>>>> atomic_set(&sdiodev->suspend, true);
>>>>
>>>> if (sdiodev->wowl_enabled) {
>>>> @@ -1164,9 +1171,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
>>>> static int brcmf_ops_sdio_resume(struct device *dev)
>>>> {
>>>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>>>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>>>> + struct brcmf_sdio_dev *sdiodev;
>>>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>>>
>>>> brcmf_dbg(SDIO, "Enter\n");
>>>> +
>>>> + if (func->num == 2) {
>>>> + return 0;
>>>> + }
>>>> +
>>>> + sdiodev = bus_if->bus_priv.sdio;
>>>> +
>>>> if (sdiodev->pdata->oob_irq_supported)
>>>> disable_irq_wake(sdiodev->pdata->oob_irq_nr);
>>>> brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
>>>> -- 1.7.1
>>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH] brcmfmac: avoid duplicated suspend/resume operation
@ 2015-01-12 6:41 Fu, Zhonghui
2015-01-12 10:00 ` Arend van Spriel
2015-01-12 14:06 ` Sergei Shtylyov
0 siblings, 2 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2015-01-12 6:41 UTC (permalink / raw)
To: brudley, arend@broadcom.com >> Arend van Spriel,
Franky Lin, meuleman, kvalo, linville, pieterpg, hdegoede, wens,
linux-wireless, brcm80211-dev-list, netdev, linux-kernel
>From 8685c3c2746b4275fc808d9db23c364b2f54b52a Mon Sep 17 00:00:00 2001
From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
Date: Mon, 12 Jan 2015 14:25:46 +0800
Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
WiFi chip has 2 SDIO functions, and PM core will trigger
twice suspend/resume operations for one WiFi chip to do
the same things. This patch avoid this case.
Acked-by: Arend van Spriel<arend@broadcom.com>
Acked-by: Sergei Shtylyov<sergei.shtylyov@cogentembedded.com>
Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 9880dae..8f71485 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -1070,7 +1070,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
*/
if ((sdio_get_host_pm_caps(sdiodev->func[1]) & MMC_PM_KEEP_POWER) &&
((sdio_get_host_pm_caps(sdiodev->func[1]) & MMC_PM_WAKE_SDIO_IRQ) ||
- (sdiodev->pdata && sdiodev->pdata->oob_irq_supported)))
+ (sdiodev->pdata->oob_irq_supported)))
bus_if->wowl_supported = true;
#endif
@@ -1139,11 +1139,17 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
static int brcmf_ops_sdio_suspend(struct device *dev)
{
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
+ struct brcmf_sdio_dev *sdiodev;
mmc_pm_flag_t sdio_flags;
+ struct sdio_func *func = dev_to_sdio_func(dev);
brcmf_dbg(SDIO, "Enter\n");
+ if (func->num == 2)
+ return 0;
+
+ sdiodev = bus_if->bus_priv.sdio;
+
atomic_set(&sdiodev->suspend, true);
if (sdiodev->wowl_enabled) {
@@ -1164,10 +1170,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
static int brcmf_ops_sdio_resume(struct device *dev)
{
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
+ struct brcmf_sdio_dev *sdiodev;
+ struct sdio_func *func = dev_to_sdio_func(dev);
brcmf_dbg(SDIO, "Enter\n");
- if (sdiodev->pdata && sdiodev->pdata->oob_irq_supported)
+
+ if (func->num == 2)
+ return 0;
+
+ sdiodev = bus_if->bus_priv.sdio;
+
+ if (sdiodev->pdata->oob_irq_supported)
disable_irq_wake(sdiodev->pdata->oob_irq_nr);
brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
atomic_set(&sdiodev->suspend, false);
-- 1.7.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2015-01-05 2:34 ` Fu, Zhonghui
@ 2015-01-05 10:48 ` Arend van Spriel
2015-01-12 6:43 ` Fu, Zhonghui
0 siblings, 1 reply; 27+ messages in thread
From: Arend van Spriel @ 2015-01-05 10:48 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: brudley, Franky Lin, meuleman, kvalo, linville, pieterpg,
hdegoede, wens, linux-wireless, brcm80211-dev-list, netdev,
linux-kernel
On 01/05/15 03:34, Fu, Zhonghui wrote:
> Hi Arend,
>
> Where to find your patch for this?
Well, we did not submit it. Hence my "Acked-by:" to your patch below.
Regards,
Arend
>
> Thanks,
> Zhonghui
>
> On 2014/12/31 17:56, Arend van Spriel wrote:
>> On 12/31/14 09:20, Fu, Zhonghui wrote:
>>> From e34419970a07bfcd365f9c66bdfa552188a0cd26 Mon Sep 17 00:00:00 2001
>>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>> Date: Mon, 29 Dec 2014 21:25:31 +0800
>>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>>
>>> WiFi chip has 2 SDIO functions, and PM core will trigger
>>> twice suspend/resume operations for one WiFi chip to do
>>> the same things. This patch avoid this case.
>>
>> We have a patch queued up for this as well, but this one looks good enough although I personally prefer container_of() instead of dev_to_sdio_func().
>>
>> Acked-by: Arend van Spriel<arend@broadcom.com>
>>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>>> ---
>>> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 +++++++++++++++++--
>>> 1 files changed, 17 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>> index 3c06e93..eee7818 100644
>>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>>> @@ -1139,11 +1139,18 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
>>> static int brcmf_ops_sdio_suspend(struct device *dev)
>>> {
>>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>>> + struct brcmf_sdio_dev *sdiodev;
>>> mmc_pm_flag_t sdio_flags;
>>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>>
>>> brcmf_dbg(SDIO, "Enter\n");
>>>
>>> + if (func->num == 2) {
>>> + return 0;
>>> + }
>>> +
>>> + sdiodev = bus_if->bus_priv.sdio;
>>> +
>>> atomic_set(&sdiodev->suspend, true);
>>>
>>> if (sdiodev->wowl_enabled) {
>>> @@ -1164,9 +1171,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
>>> static int brcmf_ops_sdio_resume(struct device *dev)
>>> {
>>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>>> + struct brcmf_sdio_dev *sdiodev;
>>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>>
>>> brcmf_dbg(SDIO, "Enter\n");
>>> +
>>> + if (func->num == 2) {
>>> + return 0;
>>> + }
>>> +
>>> + sdiodev = bus_if->bus_priv.sdio;
>>> +
>>> if (sdiodev->pdata->oob_irq_supported)
>>> disable_irq_wake(sdiodev->pdata->oob_irq_nr);
>>> brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
>>> -- 1.7.1
>>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2014-12-31 11:22 ` Sergei Shtylyov
@ 2015-01-05 2:37 ` Fu, Zhonghui
0 siblings, 0 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2015-01-05 2:37 UTC (permalink / raw)
To: Sergei Shtylyov, brudley, Arend van Spriel, Franky Lin, meuleman,
kvalo, linville, pieterpg, hdegoede, wens, linux-wireless,
brcm80211-dev-list, netdev, linux-kernel
Hi Sergei,
You are right, I will apply your advice in next version of this patch.
Thanks,
Zhonghui
On 2014/12/31 19:22, Sergei Shtylyov wrote:
> Hello.
>
> On 12/31/2014 11:20 AM, Fu, Zhonghui wrote:
>
>> From e34419970a07bfcd365f9c66bdfa552188a0cd26 Mon Sep 17 00:00:00 2001
>> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>> Date: Mon, 29 Dec 2014 21:25:31 +0800
>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>
>> WiFi chip has 2 SDIO functions, and PM core will trigger
>> twice suspend/resume operations for one WiFi chip to do
>> the same things. This patch avoid this case.
>
>> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
>> ---
>> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 +++++++++++++++++--
>> 1 files changed, 17 insertions(+), 2 deletions(-)
>
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> index 3c06e93..eee7818 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> @@ -1139,11 +1139,18 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
>> static int brcmf_ops_sdio_suspend(struct device *dev)
>> {
>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>> + struct brcmf_sdio_dev *sdiodev;
>> mmc_pm_flag_t sdio_flags;
>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>
>> brcmf_dbg(SDIO, "Enter\n");
>>
>> + if (func->num == 2) {
>> + return 0;
>> + }
>
> {} not needed.
>
> [...]
>> @@ -1164,9 +1171,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
>> static int brcmf_ops_sdio_resume(struct device *dev)
>> {
>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>> + struct brcmf_sdio_dev *sdiodev;
>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>
>> brcmf_dbg(SDIO, "Enter\n");
>> +
>> + if (func->num == 2) {
>> + return 0;
>> + }
>
> Same here.
>
> [...]
>
> WBR, Sergei
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2014-12-31 9:56 ` Arend van Spriel
@ 2015-01-05 2:34 ` Fu, Zhonghui
2015-01-05 10:48 ` Arend van Spriel
0 siblings, 1 reply; 27+ messages in thread
From: Fu, Zhonghui @ 2015-01-05 2:34 UTC (permalink / raw)
To: Arend van Spriel
Cc: brudley, Franky Lin, meuleman, kvalo, linville, pieterpg,
hdegoede, wens, linux-wireless, brcm80211-dev-list, netdev,
linux-kernel
Hi Arend,
Where to find your patch for this?
Thanks,
Zhonghui
On 2014/12/31 17:56, Arend van Spriel wrote:
> On 12/31/14 09:20, Fu, Zhonghui wrote:
>> From e34419970a07bfcd365f9c66bdfa552188a0cd26 Mon Sep 17 00:00:00 2001
>> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>> Date: Mon, 29 Dec 2014 21:25:31 +0800
>> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>>
>> WiFi chip has 2 SDIO functions, and PM core will trigger
>> twice suspend/resume operations for one WiFi chip to do
>> the same things. This patch avoid this case.
>
> We have a patch queued up for this as well, but this one looks good enough although I personally prefer container_of() instead of dev_to_sdio_func().
>
> Acked-by: Arend van Spriel <arend@broadcom.com>
>> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
>> ---
>> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 +++++++++++++++++--
>> 1 files changed, 17 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> index 3c06e93..eee7818 100644
>> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
>> @@ -1139,11 +1139,18 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
>> static int brcmf_ops_sdio_suspend(struct device *dev)
>> {
>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>> + struct brcmf_sdio_dev *sdiodev;
>> mmc_pm_flag_t sdio_flags;
>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>
>> brcmf_dbg(SDIO, "Enter\n");
>>
>> + if (func->num == 2) {
>> + return 0;
>> + }
>> +
>> + sdiodev = bus_if->bus_priv.sdio;
>> +
>> atomic_set(&sdiodev->suspend, true);
>>
>> if (sdiodev->wowl_enabled) {
>> @@ -1164,9 +1171,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
>> static int brcmf_ops_sdio_resume(struct device *dev)
>> {
>> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
>> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
>> + struct brcmf_sdio_dev *sdiodev;
>> + struct sdio_func *func = dev_to_sdio_func(dev);
>>
>> brcmf_dbg(SDIO, "Enter\n");
>> +
>> + if (func->num == 2) {
>> + return 0;
>> + }
>> +
>> + sdiodev = bus_if->bus_priv.sdio;
>> +
>> if (sdiodev->pdata->oob_irq_supported)
>> disable_irq_wake(sdiodev->pdata->oob_irq_nr);
>> brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
>> -- 1.7.1
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2014-12-31 8:20 Fu, Zhonghui
2014-12-31 9:56 ` Arend van Spriel
@ 2014-12-31 11:22 ` Sergei Shtylyov
2015-01-05 2:37 ` Fu, Zhonghui
1 sibling, 1 reply; 27+ messages in thread
From: Sergei Shtylyov @ 2014-12-31 11:22 UTC (permalink / raw)
To: Fu, Zhonghui, brudley, Arend van Spriel, Franky Lin, meuleman,
kvalo, linville, pieterpg, hdegoede, wens, linux-wireless,
brcm80211-dev-list, netdev, linux-kernel
Hello.
On 12/31/2014 11:20 AM, Fu, Zhonghui wrote:
> From e34419970a07bfcd365f9c66bdfa552188a0cd26 Mon Sep 17 00:00:00 2001
> From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> Date: Mon, 29 Dec 2014 21:25:31 +0800
> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
> WiFi chip has 2 SDIO functions, and PM core will trigger
> twice suspend/resume operations for one WiFi chip to do
> the same things. This patch avoid this case.
> Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 +++++++++++++++++--
> 1 files changed, 17 insertions(+), 2 deletions(-)
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> index 3c06e93..eee7818 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> @@ -1139,11 +1139,18 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
> static int brcmf_ops_sdio_suspend(struct device *dev)
> {
> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
> + struct brcmf_sdio_dev *sdiodev;
> mmc_pm_flag_t sdio_flags;
> + struct sdio_func *func = dev_to_sdio_func(dev);
>
> brcmf_dbg(SDIO, "Enter\n");
>
> + if (func->num == 2) {
> + return 0;
> + }
{} not needed.
[...]
> @@ -1164,9 +1171,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
> static int brcmf_ops_sdio_resume(struct device *dev)
> {
> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
> + struct brcmf_sdio_dev *sdiodev;
> + struct sdio_func *func = dev_to_sdio_func(dev);
>
> brcmf_dbg(SDIO, "Enter\n");
> +
> + if (func->num == 2) {
> + return 0;
> + }
Same here.
[...]
WBR, Sergei
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
2014-12-31 8:20 Fu, Zhonghui
@ 2014-12-31 9:56 ` Arend van Spriel
2015-01-05 2:34 ` Fu, Zhonghui
2014-12-31 11:22 ` Sergei Shtylyov
1 sibling, 1 reply; 27+ messages in thread
From: Arend van Spriel @ 2014-12-31 9:56 UTC (permalink / raw)
To: Fu, Zhonghui
Cc: brudley, Franky Lin, meuleman, kvalo, linville, pieterpg,
hdegoede, wens, linux-wireless, brcm80211-dev-list, netdev,
linux-kernel
On 12/31/14 09:20, Fu, Zhonghui wrote:
> From e34419970a07bfcd365f9c66bdfa552188a0cd26 Mon Sep 17 00:00:00 2001
> From: Zhonghui Fu<zhonghui.fu@linux.intel.com>
> Date: Mon, 29 Dec 2014 21:25:31 +0800
> Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
>
> WiFi chip has 2 SDIO functions, and PM core will trigger
> twice suspend/resume operations for one WiFi chip to do
> the same things. This patch avoid this case.
We have a patch queued up for this as well, but this one looks good
enough although I personally prefer container_of() instead of
dev_to_sdio_func().
Acked-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Zhonghui Fu<zhonghui.fu@linux.intel.com>
> ---
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 +++++++++++++++++--
> 1 files changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> index 3c06e93..eee7818 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
> @@ -1139,11 +1139,18 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
> static int brcmf_ops_sdio_suspend(struct device *dev)
> {
> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
> + struct brcmf_sdio_dev *sdiodev;
> mmc_pm_flag_t sdio_flags;
> + struct sdio_func *func = dev_to_sdio_func(dev);
>
> brcmf_dbg(SDIO, "Enter\n");
>
> + if (func->num == 2) {
> + return 0;
> + }
> +
> + sdiodev = bus_if->bus_priv.sdio;
> +
> atomic_set(&sdiodev->suspend, true);
>
> if (sdiodev->wowl_enabled) {
> @@ -1164,9 +1171,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
> static int brcmf_ops_sdio_resume(struct device *dev)
> {
> struct brcmf_bus *bus_if = dev_get_drvdata(dev);
> - struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
> + struct brcmf_sdio_dev *sdiodev;
> + struct sdio_func *func = dev_to_sdio_func(dev);
>
> brcmf_dbg(SDIO, "Enter\n");
> +
> + if (func->num == 2) {
> + return 0;
> + }
> +
> + sdiodev = bus_if->bus_priv.sdio;
> +
> if (sdiodev->pdata->oob_irq_supported)
> disable_irq_wake(sdiodev->pdata->oob_irq_nr);
> brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
> -- 1.7.1
>
^ permalink raw reply [flat|nested] 27+ messages in thread
* [PATCH] brcmfmac: avoid duplicated suspend/resume operation
@ 2014-12-31 8:20 Fu, Zhonghui
2014-12-31 9:56 ` Arend van Spriel
2014-12-31 11:22 ` Sergei Shtylyov
0 siblings, 2 replies; 27+ messages in thread
From: Fu, Zhonghui @ 2014-12-31 8:20 UTC (permalink / raw)
To: brudley, Arend van Spriel, Franky Lin, meuleman, kvalo, linville,
pieterpg, hdegoede, wens, linux-wireless, brcm80211-dev-list,
netdev, linux-kernel
>From e34419970a07bfcd365f9c66bdfa552188a0cd26 Mon Sep 17 00:00:00 2001
From: Zhonghui Fu <zhonghui.fu@linux.intel.com>
Date: Mon, 29 Dec 2014 21:25:31 +0800
Subject: [PATCH] brcmfmac: avoid duplicated suspend/resume operation
WiFi chip has 2 SDIO functions, and PM core will trigger
twice suspend/resume operations for one WiFi chip to do
the same things. This patch avoid this case.
Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 3c06e93..eee7818 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -1139,11 +1139,18 @@ void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
static int brcmf_ops_sdio_suspend(struct device *dev)
{
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
+ struct brcmf_sdio_dev *sdiodev;
mmc_pm_flag_t sdio_flags;
+ struct sdio_func *func = dev_to_sdio_func(dev);
brcmf_dbg(SDIO, "Enter\n");
+ if (func->num == 2) {
+ return 0;
+ }
+
+ sdiodev = bus_if->bus_priv.sdio;
+
atomic_set(&sdiodev->suspend, true);
if (sdiodev->wowl_enabled) {
@@ -1164,9 +1171,17 @@ static int brcmf_ops_sdio_suspend(struct device *dev)
static int brcmf_ops_sdio_resume(struct device *dev)
{
struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_sdio_dev *sdiodev = bus_if->bus_priv.sdio;
+ struct brcmf_sdio_dev *sdiodev;
+ struct sdio_func *func = dev_to_sdio_func(dev);
brcmf_dbg(SDIO, "Enter\n");
+
+ if (func->num == 2) {
+ return 0;
+ }
+
+ sdiodev = bus_if->bus_priv.sdio;
+
if (sdiodev->pdata->oob_irq_supported)
disable_irq_wake(sdiodev->pdata->oob_irq_nr);
brcmf_sdio_wd_timer(sdiodev->bus, BRCMF_WD_POLL_MS);
-- 1.7.1
^ permalink raw reply related [flat|nested] 27+ messages in thread
end of thread, other threads:[~2015-02-09 4:49 UTC | newest]
Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 2:46 [PATCH] brcmfmac: avoid duplicated suspend/resume operation Fu, Zhonghui
2015-02-03 13:08 ` Kalle Valo
2015-02-05 11:56 ` Fu, Zhonghui
2015-02-05 11:34 ` Fu, Zhonghui
2015-02-05 11:46 ` Arend van Spriel
2015-02-09 4:49 ` Fu, Zhonghui
-- strict thread matches above, loose matches on Subject: below --
2015-01-20 3:31 Fu, Zhonghui
2015-01-22 13:49 ` Kalle Valo
2015-01-22 13:54 ` Sergei Shtylyov
2015-01-22 20:58 ` Arend van Spriel
2015-01-23 15:29 ` Kalle Valo
2015-01-23 18:09 ` Arend van Spriel
2015-01-27 5:35 ` Fu, Zhonghui
2015-02-02 1:58 ` Fu, Zhonghui
2015-01-12 6:41 Fu, Zhonghui
2015-01-12 10:00 ` Arend van Spriel
2015-01-15 12:52 ` Kalle Valo
2015-01-20 3:34 ` Fu, Zhonghui
2015-01-12 14:06 ` Sergei Shtylyov
2015-01-12 16:24 ` Arend van Spriel
2014-12-31 8:20 Fu, Zhonghui
2014-12-31 9:56 ` Arend van Spriel
2015-01-05 2:34 ` Fu, Zhonghui
2015-01-05 10:48 ` Arend van Spriel
2015-01-12 6:43 ` Fu, Zhonghui
2014-12-31 11:22 ` Sergei Shtylyov
2015-01-05 2:37 ` Fu, Zhonghui
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).