All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: dsadsa sadsad <natserver2@gmail.com>, linux-wireless@vger.kernel.org
Subject: Re: alfa awus036nhr v2 and module rtl8xxxu
Date: Thu, 03 Mar 2016 16:54:43 -0500	[thread overview]
Message-ID: <wrfjbn6v5isc.fsf@redhat.com> (raw)
In-Reply-To: <56D4B956.8030408@lwfinger.net> (Larry Finger's message of "Mon, 29 Feb 2016 15:34:14 -0600")

Larry Finger <Larry.Finger@lwfinger.net> writes:
> On 02/29/2016 06:28 AM, Jes Sorensen wrote:
>> That one I have never seen before - could you try and insert some debug
>> prints to see where the RF initialization fails?
>
> The call to usb_control_msg() is returning -EPROTO (-71), but
> sometimes the system works. I added the following patch:
>
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
> b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
> index 38aa3c2..8ab77a0 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c
> @@ -1979,9 +1979,12 @@ static int rtl8xxxu_write_rfreg(struct rtl8xxxu_priv *priv,
>
>         /* Use XB for path B */
>         ret = rtl8xxxu_write32(priv, rtl8xxxu_rfregs[path].lssiparm, dataaddr);
> -       if (ret != sizeof(dataaddr))
> +       if (ret != sizeof(dataaddr)) {
> +               pr_info("**** rtl8xxxu_write32() error %d: path %d,
> reg: 0x%x, data 0x%x, dataaddr 0x%x, lssiparm 0x%x\n",
> +                       ret, path, reg, data, dataaddr,
> rtl8xxxu_rfregs[path].lssiparm);
> +               dump_stack();
>                 retval = -EIO;
> -       else
> +       } else
>                 retval = 0;
>
>         udelay(1);
>
> When the error happens, my log contains

Odd, I wonder if my code writes the reigsters out to the device too
fast. You could try adding a call to read back the RF register before
exiting the function - preferably after the udelay().

Cheers,
Jes

      reply	other threads:[~2016-03-03 21:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 23:36 alfa awus036nhr v2 and module rtl8xxxu Drunk Cat
2016-02-04 16:45 ` Jes Sorensen
2016-02-04 17:39   ` Larry Finger
2016-02-04 17:41     ` Jes Sorensen
2016-02-05 16:43       ` Larry Finger
2016-02-09 20:59       ` Jes Sorensen
2016-02-09 21:00       ` Jes Sorensen
2016-02-10  1:11         ` Larry Finger
2016-02-10  2:00           ` Jes Sorensen
     [not found]             ` <CAOhKHAXH-PCyWQSpuuZ=-6BnE0PeDks-4p9A3G_86OHLfEdU=w@mail.gmail.com>
2016-02-10 15:49               ` Larry Finger
2016-02-28 23:01                 ` Jes Sorensen
2016-02-29  6:57                   ` Larry Finger
2016-02-29 12:28                     ` Jes Sorensen
2016-02-29 21:34                       ` Larry Finger
2016-03-03 21:54                         ` Jes Sorensen [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=wrfjbn6v5isc.fsf@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=natserver2@gmail.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 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.