loading firmware into hplj1000 twice on Ubuntu LTS
Posted by: pavel.shvagirev ()
Date: July 22, 2015 09:42AM

Bug report at launchpad.net

/lib/udev/hplj1000 doesn't handle another $DEVNAME case when udev calls it twice.

Udev calls the script twice for some reason on the system described below.

At first, udev calls hplj1000 with "/dev/bus/usb/004/059" as a $DEVNAME which is not desired/not supported.
Then it calls the script once again with "/dev/usb/lp0" as a $DEVNAME which is desired and must be used to load a firmware to.

The problem is that the script handles only "/dev/usb/usb*" case but not the "/dev/bus/usb/*".
This leads to firmware being loaded twice which causes HP LaserJet 1000 to hang and stop processing tasks.

Attached patch adds another case to the /lib/udev/hplj1000 script that silently exits if the script is called with undesired value.



# lsb_release -rd
Description: Ubuntu 14.04.2 LTS
Release: 14.04
# apt-cache policy printer-driver-foo2zjs-common
printer-driver-foo2zjs-common:
Installed: 20140209dfsg0-1ubuntu1
Candidate: 20140209dfsg0-1ubuntu1
Version table:
*** 20140209dfsg0-1ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
100 /var/lib/dpkg/status
# apt-cache policy udev
udev:
Installed: 204-5ubuntu20.12
Candidate: 204-5ubuntu20.12
Version table:
*** 204-5ubuntu20.12 0
500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
100 /var/lib/dpkg/status
204-5ubuntu20 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
#



*** /lib/udev/hplj1000.orig	2014-02-19 00:00:00.000000000 +0400
--- /lib/udev/hplj1000	2015-07-22 00:52:47.122349999 +0300
***************
*** 27,32 ****
--- 27,33 ----
  # udev calls us twice on FC4! Just want /dev/usb/lp<N>
  case "$DEVNAME" in
  /dev/usb/usb*)	exit;;
+ /dev/bus/usb/*)	exit;;
  esac
  
  PROGNAME="$0"

Re: loading firmware into hplj1000 twice on Ubuntu LTS
Posted by: rickrich ()
Date: July 22, 2015 04:58PM

Patch accepted.

Sorry, only registered users may post in this forum.
This forum powered by Phorum.