Lines Matching refs:tdev

118 #define ERROR(tdev, fmt, args...) \
119 dev_err(&(tdev)->intf->dev , fmt , ## args)
120 #define WARNING(tdev, fmt, args...) \
121 dev_warn(&(tdev)->intf->dev , fmt , ## args)
384 static int check_guard_bytes(struct usbtest_dev *tdev, struct urb *urb)
392 ERROR(tdev, "guard byte[%d] %d (not %d)\n",
400 static int simple_check_buf(struct usbtest_dev *tdev, struct urb *urb)
408 int ret = check_guard_bytes(tdev, urb);
433 ERROR(tdev, "buf[%d] = %d (not %d)\n", i, *buf, expected);
455 struct usbtest_dev *tdev,
491 retval = simple_check_buf(tdev, urb);
601 struct usbtest_dev *tdev,
609 struct usb_device *udev = testdev_to_usbdev(tdev);
644 ERROR(tdev, "perform_sglist failed, "
704 static int is_good_config(struct usbtest_dev *tdev, int len)
710 config = (struct usb_config_descriptor *) tdev->buf;
716 ERROR(tdev, "bogus config descriptor length\n");
721 ERROR(tdev, "high bit of config attributes not set\n");
725 ERROR(tdev, "reserved config bits set\n");
737 ERROR(tdev, "bogus config descriptor read size\n");
741 static int is_good_ext(struct usbtest_dev *tdev, u8 *buf)
749 ERROR(tdev, "bogus usb 2.0 extension descriptor length\n");
756 ERROR(tdev, "reserved bits set\n");
763 static int is_good_ss_cap(struct usbtest_dev *tdev, u8 *buf)
770 ERROR(tdev, "bogus superspeed device capability descriptor length\n");
779 ERROR(tdev, "reserved bits set in bmAttributes\n");
785 ERROR(tdev, "reserved bits set in wSpeedSupported\n");
792 static int is_good_con_id(struct usbtest_dev *tdev, u8 *buf)
799 ERROR(tdev, "bogus container id descriptor length\n");
804 ERROR(tdev, "reserved bits set\n");
1629 static int verify_not_halted(struct usbtest_dev *tdev, int ep, struct urb *urb)
1637 ERROR(tdev, "ep %02x couldn't get no-halt status, %d\n",
1642 ERROR(tdev, "ep %02x bogus status: %04x != 0\n", ep, status);
1645 retval = simple_io(tdev, urb, 1, 0, 0, __func__);
1651 static int verify_halted(struct usbtest_dev *tdev, int ep, struct urb *urb)
1659 ERROR(tdev, "ep %02x couldn't get halt status, %d\n",
1664 ERROR(tdev, "ep %02x bogus status: %04x != 1\n", ep, status);
1667 retval = simple_io(tdev, urb, 1, 0, -EPIPE, __func__);
1670 retval = simple_io(tdev, urb, 1, 0, -EPIPE, "verify_still_halted");
1676 static int test_halt(struct usbtest_dev *tdev, int ep, struct urb *urb)
1681 retval = verify_not_halted(tdev, ep, urb);
1691 ERROR(tdev, "ep %02x couldn't set halt, %d\n", ep, retval);
1694 retval = verify_halted(tdev, ep, urb);
1701 ERROR(tdev, "ep %02x couldn't clear halt, %d\n",
1710 ERROR(tdev, "ep %02x couldn't clear halt, %d\n", ep, retval);
1713 retval = verify_not_halted(tdev, ep, urb);
1722 static int test_toggle_sync(struct usbtest_dev *tdev, int ep, struct urb *urb)
1729 ERROR(tdev, "ep %02x couldn't clear halt, %d\n", ep, retval);
1734 retval = simple_io(tdev, urb, 1, 0, 0, __func__);
1741 ERROR(tdev, "ep %02x couldn't clear halt, %d\n", ep, retval);
1746 retval = simple_io(tdev, urb, 1, 0, 0, __func__);
2159 struct usbtest_dev *tdev,
2167 struct urb *urb = usbtest_alloc_urb(testdev_to_usbdev(tdev),
2173 retval = simple_io(tdev, urb, iterations, 0, 0, label);