Index: uspace/lib/usb/include/usb/debug.h
===================================================================
--- uspace/lib/usb/include/usb/debug.h	(revision cfbbe1d3a9a94acf026279720b2b199d8893f400)
+++ uspace/lib/usb/include/usb/debug.h	(revision 28d7185e1cfc330931535edf4f6fa0bc723c3a92)
@@ -36,4 +36,5 @@
 #define LIBUSB_DEBUG_H_
 #include <stdio.h>
+#include <inttypes.h>
 #include <usb/usb.h>
 #include <assert.h>
@@ -85,5 +86,6 @@
 void usb_log_enable(usb_log_level_t, const char *);
 
-void usb_log_printf(usb_log_level_t, const char *, ...);
+void usb_log_printf(usb_log_level_t, const char *, ...)
+	PRINTF_ATTRIBUTE(2, 3);
 
 /** Log fatal error. */
Index: uspace/lib/usb/include/usb/pipes.h
===================================================================
--- uspace/lib/usb/include/usb/pipes.h	(revision cfbbe1d3a9a94acf026279720b2b199d8893f400)
+++ uspace/lib/usb/include/usb/pipes.h	(revision 28d7185e1cfc330931535edf4f6fa0bc723c3a92)
@@ -99,4 +99,18 @@
 	/** Number of active transfers over the pipe. */
 	int refcount;
+	/** Number of failed attempts to open the HC phone.
+	 * When user requests usb_pipe_start_long_transfer() and the operation
+	 * fails, there is no way to report this to the user.
+	 * That the soft reference counter is increased to record the attempt.
+	 * When the user then request e.g. usb_pipe_read(), it will try to
+	 * add reference as well.
+	 * If that fails, it is reported to the user. If it is okay, the
+	 * real reference counter is incremented.
+	 * The problem might arise when ending the long transfer (since
+	 * the number of references would be only 1, but logically it shall be
+	 * two).
+	 * Decrementing the soft counter first shall solve this.
+	 */
+	int refcount_soft;
 
 	/** Whether to automatically reset halt on the endpoint.
@@ -163,9 +177,5 @@
 int usb_pipe_unregister(usb_pipe_t *, usb_hc_connection_t *);
 
-int usb_pipe_start_session(usb_pipe_t *);
-int usb_pipe_end_session(usb_pipe_t *);
-bool usb_pipe_is_session_started(usb_pipe_t *);
-
-int usb_pipe_start_long_transfer(usb_pipe_t *);
+void usb_pipe_start_long_transfer(usb_pipe_t *);
 void usb_pipe_end_long_transfer(usb_pipe_t *);
 
