HPLIP should "avoid_reset_quirk" for mass-storage for Linux Kernel >= 3.1

Bug #1092111 reported by Johannes Meixner
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
New
Undecided
Unassigned

Bug Description

At least for some HP all-in-one USB devices
with a mass-storage interface any print job
(and perhaps any scan) that lasts longer
than 30 seconds gets aborted since
Linux kernel >= 3.1.

See
https://bugzilla.novell.com/show_bug.cgi?id=751712
and for a summary see in particular
https://bugzilla.novell.com/show_bug.cgi?id=751712#c10

The issue was already reported but misunderstood
by the HPLIP team
https://answers.launchpad.net/hplip/+question/191200

Summary of the issue:

When a HP all-in-one USB device has a mass-storage interface
starting in 3.1 the kernel continually polls this mass-storage
interface.

At least for some HP all-in-one USB devices the mass-storage
interface becomes unaccessible or non-responsive
while a print job is printing out (perhaps also while
scanning happens).

When the mass-storage interface becomes unaccessible
or non-responsive the kernel will after 30 seconds
by default reset the whole HP all-in-one USB device
which means that the currently printing job (or perhaps
also a currently ongoing scan) gets aborted.

In the end this means that any print job (and perhaps any scan)
that lasts longer than 30 seconds gets aborted.

Proposal for a solution:

The basic idea is to tell the kernel not do do its
default USB device reset when the mass-storage interface
becomes unaccessible or non-responsive.

This can be done via the special file
/sys/bus/usb/devices/<something>/avoid_reset_quirk

For example on an openSUSE 12.2 system I have:
--------------------------------------------------------------
# lsusb
Bus 001 Device 002: ID 03f0:2b17 Hewlett-Packard LaserJet 1020

# cat /sys/bus/usb/devices/1-1/idVendor
03f0

# cat /sys/bus/usb/devices/1-1/idProduct
2b17

# ls -l /sys/bus/usb/devices/1-1/avoid_reset_quirk
-rw-r--r-- 1 root root ... /sys/bus/usb/devices/1-1/avoid_reset_quirk
--------------------------------------------------------------

I.e. the "<something>" does not match "Bus 001 Device 002"
but via the idVendor and idProduct files it is possible
to find the right
/sys/bus/usb/devices/<something>/avoid_reset_quirk
that actually matches the HP device.

By default only root has permissions to use
/sys/bus/usb/devices/<something>/avoid_reset_quirk
but the CUPS backend "hp" runs as user lp group lp
so that

-rw-rw-r-- root lp ... /sys/bus/usb/devices/1-1/avoid_reset_quirk

is needed.

The group lp and the group read/write permissions
could be set via appropriate udev rules.

In the end while a print job is submitted, the CUPS backend "hp"
should enable the "avoid_reset_quirk" and after the print job
had finished the CUPS backend "hp" may re-enable the kernel's
default USB device reset.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.