Hi, 2010/12/18 Sergei Shtylyov <sshtylyov@xxxxxxxxxx>: > Hello. > > Alan Stern wrote: > >>>>> From: Ming Lei <tom.leiming@xxxxxxxxx> > >>>>> This patch fix kernel panic during s2ram, which is caused >>>>> by mistaken definition of glue_to_musb. >>>>> --- a/drivers/usb/musb/musb_core.h >>>>> +++ b/drivers/usb/musb/musb_core.h >>>>> @@ -577,6 +577,16 @@ static inline void musb_configure_ep0(struct musb >>>>> *musb) >>>>> } >>>>> #endif /* CONFIG_BLACKFIN */ >>>>> >>>>> +static inline struct musb *dev_to_musb(struct device *dev) >>>>> +{ >>>>> +#ifdef CONFIG_USB_MUSB_HDRC_HCD >>>>> + /* usbcore insists dev->driver_data is a "struct hcd *" */ > >>>> It does? Where? > >>> usb_create_hcd() >>> ...... >>> dev_set_drvdata(dev, hcd); >>> ...... > >>> In fact, should be dev->p->driver_data, accurately speaking. > >> Well, usbcore does not use this value. > > It seems it does use it still, in usb_hcd_platform_shutdown() -- at least > for the platform drivers that choose to call this function (but MUSB is not > amongst them)... > Considered at least usb_hcd_platform_shutdown insists on it, so suggest to take this patch first to fix the kernel panic during s2ram. If usb_hcd_platform_shutdown doesn't insist on it any longer, we can use platform_set_drvdata to do it. Felipe, your comments? -- Lei Ming -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html