linux_dsm_epyc7002/drivers/usb/usbip
Nobuo Iwata 0775a9cbc6 usbip: vhci extension: modifications to vhci driver
Modification to Kconfig, vhci_hc.c, vhci.h and vhci_sysfs.c.

1. kernel config

Followings are added.

USBIP_VHCI_HC_PORTS: Number of ports per USB/IP virtual host
controller. The default is 8 - same as current VHCI_NPORTS.
USBIP_VHCI_NR_HCS: Number of USB/IP virtual host controllers. The
default is 1. This paratmeter is replaced with USBIP_VHCI_INIT_HCS and
USBIP_VHCI_MAX_HCS included in succeeding dynamic extension patch.

2. the_controller to controllers

the_controller is changed to vhci_pdevs: array of struct
platform_device.

3. vhci_sysfs.c

Sysfs structure is changed as following.

BEFORE:
    /sys/devices/platform
        +-- vhci
            +-- status
            +-- attach
            +-- detach
            +-- usbip_debug

AFTER: example for CONFIG_USBIP_NR_HCS=4
    /sys/devices/platform
        +-- vhci
        |   +-- nports
        |   +-- status
        |   +-- status.1
        |   +-- status.2
        |   +-- status.3
        |   +-- attach
        |   +-- detach
        |   +-- usbip_debug
        +-- vhci.1
        +-- vhci.2
        +-- vhci.3

vhci[.N] is shown for each host controller kobj. vhch.1, vhci.2, ...
are shown only when CONFIG_USBIP_NR_HCS is more than 1. Only 'vhci'
(without number) has user space interfaces. 'nports' is newly added to
give ports-per-controller and number of controlles. Before that, number
of ports is acquired by reading status lines. Status is divided for
each controller to avoid page size (4KB) limitation.

Old userspace tool binaries work with the first status within the first
controller.

Inconsistency between status header and content is fixed.
4th and 5th column are
header:          "dev bus"
content(unused): "000 000"
content(used):   "%08x", devid
Only 1st and 2nd column are used by program. In old version, sscanf()
in parse_status expect no bus column. And bus_id string is shown in the
last column. Then bus in the header is removed and unused content is
replaced with 8 zeros. The sscanf() expects more than 5 columns and new
has 6 columns so there's no compatibility issue in this change.

Signed-off-by: Nobuo Iwata <nobuo.iwata@fujixerox.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-09 16:21:05 +02:00
..
Kconfig usbip: vhci extension: modifications to vhci driver 2016-08-09 16:21:05 +02:00
Makefile usbip: vudc: Add vudc to Kconfig 2016-04-26 15:19:50 -07:00
README usbip: move usbip kernel code out of staging 2014-08-25 10:40:06 -07:00
stub_dev.c usbip: fix NULL pointer dereference on errors 2016-04-28 12:28:08 -07:00
stub_main.c usbip: move usbip kernel code out of staging 2014-08-25 10:40:06 -07:00
stub_rx.c usbip: fix NULL pointer dereference on errors 2016-04-28 12:28:08 -07:00
stub_tx.c usbip: safe completion against unbind operation 2016-04-28 12:28:08 -07:00
stub.h usbip: fix NULL pointer dereference on errors 2016-04-28 12:28:08 -07:00
usbip_common.c usbip: vudc: Make usbip_common vudc-aware 2016-04-26 15:19:50 -07:00
usbip_common.h usbip: don't call stub_device_reset() during stub_disconnect() 2016-06-07 22:18:39 -07:00
usbip_event.c usbip: event handler as one thread 2016-04-19 04:33:15 +09:00
vhci_hcd.c usbip: vhci extension: modifications to vhci driver 2016-08-09 16:21:05 +02:00
vhci_rx.c usbip: vhci extension: modifications to vhci driver 2016-08-09 16:21:05 +02:00
vhci_sysfs.c usbip: vhci extension: modifications to vhci driver 2016-08-09 16:21:05 +02:00
vhci_tx.c usb: usbip: Fix possible deadlocks reported by lockdep 2016-02-03 13:52:10 -08:00
vhci.h usbip: vhci extension: modifications to vhci driver 2016-08-09 16:21:05 +02:00
vudc_dev.c usb: usbip: vudc: Rename find_endpoint() to vudc_find_endpoint() 2016-04-28 12:28:08 -07:00
vudc_main.c usbip: vudc: Add VUDC main file 2016-04-26 15:19:50 -07:00
vudc_rx.c usb: usbip: vudc: Rename find_endpoint() to vudc_find_endpoint() 2016-04-28 12:28:08 -07:00
vudc_sysfs.c usb: usbip: remove null check 2016-06-07 22:18:39 -07:00
vudc_transfer.c usb: usbip: vudc: Rename find_endpoint() to vudc_find_endpoint() 2016-04-28 12:28:08 -07:00
vudc_tx.c usbip: vudc: Add vudc_tx 2016-04-26 15:19:50 -07:00
vudc.h usb: usbip: vudc: Rename find_endpoint() to vudc_find_endpoint() 2016-04-28 12:28:08 -07:00

TODO:
	- more discussion about the protocol
	- testing
	- review of the userspace interface
	- document the protocol

Please send patches for this code to Greg Kroah-Hartman <greg@kroah.com>