Nobuo Iwata <nobuo.iwata@xxxxxxxxxxxxxxx> writes: > This patch extends number of ports limitation in application (vhci) > side. > > To do so, vhci driver supports multiple host controllers. The number of > controllers can be specified as a module parameter 'num_controllers'. > The default is 1. > > ex) # insmod vhci_hcd.ko num_controllers=4 > > Also, ports per controller is changed from 8 to USB_MAXCHILDREN (31). > It can be modified with VHCI_NPORTS flag at module compilation. Why do these numbers have to be static? Why can't we automatically add new controllers when there are no more ports avilable? > So number of ports supported by vhci is 'num_controllers' * 31. > > Sysfs structure is changes as following. > BEFORE: > /sys/devices/platform > +-- vhci > +-- status > +-- attach > +-- detach > +-- usbip_debug > AFTER: example for num_controllers=4 > /sys/devices/platform > +-- vhci.0 > | +-- nports > | +-- status.0 > | +-- status.1 > | +-- status.2 > | +-- status.3 > | +-- attach > | +-- detach > | +-- usbip_debug > +-- vhci.1 > +-- vhci.2 > +-- vhci.3 Again: Not sure the existing files can be changed? Or can we do that because the userspace implementation is part of the kernel source repo? > +static ssize_t nports_show(struct device *dev, struct device_attribute *attr, > + char *out) > +{ > + char *s = out; > + out += sprintf(out, "%d %d\n", VHCI_NPORTS, num_controllers); Definitely not. One value per file. Note that the num_controllers will be readable as a module parameter by default. Bjørn -- 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