Re: [Linux USB] enable/disable individual ports

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

 



On Mon, 23 Nov 2015, Peter Stuge wrote:

> Alan Stern wrote:
> > > > > It does print out a message, though not a big one.  Would you like it
> > > > > to do something more specific?  A more verbose "usage" message,
> > > > > perhaps?
> > > > 
> > > > That's a good idea, and additionally I think it would be important to
> > > > print (much) more information if the ioctl() fails.
> > > 
> > > I agree.
> > 
> > What more is there to print?  If the ioctl fails, all the program gets
> > back from the kernel is an error code, which it already prints out.  I
> > wouldn't mind adding something else, if anybody can suggest what it
> > might be.
> 
> Information about possible reasons for failure, in particular
> that this operation may simply not be supported by the hardware.
> 
> Ideally even have a special case for that, with overly clear text,
> if it is indeed possible to determine from the error code that this
> is the cause.

USB hardware always supports reset.  Any device that didn't support it 
would be unusable.

The very first thing that Linux does when it detects a new device has 
been plugged into a port is issue a reset.  The same is true for 
Windows.

Now, lots of other things can go wrong.  For example, it may not be
possible to disable Link Power Management prior to doing the reset.  
Or the device's descriptors may change because a firmware update was
installed and activated by the reset.  Or it may even be something as
simple as the device disconnecting from the bus before or during the
reset.

The error codes don't distinguish among all of these possibilities.  
Still, I'll see what I can do.

Alan Stern

--
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