summaryrefslogtreecommitdiffstats
path: root/drivers/staging/usbip/stub.h
diff options
context:
space:
mode:
authorEndre Kollar <taxy443@gmail.com>2010-07-27 12:39:30 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-27 11:06:29 -0700
commitaa5873e96271611ae55586f65e49ea1fab90cb88 (patch)
treeb2a0c0b5d06976b262e4403225d6ca3bc8380daf /drivers/staging/usbip/stub.h
parent125ed824d3d03f5c470cf98aca757fd9423c49ab (diff)
downloadlinux-aa5873e96271611ae55586f65e49ea1fab90cb88.tar.bz2
Staging: usbip: fix multiple interfaces
The stub_probe function instantiates an stub_dev object for all interfaces. Wich causes a problem. The stub_dev object belongs to their own interfaces. This patch creates the sdev object at the first stub_probe call, the other calls associate the interfaces to this. Signed-off-by: Endre Kollar <taxy443@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip/stub.h')
-rw-r--r--drivers/staging/usbip/stub.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/staging/usbip/stub.h b/drivers/staging/usbip/stub.h
index 022d0649ac5e..30dbfb6d16f2 100644
--- a/drivers/staging/usbip/stub.h
+++ b/drivers/staging/usbip/stub.h
@@ -25,6 +25,11 @@
#include <linux/module.h>
#include <linux/net.h>
+#define STUB_BUSID_OTHER 0
+#define STUB_BUSID_REMOV 1
+#define STUB_BUSID_ADDED 2
+#define STUB_BUSID_ALLOC 3
+
struct stub_device {
struct usb_interface *interface;
struct list_head list;
@@ -72,6 +77,14 @@ struct stub_unlink {
__u32 status;
};
+#define BUSID_SIZE 20
+struct bus_id_priv {
+ char name[BUSID_SIZE];
+ char status;
+ int interf_count;
+ struct stub_device *sdev;
+ char shutdown_busid;
+};
extern struct kmem_cache *stub_priv_cache;
@@ -91,5 +104,7 @@ void stub_rx_loop(struct usbip_task *);
void stub_enqueue_ret_unlink(struct stub_device *, __u32, __u32);
/* stub_main.c */
-int match_busid(const char *busid);
+struct bus_id_priv *get_busid_priv(const char *busid);
+int del_match_busid(char *busid);
+
void stub_device_cleanup_urbs(struct stub_device *sdev);