.. | .. |
---|
516 | 516 | case USB_PORT_FEAT_U1_TIMEOUT: |
---|
517 | 517 | usbip_dbg_vhci_rh( |
---|
518 | 518 | " SetPortFeature: USB_PORT_FEAT_U1_TIMEOUT\n"); |
---|
| 519 | + fallthrough; |
---|
519 | 520 | case USB_PORT_FEAT_U2_TIMEOUT: |
---|
520 | 521 | usbip_dbg_vhci_rh( |
---|
521 | 522 | " SetPortFeature: USB_PORT_FEAT_U2_TIMEOUT\n"); |
---|
.. | .. |
---|
568 | 569 | "supported for USB 2.0 roothub\n"); |
---|
569 | 570 | goto error; |
---|
570 | 571 | } |
---|
571 | | - /* FALLS THROUGH */ |
---|
| 572 | + fallthrough; |
---|
572 | 573 | case USB_PORT_FEAT_RESET: |
---|
573 | 574 | usbip_dbg_vhci_rh( |
---|
574 | 575 | " SetPortFeature: USB_PORT_FEAT_RESET\n"); |
---|
.. | .. |
---|
591 | 592 | |
---|
592 | 593 | /* 50msec reset signaling */ |
---|
593 | 594 | vhci_hcd->re_timeout = jiffies + msecs_to_jiffies(50); |
---|
594 | | - |
---|
595 | | - /* FALLS THROUGH */ |
---|
| 595 | + fallthrough; |
---|
596 | 596 | default: |
---|
597 | 597 | usbip_dbg_vhci_rh(" SetPortFeature: default %d\n", |
---|
598 | 598 | wValue); |
---|
.. | .. |
---|
664 | 664 | static void vhci_tx_urb(struct urb *urb, struct vhci_device *vdev) |
---|
665 | 665 | { |
---|
666 | 666 | struct vhci_priv *priv; |
---|
667 | | - struct vhci_hcd *vhci_hcd; |
---|
| 667 | + struct vhci_hcd *vhci_hcd = vdev_to_vhci_hcd(vdev); |
---|
668 | 668 | unsigned long flags; |
---|
669 | | - |
---|
670 | | - if (!vdev) { |
---|
671 | | - pr_err("could not get virtual device"); |
---|
672 | | - return; |
---|
673 | | - } |
---|
674 | | - vhci_hcd = vdev_to_vhci_hcd(vdev); |
---|
675 | 669 | |
---|
676 | 670 | priv = kzalloc(sizeof(struct vhci_priv), GFP_ATOMIC); |
---|
677 | 671 | if (!priv) { |
---|
.. | .. |
---|
813 | 807 | usb_hcd_unlink_urb_from_ep(hcd, urb); |
---|
814 | 808 | no_need_unlink: |
---|
815 | 809 | spin_unlock_irqrestore(&vhci->lock, flags); |
---|
816 | | - if (!ret) |
---|
| 810 | + if (!ret) { |
---|
| 811 | + /* usb_hcd_giveback_urb() should be called with |
---|
| 812 | + * irqs disabled |
---|
| 813 | + */ |
---|
| 814 | + local_irq_disable(); |
---|
817 | 815 | usb_hcd_giveback_urb(hcd, urb, urb->status); |
---|
| 816 | + local_irq_enable(); |
---|
| 817 | + } |
---|
818 | 818 | return ret; |
---|
819 | 819 | } |
---|
820 | 820 | |
---|
.. | .. |
---|
1235 | 1235 | if (id == 0 && usb_hcd_is_primary_hcd(hcd)) { |
---|
1236 | 1236 | err = vhci_init_attr_group(); |
---|
1237 | 1237 | if (err) { |
---|
1238 | | - pr_err("init attr group\n"); |
---|
| 1238 | + dev_err(hcd_dev(hcd), "init attr group failed, err = %d\n", err); |
---|
1239 | 1239 | return err; |
---|
1240 | 1240 | } |
---|
1241 | 1241 | err = sysfs_create_group(&hcd_dev(hcd)->kobj, &vhci_attr_group); |
---|
1242 | 1242 | if (err) { |
---|
1243 | | - pr_err("create sysfs files\n"); |
---|
| 1243 | + dev_err(hcd_dev(hcd), "create sysfs files failed, err = %d\n", err); |
---|
1244 | 1244 | vhci_finish_attr_group(); |
---|
1245 | 1245 | return err; |
---|
1246 | 1246 | } |
---|