aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/usbip/vhci_hcd.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c
index f690668a4577..1e84577230ef 100644
--- a/drivers/staging/usbip/vhci_hcd.c
+++ b/drivers/staging/usbip/vhci_hcd.c
@@ -271,12 +271,14 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
271 } 271 }
272 break; 272 break;
273 case USB_PORT_FEAT_POWER: 273 case USB_PORT_FEAT_POWER:
274 usbip_dbg_vhci_rh(" ClearPortFeature: USB_PORT_FEAT_POWER\n"); 274 usbip_dbg_vhci_rh(
275 " ClearPortFeature: USB_PORT_FEAT_POWER\n");
275 dum->port_status[rhport] = 0; 276 dum->port_status[rhport] = 0;
276 dum->resuming = 0; 277 dum->resuming = 0;
277 break; 278 break;
278 case USB_PORT_FEAT_C_RESET: 279 case USB_PORT_FEAT_C_RESET:
279 usbip_dbg_vhci_rh(" ClearPortFeature: USB_PORT_FEAT_C_RESET\n"); 280 usbip_dbg_vhci_rh(
281 " ClearPortFeature: USB_PORT_FEAT_C_RESET\n");
280 switch (dum->vdev[rhport].speed) { 282 switch (dum->vdev[rhport].speed) {
281 case USB_SPEED_HIGH: 283 case USB_SPEED_HIGH:
282 dum->port_status[rhport] |= 284 dum->port_status[rhport] |=
@@ -335,15 +337,17 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
335 337
336 if (dum->vdev[rhport].ud.status == 338 if (dum->vdev[rhport].ud.status ==
337 VDEV_ST_NOTASSIGNED) { 339 VDEV_ST_NOTASSIGNED) {
338 usbip_dbg_vhci_rh(" enable rhport %d (status %u)\n", 340 usbip_dbg_vhci_rh(
339 rhport, 341 " enable rhport %d (status %u)\n",
340 dum->vdev[rhport].ud.status); 342 rhport,
343 dum->vdev[rhport].ud.status);
341 dum->port_status[rhport] |= 344 dum->port_status[rhport] |=
342 USB_PORT_STAT_ENABLE; 345 USB_PORT_STAT_ENABLE;
343 } 346 }
344 } 347 }
345 ((__le16 *) buf)[0] = cpu_to_le16(dum->port_status[rhport]); 348 ((__le16 *) buf)[0] = cpu_to_le16(dum->port_status[rhport]);
346 ((__le16 *) buf)[1] = cpu_to_le16(dum->port_status[rhport] >> 16); 349 ((__le16 *) buf)[1] =
350 cpu_to_le16(dum->port_status[rhport] >> 16);
347 351
348 usbip_dbg_vhci_rh(" GetPortStatus bye %x %x\n", ((u16 *)buf)[0], 352 usbip_dbg_vhci_rh(" GetPortStatus bye %x %x\n", ((u16 *)buf)[0],
349 ((u16 *)buf)[1]); 353 ((u16 *)buf)[1]);
@@ -355,10 +359,12 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
355 case SetPortFeature: 359 case SetPortFeature:
356 switch (wValue) { 360 switch (wValue) {
357 case USB_PORT_FEAT_SUSPEND: 361 case USB_PORT_FEAT_SUSPEND:
358 usbip_dbg_vhci_rh(" SetPortFeature: USB_PORT_FEAT_SUSPEND\n"); 362 usbip_dbg_vhci_rh(
363 " SetPortFeature: USB_PORT_FEAT_SUSPEND\n");
359 break; 364 break;
360 case USB_PORT_FEAT_RESET: 365 case USB_PORT_FEAT_RESET:
361 usbip_dbg_vhci_rh(" SetPortFeature: USB_PORT_FEAT_RESET\n"); 366 usbip_dbg_vhci_rh(
367 " SetPortFeature: USB_PORT_FEAT_RESET\n");
362 /* if it's already running, disconnect first */ 368 /* if it's already running, disconnect first */
363 if (dum->port_status[rhport] & USB_PORT_STAT_ENABLE) { 369 if (dum->port_status[rhport] & USB_PORT_STAT_ENABLE) {
364 dum->port_status[rhport] &= 370 dum->port_status[rhport] &=
@@ -530,7 +536,8 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
530 536
531 case USB_REQ_GET_DESCRIPTOR: 537 case USB_REQ_GET_DESCRIPTOR:
532 if (ctrlreq->wValue == cpu_to_le16(USB_DT_DEVICE << 8)) 538 if (ctrlreq->wValue == cpu_to_le16(USB_DT_DEVICE << 8))
533 usbip_dbg_vhci_hc("Not yet?:Get_Descriptor to device 0 (get max pipe size)\n"); 539 usbip_dbg_vhci_hc(
540 "Not yet?:Get_Descriptor to device 0 (get max pipe size)\n");
534 541
535 if (vdev->udev) 542 if (vdev->udev)
536 usb_put_dev(vdev->udev); 543 usb_put_dev(vdev->udev);
@@ -539,7 +546,9 @@ static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
539 546
540 default: 547 default:
541 /* NOT REACHED */ 548 /* NOT REACHED */
542 dev_err(dev, "invalid request to devnum 0 bRequest %u, wValue %u\n", ctrlreq->bRequest, 549 dev_err(dev,
550 "invalid request to devnum 0 bRequest %u, wValue %u\n",
551 ctrlreq->bRequest,
543 ctrlreq->wValue); 552 ctrlreq->wValue);
544 ret = -EINVAL; 553 ret = -EINVAL;
545 goto no_need_xmit; 554 goto no_need_xmit;
@@ -1060,7 +1069,9 @@ static int vhci_hcd_suspend(struct platform_device *pdev, pm_message_t state)
1060 spin_unlock(&the_controller->lock); 1069 spin_unlock(&the_controller->lock);
1061 1070
1062 if (connected > 0) { 1071 if (connected > 0) {
1063 dev_info(&pdev->dev, "We have %d active connection%s. Do not suspend.\n", connected, (connected == 1 ? "" : "s")); 1072 dev_info(&pdev->dev,
1073 "We have %d active connection%s. Do not suspend.\n",
1074 connected, (connected == 1 ? "" : "s"));
1064 ret = -EBUSY; 1075 ret = -EBUSY;
1065 } else { 1076 } else {
1066 dev_info(&pdev->dev, "suspend vhci_hcd"); 1077 dev_info(&pdev->dev, "suspend vhci_hcd");