Skip to contentSkip to conversation

PATCH: pci.agent script fixup

PATCH Zink, Dan 2 participants 2 messages Jan 17, 2001

lore
Share & tools
lore

Zink, Dan

author
#0 lore raw

I tracked down the problems with the pci.agent script. Here's the patch:

etc/hotplug/pci.agent renamed from hotplug/pci.agent +2 -1
diff -Nuar etc/hotplug/pci.agent /etc/hotplug/pci.agent
@@ -28,9 +28,10 @@
 #
 # $Id: pci.agent,v 1.2 2001/01/17 00:53:18 dbrownell Exp $
 #
+. hotplug.functions
 
 # generated by modutils, for current 2.4.x kernels
-PCI_MAP=$MODULE_DIR/modules.pcimap
+MAP_CURRENT=$MODULE_DIR/modules.pcimap
 
 # accumulates list of modules we may care about
 DRIVERS@@ -62,12 +63,12 @@

exit 1
fi

-    XID=`echo $PCI_ID | $AWK -F/ '{print "0x" $1, "0x" $2 }'`
+    XID=`echo $PCI_ID | $AWK -F: '{print "0x" $1, "0x" $2 }'`

read pci_class pci_id_vendor pci_id_device << EOT
0x$PCI_CLASS $XID
EOT

-    XID=`echo $PCI_SUBSYS_ID | $AWK -F/ '{print "0x" $1, "0x" $2 }'`
+    XID=`echo $PCI_SUBSYS_ID | $AWK -F: '{print "0x" $1, "0x" $2 }'`

read pci_subid_vendor pci_subid_device << EOT
$XID
EOT
@@ -138,7 +139,7 @@

     # on 2.4 systems, modutils maintains MAP_CURRENT
     if [ -r $MAP_CURRENT ]; then
-    	load_drivers usb $MAP_CURRENT "$LABEL"
+    	load_drivers pci $MAP_CURRENT "$LABEL"
     fi
     if [ "$DRIVERS" = "" ]; then

____________________________
[email protected]

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw

Cool -- that wasn't something I was able to test, but I take it you got this working with the Hotplug PCI hardware (or maybe Cardbus)?

I'll merge this patch in right away.

- Dave

----- Original Message -----
From: Zink, Dan <[email protected]>
To: <[email protected]>
Sent: Wednesday, January 17, 2001 8:48 AM
Subject: PATCH: pci.agent script fixup

Quoted 45 lines

I tracked down the problems with the pci.agent script. Here's the patch:

diff -Nuar etc/hotplug/pci.agent /etc/hotplug/pci.agent

etc/hotplug/pci.agent Wed Jan 17 10:29:23 2001 renamed from hotplug/pci.agent Wed Jan 17 00:35:33 2001 +2 -1
@@ -28,9 +28,10 @@
 #
 # $Id: pci.agent,v 1.2 2001/01/17 00:53:18 dbrownell Exp $
 #
+. hotplug.functions
 
 # generated by modutils, for current 2.4.x kernels
-PCI_MAP=$MODULE_DIR/modules.pcimap
+MAP_CURRENT=$MODULE_DIR/modules.pcimap
 
 # accumulates list of modules we may care about
 DRIVERS> @@ -62,12 +63,12 @@

exit 1
fi

etc/hotplug/pci.agent Wed Jan 17 10:29:23 2001 renamed from hotplug/pci.agent Wed Jan 17 00:35:33 2001 +3 -3
-    XID=`echo $PCI_ID | $AWK -F/ '{print "0x" $1, "0x" $2 }'`
+    XID=`echo $PCI_ID | $AWK -F: '{print "0x" $1, "0x" $2 }'`
     read pci_class pci_id_vendor pci_id_device << EOT
 0x$PCI_CLASS $XID
 EOT
 
-    XID=`echo $PCI_SUBSYS_ID | $AWK -F/ '{print "0x" $1, "0x" $2 }'`
+    XID=`echo $PCI_SUBSYS_ID | $AWK -F: '{print "0x" $1, "0x" $2 }'`
     read pci_subid_vendor pci_subid_device << EOT
 $XID
 EOT
@@ -138,7 +139,7 @@
 
     # on 2.4 systems, modutils maintains MAP_CURRENT
     if [ -r $MAP_CURRENT ]; then
-    load_drivers usb $MAP_CURRENT "$LABEL"
+    load_drivers pci $MAP_CURRENT "$LABEL"
     fi
 
     if [ "$DRIVERS" = "" ]; then
Quoted 8 lines

____________________________
[email protected]

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel