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

This commit is contained in:
skrll 2014-08-12 13:36:40 +00:00
parent d7d05ee629
commit be08e709ea
3 changed files with 14 additions and 7 deletions

View File

@ -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 @@ uhub_explore(usbd_device_handle dev)
}
/* 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;

View File

@ -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 @@ usb_attach(device_t parent, device_t self, void *aux)
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 @@ usb_doattach(device_t self)
case USBREV_2_0:
speed = USB_SPEED_HIGH;
break;
case USBREV_3_0:
speed = USB_SPEED_SUPER;
break;
default:
panic("usb_doattach");
}

View File

@ -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 @@ struct usbd_bus {
#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 */