Re: How to detect overcurrent event from userland

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alan,

On Donnerstag, 25. Februar 2010, Alan Stern wrote:
> On Thu, 25 Feb 2010, Juergen Beisert wrote:
> > On Dienstag, 23. Februar 2010, Alan Stern wrote:
> > > On Tue, 23 Feb 2010, Juergen Beisert wrote:
> > > > is there a way to get an userland application informed about an
> > > > overcurrent event on a USB connector?
> > >
> > > Not specifically.  An application can monitor the system log, looking
> > > for overcurrent notifications.
> >
> > According to this patch 'http://lwn.net/Articles/366346/' for harddisks:
> > Would it be possible to add such a sysfs entry like 'state' to the HUB or
> > its interfaces to notify any waiting userland application about changed
> > states in the HUB or its interfaces?
>
> Such things can always be added; feel free to write a patch.

I will try, but currently I'm not an expert in the USB subsystem... :-(

> But what events will you want to report?  Lots of things can happen to a hub
> besides overcurrents.

I think there are some interesting states a user can only discover by taking a 
look into the kernel logs. There is no additional help possible, because also 
applications can't detect these states:

- _something_ is plugged into a port (= in use)
- enumeration of the plugged device failed
- overcurrent detected
- orphaned device plugged in (no driver found)

I think it would be an improvement if the system could notify the user about 
these kind of failures instead of simply doing nothing (from the sight of the 
user, the kernel drivers still do their jobs in the background)

Juergen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux