From: "Tanya Brokhman" <tlinder@codeaurora.org>
To: balbi@ti.com
Cc: greg@kroah.com, linux-usb@vger.kernel.org,
linux-arm-msm@vger.kernel.org, ablay@codeaurora.org,
'open list' <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v9 4/7] usb:gadget: Add SuperSpeed support to the Gadget Framework
Date: Wed, 11 May 2011 16:00:24 +0300 [thread overview]
Message-ID: <000901cc0fdb$66ec7a10$34c56e30$@org> (raw)
In-Reply-To: <20110509091904.GE1254@legolas.emea.dhcp.ti.com>
> > @@ -157,7 +167,31 @@ ep_found:
> > /* commit results */
> > _ep->maxpacket = le16_to_cpu(chosen_desc->wMaxPacketSize);
> > _ep->desc = chosen_desc;
> > -
> > + _ep->comp_desc = NULL;
> > + _ep->maxburst = 0;
> > + _ep->mult = 0;
> > + if (want_comp_desc) {
> > + /*
> > + * Companion descriptor should follow EP descriptor
> > + * USB 3.0 spec, #9.6.7
> > + */
> > + comp_desc = (struct usb_ss_ep_comp_descriptor *)*(++d_spd);
> > + if (!comp_desc ||
> > + (comp_desc->bDescriptorType !=
> USB_DT_SS_ENDPOINT_COMP))
> > + return -EIO;
> > + _ep->comp_desc = comp_desc;
> > + if (g->speed == USB_SPEED_SUPER) {
> > + int xfer_type = _ep->bEndpointAddress &
> > + USB_ENDPOINT_XFERTYPE_MASK ;
>
> how about something liks:
>
> switch (usb_endpoint_type(_ep->desc) {
> case USB_ENDPOINT_XFER_BULK:
> case USB_ENDPOINT_XFER_INT:
> _ep->maxburst = comp_desc->bMaxBurst;
> break;
> case USB_ENDPOINT_XFER_ISOC:
> _ep->mult = comp_desc->bmAttributes & 0x03;
> break;
> default:
> /* nothing to do for control endpoints */
> break;
> }
>
> --
> balbi
You're right. Your way is nicer. Will do.
Are you finished with reviewing the patches or should I wait with another
version?
Best regards,
Tanya Brokhman
Consultant for Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
next prev parent reply other threads:[~2011-05-11 13:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-08 11:16 [PATCH v9 0/7] usb gadget: Add SuperSpeed support to the Gadget Framework Tatyana Brokhman
2011-05-08 11:16 ` [PATCH v9 1/7] usb: Add usb_endpoint_descriptor to be part of the struct usb_ep Tatyana Brokhman
2011-05-08 11:16 ` [PATCH v9 2/7] usb: Configure endpoint according to gadget speed Tatyana Brokhman
2011-05-08 11:16 ` [PATCH v9 3/7] usb: Modify existing gadget drivers to use config_ep_by_speed() instead of ep_choose Tatyana Brokhman
2011-05-08 11:16 ` [PATCH v9 4/7] usb:gadget: Add SuperSpeed support to the Gadget Framework Tatyana Brokhman
2011-05-09 9:19 ` Felipe Balbi
2011-05-11 13:00 ` Tanya Brokhman [this message]
[not found] ` <1304853414-10234-1-git-send-email-tlinder-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2011-05-08 11:16 ` [PATCH v9 5/7] usb: Add streams support to the gadget framework Tatyana Brokhman
2011-05-09 9:25 ` Felipe Balbi
2011-05-11 13:29 ` Tanya Brokhman
2011-05-11 20:54 ` Felipe Balbi
2011-05-08 11:16 ` [PATCH v9 6/7] usb:gadget: Introduce usb_generate_ss_descriptors() Tatyana Brokhman
2011-05-08 11:16 ` [PATCH v9 7/7] usb: Adding SuperSpeed support to dummy_hcd Tatyana Brokhman
2011-05-09 17:49 ` Sebastian Andrzej Siewior
2011-05-10 11:24 ` Sergei Shtylyov
2011-05-12 5:19 ` Tanya Brokhman
2011-05-12 14:45 ` Alan Stern
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='000901cc0fdb$66ec7a10$34c56e30$@org' \
--to=tlinder@codeaurora.org \
--cc=ablay@codeaurora.org \
--cc=balbi@ti.com \
--cc=greg@kroah.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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).