Re: PCMCIA product id strings -> hashes generation at compilation time? [Was: Re: [patch 14/38] pcmcia: id_table for wavelan_cs]

From: Andrew Morton (akpm_at_osdl.org)
Date: 03/08/05

  • Next message: Christoph Lameter: "Re: [patch] del_timer_sync scalability patch"
    Date:	Tue, 8 Mar 2005 12:34:26 -0800
    To: Dominik Brodowski <linux@dominikbrodowski.net>
    
    

    Dominik Brodowski <linux@dominikbrodowski.net> 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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Christoph Lameter: "Re: [patch] del_timer_sync scalability patch"

    Relevant Pages

    • Re: PCMCIA product id strings -> hashes generation at compilation time? [Was: Re: [patch 14/38] p
      ... > be passed to userspace for easy userspace-based loading of appropriate ... We already pass a number of strings as environment ... In fact, what's wrong with DEVPATH? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: The limits of human hearing
      ... much less documentation and in fact, ... strings with a very long length and the lighter strings with a very ... The saturation point of unrelated factoids taken ... out of context has been reached. ...
      (rec.music.theory)
    • Re: [BENCHMARK] nproc: netlink access to /proc information
      ... > strings is expensive. ... /proc performance does not scale if we have to ... as I see that the internal algorithms actually dominate the runtime ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH] JFS: sane file name handling (0 of 2)
      ... the second one changes the default translation of filenames into unicode. ... the character set of the file names rather than just treating them as strings ... while still allowing the charset-specific behavior with the ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: C question...little OT
      ... pointers to the two strings are given as *s and *t. ... demonstrate strcpy, I use char *u = s to hold the return value. ... more documentation will solve every problem in the universe. ...
      (comp.lang.c)