Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Congrats! But how nobody analysed this bug for 8+ years is a bit of a mystery to me...


Well the Linux USB maintainer has spent the last month or so trying to get Linus to be more polite, so I guess those kind of things have a higher priority!

I kid, I kid...

The reason is that it is incredibly difficult to link the disconnect to the cause as the 10ms is likely sufficient in 99% of cases - until it suddenly isn't. This means that you could be running test cases on a certain device for a year, and suddenly the test will fail the day after. When the test case mysteriously fails randomly like that on only a subset of devices, the assumption is that the hardware is faulty. These kind of failures would likely be higher on lower quality, less optimized hardware as well, furthering the perception.

As far as I can tell, the reason this is fixed now is because known good hardware from Intel started exhibiting the same error which got people at Intel to track it down directly, as they knew it wasn't their hardware at fault.


> the 10ms is likely sufficient in 99% of cases

from TFA:

> the time is above 10 ms in about 8% of the remote wakeup events I've tested.

So 10ms is sufficient in about 92% of cases, barely more than 9 in 10.


This figure is just for two specific devices [1]:

>Out of 227 remote wakeup events from a USB mouse and keyboard: > - 163 transitions from RExit to U0 were immediate ( < 1 microsecond) > - 47 transitions from RExit to U0 took under 10 ms > - 17 transitions were over 10ms

So, 10 ms might indeed be sufficient for 99% of devices. But some devices (i.e. this mouse/kb combo) needs between 10 ms and 12 ms in 8% of all wakeups.

[1] http://marc.info/?l=linux-usb&m=137714769606183&w=2


Which depends on the cases tested by Sharp – as the GP, depending on the hardware you use, you can probably get 100% or 0% (if you try really hard).


I add it to my list of hard-to-replicate-and-locate bugs then.


Because nobody cares about suspend-resume power mgmt. If it doesn't work, curse it, pull it out and put it back in again, voila it works.

The people who really care about and study the spec, are those who have to support fixed devices i.e. USB devices internal to an appliance. They physically cannot be removed by the user. So suspend/resume has to work.

Embedded programmers have to deal with totally-broken drivers/specs all the time. There are probably 100s of folks who knew about this and dealt with it (bumped the timeout in their embedded kernel to match the devices they support) and never said anything to anybody.


In this case, the pain point was apparently a ChromeOS device: http://marc.info/?l=linux-usb&m=137714769606183&w=2

> This bug has been reproduced under ChromeOS, which is very aggressive about USB power management. It enables auto-suspend for all internal USB devices (wifi and bluetooth), and the disconnects wreck havoc on those devices, causing the ChromeOS GUIs to repeatedly flash the USB wifi setup screen on user login.


Also with sound devices it is more than a tad annoying to unplug a USB external audio interface (powering down your monitors, etc) because it magically disappeared for some reason.

This is an amazing fix if it is the root of the sorts of problems I've seen on Linux (which've kept me crawling back to Mac for hardware support)


When cheap hardware acts like it doesn't follow the spec, no one digs too deep, because it's always going to be quite frequent, and there's nothing you can do about it. It's very rare that it turns out to actually have been following the spec, and you had the spec wrong. That's the practical reason.


I can't speak for kernel developers, but when you have complex and large codebase running on a huge variety of hardware, you will have some edge cases that are rare or difficult to debug. And I don't envy the folks that have to interface directly with hardware, I have enough fun in database land...


I'm an embedded software developer now doing some things with databases.... Give me hardware any day :-)


I'm an embedded software developer who designs internal embedded databases and import/export routines to external databases.

My brain hurts, but at least I'm never bored. :/


Why is that variable set at 10? Who would question that?

The spec says 10 too. It's the "at least 10" part that was missed. That's very subtle, does not stand out and is easily over-looked unless someone is really auditing code and reading specs carefully.


Take a look at Kernel USB source code. I did. Once.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: