From 60e1a2a1cb47c5c34c7d9a11f318399a59bd8045 Mon Sep 17 00:00:00 2001 From: drochner Date: Fri, 19 Jan 2007 22:46:21 +0000 Subject: [PATCH] Kill the "bus powered" bit in the configuration descriptor. This doesn't exist in newer spec revisions, and is recommended to be set to 1. So call it _MBO and also use it in the fake root hub descriptors, just for sanity, even if nothing ever looks at it. --- sys/dev/usb/ehci.c | 6 +++--- sys/dev/usb/ohci.c | 6 +++--- sys/dev/usb/uhci.c | 6 +++--- sys/dev/usb/usb.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index bb21bfea0825..db5818a11ad8 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ehci.c,v 1.119 2007/01/07 16:44:44 drochner Exp $ */ +/* $NetBSD: ehci.c,v 1.120 2007/01/19 22:46:21 drochner Exp $ */ /* * Copyright (c) 2004,2005 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.119 2007/01/07 16:44:44 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.120 2007/01/19 22:46:21 drochner Exp $"); #include "ohci.h" #include "uhci.h" @@ -1584,7 +1584,7 @@ Static usb_config_descriptor_t ehci_confd = { 1, 1, 0, - UC_SELF_POWERED, + UC_ATTR_MBO | UC_SELF_POWERED, 0 /* max power */ }; diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 57adf2cba7ed..4220dd3dd7be 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $NetBSD: ohci.c,v 1.179 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: ohci.c,v 1.180 2007/01/19 22:46:21 drochner Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ /* @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.179 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ohci.c,v 1.180 2007/01/19 22:46:21 drochner Exp $"); #include #include @@ -2323,7 +2323,7 @@ Static usb_config_descriptor_t ohci_confd = { 1, 1, 0, - UC_SELF_POWERED, + UC_ATTR_MBO | UC_SELF_POWERED, 0 /* max power */ }; diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c index fabd600081bf..1241d9c086f7 100644 --- a/sys/dev/usb/uhci.c +++ b/sys/dev/usb/uhci.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhci.c,v 1.205 2006/11/16 01:33:26 christos Exp $ */ +/* $NetBSD: uhci.c,v 1.206 2007/01/19 22:46:21 drochner Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */ /* @@ -49,7 +49,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.205 2006/11/16 01:33:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.206 2007/01/19 22:46:21 drochner Exp $"); #include #include @@ -3020,7 +3020,7 @@ usb_config_descriptor_t uhci_confd = { 1, 1, 0, - UC_SELF_POWERED, + UC_ATTR_MBO | UC_SELF_POWERED, 0 /* max power */ }; diff --git a/sys/dev/usb/usb.h b/sys/dev/usb/usb.h index 1a7ec9ec8936..5b723741ce36 100644 --- a/sys/dev/usb/usb.h +++ b/sys/dev/usb/usb.h @@ -1,4 +1,4 @@ -/* $NetBSD: usb.h,v 1.75 2006/12/03 22:34:58 pavel Exp $ */ +/* $NetBSD: usb.h,v 1.76 2007/01/19 22:46:21 drochner Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.h,v 1.14 1999/11/17 22:33:46 n_hibma Exp $ */ /* @@ -215,7 +215,7 @@ typedef struct { uByte bConfigurationValue; uByte iConfiguration; uByte bmAttributes; -#define UC_BUS_POWERED 0x80 +#define UC_ATTR_MBO 0x80 #define UC_SELF_POWERED 0x40 #define UC_REMOTE_WAKEUP 0x20 uByte bMaxPower; /* max current in 2 mA units */