linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gertjan van Wingerde <gwingerde@gmail.com>
To: Jakub Kicinski <kubakici@wp.pl>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	users@rt2x00.serialmonkey.com
Subject: Re: [rt2x00-users] [PATCH v2 4/4] rt2800pci: Fix 'Error - MCU request failed' during initialization
Date: Tue, 14 Feb 2012 11:50:36 +0100	[thread overview]
Message-ID: <CAL1gcdORGntSRzAzagTPHi8d6ZhvHCRvo2PN4JV36TEMVhBjbw@mail.gmail.com> (raw)
In-Reply-To: <1329108519-5342-5-git-send-email-kubakici@wp.pl>

On Mon, Feb 13, 2012 at 5:48 AM, Jakub Kicinski <kubakici@wp.pl> wrote:
> Bring MCU operations during device initialization to sync
> with legacy driver.
>
> This should fix following error:
> phy0 -> rt2800pci_mcu_status: Error - MCU request failed,
> no response from hardware
>
> Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
> Acked-by: Ivo van Doorn <IvDoorn@gmail.com>

Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>

provided that my comments to patches 1 & 2 are handled.

> ---
>  drivers/net/wireless/rt2x00/rt2800pci.c |   20 +++++++++++++-------
>  1 files changed, 13 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
> index f184a4f..773d078 100644
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -524,14 +524,20 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev,
>
>        switch (state) {
>        case STATE_RADIO_ON:
> -               /*
> -                * Before the radio can be enabled, the device first has
> -                * to be woken up. After that it needs a bit of time
> -                * to be fully awake and then the radio can be enabled.
> -                */
> -               rt2800pci_set_device_state(rt2x00dev, STATE_AWAKE);
> -               msleep(1);
> +               /* Initialise all registers and send MCU_BOOT_SIGNAL. */
>                retval = rt2800pci_enable_radio(rt2x00dev);
> +
> +               /* After resume MCU_BOOT_SIGNAL will trash these. */
> +               rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0);
> +               rt2x00pci_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0);
> +
> +               /* Finish initialization procedure. */
> +               rt2800_mcu_request(rt2x00dev, MCU_SLEEP, TOKEN_RADIO_OFF,
> +                                  0xff, 0x02);
> +               rt2800pci_mcu_status(rt2x00dev, TOKEN_RADIO_OFF);
> +
> +               rt2800_mcu_request(rt2x00dev, MCU_WAKEUP, TOKEN_WAKEUP, 0, 0);
> +               rt2800pci_mcu_status(rt2x00dev, TOKEN_WAKEUP);
>                break;
>        case STATE_RADIO_OFF:
>                /*
> --
> 1.7.7.6
>
>
> _______________________________________________
> users mailing list
> users@rt2x00.serialmonkey.com
> http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com



-- 
---
Gertjan

      reply	other threads:[~2012-02-14 10:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13  4:48 [PATCH v2 0/4] rt2x00: Update MCU operations during device initialization Jakub Kicinski
2012-02-13  4:48 ` [PATCH v2 1/4] rt2800pci: remove rt2800pci_set_state function Jakub Kicinski
2012-02-14 10:47   ` [rt2x00-users] " Gertjan van Wingerde
2012-02-14 17:05     ` Jakub Kicinski
2012-02-15 15:42       ` Gertjan van Wingerde
2012-02-15 19:10         ` Jakub Kicinski
2012-02-13  4:48 ` [PATCH v2 2/4] rt2800usb: remove rt2800usb_set_state function Jakub Kicinski
2012-02-14 10:48   ` [rt2x00-users] " Gertjan van Wingerde
2012-02-13  4:48 ` [PATCH v2 3/4] rt2800: Add documentation on MCU requests Jakub Kicinski
2012-02-14 10:50   ` [rt2x00-users] " Gertjan van Wingerde
2012-02-13  4:48 ` [PATCH v2 4/4] rt2800pci: Fix 'Error - MCU request failed' during initialization Jakub Kicinski
2012-02-14 10:50   ` Gertjan van Wingerde [this message]

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=CAL1gcdORGntSRzAzagTPHi8d6ZhvHCRvo2PN4JV36TEMVhBjbw@mail.gmail.com \
    --to=gwingerde@gmail.com \
    --cc=kubakici@wp.pl \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=users@rt2x00.serialmonkey.com \
    /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 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).