From: Plato <tom@redant.freeserve.co.uk>
To: linux-hotplug@vger.kernel.org
Subject: 2.2 bcdDevice munging patch
Date: Wed, 05 Dec 2001 00:42:10 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-100751293225808@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-100743001825350@msgid-missing>
Sorry for the broken thread, but I've only just subscribed to the list.
Dave:
> Sounds fair to me. Though it'll need to be a bit smarter, since I
> think the current code says "if the kernel is 2.2 then ..." and it'd
> have to change to handle two types of 2.2 kernels (original, new).
That's not necessary. usb.agent only cares which kernel version is running
when deciding which of $MAP_CURRENT or $MAP_DISTMAP to use.
The code which munges the bcdDevice number is kernel independent. It
will not change a four hex-digit number specified by a 2.4 kernel, but will
change a number with a decimal point from a 2.2 kernel.
> That is, the newer 2.2 kernels would need updated hotplug scripts.
If 2.2.21 produced a four hex-digit number it would _not_ need an update to
my patch.
Greg:
> I'd recommend fixing the 2.2 kernel code to work the same way as 2.4.x.
> The hotplug code was enabled right at the end of the 2.2.20 development
> cycle, and this problem must have slipped through.
The problem has been solved now in userspace. If my patch is implemented
then `broken' 2.2 kernels will work, along with 2.4, and later 2.2 kernels
possibly incorporating a fix.
The munging already exists. Unfortunately it does not work for all possible
values of bcdDevice. If you are going to continue to support 2.2 kernels
you should fix this. I believe my patch fixes this.
The problem, for those of you that are not aware, is due to a difference in
the PRODUCT environment variable for use by the usb.agent between 2.2 and 2.4 kernels.
PRODUCT is of the form xxxx/xxxx/xxxx, i.e four hex numbers separated by
slashes.
The 2.4 kernel specifies the third of these numbers as `abcd', where a, b, c,
d are four hex digits.
The 2.2 kernel specifies the third of these numbers as `ab.cd'
It also omits a and d if they are zero.
There is a `munge' in the current usb.agent which seeks to rectify this.
Unfortunately it does not seem to work for some cases, e.g.
PRODUCT=.../.../10.0
I'd be happy to hear any comments that you may have. Keep up the good work!
Plato
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
prev parent reply other threads:[~2001-12-05 0:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-04 1:41 2.2 bcdDevice munging patch Plato
2001-12-04 1:44 ` Plato
2001-12-04 3:32 ` Greg KH
2001-12-04 3:49 ` David Brownell
2001-12-05 0:42 ` Plato [this message]
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=marc-linux-hotplug-100751293225808@msgid-missing \
--to=tom@redant.freeserve.co.uk \
--cc=linux-hotplug@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).