Re: [PATCH v2] usb: core: Avoid doing warm reset on disconnect event

From: Alan Stern
Date: Tue Dec 21 2021 - 09:30:05 EST


On Tue, Dec 21, 2021 at 11:35:25AM +0800, Kai-Heng Feng wrote:
> (
>
>
> On Fri, Nov 26, 2021 at 11:30 PM Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> > Why is it correct to skip doing a warm reset on a disconnected port here, but not
> > correct to skip doing a warm reset on a disconnected port in all the other places
> > where hub_port_warm_reset_required() gets called?
>
> Can a disconnect event happens to other places other than port_event()?

A disconnect can happen at any time. After all, users can unplug USB
cables whenever they want.

Alan Stern