[Bug 751712] New: USB resets break printing
https://bugzilla.novell.com/show_bug.cgi?id=751712 https://bugzilla.novell.com/show_bug.cgi?id=751712#c0 Summary: USB resets break printing Classification: openSUSE Product: openSUSE 12.1 Version: Final Platform: x86-64 OS/Version: openSUSE 12.1 Status: NEW Severity: Normal Priority: P5 - None Component: Kernel AssignedTo: kernel-maintainers@forge.provo.novell.com ReportedBy: wolfgang@rosenauer.org QAContact: qa@suse.de Found By: --- Blocker: --- This is the bugreport to sum up the following thread: http://lists.opensuse.org/opensuse-kernel/2012-03/msg00010.html Since I'm on openSUSE 12.1 I cannot print using my HP USB printer anymore. After some seconds of printing the connections gets destroyed and the following appears in /var/log/messages: Mar 6 18:37:42 Hygiea kernel: [45838.854035] usb 1-4: reset high speed USB device number 5 using ehci_hcd Mar 6 18:37:42 Hygiea hp[21391]: io/hpmud/musb.c 1043: bulk_write failed buf=0x7fff7b5aed40 size=8192 len=-34: Success Mar 6 18:37:42 Hygiea hp[21391]: io/hpmud/musb.c 1423: unable to write data hp:/usb/Officejet_6300_series?serial=CN69DCH2GW04M4: Success Mar 6 18:37:42 Hygiea kernel: [45838.969179] Did not find alt setting 1 for intf 0, config 1 Mar 6 18:37:42 Hygiea kernel: [45838.969189] usb 1-4: usbfs: process 21391 (hp) did not claim interface 1 before use As this was working with 11.4 without any issues I've checked the different kernels. The following kernels are able to print w/o issues when used on 12.1: kernel-desktop 2.6.37.6 (from 11.4) - no problems kernel-default 3.0.22 (from SLE11-SP2) - no problems kernel-vanilla 3.0.22 - no problems while the following kernels expose the issue: kernel-desktop 3.1.0 kernel-vanilla 3.1.0 kernel-desktop 3.1.9 kernel-desktop 3.1.10 kernel-vanilla 3.1.10 Therefore IMHO the regression window is between vanilla kernels 3.0 -> 3.1.0 A system which is not able to print is pretty unusable. I've kept it "normal" because it seems to be quite hardware dependent (printer and/or USB controller?) but it's really a pita. Everytime I need to print something I need to reboot to another system. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c1
--- Comment #1 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c2
--- Comment #2 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c3
Larry Finger
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c4
--- Comment #4 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c
Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c5
--- Comment #5 from Larry Finger
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c6
David Sterba
That is a merge commit, and cannot be the faulty one. Please post the commit ID (7 digits is enough) for kernels near the end of the bisection that definitely failed, and those that definitely worked.
JFYI, a merge commit can actually contain a diff resulting from resolving a conflict and if it is not done correctly, bugs can be introduced and hard to find(BTDT). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c7
--- Comment #7 from Wolfgang Rosenauer
Your bisection ended up in the merge from 3.0 to 3.1, which is quite likely; however, something went wrong as the things that were changed there have nothing to do with the USB systems, which I would suspect.
Agreed. I have no idea what could be wrong.
One of the things that bother me are all the skips. Could you build two more kernels? If so, try
The skips were manually tagged by myself because it didn't build. Later I excluded that broken module from the build because I ran too often into that build error.
git checkout 03c7536
Works
Does that one work? If it does, then try
git checkout e04f5f7
Works -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c8
--- Comment #8 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c9
--- Comment #9 from Larry Finger
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c
Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c
Jeff Mahoney
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c10
Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c11
--- Comment #11 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c12
--- Comment #12 from Oliver Neukum
It would work if the mass-storage interface did not stop responding i.e. when both the printing interface and the mass-storage interface could work simulaneously.
I don't know if it is o.k. when interfaces in a USB device only work mutually exclusive.
No. A device needs to put those functionality into different configurations. If it doesn't do that, the interfaces must work independently.
I don't know if it is o.k. when the whole USB device is reset because one of its interfaces stopped responding while at the same time another interface is in use.
That is inevitable. We must not let it come to the reset. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c13
--- Comment #13 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c14
Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c15
--- Comment #15 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c16
--- Comment #16 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c17
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c18
Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c19
--- Comment #19 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c20
--- Comment #20 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c21
--- Comment #21 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c22
--- Comment #22 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c23
--- Comment #23 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c24
--- Comment #24 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c25
--- Comment #25 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c26
--- Comment #26 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c27
--- Comment #27 from Oliver Neukum
I guess that Oliver is talking about upstream kernel or udev in the end?
Both. A kernel change triggers the bug. If you are very unlucky you'll see this bug on a kernel older than 3.1. Unfortunately there's no good way to handle this in the kernel (we'll lose the card reader). That means that the best kernel fix has to go into the kernel(upstream and stable) and udev rules to disable the trigger have to go into upstream udev.
Anyway I can report to HPLIP project but it's the wrong channel (while probably the only one available to me) as it's not a hplip software issue at all. I would expect that it's easier for SUSE to talk to HP either directly through alliances or via other kernel developers (I just assume here that HP has kernel developers as they provide drivers on their own AFAIK).
We could merely tell HP to fix the firmware and still would have to deal with all buggy devices out there. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c28
--- Comment #28 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c29
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c30
Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c31
--- Comment #31 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c32
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c33
--- Comment #33 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c34
--- Comment #34 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c35
--- Comment #35 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c36
--- Comment #36 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c37
--- Comment #37 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c38
Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c39
--- Comment #39 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c40
--- Comment #40 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c41
--- Comment #41 from Oliver Neukum
Created an attachment (id=482601) --> (http://bugzilla.novell.com/attachment.cgi?id=482601) [details] hopefully better udev-181_60-persistent-storage.rules.diff
This udev-181_60-persistent-storage.rules.diff should be cleaner and avoid useless processing of all those HP rules by ------------------------------------------------------------------------- ACTION!="add", GOTO="skip_media_presence_polling" ... [all those HP rules GOTO="skip_media_presence_polling"] ... [rule which enables in-kernel media-presence polling] LABEL="skip_media_presence_polling" -------------------------------------------------------------------------
If you are so worried about efficiency you could first test for HP and skip the tests in the alternative case. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c42
--- Comment #42 from Oliver Neukum
Why is your kernel patch to prevent a reset of HP USB devices with a printer interface plus a mass-storage interface in attachment #482132 [details] not sufficient?
If the the card reader still does not work after the attempted reset, the SCSI layer will offline the reader. This should be avoided. The kernel patch is really only the last line of defense in case user space does something stupid. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c43
--- Comment #43 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c44
--- Comment #44 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c45
Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c
Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c46
Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c47
--- Comment #47 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c48
--- Comment #48 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c50
Wolfgang Rosenauer
Wolfgang, could you estimate when you would have time to test the kernel patch in attachment #482132 [details] (comment #28)
Hopefully in the next days. So what exactly should I test with the kernel patch? - Using the original udev (w/o the new changes)? - trying to print (longer than 30 seconds)? - should I check if sd cards are recognized before/during/after print?
and the udev rules change in attachment #482901 [details] (comment #46)
Just changed and rebooted: Hygiea:~ # cat /sys/block/sdc/events_poll_msecs -1 I don't think that -1 is the correct value here. At least when this is set printing is broken as before. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c51
Oliver Neukum
Hopefully in the next days. So what exactly should I test with the kernel patch? - Using the original udev (w/o the new changes)?
Yes
- trying to print (longer than 30 seconds)?
Yes
- should I check if sd cards are recognized before/during/after print?
Yes -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c52
--- Comment #52 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c53
--- Comment #53 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c54
--- Comment #54 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c55
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c56
Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c57
--- Comment #57 from Wolfgang Rosenauer
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c58
--- Comment #58 from Oliver Neukum
I'll try to test the kernel stuff but the udev stuff does _not_ work. Please see comment 53 and the fact that as long as -1 is set my print job still fails. Only when I set echo 0 > /sys/block/sdc/events_poll_msecs it really works.
OK, I see. Johannes, your modified udev rule changes "events_dfl_poll_msecs". That is the default poll interval, which we don't want to change. We need to change "events_poll_msecs". Could you fix the script? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c59
--- Comment #59 from Oliver Neukum
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c60
--- Comment #60 from Johannes Meixner
https://bugzilla.novell.com/show_bug.cgi?id=751712
https://bugzilla.novell.com/show_bug.cgi?id=751712#c61
Johannes Meixner
participants (1)
-
bugzilla_noreply@novell.com