Re: [OPW] USB subsystem questions

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

 



On Sat, 15 Feb 2014, Valentina Manea wrote:

> Hi,
> 
> Thank you both for your replies, I managed to solve the /dev issues,
> it seems it was related to tmpfs.
> 
> Related to the port claim mechanism, as far as I can see,
> usb_hub_claim_port is called from a ioctl and, thus, needs a file to
> be called for.

That's true when it is invoked from userspace.  It can also be invoked 
directly by a kernel driver; in that case no file is needed.

> As I read, usbfs has been deprecated and /sys and /dev/bus/usb are
> used instead. However, I can't figure out which file to use. I tried
> claming a port from userspace using ioctl on /dev/bus/usb/001/001
> (since it's the only file that looks like a device file corresponding
> to hub usb1, to which the USB device to be shared is attached). I get
> Operation not permitted when doing this.

That's the right file.  Did you open the file for writing?  Did you run 
the program as root?

For an example of how to use this ioctl, see

	http://marc.info/?l=linux-usb&m=124345857431452&w=2

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