All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libertas: call into generic suspend code before turning off power
@ 2018-10-08 20:03 ` Daniel Mack
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Mack @ 2018-10-08 20:03 UTC (permalink / raw)
  To: ulf.hansson; +Cc: chris, linux-mmc, libertas-dev, linux-wireless, Daniel Mack

When powering down a SDIO connected card during suspend, make sure to call
into the generic lbs_suspend() function before pulling the plug. This will
make sure the card is successfully deregistered from the system to avoid
communication to the card starving out.

Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")
Signed-off-by: Daniel Mack <daniel@zonque.org>
---
If possible, this should go in for 4.19.

 drivers/net/wireless/marvell/libertas/if_sdio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c
index 43743c26c071..39bf85d0ade0 100644
--- a/drivers/net/wireless/marvell/libertas/if_sdio.c
+++ b/drivers/net/wireless/marvell/libertas/if_sdio.c
@@ -1317,6 +1317,10 @@ static int if_sdio_suspend(struct device *dev)
 	if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
 		dev_info(dev, "Suspend without wake params -- powering down card\n");
 		if (priv->fw_ready) {
+			ret = lbs_suspend(priv);
+			if (ret)
+				return ret;
+
 			priv->power_up_on_resume = true;
 			if_sdio_power_off(card);
 		}
-- 
2.17.1


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

* [PATCH] libertas: call into generic suspend code before turning off power
@ 2018-10-08 20:03 ` Daniel Mack
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Mack @ 2018-10-08 20:03 UTC (permalink / raw)
  To: ulf.hansson-QSEj5FYQhm4dnm+yROfE0A
  Cc: chris-OsFVWbfNK3isTnJN9+BGXg, linux-mmc-u79uwXL29TY76Z2rM5mHXA,
	libertas-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA, Daniel Mack

When powering down a SDIO connected card during suspend, make sure to call
into the generic lbs_suspend() function before pulling the plug. This will
make sure the card is successfully deregistered from the system to avoid
communication to the card starving out.

Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")
Signed-off-by: Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>
---
If possible, this should go in for 4.19.

 drivers/net/wireless/marvell/libertas/if_sdio.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c
index 43743c26c071..39bf85d0ade0 100644
--- a/drivers/net/wireless/marvell/libertas/if_sdio.c
+++ b/drivers/net/wireless/marvell/libertas/if_sdio.c
@@ -1317,6 +1317,10 @@ static int if_sdio_suspend(struct device *dev)
 	if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
 		dev_info(dev, "Suspend without wake params -- powering down card\n");
 		if (priv->fw_ready) {
+			ret = lbs_suspend(priv);
+			if (ret)
+				return ret;
+
 			priv->power_up_on_resume = true;
 			if_sdio_power_off(card);
 		}
-- 
2.17.1

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

* Re: [PATCH] libertas: call into generic suspend code before turning off power
@ 2018-10-09  7:43   ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2018-10-09  7:43 UTC (permalink / raw)
  To: Daniel Mack; +Cc: Chris Ball, linux-mmc, libertas-dev, linux-wireless

On 8 October 2018 at 22:03, Daniel Mack <daniel@zonque.org> wrote:
> When powering down a SDIO connected card during suspend, make sure to call
> into the generic lbs_suspend() function before pulling the plug. This will
> make sure the card is successfully deregistered from the system to avoid
> communication to the card starving out.
>
> Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")
> Signed-off-by: Daniel Mack <daniel@zonque.org>

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

BTW, if you need this to reach 4.19 I have already queued some other
mmc fixes so I can take this as well, if it helps. I need and ack of
course.

Kind regards
Uffe

> ---
> If possible, this should go in for 4.19.
>
>  drivers/net/wireless/marvell/libertas/if_sdio.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c
> index 43743c26c071..39bf85d0ade0 100644
> --- a/drivers/net/wireless/marvell/libertas/if_sdio.c
> +++ b/drivers/net/wireless/marvell/libertas/if_sdio.c
> @@ -1317,6 +1317,10 @@ static int if_sdio_suspend(struct device *dev)
>         if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
>                 dev_info(dev, "Suspend without wake params -- powering down card\n");
>                 if (priv->fw_ready) {
> +                       ret = lbs_suspend(priv);
> +                       if (ret)
> +                               return ret;
> +
>                         priv->power_up_on_resume = true;
>                         if_sdio_power_off(card);
>                 }
> --
> 2.17.1
>

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

* Re: [PATCH] libertas: call into generic suspend code before turning off power
@ 2018-10-09  7:43   ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2018-10-09  7:43 UTC (permalink / raw)
  To: Daniel Mack
  Cc: Chris Ball, linux-mmc-u79uwXL29TY76Z2rM5mHXA,
	libertas-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

On 8 October 2018 at 22:03, Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org> wrote:
> When powering down a SDIO connected card during suspend, make sure to call
> into the generic lbs_suspend() function before pulling the plug. This will
> make sure the card is successfully deregistered from the system to avoid
> communication to the card starving out.
>
> Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")
> Signed-off-by: Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>

Reviewed-by: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

BTW, if you need this to reach 4.19 I have already queued some other
mmc fixes so I can take this as well, if it helps. I need and ack of
course.

Kind regards
Uffe

> ---
> If possible, this should go in for 4.19.
>
>  drivers/net/wireless/marvell/libertas/if_sdio.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/wireless/marvell/libertas/if_sdio.c b/drivers/net/wireless/marvell/libertas/if_sdio.c
> index 43743c26c071..39bf85d0ade0 100644
> --- a/drivers/net/wireless/marvell/libertas/if_sdio.c
> +++ b/drivers/net/wireless/marvell/libertas/if_sdio.c
> @@ -1317,6 +1317,10 @@ static int if_sdio_suspend(struct device *dev)
>         if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
>                 dev_info(dev, "Suspend without wake params -- powering down card\n");
>                 if (priv->fw_ready) {
> +                       ret = lbs_suspend(priv);
> +                       if (ret)
> +                               return ret;
> +
>                         priv->power_up_on_resume = true;
>                         if_sdio_power_off(card);
>                 }
> --
> 2.17.1
>

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

* Re: [PATCH] libertas: call into generic suspend code before turning off power
@ 2018-10-09 13:36     ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2018-10-09 13:36 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Daniel Mack, Chris Ball, linux-mmc, libertas-dev, linux-wireless

Ulf Hansson <ulf.hansson@linaro.org> writes:

> On 8 October 2018 at 22:03, Daniel Mack <daniel@zonque.org> wrote:
>> When powering down a SDIO connected card during suspend, make sure to call
>> into the generic lbs_suspend() function before pulling the plug. This will
>> make sure the card is successfully deregistered from the system to avoid
>> communication to the card starving out.
>>
>> Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")
>> Signed-off-by: Daniel Mack <daniel@zonque.org>
>
> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
>
> BTW, if you need this to reach 4.19 I have already queued some other
> mmc fixes so I can take this as well, if it helps. I need and ack of
> course.

I'm not planning to send anything to 4.19 anymore and this is so simple
that hopefully it cause any conflicts with -next patches, so feel free
to do that:

Acked-by: Kalle Valo <kvalo@codeaurora.org>

-- 
Kalle Valo

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

* Re: [PATCH] libertas: call into generic suspend code before turning off power
@ 2018-10-09 13:36     ` Kalle Valo
  0 siblings, 0 replies; 8+ messages in thread
From: Kalle Valo @ 2018-10-09 13:36 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Daniel Mack, Chris Ball, linux-mmc@vger.kernel.org,
	libertas-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> writes:

> On 8 October 2018 at 22:03, Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org> wrote:
>> When powering down a SDIO connected card during suspend, make sure to call
>> into the generic lbs_suspend() function before pulling the plug. This will
>> make sure the card is successfully deregistered from the system to avoid
>> communication to the card starving out.
>>
>> Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")
>> Signed-off-by: Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>
>
> Reviewed-by: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>
> BTW, if you need this to reach 4.19 I have already queued some other
> mmc fixes so I can take this as well, if it helps. I need and ack of
> course.

I'm not planning to send anything to 4.19 anymore and this is so simple
that hopefully it cause any conflicts with -next patches, so feel free
to do that:

Acked-by: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

-- 
Kalle Valo

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

* Re: [PATCH] libertas: call into generic suspend code before turning off power
@ 2018-10-10 12:04       ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2018-10-10 12:04 UTC (permalink / raw)
  To: Kalle Valo, Daniel Mack
  Cc: Chris Ball, linux-mmc, libertas-dev, linux-wireless

On 9 October 2018 at 15:36, Kalle Valo <kvalo@codeaurora.org> wrote:
> Ulf Hansson <ulf.hansson@linaro.org> writes:
>
>> On 8 October 2018 at 22:03, Daniel Mack <daniel@zonque.org> wrote:
>>> When powering down a SDIO connected card during suspend, make sure to call
>>> into the generic lbs_suspend() function before pulling the plug. This will
>>> make sure the card is successfully deregistered from the system to avoid
>>> communication to the card starving out.
>>>
>>> Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")
>>> Signed-off-by: Daniel Mack <daniel@zonque.org>
>>
>> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
>>
>> BTW, if you need this to reach 4.19 I have already queued some other
>> mmc fixes so I can take this as well, if it helps. I need and ack of
>> course.
>
> I'm not planning to send anything to 4.19 anymore and this is so simple
> that hopefully it cause any conflicts with -next patches, so feel free
> to do that:
>
> Acked-by: Kalle Valo <kvalo@codeaurora.org>

Applied for fixes, thanks!

Kind regards
Uffe

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

* Re: [PATCH] libertas: call into generic suspend code before turning off power
@ 2018-10-10 12:04       ` Ulf Hansson
  0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2018-10-10 12:04 UTC (permalink / raw)
  To: Kalle Valo, Daniel Mack
  Cc: Chris Ball, linux-mmc-u79uwXL29TY76Z2rM5mHXA,
	libertas-dev-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA

On 9 October 2018 at 15:36, Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> wrote:
> Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> writes:
>
>> On 8 October 2018 at 22:03, Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org> wrote:
>>> When powering down a SDIO connected card during suspend, make sure to call
>>> into the generic lbs_suspend() function before pulling the plug. This will
>>> make sure the card is successfully deregistered from the system to avoid
>>> communication to the card starving out.
>>>
>>> Fixes: 7444a8092906 ("libertas: fix suspend and resume for SDIO connected cards")
>>> Signed-off-by: Daniel Mack <daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org>
>>
>> Reviewed-by: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>>
>> BTW, if you need this to reach 4.19 I have already queued some other
>> mmc fixes so I can take this as well, if it helps. I need and ack of
>> course.
>
> I'm not planning to send anything to 4.19 anymore and this is so simple
> that hopefully it cause any conflicts with -next patches, so feel free
> to do that:
>
> Acked-by: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

Applied for fixes, thanks!

Kind regards
Uffe

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

end of thread, other threads:[~2018-10-10 12:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 20:03 [PATCH] libertas: call into generic suspend code before turning off power Daniel Mack
2018-10-08 20:03 ` Daniel Mack
2018-10-09  7:43 ` Ulf Hansson
2018-10-09  7:43   ` Ulf Hansson
2018-10-09 13:36   ` Kalle Valo
2018-10-09 13:36     ` Kalle Valo
2018-10-10 12:04     ` Ulf Hansson
2018-10-10 12:04       ` Ulf Hansson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.