openbsd-ports/print/hplip/patches/patch-io_hpmud_musb_c
2012-12-10 16:00:11 +00:00

30 lines
976 B
Plaintext

$OpenBSD: patch-io_hpmud_musb_c,v 1.5 2012/12/10 16:00:12 ajacoutot Exp $
Fix probing HP PS 8250 printer, from FreeBSD.
--- io/hpmud/musb.c.orig Tue Nov 20 10:55:09 2012
+++ io/hpmud/musb.c Mon Dec 10 16:43:14 2012
@@ -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>
@@ -137,8 +138,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;