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 Deal with super speed port powered reportin...



details:   https://anonhg.NetBSD.org/src/rev/f5c89aec6183
branches:  nick-nhusb
changeset: 804344:f5c89aec6183
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Apr 07 07:16:47 2015 +0000

description:
Deal with super speed port powered reporting.  From Takahiro HAYASHI.

diffstat:

 sys/dev/usb/usb_subr.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 1267b631c595 -r f5c89aec6183 sys/dev/usb/usb_subr.c
--- a/sys/dev/usb/usb_subr.c    Tue Apr 07 07:11:58 2015 +0000
+++ b/sys/dev/usb/usb_subr.c    Tue Apr 07 07:16:47 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb_subr.c,v 1.198.2.10 2015/04/06 15:18:13 skrll Exp $        */
+/*     $NetBSD: usb_subr.c,v 1.198.2.11 2015/04/07 07:16:47 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.10 2015/04/06 15:18:13 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb_subr.c,v 1.198.2.11 2015/04/07 07:16:47 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1427,6 +1427,13 @@
                                        err = USB_PORT_ENABLED;
                                else if (s & UPS_SUSPEND)
                                        err = USB_PORT_SUSPENDED;
+                               /*
+                                * UPS_PORT_POWER_SS is available only
+                                * if SS, otherwise it means UPS_LOW_SPEED.
+                                */
+                               else if (dev->ud_speed == USB_SPEED_SUPER && 
+                                   (s & UPS_PORT_POWER_SS) &&
+                                       err = USB_PORT_POWERED;
                                else if (s & UPS_PORT_POWER)
                                        err = USB_PORT_POWERED;
                                else



Home | Main Index | Thread Index | Old Index