summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_uathvar.h
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2006-12-03 16:09:21 +0000
committerdamien <damien@openbsd.org>2006-12-03 16:09:21 +0000
commit6a54674fc1702685a23219f4ad615c28c32bc7f1 (patch)
tree7372c4afaa12d5091b8a346ebf2aa34519b1b53c /sys/dev/usb/if_uathvar.h
parentalways assume full duplex state if the interface is up... what does (diff)
downloadwireguard-openbsd-6a54674fc1702685a23219f4ad615c28c32bc7f1.tar.xz
wireguard-openbsd-6a54674fc1702685a23219f4ad615c28c32bc7f1.zip
The device doesn't always detach gracefully from the bus after a firmware
upload. We thus force a port reset and a re-exploration on the parent hub after firmware upload. In uath_newstate(), if we're called from a process context, we don't need to schedule a USB task. This fixes a problem in uath_stop(): when moving to the S_INIT state, the task was scheduled after the device was reset. Don't abort the RX firmware command pipe in uath_stop(), otherwise we will never receive commands ACKs from the firmware anymore. We now survive to an ifconfig down up.
Diffstat (limited to 'sys/dev/usb/if_uathvar.h')
-rw-r--r--sys/dev/usb/if_uathvar.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/usb/if_uathvar.h b/sys/dev/usb/if_uathvar.h
index 8255c55513d..3d99fa9f91f 100644
--- a/sys/dev/usb/if_uathvar.h
+++ b/sys/dev/usb/if_uathvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uathvar.h,v 1.3 2006/09/20 19:47:17 damien Exp $ */
+/* $OpenBSD: if_uathvar.h,v 1.4 2006/12/03 16:09:21 damien Exp $ */
/*-
* Copyright (c) 2006
@@ -122,6 +122,9 @@ struct uath_softc {
int tx_queued;
usbd_device_handle sc_udev;
+ usbd_device_handle sc_uhub;
+ int sc_port;
+
usbd_interface_handle sc_iface;
usbd_pipe_handle data_tx_pipe;