3 pci_table=/etc/pl_pcitable
5 echo "pl_hwinit: loading applicable modules"
7 # this will contain lines of device_id:vendor_id (no 0x)
8 system_devices=$(lspci -n | cut -d " " -f4)
10 for device in $system_devices; do
12 # now vendor_id and device_id are broken apart
13 vendor_id=$(echo $device | cut -d ":" -f1)
14 device_id=$(echo $device | cut -d ":" -f2)
16 # either exactly match vendor:device, or a vendor:ffff (let the module
17 # figure out if it can be used for this device), or ffff:device
18 # (not sure if this is legal, but shows up in the pci map)
19 mods=$(grep -i "\($vendor_id:ffff\|$vendor_id:$device_id\|ffff:$device_id\)" \
20 $pci_table | cut -d " " -f1)
22 for module in $mods; do
23 if [ -n "$module" ]; then
24 echo "pl_hwinit: found and loading module $module"
25 /sbin/modprobe $module
30 # just in case, look for any modules that are ffff:ffff and load them
31 mods=$(grep -i "ffff:ffff" $pci_table | cut -d " " -f1)
32 for module in $mods; do
33 if [ -n "$module" ]; then
34 echo "pl_hwinit: found and loading wild module $module"
35 /sbin/modprobe $module
39 # sd_mod won't get loaded automatically
40 echo "pl_hwinit: loading sd_mod"
43 echo "pl_hwinit: loading floppy device driver"