On 23-11-14 10:44:36, Oliver Neukum wrote: > Hi, > > On 14.11.23 08:27, Peter Chen wrote: > > On 23-11-13 18:31:20, Oliver Neukum wrote: > > > The earlier fix bf88fef0b6f1 ("usb: otg-fsm: Fix hrtimer list > > > corruption") in effect hid an issue with intialization. > > > > Typo, hit an issue with initialization. > > No, it hides an issue. > > > > In effect it replaces the racy continous reinitialization > > > of fsm->hnp_polling_work with a delayed one-time > > > initialization. > > > > > > This just makes no sense. As a single initialization > > > is sufficient, the clean solution is just to do it once > > > and do it early enough. > > > > The phy-fsl-usb is not the only user, there are other users, eg, > > chipidea. > > Interesting. > Are you saying that somebody calls otg_start_hnp_polling() without > a prior call to usb_otg_start()? Yes, phy-fsl-usb is the freescale implementation. Others may have different, see ci_hdrc_otg_fsm_init for detail. Peter > If so, how is struct otg_fsm initialized? > Currently struct otg_fsm is partially initialized and that just > makes no sense. > > Regards > Oliver -- Thanks, Peter Chen