diff options
author | le <le@FreeBSD.org> | 2004-07-01 21:14:03 +0000 |
---|---|---|
committer | le <le@FreeBSD.org> | 2004-07-01 21:14:03 +0000 |
commit | 4925f692a66a8085e74a9541f8feee4599fd2f5a (patch) | |
tree | b8d271a2009259083cd94127d4d2f341119d83d2 | |
parent | 615a6a246a8cac15992a2778449e45acc555bf7b (diff) | |
download | FreeBSD-src-4925f692a66a8085e74a9541f8feee4599fd2f5a.zip FreeBSD-src-4925f692a66a8085e74a9541f8feee4599fd2f5a.tar.gz |
MFNetBSD.
rev. 1.68, author: mycroft
Ignore a port error that happens to come in at the same time as a
connect status change. Some root hubs seem to report both.
Obtained from: NetBSD
-rw-r--r-- | sys/dev/usb/uhub.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index 77a2ead..96cfdf2 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -1,4 +1,4 @@ -/* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */ +/* $NetBSD: uhub.c,v 1.68 2004/06/29 06:30:05 mycroft Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -381,7 +381,10 @@ uhub_explore(usbd_device_handle dev) if (change & UPS_C_PORT_ENABLED) { DPRINTF(("uhub_explore: C_PORT_ENABLED\n")); usbd_clear_port_feature(dev, port, UHF_C_PORT_ENABLE); - if (status & UPS_PORT_ENABLED) { + if (change & UPS_C_CONNECT_STATUS) { + /* Ignore the port error if the device + vanished. */ + } else if (status & UPS_PORT_ENABLED) { printf("%s: illegal enable change, port %d\n", USBDEVNAME(sc->sc_dev), port); } else { |