public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@kernel.org>
To: Oliver Neukum <oneukum@suse.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] initialize struct otg_fsm earlier
Date: Wed, 15 Nov 2023 09:31:37 +0800	[thread overview]
Message-ID: <20231115013137.GA69668@nchen-desktop> (raw)
In-Reply-To: <1501d722-d193-4440-b5ea-a9586fca9a2b@suse.com>

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

      parent reply	other threads:[~2023-11-15  1:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 17:31 [PATCH] initialize struct otg_fsm earlier Oliver Neukum
2023-11-14  7:27 ` Peter Chen
2023-11-14  9:44   ` Oliver Neukum
2023-11-14 15:33     ` Alan Stern
2023-11-15  1:33       ` Peter Chen
2023-11-15  1:31     ` Peter Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231115013137.GA69668@nchen-desktop \
    --to=peter.chen@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox