Message ID | CAOMZO5B3EXOB4ijh0LOhvU4g67kdz8KSXw8dvS2dOD1anu_8Bw@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Dec 21, 2012 at 07:24:14AM -0200, Fabio Estevam wrote: > Hi Peter, > > On Fri, Dec 21, 2012 at 12:22 AM, Peter Chen <peter.chen@freescale.com> wrote: > > > Current chipidea driver only considers disable stream mode at device > > mode, in fact, it may be related to below chipidea bug, and needs > > to consider all usb modes. > > > > STAR 9000378958 > > Title: Non-Double Word Aligned Buffer Address Sometimes Causes Host to Hang on OUT Retry > > www.synopsys.com/dw/star.php?c=dwc_usb2_hs_otg_controller&fixedIn=2.20a > > > > To fix this, we need to add CI13XXX_DISABLE_STREAMING after role->start/init. > > Yes, setting CI13XXX_DISABLE_STREAMING inside ci_role_start does work. > > If you think the patch below is fine I can properly submit it. Why did you need to move this function?
On Fri, Dec 21, 2012 at 9:49 AM, Wolfram Sang <w.sang@pengutronix.de> wrote: >> Yes, setting CI13XXX_DISABLE_STREAMING inside ci_role_start does work. >> >> If you think the patch below is fine I can properly submit it. > > Why did you need to move this function? Only to make the compiler happy. hw_write() is now used by ci_role_start(), so I re-ordered so that hw_write comes first in the code and compiler does not complain. Regards, Fabio Estevam
> Only to make the compiler happy. hw_write() is now used by > ci_role_start(), so I re-ordered so that hw_write comes first in the > code and compiler does not complain. Yup, spotted this on second glance. If you submit the patch, might be helpful to mention this.
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index e25d126..7fe652a 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h @@ -18,6 +18,8 @@ #include <linux/usb.h> #include <linux/usb/gadget.h> +#define USBMODE_CI_SDIS BIT(4) + /****************************************************************************** * DEFINE *****************************************************************************/ @@ -173,22 +175,6 @@ static inline struct ci_role_driver *ci_role(struct ci13xxx *ci) return ci->roles[ci->role]; } -static inline int ci_role_start(struct ci13xxx *ci, enum ci_role role) -{ - int ret; - - if (role >= CI_ROLE_END) - return -EINVAL; - - if (!ci->roles[role]) - return -ENXIO; - - ret = ci->roles[role]->start(ci); - if (!ret) - ci->role = role; - return ret; -} - static inline void ci_role_stop(struct ci13xxx *ci) {