PCMCIA hotplugging, in-kernel-matching and depmod support
PATCH 1/1 PCMCIA hotplugging, in-kernel-matching and depmod support
... and the deprecation of "cardmgr" and "cardctl"
Dear kernel developers and testers,
Updated and re-diffed revisions of my pcmcia-related patches are available at http://www.brodo.de/pcmcia/
These patches update the PCMCIA subsystem (16-bit) to use the driver model matching and hotplug utilities. The "cardmgr" will not be needed any longer - in fact, it won't even work any longer.
They are based on kernel 2.5.67
Many thanks to David Hinds for the great PCMCIA package to build this work onto, to David Woodhouse for parts of the code and many ideas, to Russell King, Greg Kroah-Hartman for their insight, and to Patrick Mochel for the great linux driver model which made implementing this so much easier.
A descritption of each patch, and more information can be found at the said website, http://www.brodo.de/pcmcia/index.html
Dominik
Quoted 4 lines · Dominik Brodowski
... and the deprecation of "cardmgr" and "cardctl"
Dear kernel developers and testers,
Quoted 8 lines
Updated and re-diffed revisions of my pcmcia-related patches are available at http://www.brodo.de/pcmcia/
These patches update the PCMCIA subsystem (16-bit) to use the driver model matching and hotplug utilities. The "cardmgr" will not be needed any longer - in fact, it won't even work any longer.
They are based on kernel 2.5.67
Will we see pcmcia id lists making their way into low-level drivers?
That was a big stumbling block when I last looked at the "big picture" for pcmcia -- in-kernel drivers still required probe assistance from userspace via the /etc/pcmcia/* bindings.
Jeff
Quoted 12 lines · Jeff Garzik
Quoted 11 lines · Dominik Brodowski
... and the deprecation of "cardmgr" and "cardctl"
Dear kernel developers and testers,
Updated and re-diffed revisions of my pcmcia-related patches are available at http://www.brodo.de/pcmcia/
These patches update the PCMCIA subsystem (16-bit) to use the driver model matching and hotplug utilities. The "cardmgr" will not be needed any longer - in fact, it won't even work any longer.
Quoted 7 lines
Quoted 1 line
They are based on kernel 2.5.67
Will we see pcmcia id lists making their way into low-level drivers?
That was a big stumbling block when I last looked at the "big picture" for pcmcia -- in-kernel drivers still required probe assistance from userspace via the
/etc/pcmcia/*bindings.
In the drivers I converted (~20 or so...) this is done already. You can find them at http://www.brodo.de/pcmcia/ , for example the network drivers (all of them should be converted) at
http://www.brodo.de/pcmcia/pcmcia-2.5.67-drivers_network .
For example, a part of pcnet_cs.c looks like this now:
static struct pcmcia_device_id pcnet_ids[] = {
{ PCMCIA_DEVICE_VERS1("2412LAN", 0x67f236ab) },
{ PCMCIA_DEVICE_VERS12("ACCTON", "EN2212", 0xdfc6b5b2, 0xcb112a11) },
...
{ PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0105, 0xea15) },
{ },
};MODULE_DEVICE_TABLE(pcmcia, pcnet_ids);
As strings can't be passed to userspace in file2alias.c, I've chosen the crc32 value of the string as the matching identifier for the userspace hotplug script. In-kernel matching uses the full string then. And _MFC_ stands for multi-function-card , function 0 of the card in the example above will be bound to this driver. Oh, and I didn't do this parsing by hand -- wrote an ugly /etc/pcmcia/config --> pcmcia_device_id_table parser (which works) and I'm willing to convert any entries still left over.
Dominik
Quoted 9 lines · Dominik Brodowski
Quoted 1 line · Jeff Garzik
Will we see pcmcia id lists making their way into low-level drivers?
In the drivers I converted (~20 or so...) this is done already. You can find them at http://www.brodo.de/pcmcia/ , for example the network drivers (all of them should be converted) at
http://www.brodo.de/pcmcia/pcmcia-2.5.67-drivers_network .For example, a part of
pcnet_cs.clooks like this now:
Quoted 8 lines
static struct pcmcia_device_id pcnet_ids[] = { { PCMCIA_DEVICE_VERS1("2412LAN", 0x67f236ab) }, { PCMCIA_DEVICE_VERS12("ACCTON", "EN2212", 0xdfc6b5b2, 0xcb112a11) }, ... { PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0105, 0xea15) }, { }, };
MODULE_DEVICE_TABLE(pcmcia, pcnet_ids);
Very cool...
Quoted 3 lines
As strings can't be passed to userspace in
file2alias.c, I've chosen the crc32 value of the string as the matching identifier for the userspace hotplug script.
This sounds like a problem to be solved, not worked around... the source should have the strings presented directly, and I'm sure a creative and smart person such as yourself can conceive of at least one... ;-)
Jeff
Quoted 8 lines · Jeff Garzik
Quoted 3 lines
As strings can't be passed to userspace in
file2alias.c, I've chosen the crc32 value of the string as the matching identifier for the userspace hotplug script.This sounds like a problem to be solved, not worked around... the source should have the strings presented directly, and I'm sure a creative and smart person such as yourself can conceive of at least one... ;-)
OK, there might be a way to do this (and yes, I can think of one...). However, I doubt it makes sense: using strings in depmod.c and in the hotplug utilities is even worse than in file2alias.c. For example, whitespace is used as delimitier for the values being parsed in hotplug scripts. So I think the better (as simpler and thus more difficult to break) approach is using crc32.
Dominik