All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@mail.ru>
To: David Kilroy <kilroyd@googlemail.com>
Cc: linux-wireless@vger.kernel.org,
	orinoco-devel@lists.sourceforge.net,
	linux-pm@lists.linux-foundation.org
Subject: Re: [RFC PATCH 1/2] orinoco: Use PM notifier to cache firmware for use during resume
Date: Fri, 31 Oct 2008 20:36:59 +0300	[thread overview]
Message-ID: <200810312037.00936.arvidjaar@mail.ru> (raw)
In-Reply-To: <1225415743-28209-2-git-send-email-kilroyd@googlemail.com>

[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]

On Friday 31 October 2008, David Kilroy wrote:
> When preparing for either suspend or hibernation, load the necessary
> firmware from userspace.
> 
> Upon error or resume, release the firmware.
> 
> Works for both Agere and Symbol firmware.
> 
> Signed-off by: David Kilroy <kilroyd@gmail.com>

This is on top of my old patch; was it ever accepted anywhere? I guess
it should be rediffed against clean tree.

> @@ -621,7 +620,7 @@ symbol_dl_image(struct orinoco_private *priv, const struct fw_info *fw,
>  	ret = hermes_init(hw);
>  
>  	/* hermes_reset() should return 0 with the secondary firmware */
> -	if (secondary && ret != 0)
> +	if (secondary && (ret != 0))

Extra parenthesis are redundant, are not they?

>  /********************************************************************/
> +/* Power management                                                 */
> +/********************************************************************/
> +
> +static int orinoco_pm_notifier(struct notifier_block *notifier,
> +			       unsigned long pm_event,
> +			       void *unused)

It probably should be conditional on CONFIG_PM somehow? 

> diff --git a/drivers/net/wireless/orinoco.h b/drivers/net/wireless/orinoco.h
> index 8c29538..5a9685a 100644
> --- a/drivers/net/wireless/orinoco.h
> +++ b/drivers/net/wireless/orinoco.h
> @@ -10,6 +10,7 @@
>  #define DRIVER_VERSION "0.15"
>  
>  #include <linux/interrupt.h>
> +#include <linux/suspend.h>
>  #include <linux/netdevice.h>
>  #include <linux/wireless.h>
>  #include <net/iw_handler.h>
> @@ -167,8 +168,11 @@ struct orinoco_private {
>  	unsigned int tkip_cm_active:1;
>  	unsigned int key_mgmt:3;
>  
> -	/* Cached in memory firmware to use in ->resume */
> -	const struct firmware *cached_fw;
> +	/* Cached in memory firmware to use during ->resume. */
> +	const struct firmware *cached_pri_fw;
> +	const struct firmware *cached_sta_fw;

I think name is badly chosen. It could be both STA and AP firmware;
I know that AP is not implemented currently, but it does not mean
it will never be and firmware is there if required.

I will test it once I sort out issue with booting 2.6.28. Right now
it stopped booting completely.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  parent reply	other threads:[~2008-10-31 17:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-31  1:15 [RFC PATCH 0/2] orinoco: Don't keep cached firmware around permanently David Kilroy
2008-10-31  1:15 ` [RFC PATCH 1/2] orinoco: Use PM notifier to cache firmware for use during resume David Kilroy
2008-10-31  1:15   ` [RFC PATCH 2/2] orinoco: Resume spectrum_cs in the same way as orinoco_cs David Kilroy
2008-10-31  1:15   ` David Kilroy
2008-10-31 17:36   ` [RFC PATCH 1/2] orinoco: Use PM notifier to cache firmware for use during resume Andrey Borzenkov
2008-10-31 17:36   ` Andrey Borzenkov [this message]
2008-10-31 21:27     ` [linux-pm] " Rafael J. Wysocki
2008-10-31 21:27     ` Rafael J. Wysocki
2008-10-31  1:15 ` David Kilroy
2008-11-02 10:35 ` [RFC PATCH 0/2] orinoco: Don't keep cached firmware around permanently Andrey Borzenkov
2008-11-02 10:35 ` Andrey Borzenkov
2008-11-02 12:29   ` Dave
2008-11-02 12:29   ` Dave

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200810312037.00936.arvidjaar@mail.ru \
    --to=arvidjaar@mail.ru \
    --cc=kilroyd@googlemail.com \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=orinoco-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.