Fwd: USB Driver - Device No Response standard compliant
Hi All According to USB On The Go and Embedded Host Automated Compliacne Plan, item 6.7.22 A-UUT “Device No Response” for connection timeout, the "Device not responding” error message should be displayed when a non-responsive device is attached. I know that the presentation of the message is the responsibility of the application (user space), but to do this is necesary an event from usb driver (I think it). Nowdays when a non responsive device is attached, "unable to enumerate USB device on port... " is logged a in dmesg, but not event is dispatched (by example in usb_uevent). Without an event application should poll the log (loading the system unnecessarily) searching new "not responsive devices". To comply with the standard usb driver should be modified? I'm probably confusing responsibilities of user and kernel space. I appreciate your opinion/answer. Thanks in advance Christian
On Sun, 02 Aug 2015 00:04:44 -0300, Christian N said:
I know that the presentation of the message is the responsibility of the application (user space), but to do this is necesary an event from usb driver (I think it).
A timeout with no activity at all can do it.. That's Userspace C 101 - select() with a timeout...
Nowdays when a non responsive device is attached, "unable to enumerate USB device on port... " is logged a in dmesg, but not event is dispatched (by example in usb_uevent). Without an event application should poll the log (loading the system unnecessarily) searching new "not responsive devices".
To comply with the standard usb driver should be modified?
No, because userspace can detect the condition on its own and tell a user about it.
I'm probably confusing responsibilities of user and kernel space. I appreciate your opinion/answer.
Yes, you are. Although I suspect the "standard" you're quoting is confusing them as well....
I know that the presentation of the message is the responsibility of the application (user space), but to do this is necesary an event from usb driver (I think it).
A timeout with no activity at all can do it.. That's Userspace C 101 - select() with a timeout...
To implement a timout first, an event is needed. The standar state "when device is attached...". This is a physical event, so at this time the user space needs an event from kernel space, to know that something should be done (start timout, show message or anything else). The problem is that the only message is "unable to enumerate USB device on port...", but this one can't be trapped frome u/mdev (I thought)
Nowdays when a non responsive device is attached, "unable to enumerate USB device on port... " is logged a in dmesg, but not event is dispatched (by example in usb_uevent). Without an event application should poll the log (loading the system unnecessarily) searching new "not responsive devices".
To comply with the standard usb driver should be modified?
No, because userspace can detect the condition on its own and tell a user about it.
I'm probably confusing responsibilities of user and kernel space. I appreciate your opinion/answer.
Yes, you are. Although I suspect the "standard" you're quoting is confusing them as well....
participants (2)
-
Christian N -
Valdis.Kletnieks@vt.edu