]> git.pld-linux.org Git - projects/geninitrd.git/blobdiff - mod-sata.sh
no need to mess with magic values, let the "magic" be value
[projects/geninitrd.git] / mod-sata.sh
index f864034d9edf043eaf5f79df8d4b1fdbf2b9aac2..949c8a6d19c1851b3a30043f8a19f9060d841b9f 100644 (file)
@@ -3,51 +3,6 @@ SATA_RCSID='$Revision$ $Date::                            $'
 
 # geninitrd mod: sata
 
-# setup geninitrd module
-# @access      public
-setup_mod_sata() {
-       lspci=$(find_tool /sbin/lspci)
-
-       pcimap="/lib/modules/$kernel/modules.pcimap"
-
-       if [ ! -x "$lspci" ]; then
-               warn "Failed to execute lspci. Is pciutils package installed?"
-       fi
-}
-
-# private until only mod-sata uses the function
-find_modules_by_class() {
-       local req_class="$1"
-
-       # no pcimap, nothing to lookup from
-       if [ ! -f "$pcimap" ]; then
-               return
-       fi
-
-       if [ -z "$lspci" ]; then
-               return
-       fi
-
-       set -- $($lspci -n | awk -vclass=$req_class '$2 == class":" {split($3, p, ":"); printf("0x0000%s 0x0000%s\n", p[1], p[2])}')
-
-       req_class="0x${req_class}00"
-
-       local PCI_ANY_ID=0xffffffff 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
-               # ignore program interface (last two digits) - we want any
-               class_mask=$(($class_mask & 0xffffff00))
-               # some devices (like hcd) have very specific class
-               class=$(($class & $class_mask))
-               [ "$(($req_class & $class_mask))" = "$class" ] || continue
-               # match vendor
-               [ "$1" = "$vendor" -o "$vendor" = "$PCI_ANY_ID" ] || continue
-               # match device, allow PCI_ANY_ID
-               [ "$2" = "$device" -o "$device" = "$PCI_ANY_ID" ] || continue
-
-               echo "$pci_module"
-       done < $pcimap
-}
-
 find_modules_sata() {
        debug "Finding SATA modules (class=0x0106)"
 
This page took 0.035201 seconds and 4 git commands to generate.