Re: [PATCH next] usb: musb: fix kernel panic during s2ram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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)...

It's just the default; drivers can change it if they want. usbcore does not _insist_ on the value.

   Yeah, looks like this...

Alan Stern

WBR, Sergei

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux