Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Patch: usblp quirk for zebra printers

0 views
Skip to first unread message

P. Christeas

unread,
May 21, 2008, 2:10:14 PM5/21/08
to
Hi,
I guess such a quirk may be a little odd, but it has been a blocking point in
my system not being able to support more than one printer.

Please comment. (and cc. me)

0001-USB-Quirk-for-Zebra-printers-not-reporting-their-S.patch

Pete Zaitcev

unread,
May 21, 2008, 6:40:12 PM5/21/08
to
On Wed, 21 May 2008 20:57:49 +0300, "P. Christeas" <p_ch...@hol.gr> wrote:

> I guess such a quirk may be a little odd, but it has been a blocking point in
> my system not being able to support more than one printer.

> @@ -1330,6 +1332,23 @@ static int usblp_cache_device_id_string(struct usblp *usblp)
.....
> + strcpy(&usblp->device_id_string[length],"SN:");
> + length+=3;
> + strcat(&usblp->device_id_string[length],usblp->dev->serial);
> + length += strlen(usblp->dev->serial);
> + usblp->device_id_string[length++]= ';';
> +
> + *((__be16 *)usblp->device_id_string) = cpu_to_be16(length);

I see...

> Please comment. (and cc. me)

Personally, I don't like this. In kernel, we typically try not to
fake things in lower levels in order to fool upper levels. There are
always knock-off effects. Sometimes we have to do it, but in my
experience CUPS folks always were for doing the right thing.

Let's ask them if extracting the S/N from sysfs is too onerous.
I'm cc-ing this to Tim Waugh.

BTW, Please try to tinker with the following udev ruleset:
BUS="usb", KERNEL="lp[0-9]*", SYSFS{serial}=="XXXXXXX", SYMLINK+="mylp0"
BUS="usb", KERNEL="lp[0-9]*", SYSFS{serial}=="YYYYYYY", SYMLINK+="mylp1"
Encoding your serial numbers into udev rules is not pleasant, but
the above should provide a stop-gap solution without patching kernels.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

P. Christeas

unread,
May 25, 2008, 5:10:16 AM5/25/08
to
On Thursday 22 May 2008, Pete Zaitcev wrote:
> On Wed, 21 May 2008 20:57:49 +0300, "P. Christeas" <p_ch...@hol.gr> wrote:
> > I guess such a quirk may be a little odd, but it has been a blocking
> > point in my system not being able to support more than one printer.
> Personally, I don't like this. In kernel, we typically try not to
> fake things in lower levels in order to fool upper levels.
>...

> I'm cc-ing this to Tim Waugh.

I'm now working in a more "politically correct" way around that issue [1]. The
outline is that we _add_ a backend to CUPS[2], which will bring back USB
addressing by /dev/.. name. Then, we could implement udev rulesets which will
create "by-id" symlinks to the usblpX devices.
My work is at github under "cups-usbbackend".


[1] it is a blocking point for my business, as I cannot attach a second
printer.
[2] it could remain a complementary package until we really agree we want that
code mainline.

0 new messages