Re: [PATCH] ANDROID: usb: core: Send uevent when USB TOPO layer over 6
From: Greg KH <gregkh@linuxfoundation.org>
Date: 2021-03-05 07:37:34
Also in:
lkml
On Fri, Mar 05, 2021 at 03:17:37PM +0800, Chien Kun Niu wrote:
Greg KH [off-list ref] 於 2021年3月3日 週三 下午5:10寫道:quoted
On Wed, Mar 03, 2021 at 05:03:25PM +0800, Chien Kun Niu wrote:quoted
Hi , Greg What tool will "catch" this? Where is that code located at? => I prepare merge the code to Android phone , so I used Android HLOS to catch this uevent.Very odd quoting style, perhaps you might want to read up on how to do this properly at: https://en.wikipedia.org/wiki/Posting_style#Interleaved_stylequoted
uevents are not for stuff like this, you are trying to send "error conditions" to userspace, please use the "proper" interfaces like this and not abuse existing ones. => Sorry , I am not sure what is the "proper" interfaces your mean. Could you please give me more description?How does the kernel normally send error conditions that it detects in hardware to userspace?I will create a sysfs attribute to record the hub status. If there is a new hub with over 6 USB TOPO layer connected, I will use the sysfs_notify to send the "error conditions" to userspace. Is it a proper interfaces to delivery "error conditions"?
Maybe, it all depends on what you are wanting to show here. Try it out and see, it's easier to review patches that you have shown work properly for your use case than it is to try to discuss general issues. thanks, greg k-h