[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <000901cc0fdb$66ec7a10$34c56e30$@org>
Date: Wed, 11 May 2011 16:00:24 +0300
From: "Tanya Brokhman" <tlinder@...eaurora.org>
To: <balbi@...com>
Cc: <greg@...ah.com>, <linux-usb@...r.kernel.org>,
<linux-arm-msm@...r.kernel.org>, <ablay@...eaurora.org>,
"'open list'" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v9 4/7] usb:gadget: Add SuperSpeed support to the Gadget Framework
> > @@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists