Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Add comments.
details: https://anonhg.NetBSD.org/src/rev/567404f838cd
branches: trunk
changeset: 1010635:567404f838cd
user: maxv <maxv%NetBSD.org@localhost>
date: Sun May 31 07:53:38 2020 +0000
description:
Add comments.
diffstat:
sys/dev/usb/vhci.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diffs (44 lines):
diff -r c2136e014225 -r 567404f838cd sys/dev/usb/vhci.c
--- a/sys/dev/usb/vhci.c Sun May 31 06:27:06 2020 +0000
+++ b/sys/dev/usb/vhci.c Sun May 31 07:53:38 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vhci.c,v 1.18 2020/05/21 05:58:00 maxv Exp $ */
+/* $NetBSD: vhci.c,v 1.19 2020/05/31 07:53:38 maxv Exp $ */
/*
* Copyright (c) 2019-2020 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vhci.c,v 1.18 2020/05/21 05:58:00 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vhci.c,v 1.19 2020/05/31 07:53:38 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -832,6 +832,10 @@
}
KASSERT(xfer->ux_status == USBD_IN_PROGRESS);
+ /*
+ * Mark our port has having changed state. Uhub will then fetch
+ * status/change and see it needs to perform an attach.
+ */
p = xfer->ux_buf;
memset(p, 0, xfer->ux_length);
p[0] = __BIT(vfd->port); /* TODO-bitmap */
@@ -917,9 +921,13 @@
port->status = 0;
port->change = UPS_C_CONNECT_STATUS | UPS_C_PORT_RESET;
+ /*
+ * Mark our port has having changed state. Uhub will then fetch
+ * status/change and see it needs to perform a detach.
+ */
p = xfer->ux_buf;
memset(p, 0, xfer->ux_length);
- p[0] = __BIT(vfd->port);
+ p[0] = __BIT(vfd->port); /* TODO-bitmap */
xfer->ux_actlen = xfer->ux_length;
xfer->ux_status = USBD_NORMAL_COMPLETION;
Home |
Main Index |
Thread Index |
Old Index