RE: [RFC PATCH] usb: udc: run disconnect callback before pull up zero

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

 



> From: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Sent: Monday, January 22, 2024 10:31 AM
> To: yuan linyu <yuanlinyu@xxxxxxxxxxx>
> Cc: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>; Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx>; linux-usb@xxxxxxxxxxxxxxx
> Subject: Re: [RFC PATCH] usb: udc: run disconnect callback before pull up zero
> 
> >
> > What is host error ?
> 
> If the host is trying to communicate with the gadget at the time of the
> mode switch, it will see that something is wrong because the gadget will
> still be connected (the pullup will still be on) but it won't reply to
> any USB packets.
> 


Host will lost device soon.

> >
> > It is already change to dev_dbg() by Wesley Cheng for dwc3.
> > But it also can enable by change log level. Only delete it will not show again.
> 
> I think it's good to have those messages show up when the log level is
> set to debug.  They let developers know what's happening when they test
> changes to the gadget drivers.  If the messages really bother somebody,
> all they have to do is reduce the log level to info.
> 
> If you're still concerned about the behavior of the mass-storage
> function, you could change it.  Make it disable itself whenever it gets
> a -ESHUTDOWN error, either while submitting a request or as a completion
> status.  This should reduce the number of error messages, although it
> won't eliminate them.

Thanks, will send a patch for mass storage only.

> 
> (Of course, this still leaves the possibility of floods of debugging
> messages from all the other function drivers...)
> 
> > this thread just want to discuss if disable eps first then pull up zero acceptable
> or
> > good (reduce mode switch time ???) for all UDCs ?
> 
> I think it's not a good thing to do.  And I don't think it will reduce
> the mode switch time, because both operations still have to occur so
> they will require the same total amount of time.
> 
> Alan Stern




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

  Powered by Linux