aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorValentina Manea <valentina.manea.m@gmail.com>2014-03-08 07:53:34 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-09 01:48:43 -0500
commit6080cd0e9239469524d2aa07250ad4b9f383960d (patch)
tree0682e223b8d1345188251e6dd6b05fc1fb4f63c6 /include/linux/usb.h
parenta46034ca57ed6bdbb574a46ca3453061946b62f9 (diff)
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 {
366#endif 366#endif
367}; 367};
368 368
369struct dev_state;
370
369/* ----------------------------------------------------------------------- */ 371/* ----------------------------------------------------------------------- */
370 372
371struct usb_tt; 373struct usb_tt;
@@ -749,6 +751,11 @@ extern struct usb_host_interface *usb_find_alt_setting(
749 unsigned int iface_num, 751 unsigned int iface_num,
750 unsigned int alt_num); 752 unsigned int alt_num);
751 753
754/* port claiming functions */
755int usb_hub_claim_port(struct usb_device *hdev, unsigned port1,
756 struct dev_state *owner);
757int usb_hub_release_port(struct usb_device *hdev, unsigned port1,
758 struct dev_state *owner);
752 759
753/** 760/**
754 * usb_make_path - returns stable device path in the usb tree 761 * usb_make_path - returns stable device path in the usb tree