aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorValentina Manea <valentina.manea.m@gmail.com>2014-03-08 14:53:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-08 22:48:43 -0800
commit6080cd0e9239469524d2aa07250ad4b9f383960d (patch)
tree0682e223b8d1345188251e6dd6b05fc1fb4f63c6 /include/linux/usb.h
parentstaging: usbip: trigger driver probing after unbinding from usbip-host (diff)
downloadlinux-dev-6080cd0e9239469524d2aa07250ad4b9f383960d.tar.xz
linux-dev-6080cd0e9239469524d2aa07250ad4b9f383960d.zip
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 <valentina.manea.m@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h7
1 files changed, 7 insertions, 0 deletions
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