All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 1/1] usblp.c - add Kyocera Mita FS 820 to list of "quirky" printers
@ 2006-12-28 19:52 Martin Williges
  0 siblings, 0 replies; 5+ messages in thread
From: Martin Williges @ 2006-12-28 19:52 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel, linux-usb-devel

from: Martin Williges <kernel@zut.de>

This patch gets the Kyocera FS-820 working with cups 1.2 via usb again. It
adds the printer to the list of "quirky" printers. The printer seems not
answer to ID requests some seconds after plugging in. Patch is based on
linux-2.6.19.1.

Signed-off-by: Martin Williges <kernel@zut.de>

---

Background:
As far as I could see (strace, usbmon), the Kyocera FS-820 answers to ID
requests only a few seconds after plugging it in. This applies to detecting
it with cups and is also true for the printing itself, which is initiated
with an ID request. Since I have little usb knowledge, maybe someone can
interpret the data, especially the fist bulk transfer - why request 8192
bytes? This is the second version of the patch.

usbmon output of printing an email without patch:
tail -F /tmp/printlog.txt
c636e140 3374734463 S Bi:002:02 -115 8192 <
c9d43b40 3374734494 S Ci:002:00 s a1 00 0000 0000 03ff 1023 <
c9d43b40 3379732301 C Ci:002:00 -104 0
c636e140 3379733294 C Bi:002:02 -2 0
[...repeating...]

with patch:
tail -F /tmp/printlog.txt
d9cb82c0 3729790131 S Ci:002:00 s a1 00 0000 0000 03ff 1023 <
d9cb82c0 3729791725 C Ci:002:00 0 91 = 005b4944 3a46532d 3832303b 4d46473a
 4b796f63 6572613b 434d443a 50434c58 df956320 3732493190 S Bo:002:01 -115
 1347 = 1b252d31 32333435 5840504a 4c0a4050 4a4c2053 4554204d 414e5541
 4c464545 [...more data...]

--- linux-2.6.19.1/drivers/usb/class/usblp.c.orig	2006-12-28 20:15:34.000000000 +0100
+++ linux-2.6.19.1/drivers/usb/class/usblp.c	2006-12-28 19:32:52.000000000 +0100
@@ -217,6 +217,7 @@ static const struct quirk_printer_struct
 	{ 0x0409, 0xbef4, USBLP_QUIRK_BIDIR }, /* NEC Picty760 (HP OEM) */
 	{ 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
 	{ 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
+	{ 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */
 	{ 0, 0 }
 };

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 1/1] usblp.c - add Kyocera Mita FS 820 to list of "quirky" printers
@ 2006-12-22 11:27 Martin Williges
  2006-12-22 13:10 ` Daniel Drake
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Williges @ 2006-12-22 11:27 UTC (permalink / raw)
  To: gregkh, linux-usb-devel; +Cc: linux-kernel, dsd

from: Martin Williges <kernel@zut.de>

this patch gets the Kyocera FS 820 working with cups 1.2 via usb again. It
adds the printer to the list of "quirky" printers. Patch is based on
linux-2.6.19.

Signed-off-by: Martin Williges <kernel@zut.de>

---

Background:
I have little knowledge of usb, the following is based on my observations and
assumptions. With cups 1.2.6 going stable in gentoo, the usb backend does not
find the printer and thus users are not able to add the printer if it´s
connected via usb. In cups 1.1.x, the backend just reported a default bunch
of devices a printer might be connected to.
As far as I could see, cups detects the printer (/dev/usb/lp0) and sends an
ioctl which times out. I traced the timeout:
usblp.c calls usb_control_msg() (in message.c)
->usb_internal_control_msg()
->usb_start_wait_urb()
this function times out, the printer does not answer (0/1023 chars read).

Funny thing is, reading the identification works directly after plugging the
printer in, but not some seconds after. The patch lets the cups usb backend
find the printer again. So maybe the patch is a little crude. If someone has
a better idea, I may be able provide straces, syslog with DEBUG on,...

--- usblp.c.orig        2006-11-29 22:57:37.000000000 +0100
+++ usblp.c     2006-12-22 12:08:00.000000000 +0100
@@ -217,6 +217,7 @@ static const struct quirk_printer_struct
        { 0x0409, 0xbef4, USBLP_QUIRK_BIDIR }, /* NEC Picty760 (HP OEM) */
        { 0x0409, 0xf0be, USBLP_QUIRK_BIDIR }, /* NEC Picty920 (HP OEM) */
        { 0x0409, 0xf1be, USBLP_QUIRK_BIDIR }, /* NEC Picty800 (HP OEM) */
+       { 0x0482, 0x0010, USBLP_QUIRK_BIDIR }, /* Kyocera Mita FS 820, by zut <kernel@zut.de> */
        { 0, 0 }
 };

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-12-28 19:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-28 19:52 [PATCH 1/1] usblp.c - add Kyocera Mita FS 820 to list of "quirky" printers Martin Williges
  -- strict thread matches above, loose matches on Subject: below --
2006-12-22 11:27 Martin Williges
2006-12-22 13:10 ` Daniel Drake
2006-12-23 10:03   ` Martin Williges
2006-12-23 14:28   ` Martin Williges

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.