Re: ->drop_endpoint being called for disabled endpoints

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

 



On Tue, 19 Feb 2013, Felipe Balbi wrote:

> > > we will still see the warning since usbcore will continue to call
> > > ->drop_endpoint() for disabled eps.
> > 
> > But if xhci-hcd is fixed properly, it won't print out those warnings 
> > when drop_endpoint is called for eps that were disabled by a device 
> > reset.
> 
> why not fixing at usbcore level and we will never have such an issue
> again with any new drivers. Currently the only user for
> ->drop_endpoint() is xhci, but what if another driver decides to use it
> and makes a similar 'mistake' ?
> 
> It might be just me, but it sounds better that usbcore doesn't even call
> ->drop_endpoint() for endpoints which it knows are disabled.

Part of the problem here is that ep->enabled is owned by usbcore, not 
by the HCD.  The HCD should not be allowed to change it.

Furthermore, enabling an endpoint involves changes to the core data 
structures as well as to the HCD's structures and the hardware.  
Resetting a device may affect the hardware and the HCD, but it doesn't 
affect the core structures.

> But I have no strong feelings either way, it just feels/sounds better
> what I suggested ;-)

I think we should wait to hear what Sarah has to say.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux