From: Christian Lamparter <chunkeey@googlemail.com>
To: Ronald Wahl <ronald.wahl@raritan.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] carl9170: fix sending URBs with wrong type when using full-speed
Date: Thu, 07 Aug 2014 15:04:33 +0200 [thread overview]
Message-ID: <7450698.ipAbWqfnUT@blech> (raw)
In-Reply-To: <53E36624.9060905@raritan.com>
On Thursday, August 07, 2014 01:42:28 PM Ronald Wahl wrote:
> On 07.08.2014 12:51, Christian Lamparter wrote:
> > my comments:
> > - Patch needs a "signed-off-by: <Your Name> <Your Mail> tag"
> > (see Section 12 - Sign your work [0]) for details.
> >
> > - Do you see any improvement on a fullspeed port now?
> > (If so, this should be a stable- patch)
>
> Yes, it actually works now. Before this change you could crash the
> system because of the constant logging of the warnings it was almost
> dead. My embedded device just rebooted after a while (maybe the
> watchdog triggered).
Ok, this is important then ;).
> >> @@ -1050,6 +1056,21 @@ static int carl9170_usb_probe(struct usb_interface *intf,
> >> ar->intf = intf;
> >> ar->features = id->driver_info;
> >>
> >> + /* We need to remember the type of endpoint 4 because it differs
> >> + * between high- and full-speed configuration. The high-speed
> >> + * configuration specifies it as interrupt and the full-speed
> >> + * configuration as bulk endpoint. This information is required
> >> + * later when sending urbs to that endpoint.
> >> + */
> >> + for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; ++i) {
> >> + ep = &intf->cur_altsetting->endpoint[i].desc;
> >> +
> >> + if (usb_endpoint_dir_out(ep) &&
> >> + usb_endpoint_num(ep) == AR9170_USB_EP_CMD)
> >> + ar->usb_ep_cmd_is_bulk =
> >> + usb_endpoint_type(ep) == USB_ENDPOINT_XFER_BULK;
> > What about this:
> >
> > if (usb_endpoint_num(ep) == AR9170_USB_EP_CMD &&
> > usb_endpoint_is_bulk_out(ep))
> > ar->usb_ep_cmd_is_bulk = true;
> > (the driver context "ar" is zero'd out - It is not necessary to set
> > usb_ep_cmd_is_bulk to false.)
>
> This is what my first patch has done but we need to check the endpoint
> type if its bulk or not. Otherwise it will fail in the high-speed case.
> Or did you mean:
>
> if (usb_endpoint_num(ep) == AR9170_USB_EP_CMD &&
> usb_endpoint_is_bulk_out(ep) &&
> usb_endpoint_type(ep) == USB_ENDPOINT_XFER_BULK)
> ar->usb_ep_cmd_is_bulk = true;
usb_endpoint_is_bulk_out [0] "checks if the endpoint is bulk OUT".
This function should perform both checks (ie.: is bulk? is out?).
> > BTW: I'll make a patch to carl9170 firmware too.
>
> great!
>
> I will fix the remaining things you mentioned.
great!
Regards
Christian
[0] http://lxr.free-electrons.com/source/include/uapi/linux/usb/ch9.h#L539
next prev parent reply other threads:[~2014-08-07 13:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 9:24 [PATCH] carl9170: fix sending URBs with wrong type when using full-speed Ronald Wahl
2014-08-07 9:33 ` Ronald Wahl
2014-08-07 10:09 ` Ronald Wahl
2014-08-07 10:51 ` Christian Lamparter
2014-08-07 11:42 ` Ronald Wahl
2014-08-07 13:04 ` Christian Lamparter [this message]
2014-08-07 13:15 ` Ronald Wahl
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=7450698.ipAbWqfnUT@blech \
--to=chunkeey@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=ronald.wahl@raritan.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).