X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=geninitrd-svn.patch;h=1d59c961e3c947750fcb00a5d0d0d8e69f5f9a05;hb=fd9645f0f958d4a99ee321105864799cf6a1dc3e;hp=40814695f6580d2a826025152f08368f18ff1d58;hpb=ad850bfd7d70f810c675e3d19ecb10e5ea880c23;p=packages%2Fgeninitrd.git diff --git a/geninitrd-svn.patch b/geninitrd-svn.patch index 4081469..1d59c96 100644 --- a/geninitrd-svn.patch +++ b/geninitrd-svn.patch @@ -1,13 +1,69 @@ -Index: mod-sata.sh +Index: functions =================================================================== ---- mod-sata.sh (wersja 12334) -+++ mod-sata.sh (kopia robocza) -@@ -33,7 +33,7 @@ - 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 - # match class +--- functions (wersja 12390) ++++ functions (kopia robocza) +@@ -189,23 +189,33 @@ + 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 -+ [ "$(($req_class & $class_mask))" = "$(($class))" ] || continue - # match vendor - [ "$1" = "$vendor" ] || continue - # match device, allow PCI_ANY_ID +- # 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 ++ lspci -p "$pcimap" -kvmmn | awk -vreq_class="${req_class}" ' ++ BEGIN { skip_modules[1]=""; modules[1]=""; xhci=""; ehci=""; ohci=""; uhci="" } ++ /^Slot:/ { found=0 } ++ /^Class:/ { if (req_class == $2) { found=1 } } ++ /^Driver:/ { if (found) { ++ module=$2; ++ if (module == "xhci_hcd") { ++ xhci="xhci_hcd" ++ } else if (module == "ehci_hcd") { ++ ehci="ehci_hcd" ++ } else if (module == "ohci_hcd") { ++ ohci="ohci_hcd" ++ } else if (module == "uhci_hcd") { ++ uhci="uhci_hcd" ++ } else if (!(module in skip_modules)) { ++ modules[cnt]=module ++ } ++ skip_modules[cnt]=module; ++ cnt++; ++ }; ++ found=0 ++ } ++ END { ++ # xhci/ehci/ohci/uhci hack to preserve such order ++ printf "%s %s %s %s", xhci, ehci, ohci, uhci; ++ for (i in modules) { printf "%s ", modules[i]; }; ++ } ++ ' + } + +Index: functions +=================================================================== +--- functions (wersja 12391) ++++ functions (kopia robocza) +@@ -213,7 +213,7 @@ + } + END { + # xhci/ehci/ohci/uhci hack to preserve such order +- printf "%s %s %s %s", xhci, ehci, ohci, uhci; ++ printf "%s %s %s %s ", xhci, ehci, ohci, uhci; + for (i in modules) { printf "%s ", modules[i]; }; + } + '