diff options
Diffstat (limited to 'drivers/usb/usbip/vhci_hcd.c')
-rw-r--r-- | drivers/usb/usbip/vhci_hcd.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c index b03e5021c25b..e70fba9f55d6 100644 --- a/drivers/usb/usbip/vhci_hcd.c +++ b/drivers/usb/usbip/vhci_hcd.c @@ -11,6 +11,7 @@ #include <linux/module.h> #include <linux/platform_device.h> #include <linux/slab.h> +#include <linux/string_choices.h> #include "usbip_common.h" #include "vhci.h" @@ -675,7 +676,7 @@ static void vhci_tx_urb(struct urb *urb, struct vhci_device *vdev) spin_lock_irqsave(&vdev->priv_lock, flags); - priv->seqnum = atomic_inc_return(&vhci_hcd->seqnum); + priv->seqnum = (u32)atomic_inc_return(&vhci_hcd->seqnum); if (priv->seqnum == 0xffff) dev_info(&urb->dev->dev, "seqnum max\n"); @@ -1161,12 +1162,8 @@ static int vhci_setup(struct usb_hcd *hcd) hcd->self.root_hub->speed = USB_SPEED_SUPER_PLUS; } - /* - * Support SG. - * sg_tablesize is an arbitrary value to alleviate memory pressure - * on the host. - */ - hcd->self.sg_tablesize = 32; + /* accept arbitrarily long scatter-gather lists */ + hcd->self.sg_tablesize = ~0; hcd->self.no_sg_constraint = 1; return 0; @@ -1453,7 +1450,7 @@ static int vhci_hcd_suspend(struct platform_device *pdev, pm_message_t state) if (connected > 0) { dev_info(&pdev->dev, "We have %d active connection%s. Do not suspend.\n", - connected, (connected == 1 ? "" : "s")); + connected, str_plural(connected)); ret = -EBUSY; } else { dev_info(&pdev->dev, "suspend vhci_hcd"); |