All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Pavan Kondeti <pkondeti@codeaurora.org>
Cc: gregkh@suse.de, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [RFC 1/2] USB: Notify OTG errors to user space via uevents
Date: Mon, 6 Dec 2010 20:22:07 -0800	[thread overview]
Message-ID: <20101207042207.GA29098@kroah.com> (raw)
In-Reply-To: <4CFDAE90.607@codeaurora.org>

On Tue, Dec 07, 2010 at 09:18:32AM +0530, Pavan Kondeti wrote:
> On 12/7/2010 8:02 AM, pkondeti@codeaurora.org wrote:
> > Hi Greg,
> > 
> >> On Mon, Dec 06, 2010 at 06:07:50PM +0530, Pavankumar Kondeti wrote:
> >>> OTG specification mandates no silent failures and all errors should
> >>> be reported to the user.  The spec itself does not give the exact
> >>> error description. But recommends the error message to be self
> >>> explanatory.  Provide otg_notify_error() utility for USB core and
> >>> OTG driver to send the error codes to user space.  All the error
> >>> code values are described in include/linux/usb/ch9.h.  The user space
> >>> application can listen to netlink socket and parse the buffer for
> >>> "MODULE=OTG" and "ERROR=n", where 'n' contains the error code.
> >>
> >> How are you going to listen to the netlink socket that is already
> >> grabbed by libudev?
> >>
> > Sorry. I never worked with udev. But I read udev documentation.
> > I thought an external script can be invoked by adding a udev rule
> > when MODULE=OTG is matched and ERROR value can be accessed
> > in the script via env variable.
> > 
> I ran the sample program @ http://www.kernel.org/doc/pending/hotplug.txt
> and udevd concurrently. I am able to capture all the uevents in sample
> program.

Interesting, but what userspace tool are you going to create to listen
to these events that all distros are now going to have to use?

Again, please, this is NOT the interface to get errors out of the kernel
for something as minor as USB OTG issues that we have been successfully
handling just fine for years now.

thanks,

greg k-h

  reply	other threads:[~2010-12-07  4:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-06 12:37 [RFC 1/2] USB: Notify OTG errors to user space via uevents Pavankumar Kondeti
2010-12-06 12:37 ` [RFC 2/2] USB: Notify OTG errors from hub driver Pavankumar Kondeti
2010-12-06 15:58 ` [RFC 1/2] USB: Notify OTG errors to user space via uevents Greg KH
2010-12-07  2:32   ` pkondeti
2010-12-07  3:48     ` Pavan Kondeti
2010-12-07  4:22       ` Greg KH [this message]
2010-12-07  3:50     ` Greg KH
2010-12-07  4:20       ` Pavan Kondeti
2010-12-07  4:42         ` Greg KH
2010-12-07  5:00           ` Pavan Kondeti

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=20101207042207.GA29098@kroah.com \
    --to=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pkondeti@codeaurora.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.