Index: uspace/lib/usb/src/devpoll.c
===================================================================
--- uspace/lib/usb/src/devpoll.c	(revision 8989f48f9bfa498b808c36381eebab4f7955d89d)
+++ uspace/lib/usb/src/devpoll.c	(revision 8fd4ba0febd30b06d14b441e12b5134169bf5f21)
@@ -36,4 +36,5 @@
 #include <usb/request.h>
 #include <usb/debug.h>
+#include <usb/classes/classes.h>
 #include <errno.h>
 #include <str_error.h>
@@ -45,4 +46,5 @@
 /** Data needed for polling. */
 typedef struct {
+	int debug;
 	size_t max_failures;
 	useconds_t delay;
@@ -73,9 +75,17 @@
 	    = polling_data->dev->pipes[polling_data->pipe_index].pipe;
 	
-	usb_log_debug("Pipe interface number: %d, protocol: %d, subclass: %d, max packet size: %d\n", 
-	    polling_data->dev->pipes[polling_data->pipe_index].interface_no,
-	    polling_data->dev->pipes[polling_data->pipe_index].description->interface_protocol,
-	    polling_data->dev->pipes[polling_data->pipe_index].description->interface_subclass,
-	    pipe->max_packet_size);
+	if (polling_data->debug > 0) {
+		usb_endpoint_mapping_t *mapping
+		    = &polling_data->dev->pipes[polling_data->pipe_index];
+		usb_log_debug("Poll0x%x: started polling of `%s' - " \
+		    "interface %d (%s,%d,%d), %zuB/%zu.\n",
+		    polling_data,
+		    polling_data->dev->ddf_dev->name,
+		    (int) mapping->interface->interface_number,
+		    usb_str_class(mapping->interface->interface_class),
+		    (int) mapping->interface->interface_subclass,
+		    (int) mapping->interface->interface_protocol,
+		    polling_data->request_size, pipe->max_packet_size);
+	}
 
 	size_t failed_attempts = 0;
@@ -86,4 +96,19 @@
 		rc = usb_pipe_read(pipe, polling_data->buffer,
 		    polling_data->request_size, &actual_size);
+
+		if (polling_data->debug > 1) {
+			if (rc == EOK) {
+				usb_log_debug(
+				    "Poll0x%x: received: '%s' (%zuB).\n",
+				    polling_data,
+				    usb_debug_str_buffer(polling_data->buffer,
+				        actual_size, 16),
+				    actual_size);
+			} else {
+				usb_log_debug(
+				    "Poll0x%x: polling failed: %s.\n",
+				    polling_data, str_error(rc));
+			}
+		}
 
 		/* If the pipe stalled, we can try to reset the stall. */
@@ -129,13 +154,21 @@
 	}
 
-	if (failed_attempts > 0) {
-		usb_log_error(
-		    "Polling of device `%s' terminated: recurring failures.\n",
-		    polling_data->dev->ddf_dev->name);
-	}
-
 	if (polling_data->on_polling_end != NULL) {
 		polling_data->on_polling_end(polling_data->dev,
 		    failed_attempts > 0, polling_data->custom_arg);
+	}
+
+	if (polling_data->debug > 0) {
+		if (failed_attempts > 0) {
+			usb_log_error(
+			    "Polling of device `%s' terminated: %s.\n",
+			    polling_data->dev->ddf_dev->name,
+			    "recurring failures");
+		} else {
+			usb_log_debug(
+			    "Polling of device `%s' terminated by user.\n",
+			    polling_data->dev->ddf_dev->name
+			);
+		}
 	}
 
@@ -186,4 +219,5 @@
 	}
 
+	auto_polling->debug = 1;
 	auto_polling->auto_clear_halt = true;
 	auto_polling->delay = 0;
@@ -252,4 +286,5 @@
 	polling_data->custom_arg = arg;
 
+	polling_data->debug = polling->debug;
 	polling_data->max_failures = polling->max_failures;
 	if (polling->delay >= 0) {
