aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usbtest.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-11-14 00:14:07 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2017-11-14 00:14:07 -0500
commit894025f24bd028942da3e602b87d9f7223109b14 (patch)
tree57f23d2bcdd59aaa6a3e7e26e175e678bfa9a5f4 /drivers/usb/misc/usbtest.c
parentfb0255fb2941ef6f21742b2bc146d6b9aef4fedc (diff)
parentcdafb6d8b8da7fde266f79b3287ac221aa841879 (diff)
Merge tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB/PHY updates from Greg KH: "Here is the big set of USB and PHY driver updates for 4.15-rc1. There is the usual amount of gadget and xhci driver updates, along with phy and chipidea enhancements. There's also a lot of SPDX tags and license boilerplate cleanups as well, which provide some churn in the diffstat. Other major thing is the typec code that moved out of staging and into the "real" part of the drivers/usb/ tree, which was nice to see happen. All of these have been in linux-next with no reported issues for a while" * tag 'usb-4.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits) usb: gadget: f_fs: Fix use-after-free in ffs_free_inst USB: usbfs: compute urb->actual_length for isochronous usb: core: message: remember to reset 'ret' to 0 when necessary USB: typec: Remove remaining redundant license text USB: typec: add SPDX identifiers to some files USB: renesas_usbhs: rcar?.h: add SPDX tags USB: chipidea: ci_hdrc_tegra.c: add SPDX line USB: host: xhci-debugfs: add SPDX lines USB: add SPDX identifiers to all remaining Makefiles usb: host: isp1362-hcd: remove a couple of redundant assignments USB: adutux: remove redundant variable minor usb: core: add a new usb_get_ptm_status() helper usb: core: add a 'type' parameter to usb_get_status() usb: core: introduce a new usb_get_std_status() helper usb: core: rename usb_get_status() 'type' argument to 'recip' usb: core: add Status Type definitions USB: gadget: Remove redundant license text USB: gadget: function: Remove redundant license text USB: gadget: udc: Remove redundant license text USB: gadget: legacy: Remove redundant license text ...
Diffstat (limited to 'drivers/usb/misc/usbtest.c')
-rw-r--r--drivers/usb/misc/usbtest.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 5ad74750e8a4..aedc9a7f149e 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1,3 +1,4 @@
1// SPDX-License-Identifier: GPL-2.0
1#include <linux/kernel.h> 2#include <linux/kernel.h>
2#include <linux/errno.h> 3#include <linux/errno.h>
3#include <linux/init.h> 4#include <linux/init.h>
@@ -1023,7 +1024,7 @@ static int ch9_postconfig(struct usbtest_dev *dev)
1023 /* FIXME fetch strings from at least the device descriptor */ 1024 /* FIXME fetch strings from at least the device descriptor */
1024 1025
1025 /* [9.4.5] get_status always works */ 1026 /* [9.4.5] get_status always works */
1026 retval = usb_get_status(udev, USB_RECIP_DEVICE, 0, dev->buf); 1027 retval = usb_get_std_status(udev, USB_RECIP_DEVICE, 0, dev->buf);
1027 if (retval) { 1028 if (retval) {
1028 dev_err(&iface->dev, "get dev status --> %d\n", retval); 1029 dev_err(&iface->dev, "get dev status --> %d\n", retval);
1029 return retval; 1030 return retval;
@@ -1033,7 +1034,7 @@ static int ch9_postconfig(struct usbtest_dev *dev)
1033 * the device's remote wakeup feature ... if we can, test that here 1034 * the device's remote wakeup feature ... if we can, test that here
1034 */ 1035 */
1035 1036
1036 retval = usb_get_status(udev, USB_RECIP_INTERFACE, 1037 retval = usb_get_std_status(udev, USB_RECIP_INTERFACE,
1037 iface->altsetting[0].desc.bInterfaceNumber, dev->buf); 1038 iface->altsetting[0].desc.bInterfaceNumber, dev->buf);
1038 if (retval) { 1039 if (retval) {
1039 dev_err(&iface->dev, "get interface status --> %d\n", retval); 1040 dev_err(&iface->dev, "get interface status --> %d\n", retval);
@@ -1622,7 +1623,7 @@ static int verify_not_halted(struct usbtest_dev *tdev, int ep, struct urb *urb)
1622 u16 status; 1623 u16 status;
1623 1624
1624 /* shouldn't look or act halted */ 1625 /* shouldn't look or act halted */
1625 retval = usb_get_status(urb->dev, USB_RECIP_ENDPOINT, ep, &status); 1626 retval = usb_get_std_status(urb->dev, USB_RECIP_ENDPOINT, ep, &status);
1626 if (retval < 0) { 1627 if (retval < 0) {
1627 ERROR(tdev, "ep %02x couldn't get no-halt status, %d\n", 1628 ERROR(tdev, "ep %02x couldn't get no-halt status, %d\n",
1628 ep, retval); 1629 ep, retval);
@@ -1644,7 +1645,7 @@ static int verify_halted(struct usbtest_dev *tdev, int ep, struct urb *urb)
1644 u16 status; 1645 u16 status;
1645 1646
1646 /* should look and act halted */ 1647 /* should look and act halted */
1647 retval = usb_get_status(urb->dev, USB_RECIP_ENDPOINT, ep, &status); 1648 retval = usb_get_std_status(urb->dev, USB_RECIP_ENDPOINT, ep, &status);
1648 if (retval < 0) { 1649 if (retval < 0) {
1649 ERROR(tdev, "ep %02x couldn't get halt status, %d\n", 1650 ERROR(tdev, "ep %02x couldn't get halt status, %d\n",
1650 ep, retval); 1651 ep, retval);
@@ -1917,7 +1918,7 @@ static struct urb *iso_alloc_urb(
1917 1918
1918 if (bytes < 0 || !desc) 1919 if (bytes < 0 || !desc)
1919 return NULL; 1920 return NULL;
1920 maxp = 0x7ff & usb_endpoint_maxp(desc); 1921 maxp = usb_endpoint_maxp(desc);
1921 maxp *= usb_endpoint_maxp_mult(desc); 1922 maxp *= usb_endpoint_maxp_mult(desc);
1922 packets = DIV_ROUND_UP(bytes, maxp); 1923 packets = DIV_ROUND_UP(bytes, maxp);
1923 1924