From 6080cd0e9239469524d2aa07250ad4b9f383960d Mon Sep 17 00:00:00 2001 From: Valentina Manea Date: Sat, 8 Mar 2014 14:53:34 +0200 Subject: 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 Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- include/linux/usb.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/usb.h') diff --git a/include/linux/usb.h b/include/linux/usb.h index 22de4affe9c8..140a6a3e7d56 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -366,6 +366,8 @@ struct usb_bus { #endif }; +struct dev_state; + /* ----------------------------------------------------------------------- */ struct usb_tt; @@ -749,6 +751,11 @@ extern struct usb_host_interface *usb_find_alt_setting( unsigned int iface_num, unsigned int alt_num); +/* port claiming functions */ +int usb_hub_claim_port(struct usb_device *hdev, unsigned port1, + struct dev_state *owner); +int usb_hub_release_port(struct usb_device *hdev, unsigned port1, + struct dev_state *owner); /** * usb_make_path - returns stable device path in the usb tree -- cgit v1.2.3