Index: uspace/lib/usb/include/usb/hc.h
===================================================================
--- uspace/lib/usb/include/usb/hc.h	(revision d6d15ec2fdea816dd0c129b6d8affdecab0b2840)
+++ uspace/lib/usb/include/usb/hc.h	(revision 2b621cb00cfabefc8ea4a5a0f58b59511dedf1a8)
@@ -80,4 +80,6 @@
     const ddf_dev_t *);
 
+void usb_hc_connection_deinitialize(usb_hc_connection_t *);
+
 int usb_hc_connection_open(usb_hc_connection_t *);
 int usb_hc_connection_close(usb_hc_connection_t *);
Index: uspace/lib/usb/src/hc.c
===================================================================
--- uspace/lib/usb/src/hc.c	(revision d6d15ec2fdea816dd0c129b6d8affdecab0b2840)
+++ uspace/lib/usb/src/hc.c	(revision 2b621cb00cfabefc8ea4a5a0f58b59511dedf1a8)
@@ -126,4 +126,19 @@
 }
 /*----------------------------------------------------------------------------*/
+void usb_hc_connection_deinitialize(usb_hc_connection_t *connection)
+{
+	assert(connection);
+	fibril_mutex_lock(&connection->guard);
+	if (connection->ref_count != 0) {
+		usb_log_warning("%u stale reference(s) to HC connection.\n",
+		    connection->ref_count);
+		assert(connection->hc_sess);
+		async_hangup(connection->hc_sess);
+		connection->hc_sess = NULL;
+		connection->ref_count = 0;
+	}
+	fibril_mutex_unlock(&connection->guard);
+}
+/*----------------------------------------------------------------------------*/
 /** Open connection to host controller.
  *
