Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Use USB_IS_SS macro and update a comment.
details: https://anonhg.NetBSD.org/src/rev/2dd2727f0486
branches: nick-nhusb
changeset: 334217:2dd2727f0486
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Jun 06 15:21:57 2015 +0000
description:
Use USB_IS_SS macro and update a comment.
>From t-hash.
diffstat:
sys/dev/usb/usb_subr.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (33 lines):
diff -r 004f76cf8adb -r 2dd2727f0486 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c Sat Jun 06 14:39:53 2015 +0000
+++ b/sys/dev/usb/usb_subr.c Sat Jun 06 15:21:57 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: usb_subr.c,v 1.198.2.13 2015/06/06 14:40:14 skrll Exp $ */
+/* $NetBSD: usb_subr.c,v 1.198.2.14 2015/06/06 15:21:57 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
/*
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.13 2015/06/06 14:40:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.14 2015/06/06 15:21:57 skrll Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -1429,10 +1429,11 @@
else if (s & UPS_SUSPEND)
err = USB_PORT_SUSPENDED;
/*
- * UPS_PORT_POWER_SS is available only
- * if SS, otherwise it means UPS_LOW_SPEED.
+ * Note: UPS_PORT_POWER_SS is available only
+ * on 3.x, and UPS_PORT_POWER is available
+ * only on 2.0 or 1.1.
*/
- else if (dev->ud_speed == USB_SPEED_SUPER &&
+ else if (USB_IS_SS(dev->ud_speed) &&
(s & UPS_PORT_POWER_SS))
err = USB_PORT_POWERED;
else if (s & UPS_PORT_POWER)
Home |
Main Index |
Thread Index |
Old Index