Sergei, > -----Original Message----- > From: Sergei Shtylyov [mailto:sshtylyov@xxxxxxxxxx] > Sent: 2012年5月3日 21:04 > To: Neil Zhang > Cc: haojian.zhuang@xxxxxxxxx; eric.y.miao@xxxxxxxxx; Chao Xie; linux- > usb@xxxxxxxxxxxxxxx > Subject: Re: [PATCH] usb: gadget: mv_udc: fix potential register access > when clock off > > Hello. > > On 03-05-2012 10:04, Neil Zhang wrote: > > > The Android gadget has sysfs interface to configure usb gadget. > > And it may access udc driver when there is no cable attached. > > That is too say, > > s/too/to/ > > > the udc controller may in clock off status. > > May be? > > > It will cause system hang when access udc controller's register at > this > > time. > > > Change-Id: Ib8783b725f5f57323499d23bc891c6f9a07b5e8d > > Remove this please -- it has no place in an upstream commit. > > > Signed-off-by: Neil Zhang<zhangwm@xxxxxxxxxxx> > > --- > > drivers/usb/gadget/mv_udc_core.c | 12 +++++++++++- > > 1 files changed, 11 insertions(+), 1 deletions(-) > > > diff --git a/drivers/usb/gadget/mv_udc_core.c > b/drivers/usb/gadget/mv_udc_core.c > > index 771ef45..067cf65 100644 > > --- a/drivers/usb/gadget/mv_udc_core.c > > +++ b/drivers/usb/gadget/mv_udc_core.c > > @@ -2333,6 +2339,11 @@ usb_reg_show(struct device *dev, struct > device_attribute *attr, char *buf) > > return -1; > > } > > > > + if (!udc->active) { > > + ret = sprintf(buf, "The controller is clock off now.\n"); > > Clocked? > > WBR, Sergei This patch is submitted by mistake, please ignore it. Anyway, thanks for your comments. Best Regards, Neil Zhang ?韬{.n?????%??檩??w?{.n???{炳???骅w*jg????????G??⒏⒎?:+v????????????"??????