linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ming Lei <tom.leiming@gmail.com>
To: Sujith <Sujith.Manoharan@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 7/9] ath9k_htc: Use USB reboot
Date: Thu, 22 Apr 2010 22:21:06 +0800	[thread overview]
Message-ID: <j2nd82e647a1004220721n4668229l51c6e27a21ec9f8c@mail.gmail.com> (raw)
In-Reply-To: <19407.50660.739033.942199@gargle.gargle.HOWL>

2010/4/22 Sujith <Sujith.Manoharan@atheros.com>:
> So, apparently there is a USB reboot command
> that the target accepts. Using this instead of
> usb_reset_device() fixes the issue of "descriptor read error"
> that pops up on repeated load/unload.
>
> Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
> ---
>  drivers/net/wireless/ath/ath9k/hif_usb.c |   13 ++++++++++++-
>  1 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
> index cee5feb..ce13e08 100644
> --- a/drivers/net/wireless/ath/ath9k/hif_usb.c
> +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
> @@ -889,6 +889,17 @@ err_alloc:
>        return ret;
>  }
>
> +static void ath9k_hif_usb_reboot(struct usb_device *udev)
> +{
> +       u32 cmd = 0xffffffff;
> +       int ret;
> +
> +       ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, USB_REG_OUT_PIPE),
> +                          &cmd, sizeof(cmd), NULL, HZ);

The buffer passed to usb hcd should not be allocated from stack since
it will be DMAed to usb host controller. The 'cmd' should be allocated by
kmalloc even though it is only 4byte.


-- 
Lei Ming

  reply	other threads:[~2010-04-22 14:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22  3:43 [PATCH 7/9] ath9k_htc: Use USB reboot Sujith
2010-04-22 14:21 ` Ming Lei [this message]
2010-04-23  4:53   ` Sujith

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=j2nd82e647a1004220721n4668229l51c6e27a21ec9f8c@mail.gmail.com \
    --to=tom.leiming@gmail.com \
    --cc=Sujith.Manoharan@atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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).