Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Some USB3 / SS support - baby steps. From Takah...



details:   https://anonhg.NetBSD.org/src/rev/332bf0c035ab
branches:  trunk
changeset: 331499:332bf0c035ab
user:      skrll <skrll%NetBSD.org@localhost>
date:      Tue Aug 12 13:36:40 2014 +0000

description:
Some USB3 / SS support - baby steps.  From Takahiro HAYASHI.

diffstat:

 sys/dev/usb/uhub.c     |  8 +++++---
 sys/dev/usb/usb.c      |  8 ++++++--
 sys/dev/usb/usbdivar.h |  5 +++--
 3 files changed, 14 insertions(+), 7 deletions(-)

diffs (84 lines):

diff -r 7061e9c605dd -r 332bf0c035ab sys/dev/usb/uhub.c
--- a/sys/dev/usb/uhub.c        Tue Aug 12 13:28:44 2014 +0000
+++ b/sys/dev/usb/uhub.c        Tue Aug 12 13:36:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhub.c,v 1.124 2013/09/15 15:33:47 martin Exp $        */
+/*     $NetBSD: uhub.c,v 1.125 2014/08/12 13:36:40 skrll Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $       */
 
 /*
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.124 2013/09/15 15:33:47 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.125 2014/08/12 13:36:40 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -540,7 +540,9 @@
                }
 
                /* Figure out device speed */
-               if (status & UPS_HIGH_SPEED)
+               if (status & UPS_SUPER_SPEED)
+                       speed = USB_SPEED_SUPER;
+               else if (status & UPS_HIGH_SPEED)
                        speed = USB_SPEED_HIGH;
                else if (status & UPS_LOW_SPEED)
                        speed = USB_SPEED_LOW;
diff -r 7061e9c605dd -r 332bf0c035ab sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Tue Aug 12 13:28:44 2014 +0000
+++ b/sys/dev/usb/usb.c Tue Aug 12 13:36:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usb.c,v 1.154 2014/07/25 08:10:39 dholland Exp $       */
+/*     $NetBSD: usb.c,v 1.155 2014/08/12 13:36:40 skrll Exp $  */
 
 /*
  * Copyright (c) 1998, 2002, 2008, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.154 2014/07/25 08:10:39 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.155 2014/08/12 13:36:40 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -203,6 +203,7 @@
        case USBREV_1_0:
        case USBREV_1_1:
        case USBREV_2_0:
+       case USBREV_3_0:
                break;
        default:
                aprint_error(", not supported\n");
@@ -285,6 +286,9 @@
        case USBREV_2_0:
                speed = USB_SPEED_HIGH;
                break;
+       case USBREV_3_0:
+               speed = USB_SPEED_SUPER;
+               break;
        default:
                panic("usb_doattach");
        }
diff -r 7061e9c605dd -r 332bf0c035ab sys/dev/usb/usbdivar.h
--- a/sys/dev/usb/usbdivar.h    Tue Aug 12 13:28:44 2014 +0000
+++ b/sys/dev/usb/usbdivar.h    Tue Aug 12 13:36:40 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdivar.h,v 1.107 2013/10/03 19:04:00 skrll Exp $     */
+/*     $NetBSD: usbdivar.h,v 1.108 2014/08/12 13:36:40 skrll Exp $     */
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -164,7 +164,8 @@
 #define USBREV_1_0     2
 #define USBREV_1_1     3
 #define USBREV_2_0     4
-#define USBREV_STR { "unknown", "pre 1.0", "1.0", "1.1", "2.0" }
+#define USBREV_3_0     5
+#define USBREV_STR { "unknown", "pre 1.0", "1.0", "1.1", "2.0", "3.0" }
 
        void                   *soft; /* soft interrupt cookie */
        bus_dma_tag_t           dmatag; /* DMA tag */



Home | Main Index | Thread Index | Old Index