aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/usbip
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-10-28 09:44:56 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-28 09:44:56 -0700
commite4c5bf8e3dca827a1b3a6fac494eae8c74b7e1e7 (patch)
treeea51b391f7d74ca695dcb9f5e46eb02688a92ed9 /drivers/staging/usbip
parent81280572ca6f54009edfa4deee563e8678784218 (diff)
parenta4ac0d847af9dd34d5953a5e264400326144b6b2 (diff)
Merge 'staging-next' to Linus's tree
This merges the staging-next tree to Linus's tree and resolves some conflicts that were present due to changes in other trees that were affected by files here. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip')
-rw-r--r--drivers/staging/usbip/Makefile11
-rw-r--r--drivers/staging/usbip/stub_dev.c2
-rw-r--r--drivers/staging/usbip/usbip_common.c2
-rw-r--r--drivers/staging/usbip/usbip_event.c16
-rw-r--r--drivers/staging/usbip/vhci_hcd.c2
5 files changed, 12 insertions, 21 deletions
diff --git a/drivers/staging/usbip/Makefile b/drivers/staging/usbip/Makefile
index 6f2916b1807..279f3cc3eea 100644
--- a/drivers/staging/usbip/Makefile
+++ b/drivers/staging/usbip/Makefile
@@ -1,12 +1,11 @@
obj-$(CONFIG_USB_IP_COMMON) += usbip_common_mod.o
-usbip_common_mod-objs := usbip_common.o usbip_event.o
+usbip_common_mod-y := usbip_common.o usbip_event.o
obj-$(CONFIG_USB_IP_VHCI_HCD) += vhci-hcd.o
-vhci-hcd-objs := vhci_sysfs.o vhci_tx.o vhci_rx.o vhci_hcd.o
+vhci-hcd-y := vhci_sysfs.o vhci_tx.o vhci_rx.o vhci_hcd.o
obj-$(CONFIG_USB_IP_HOST) += usbip.o
-usbip-objs := stub_dev.o stub_main.o stub_rx.o stub_tx.o
+usbip-y := stub_dev.o stub_main.o stub_rx.o stub_tx.o
+
+ccflags-$(CONFIG_USB_IP_DEBUG_ENABLE) := -DDEBUG
-ifeq ($(CONFIG_USB_IP_DEBUG_ENABLE),y)
- EXTRA_CFLAGS += -DDEBUG
-endif
diff --git a/drivers/staging/usbip/stub_dev.c b/drivers/staging/usbip/stub_dev.c
index b6b753a4934..b186b5fed2b 100644
--- a/drivers/staging/usbip/stub_dev.c
+++ b/drivers/staging/usbip/stub_dev.c
@@ -427,11 +427,11 @@ static int stub_probe(struct usb_interface *interface,
if (busid_priv->status == STUB_BUSID_ALLOC) {
- busid_priv->interf_count++;
sdev = busid_priv->sdev;
if (!sdev)
return -ENODEV;
+ busid_priv->interf_count++;
dev_info(&interface->dev,
"USB/IP Stub: register a new interface "
"(bus %u dev %u ifn %u)\n", udev->bus->busnum, udev->devnum,
diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index 6a499f0eb59..210ef16bab8 100644
--- a/drivers/staging/usbip/usbip_common.c
+++ b/drivers/staging/usbip/usbip_common.c
@@ -456,7 +456,7 @@ EXPORT_SYMBOL_GPL(usbip_task_init);
/*-------------------------------------------------------------------------*/
/* socket routines */
- /* Send/receive messages over TCP/IP. I refer drivers/block/nbd.c */
+/* Send/receive messages over TCP/IP. I refer drivers/block/nbd.c */
int usbip_xmit(int send, struct socket *sock, char *buf,
int size, int msg_flags)
{
diff --git a/drivers/staging/usbip/usbip_event.c b/drivers/staging/usbip/usbip_event.c
index a2566f1075d..af3832b03e4 100644
--- a/drivers/staging/usbip/usbip_event.c
+++ b/drivers/staging/usbip/usbip_event.c
@@ -38,21 +38,13 @@ static int event_handler(struct usbip_device *ud)
ud->eh_ops.shutdown(ud);
ud->event &= ~USBIP_EH_SHUTDOWN;
-
- break;
}
- /* Stop the error handler. */
- if (ud->event & USBIP_EH_BYE)
- return -1;
-
/* Reset the device. */
if (ud->event & USBIP_EH_RESET) {
ud->eh_ops.reset(ud);
ud->event &= ~USBIP_EH_RESET;
-
- break;
}
/* Mark the device as unusable. */
@@ -60,13 +52,11 @@ static int event_handler(struct usbip_device *ud)
ud->eh_ops.unusable(ud);
ud->event &= ~USBIP_EH_UNUSABLE;
-
- break;
}
- /* NOTREACHED */
- printk(KERN_ERR "%s: unknown event\n", __func__);
- return -1;
+ /* Stop the error handler. */
+ if (ud->event & USBIP_EH_BYE)
+ return -1;
}
return 0;
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index 0574d848b90..832608d3e57 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -164,6 +164,8 @@ void rh_port_disconnect(int rhport)
* spin_unlock(&vdev->ud.lock); */
spin_unlock_irqrestore(&the_controller->lock, flags);
+
+ usb_hcd_poll_rh_status(vhci_to_hcd(the_controller));
}