Dear Tahakiro:
I'm trying to use your software to create a system in which on the client side(
where usb attach <ip> <bus> is used) needs to have maybe hundreds of virtual ports from
different servers. Can this be done? Is there a limit on how many usb ports can a PC can have?
Currently I'm using ubuntu edgy eft.
Lun
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As of the usb standard, there is a limit of 256 devices connected to a single host controller. Note that your machine may have multiple host controllers. Each has a limit of 256 devices. AFAIK a host controller _may_ support more devices, but the standard defines it to 256.
I have been thinking of a way to extend this limitation on the server. As our controller is a virtual controller, it would be possible to simply register a new one with the kernel. Just the same way as you could have multiple hardware controllers, you could have multiple virtual controllers.
But as of now, this is not implemented, and as fas as I am concerned, this is not an urgend development issue.
I hope that helps
regards
robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Robert, thanks for the replying, it helped alot. I looked into the code with the help of your reply and found this:
It seems when usb/ip try to get the controller for all the virtual usb ports(AKA driver->hc_device) it uses function "usbip_vhci_driver_open" and in this function it uses "get_nports" to update how many ports are there in current device.
I looked into this function and it's using libsysfs's "sysfs_get_device_attr" function to get the attribute data and count how many lines are there in the returned description(well, of course omitting the first line as commented in the code /* skip a header line */).
My question is here: when I use usbip -p to list available virtual usb ports, it seems the return value of get_nports would be by default 8 ports. And it seems there is no mechanism in usb/ip to increase the number of ports that is used by one host controller device (driver->hc_device),only reusing the current 8. Is there a way to increase how many ports a device is currently having in libsysfs? Or is there a way to specify an initially large value for it?
Lun
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The number of virtual ports is defined in driver/vhci.h and statically compiled into vhci-hcd driver.
It can be increased by modifying VHCI_NPORTS value, perhaps upto 16 or 32. But, I have never tested it.
Thanks,
Takahiro
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Tahakiro:
I'm trying to use your software to create a system in which on the client side(
where usb attach <ip> <bus> is used) needs to have maybe hundreds of virtual ports from
different servers. Can this be done? Is there a limit on how many usb ports can a PC can have?
Currently I'm using ubuntu edgy eft.
Lun
Hi
I am not Takahiro, but I will answer anyway :)
As of the usb standard, there is a limit of 256 devices connected to a single host controller. Note that your machine may have multiple host controllers. Each has a limit of 256 devices. AFAIK a host controller _may_ support more devices, but the standard defines it to 256.
I have been thinking of a way to extend this limitation on the server. As our controller is a virtual controller, it would be possible to simply register a new one with the kernel. Just the same way as you could have multiple hardware controllers, you could have multiple virtual controllers.
But as of now, this is not implemented, and as fas as I am concerned, this is not an urgend development issue.
I hope that helps
regards
robert
Hi Robert, thanks for the replying, it helped alot. I looked into the code with the help of your reply and found this:
It seems when usb/ip try to get the controller for all the virtual usb ports(AKA driver->hc_device) it uses function "usbip_vhci_driver_open" and in this function it uses "get_nports" to update how many ports are there in current device.
I looked into this function and it's using libsysfs's "sysfs_get_device_attr" function to get the attribute data and count how many lines are there in the returned description(well, of course omitting the first line as commented in the code /* skip a header line */).
My question is here: when I use usbip -p to list available virtual usb ports, it seems the return value of get_nports would be by default 8 ports. And it seems there is no mechanism in usb/ip to increase the number of ports that is used by one host controller device (driver->hc_device),only reusing the current 8. Is there a way to increase how many ports a device is currently having in libsysfs? Or is there a way to specify an initially large value for it?
Lun
Hello,
The number of virtual ports is defined in driver/vhci.h and statically compiled into vhci-hcd driver.
It can be increased by modifying VHCI_NPORTS value, perhaps upto 16 or 32. But, I have never tested it.
Thanks,
Takahiro