All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pete Zaitcev <zaitcev@redhat.com>
To: "P. Christeas" <p_christ@hol.gr>
Cc: Oliver Neukum <oliver@neukum.org>,
	lkml <linux-kernel@vger.kernel.org>,
	zaitcev@redhat.com, linux-usb@vger.kernel.org, twaugh@redhat.com
Subject: Re: Patch: usblp quirk for zebra printers
Date: Wed, 21 May 2008 15:37:56 -0700	[thread overview]
Message-ID: <20080521153756.cc701b14.zaitcev@redhat.com> (raw)
In-Reply-To: <200805212057.52050.p_christ@hol.gr>

On Wed, 21 May 2008 20:57:49 +0300, "P. Christeas" <p_christ@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

  reply	other threads:[~2008-05-21 22:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21 17:57 Patch: usblp quirk for zebra printers P. Christeas
2008-05-21 22:37 ` Pete Zaitcev [this message]
2008-05-25  9:03   ` P. Christeas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080521153756.cc701b14.zaitcev@redhat.com \
    --to=zaitcev@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=p_christ@hol.gr \
    --cc=twaugh@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.