From: Grazvydas Ignotas Date: Tue, 10 Dec 2013 00:02:38 +0000 (+0200) Subject: usb: musb: omap2430: fix occasional musb breakage on boot X-Git-Tag: sz_161~63 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d5f648ce9b73e6898eec88db8d38051706063d9;p=pandora-kernel.git usb: musb: omap2430: fix occasional musb breakage on boot This is a hard to reproduce problem which leads to non-functional USB-OTG port in 0.1%-1% of all boots. Tracked it down to commit e25bec160158abe86c "omap2+: save and restore OTG_INTERFSEL", which introduces save/restore of OTG_INTERFSEL over suspend. Since the resume function is also called early in driver init, it uses a non-initialized value (which is 0 and a non-supported setting in DM37xx for INTERFSEL). Shortly after the correct value is set. Apparently this works most time, but not always. Fix it by not writing the value on runtime resume if it is 0 (0 should never be saved in the context as it's invalid value). This issue was originally found by Andreas Naumann: http://marc.info/?l=linux-usb&m=138562574719654&w=2 --- Reading git-diff-tree failed