tech-kern archive

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

Re: Reboot resistant USB bug



Hello,

On Sat, Oct 13, 2018 at 08:31:43AM +0100, Iain Hibbert wrote:
> On Thu, 11 Oct 2018, Emmanuel Dreyfus wrote:
> 
> > Hello
> > 
> > On both netbsd-8 and -current, I have a problem with USB devices that
> > get stuck in a non-functionning state even after a reboot.
> > 
> > This happens after interrupting transfer with different NFC readers 
> > from different vendors, and the only way to recover the device is 
> > to power-cycle it. I wonder if there could be a missing step in the 
> > way we initialize USB devices that could explain that situation.
> 
> This is a 'state' issue which does not change unless the device is power 
> cycled, which we do not generally do as part of the init AFAIK. I noticed 
> this with Bluetooth adaptors many years ago and we issue a reset because 
> of that but it doesn't affect the USB part of the device and adaptors 
> sometimes do fail to restart on reboot.
> 
> What do other OSs do in this way?  It seems difficult to guess the state 
> and we just assume that it is in post-cold boot when we attach which may 
> not always be optimal.
> 
> iain

FWIW, my main workstation is multi-booted. I mainly use NetBSD but
occasionnally have to go to MS Windows (I also use Plan9).

When rebooting from Windows (so no power off), there are numerous issues
with USB attached devices, obviously because of a persistent state
established by Windows and not cleared off and that confuses NetBSD.

The reverse is not true (rebooting from NetBSD to Windows), whether
because NetBSD "clean" things even when rebooting or because Windows
always re-establish a known (to it) state.

When exiting Windows, I have to power down in order for NetBSD to
restart correctly with USB devices.
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index