mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
staging: usbip: claim ports used by shared devices
A device should not be able to be used concurrently both by the server and the client. Claiming the port used by the shared device ensures no interface drivers bind to it and that it is not usable from the server. Signed-off-by: Valentina Manea <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
a46034ca57
commit
6080cd0e92
4 changed files with 31 additions and 4 deletions
|
|
@ -1819,6 +1819,7 @@ int usb_hub_claim_port(struct usb_device *hdev, unsigned port1,
|
|||
*powner = owner;
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_hub_claim_port);
|
||||
|
||||
int usb_hub_release_port(struct usb_device *hdev, unsigned port1,
|
||||
struct dev_state *owner)
|
||||
|
|
@ -1834,6 +1835,7 @@ int usb_hub_release_port(struct usb_device *hdev, unsigned port1,
|
|||
*powner = NULL;
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(usb_hub_release_port);
|
||||
|
||||
void usb_hub_release_all_ports(struct usb_device *hdev, struct dev_state *owner)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,10 +57,6 @@ extern int usb_match_device(struct usb_device *dev,
|
|||
extern void usb_forced_unbind_intf(struct usb_interface *intf);
|
||||
extern void usb_rebind_intf(struct usb_interface *intf);
|
||||
|
||||
extern int usb_hub_claim_port(struct usb_device *hdev, unsigned port,
|
||||
struct dev_state *owner);
|
||||
extern int usb_hub_release_port(struct usb_device *hdev, unsigned port,
|
||||
struct dev_state *owner);
|
||||
extern void usb_hub_release_all_ports(struct usb_device *hdev,
|
||||
struct dev_state *owner);
|
||||
extern bool usb_device_is_owned(struct usb_device *udev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue