Author: glen
Date: Fri Feb 11 13:07:51 2011
New Revision: 12142

Modified:
   geninitrd/trunk/mod-sata.sh
Log:
there is no bitwise matching only DEVICE_ANY

arekm looked up it in sources, so revert the bitwise op



Modified: geninitrd/trunk/mod-sata.sh
==============================================================================
--- geninitrd/trunk/mod-sata.sh (original)
+++ geninitrd/trunk/mod-sata.sh Fri Feb 11 13:07:51 2011
@@ -29,14 +29,12 @@
 
        set -- $($lspci -n | awk -vclass=$class '$2 == class":" {split($3, p, 
":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
 
-       local pci_module vendor device subvendor subdevice class class_mask 
driver_data
+       local PCI_ANY_ID=0x0000ffff pci_module vendor device subvendor 
subdevice class class_mask driver_data
        while read pci_module vendor device subvendor subdevice class 
class_mask driver_data; do
-               # vendor match is exact
+               # match vendor
                [ "$1" = "$vendor" ] || continue
-               # bitwise mask device first
-               device=$(printf "0x%08x" $(($2 & $device)))
-               # then compare exact match
-               [ "$2" = $device ] || continue
+               # match device, allow PCI_ANY_ID
+               [ "$2" = "$device" -o $device = $PCI_ANY_ID ] || continue
 
                echo "$pci_module"
        done < $pcimap
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to