Re: PCMCIA product id strings -> hashes generation at compilationtime? [Was: Re: [patch 14/38] pcmcia: id_table for wavelan_cs]
From: Andrew Morton
Date: Tue Mar 08 2005 - 15:58:48 EST
Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx> wrote:
> Most pcmcia devices are matched to drivers using "product ID strings"
> embedded in the devices' Card Information Structures, as "manufactor ID /
> card ID" matches are much less reliable. Unfortunately, these strings cannot
> be passed to userspace for easy userspace-based loading of appropriate
> modules (MODNAME -- hotplug), so my suggestion is to also store crc32 hashes
> of the strings in the MODULE_DEVICE_TABLEs, e.g.:
> PCMCIA_DEVICE_PROD_ID12("LINKSYS", "E-CARD", 0xf7cb0b07, 0x6701da11),
What is the difficulty in passing these strings via /sbin/hotplug arguments?
> To make the life easier for device driver authors,
> - a big warning is put into dmesg if a pcmcia driver is inserted
> into the kernel and the hash mentioned in PCMCIA_DEVICE_PROD_ID()
> is incorrect,
As long as the kernel shouts loudly at the driver developer at
development-time, and that shouting mentions a bit of documentation in
Documentation/somewhere, I expect we'll be OK.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/