All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Chadd <adrian@freebsd.org>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] ath9k_htc: reboot firmware if it was loaded
Date: Wed, 10 Jul 2013 12:27:33 -0700	[thread overview]
Message-ID: <CAJ-Vmo=XPbOxmp=Kz-2Bp289YYFSrPuOb7u0FE1cxUmN-TpSrQ@mail.gmail.com> (raw)
In-Reply-To: <1373438404-5871-2-git-send-email-linux@rempel-privat.de>

Great catch!


-adrian

On 9 July 2013 23:40, Oleksij Rempel <linux@rempel-privat.de> wrote:
> Currently ath9k_htc will reboot firmware only if interface was
> ever started. Which lead to the problem in case where interface
> was never started but module need to be reloaded.
>
> This patch will partially fix bug "ath9k_htc: Target is unresponsive"
> https://github.com/qca/open-ath9k-htc-firmware/issues/1
>
> Reproduction case:
> - plug adapter
> - make sure nothing will touch it. Stop Networkmanager or blacklist mac address of this adapter.
> - rmmod ath9k_htc; sleep 1; modprobe ath9k_htc
>
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> ---
>  drivers/net/wireless/ath/ath9k/hif_usb.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index 2469db5..5205a36 100644
> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> @@ -1295,7 +1295,9 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
>
>         usb_set_intfdata(interface, NULL);
>
> -       if (!unplugged && (hif_dev->flags & HIF_USB_START))
> +       /* If firmware was loaded we should drop it
> +        * go back to first stage bootloader. */
> +       if (!unplugged && (hif_dev->flags & HIF_USB_READY))
>                 ath9k_hif_usb_reboot(udev);
>
>         kfree(hif_dev);
> --
> 1.8.1.2
>
> --
> 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

WARNING: multiple messages have this Message-ID (diff)
From: Adrian Chadd <adrian@freebsd.org>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 2/2] ath9k_htc: reboot firmware if it was loaded
Date: Wed, 10 Jul 2013 12:27:33 -0700	[thread overview]
Message-ID: <CAJ-Vmo=XPbOxmp=Kz-2Bp289YYFSrPuOb7u0FE1cxUmN-TpSrQ@mail.gmail.com> (raw)
In-Reply-To: <1373438404-5871-2-git-send-email-linux@rempel-privat.de>

Great catch!


-adrian

On 9 July 2013 23:40, Oleksij Rempel <linux@rempel-privat.de> wrote:
> Currently ath9k_htc will reboot firmware only if interface was
> ever started. Which lead to the problem in case where interface
> was never started but module need to be reloaded.
>
> This patch will partially fix bug "ath9k_htc: Target is unresponsive"
> https://github.com/qca/open-ath9k-htc-firmware/issues/1
>
> Reproduction case:
> - plug adapter
> - make sure nothing will touch it. Stop Networkmanager or blacklist mac address of this adapter.
> - rmmod ath9k_htc; sleep 1; modprobe ath9k_htc
>
> Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
> ---
>  drivers/net/wireless/ath/ath9k/hif_usb.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index 2469db5..5205a36 100644
> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> @@ -1295,7 +1295,9 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
>
>         usb_set_intfdata(interface, NULL);
>
> -       if (!unplugged && (hif_dev->flags & HIF_USB_START))
> +       /* If firmware was loaded we should drop it
> +        * go back to first stage bootloader. */
> +       if (!unplugged && (hif_dev->flags & HIF_USB_READY))
>                 ath9k_hif_usb_reboot(udev);
>
>         kfree(hif_dev);
> --
> 1.8.1.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-07-10 19:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10  6:40 [PATCH 1/2] ath9k_htc: do some initial hardware configuration Oleksij Rempel
2013-07-10  6:40 ` [ath9k-devel] " Oleksij Rempel
2013-07-10  6:40 ` [PATCH 2/2] ath9k_htc: reboot firmware if it was loaded Oleksij Rempel
2013-07-10  6:40   ` [ath9k-devel] " Oleksij Rempel
2013-07-10 19:27   ` Adrian Chadd [this message]
2013-07-10 19:27     ` Adrian Chadd
2013-07-19 18:16 [PATCH 0/2] ath9k_htc fixes, resend Oleksij Rempel
2013-07-19 18:16 ` [PATCH 2/2] ath9k_htc: reboot firmware if it was loaded Oleksij Rempel

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='CAJ-Vmo=XPbOxmp=Kz-2Bp289YYFSrPuOb7u0FE1cxUmN-TpSrQ@mail.gmail.com' \
    --to=adrian@freebsd.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    /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.