$OpenBSD: patch-io_hpmud_musb_c,v 1.7 2014/10/08 09:03:00 ajacoutot Exp $

Fix probing HP PS 8250 printer, from FreeBSD.

--- io/hpmud/musb.c.orig	Tue Oct  7 10:55:54 2014
+++ io/hpmud/musb.c	Wed Oct  8 10:32:17 2014
@@ -25,6 +25,7 @@
 Author: Naga Samrat Chowdary Narla, Sarbeswar Meher
 \*****************************************************************************/
 
+#include <stdlib.h> /* atoi(3) */
 #include "hpmud.h"
 #include "hpmudi.h"
 #include <dlfcn.h>
@@ -139,8 +140,12 @@ static int get_string_descriptor(libusb_device_handle 
 
 		if (ret==0)
 		{
-			/* This retry is necessary for lj1000 and lj1005. des 12/12/07 */
-			BUG("get_string_descriptor zero result, retrying...");
+			/*
+			 * This retry is necessary for lj1000 and lj1005. des 12/12/07
+			 * Also HP Photosmart 42xx seems to suffer transient errors with serial id
+			 */
+			BUG("get_string_descriptor error result %d, retrying in 2 secs...", ret);
+			sleep(2);
 			continue;
 		}
 		break;
