linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Chien Kun Niu <rickyniu@google.com>
Cc: stern@rowland.harvard.edu, erosca@de.adit-jv.com,
	gustavoars@kernel.org, a.darwish@linutronix.de, oneukum@suse.com,
	Kyle Tso <kyletso@google.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	James Wei <jameswei@google.com>
Subject: Re: [PATCH] ANDROID: usb: core: Send uevent when USB TOPO layer over 6
Date: Fri, 5 Mar 2021 08:37:28 +0100	[thread overview]
Message-ID: <YEHfuCFGSpm5ldl0@kroah.com> (raw)
In-Reply-To: <CADRPvQtbbxKhvmE1OZ=GRSmfejk5tXYADo=jw52EQdkj1nN78w@mail.gmail.com>

On Fri, Mar 05, 2021 at 03:17:37PM +0800, Chien Kun Niu wrote:
> Greg KH <gregkh@linuxfoundation.org> 於 2021年3月3日 週三 下午5:10寫道:
> >
> > On Wed, Mar 03, 2021 at 05:03:25PM +0800, Chien Kun Niu wrote:
> > > 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_style
> >
> > > 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

      reply	other threads:[~2021-03-05  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-26  9:16 [PATCH] ANDROID: usb: core: Send uevent when USB TOPO layer over 6 Ricky Niu
2021-02-26  9:24 ` Greg KH
2021-02-26  9:31 ` Greg KH
2021-03-03  9:03   ` Chien Kun Niu
2021-03-03  9:09     ` Greg KH
2021-03-05  7:17       ` Chien Kun Niu
2021-03-05  7:37         ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YEHfuCFGSpm5ldl0@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=a.darwish@linutronix.de \
    --cc=erosca@de.adit-jv.com \
    --cc=gustavoars@kernel.org \
    --cc=jameswei@google.com \
    --cc=kyletso@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=rickyniu@google.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).