ports/print/hplip/files/patch-io_hpmud_musb.c
Ben Woods 8d850ed6c5 print/hplip and print/hplip-plugin: Update to 3.16.8
print/hplip:

- Add LICENSE details
- Changes USE_OPENSSL=yes to USES=ssl
- Create empty directories for pkg-plist @dir entries
- Reformat patches with makepatch (pet portlint)
- Move ${PREFIX}/etc/sane.d/dll.conf to ${PREFIX}/etc/sane.d/dll.d/hpaio
  during post-install, rather than editing ${PREFIX}/etc/sane.d/dll.conf
  during @exec and @unexec during pkg-plist

print/hplip-plugin:

- Re-order LICENSE block (pet portlint)

Changes this release:

http://hplipopensource.com/hplip-web/release_notes.html

Reviewed by:	mat (mentor)
Approved by:	makc (maintainer timeout), adamw (mentor)
Differential Revision:	https://reviews.freebsd.org/D7812
2016-09-24 10:26:42 +00:00

31 lines
1.1 KiB
C

--- io/hpmud/musb.c.orig 2016-08-26 10:05:31 UTC
+++ io/hpmud/musb.c
@@ -139,10 +139,16 @@ static int get_string_descriptor(libusb_
0x409,
tbuf, sizeof(tbuf), LIBUSB_CONTROL_REQ_TIMEOUT);
- if (ret==0)
+ if (ret==0
+#ifdef __FreeBSD__
+ || ret == -EIO
+#endif
+ )
{
- /* 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;
@@ -385,7 +391,7 @@ static int detach(libusb_device_handle *
{
int ret ;
/* If any kernel module has claimed this interface, detach it. */
- ret = libusb_kernel_driver_active (hd, interface);
+ ret = 0;
DBG("Active kernel driver on interface=%d ret=%d\n", interface, ret);
if (ret == 1)
{