diff options
Diffstat (limited to 'drivers/staging/usbip/vhci.h')
-rw-r--r-- | drivers/staging/usbip/vhci.h | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/staging/usbip/vhci.h b/drivers/staging/usbip/vhci.h index d3f1e5f8a960..d5bc8e7e3d79 100644 --- a/drivers/staging/usbip/vhci.h +++ b/drivers/staging/usbip/vhci.h @@ -17,9 +17,14 @@ * USA. */ -#include <linux/platform_device.h> +#include <linux/device.h> +#include <linux/list.h> +#include <linux/spinlock.h> +#include <linux/sysfs.h> +#include <linux/types.h> +#include <linux/usb.h> #include <linux/usb/hcd.h> - +#include <linux/wait.h> struct vhci_device { struct usb_device *udev; @@ -33,12 +38,11 @@ struct vhci_device { /* speed of a remote device */ enum usb_device_speed speed; - /* vhci root-hub port to which this device is attached */ + /* vhci root-hub port to which this device is attached */ __u32 rhport; struct usbip_device ud; - /* lock for the below link lists */ spinlock_t priv_lock; @@ -54,7 +58,6 @@ struct vhci_device { wait_queue_head_t waitq_tx; }; - /* urb->hcpriv, use container_of() */ struct vhci_priv { unsigned long seqnum; @@ -64,7 +67,6 @@ struct vhci_priv { struct urb *urb; }; - struct vhci_unlink { /* seqnum of this request */ unsigned long seqnum; @@ -85,12 +87,12 @@ struct vhci_unlink { /* for usb_bus.hcpriv */ struct vhci_hcd { - spinlock_t lock; + spinlock_t lock; - u32 port_status[VHCI_NPORTS]; + u32 port_status[VHCI_NPORTS]; - unsigned resuming:1; - unsigned long re_timeout; + unsigned resuming:1; + unsigned long re_timeout; atomic_t seqnum; @@ -102,24 +104,20 @@ struct vhci_hcd { struct vhci_device vdev[VHCI_NPORTS]; }; - extern struct vhci_hcd *the_controller; extern struct attribute_group dev_attr_group; - - -/*-------------------------------------------------------------------------*/ -/* prototype declaration */ +#define hardware (&the_controller->pdev.dev) /* vhci_hcd.c */ void rh_port_connect(int rhport, enum usb_device_speed speed); void rh_port_disconnect(int rhport); -int vhci_rx_loop(void *data); -int vhci_tx_loop(void *data); -struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, - __u32 seqnum); +/* vhci_rx.c */ +struct urb *pickup_urb_and_free_priv(struct vhci_device *vdev, __u32 seqnum); +int vhci_rx_loop(void *data); -#define hardware (&the_controller->pdev.dev) +/* vhci_tx.c */ +int vhci_tx_loop(void *data); static inline struct vhci_device *port_to_vdev(__u32 port) { |