Add a quirk for devices that lie about how they are powered.
This commit is contained in:
parent
d0bbed5169
commit
740ae27d5a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usb_quirks.h,v 1.7 1999/06/26 00:09:15 augustss Exp $ */
|
||||
/* $NetBSD: usb_quirks.h,v 1.8 1999/10/11 09:16:39 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -44,6 +44,7 @@ struct usbd_quirks {
|
||||
#define UQ_MS_REVZ 0x04 /* mouse has Z-axis reversed */
|
||||
#define UQ_NO_STRINGS 0x08 /* string descriptors are broken. */
|
||||
#define UQ_BAD_ADC 0x10 /* bad audio spec version number. */
|
||||
#define UQ_BUS_POWERED 0x20 /* device is bus powered, despite claim */
|
||||
};
|
||||
|
||||
extern struct usbd_quirks usbd_no_quirk;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: usb_subr.c,v 1.48 1999/09/16 19:20:34 augustss Exp $ */
|
||||
/* $NetBSD: usb_subr.c,v 1.49 1999/10/11 09:16:39 augustss Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -578,7 +578,8 @@ usbd_set_config_index(dev, index, msg)
|
||||
goto bad;
|
||||
}
|
||||
selfpowered = 0;
|
||||
if (cdp->bmAttributes & UC_SELF_POWERED) {
|
||||
if (!(dev->quirks->uq_flags & UQ_BUS_POWERED) &&
|
||||
cdp->bmAttributes & UC_SELF_POWERED) {
|
||||
/* May be self powered. */
|
||||
if (cdp->bmAttributes & UC_BUS_POWERED) {
|
||||
/* Must ask device. */
|
||||
|
Loading…
Reference in New Issue
Block a user