diff options
author | Lukas Ertl <le@FreeBSD.org> | 2004-07-01 21:14:03 +0000 |
---|---|---|
committer | Lukas Ertl <le@FreeBSD.org> | 2004-07-01 21:14:03 +0000 |
commit | c88e8580687ef2ac9f0d1be07b5375903f08808f (patch) | |
tree | b8d271a2009259083cd94127d4d2f341119d83d2 | |
parent | 862b46f607ea4641313eff08f6df8fd1d930394c (diff) | |
download | src-c88e8580687ef2ac9f0d1be07b5375903f08808f.tar.gz src-c88e8580687ef2ac9f0d1be07b5375903f08808f.zip |
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
Notes
Notes:
svn path=/head/; revision=131422
-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 77a2ead48475..96cfdf24daba 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 { |