From: Jack Pham Subject: Re: [PATCH v1 1/1] usb: gadget: f_fs: Add support for SuperSpeed Mode Date: Mon, 16 Sep 2013 17:45:14 -0700 Message-ID: <20130917004514.GA22750@usblab-sd-06.qualcomm.com> References: <1379324414-7007-1-git-send-email-mgautam@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1379324414-7007-1-git-send-email-mgautam-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Manu Gautam Cc: balbi-l0cyMroinI0@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, pheatwol-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org List-Id: linux-arm-msm@vger.kernel.org Hi Manu, An intern working with us here (thanks Peter!) found a bug. On Mon, Sep 16, 2013 at 03:10:14PM +0530, Manu Gautam wrote: > @@ -1569,7 +1573,20 @@ static int ffs_func_eps_enable(struct ffs_function *func) > spin_lock_irqsave(&func->ffs->eps_lock, flags); > do { > struct usb_endpoint_descriptor *ds; > - ds = ep->descs[ep->descs[1] ? 1 : 0]; > + int desc_idx; > + > + if (ffs->gadget->speed == USB_SPEED_SUPER) > + desc_idx = 2; > + if (ffs->gadget->speed == USB_SPEED_HIGH) This should be "else if", otherwise if the gadget is superspeed, it will fall through to the full speed case below and desc_idx will be set to 0, resulting in FS descriptors being used instead. > + desc_idx = 1; > + else > + desc_idx = 0; > + > + ds = ep->descs[desc_idx]; Thanks, Jack -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html