Back to home page

OSCL-LXR

 
 

    


0001 ============
0002 Device table
0003 ============
0004 
0005 Matching of PCMCIA devices to drivers is done using one or more of the
0006 following criteria:
0007 
0008 - manufactor ID
0009 - card ID
0010 - product ID strings _and_ hashes of these strings
0011 - function ID
0012 - device function (actual and pseudo)
0013 
0014 You should use the helpers in include/pcmcia/device_id.h for generating the
0015 struct pcmcia_device_id[] entries which match devices to drivers.
0016 
0017 If you want to match product ID strings, you also need to pass the crc32
0018 hashes of the string to the macro, e.g. if you want to match the product ID
0019 string 1, you need to use
0020 
0021 PCMCIA_DEVICE_PROD_ID1("some_string", 0x(hash_of_some_string)),
0022 
0023 If the hash is incorrect, the kernel will inform you about this in "dmesg"
0024 upon module initialization, and tell you of the correct hash.
0025 
0026 You can determine the hash of the product ID strings by catting the file
0027 "modalias" in the sysfs directory of the PCMCIA device. It generates a string
0028 in the following form:
0029 pcmcia:m0149cC1ABf06pfn00fn00pa725B842DpbF1EFEE84pc0877B627pd00000000
0030 
0031 The hex value after "pa" is the hash of product ID string 1, after "pb" for
0032 string 2 and so on.
0033 
0034 Alternatively, you can use crc32hash (see tools/pcmcia/crc32hash.c)
0035 to determine the crc32 hash.  Simply pass the string you want to evaluate
0036 as argument to this program, e.g.:
0037 $ tools/pcmcia/crc32hash "Dual Speed"