On Fri, 2014-03-07 at 10:14 -0500, Alan Stern wrote:
> On Fri, 7 Mar 2014, Oliver Neukum wrote:
> 
> > > Are there any wakeup-enabled devices that this will mess up?
> > 
> > Potentially HID. Now that I think about this it seems to me that
> > drivers really need to be told about the error condition. For
> > btusb the error condition cannot be handled. For HID it may mean
> > a lost key or click at the worst. The driver should react to such
> > errors by disabling power management, but that requires that it
> > become aware of such errors.
> 
> The only way to notify the driver about the error condition is by a 
> reset-resume callback, and btusb has no such callback.

I wouldn't object to adding reset_resume() provided you add an error
flag and usbcore can deal with a failure.

> In the case of a mobile device, it seems to me that unbinding and
> rebinding is more suitable than disabling power management.  
> Especially if these errors are infrequent.

It breaks opened fds.

> Of course, unbind followed by rebind is a natural side effect of 
> logical disconnect.
> 
> Earlier, you objected to rebinding on the grounds that it could lead to 
> a tight error loop.  Unbinding without rebinding would be essentially 
> the same as what the kernel does now.

Yes, I much prefer drivers to be notified.

        Regards
                Oliver



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

Reply via email to