Index: c/src/ChangeLog
===================================================================
--- c/src/ChangeLog	(revision fb77bc8af064b3566d624095faafe679197d42ba)
+++ c/src/ChangeLog	(revision bb9e843a12e03d0b04c236f5f70400d859e7581e)
@@ -1,2 +1,9 @@
+2005-03-14	Joel Sherrill <joel@OARcorp.com>
+
+	* libchip/network/dec21140.c, libchip/network/elnk.c,
+	libchip/network/if_fxp.c: Continue PCI API unification. All use
+	pci_find_device(). Network drivers manufacture a signature since all
+	calls have not been converted yet.
+
 2005-03-04	Joel Sherrill <joel@OARcorp.com>
 
Index: c/src/libchip/network/dec21140.c
===================================================================
--- c/src/libchip/network/dec21140.c	(revision fb77bc8af064b3566d624095faafe679197d42ba)
+++ c/src/libchip/network/dec21140.c	(revision bb9e843a12e03d0b04c236f5f70400d859e7581e)
@@ -589,5 +589,5 @@
     */
    setup_frm = (volatile unsigned char *)(bus_to_phys(rmd->buf1));
-   eaddrs = (char *)(sc->arpcom.ac_enaddr);
+   eaddrs = (unsigned char *)(sc->arpcom.ac_enaddr);
    /* Fill the buffer with our physical address. */
    for (i = 1; i < 16; i++) {
@@ -1013,11 +1013,9 @@
 #if defined(__i386__)
    int          signature;
-   int          value;
-   char         interrupt;
-   int          diag;
-   unsigned int deviceId;
-#endif
+   unsigned int value;
+   unsigned char interrupt;
+#endif
+   int          pbus, pdev, pfun;
 #if defined(__PPC__)
-   int          pbus, pdev, pfun;
    int          tmp;
    unsigned int lvalue;
@@ -1040,54 +1038,23 @@
 
    if (pci_initialize() != PCIB_ERR_SUCCESS)
-      rtems_panic("Unable to initialize PCI");
-
-
+      rtems_panic("dec2114x: Unable to initialize PCI");
+
+   /*
+    * Find the board
+    */
+   if ( pci_find_device(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21140,
+                          unitNumber-1, &pbus, &pdev, &pfun) == -1 ) {
+      if ( pci_find_device(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21143,
+                             unitNumber-1, &pbus, &pdev, &pfun) != -1 ) {
+
+        /* the 21143 chip must be enabled before it can be accessed */
 #if defined(__i386__)
-   /*
-    * First, find a DEC board
-    */
-
-   /*
-    * Try to find the network card on the PCI bus. Probe for a DEC 21140
-    * card first. If not found probe the bus for a DEC/Intel 21143 card.
-    */
-   deviceId = PCI_DEVICE_ID_DEC_21140;
-   diag = pcib_find_by_devid( PCI_VENDOR_ID_DEC, deviceId, unitNumber-1, &signature);
-
-   if ( diag == PCIB_ERR_SUCCESS)
-      printk( "DEC 21140 PCI network card found\n" );
-   else
-   {
-      deviceId = PCI_DEVICE_ID_DEC_21143;
-      diag = pcib_find_by_devid( PCI_VENDOR_ID_DEC, deviceId, unitNumber-1, &signature);
-      if ( diag == PCIB_ERR_SUCCESS)
-         printk( "DEC/Intel 21143 PCI network card found\n" );
-      else
-      {
-         printk("No DEC/Intel 21140/3 PCI network card found !!\n");
-         return 0;
-      }
-   }
-#endif
-#if defined(__PPC__)
-   /*
-    * Find the board
-    */
-   if( BSP_pciFindDevice( PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21140,
-                          unitNumber-1, &pbus, &pdev, &pfun) == -1 )
-   {
-      if( BSP_pciFindDevice( PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21143,
-                             unitNumber-1, &pbus, &pdev, &pfun) != -1 )
-      {
-
-         pci_write_config_dword(pbus,
-                                pdev,
-                                pfun,
-                                0x40,
-                                PCI_DEVICE_ID_DEC_21143 );
-
-      }
-      else
-      {
+        signature =  PCIB_DEVSIG_MAKE( pbus, pdev, pfun );
+        pcib_conf_write32( signature, 0x40, 0 );
+#else
+        pci_write_config_dword(pbus, pdev, pfun, 0x40, PCI_DEVICE_ID_DEC_21143);
+#endif
+
+      } else {
          printk("dec2114x : device '%s' not found on PCI bus\n", config->name );
          return 0;
@@ -1096,6 +1063,5 @@
 
 #ifdef DEC_DEBUG
-   else
-   {
+   else {
       printk("dec21140 : found device '%s', bus 0x%02x, dev 0x%02x, func 0x%02x\n",
              config->name, pbus, pdev, pfun);
@@ -1103,6 +1069,7 @@
 #endif
 
-#endif
-
+#if defined(__i386__)
+   signature =  PCIB_DEVSIG_MAKE( pbus, pdev, pfun );
+#endif
 
 
@@ -1139,8 +1106,4 @@
     */
 #if defined(__i386__)
-
-   /* the 21143 chip must be enabled before it can be accessed */
-   if ( deviceId == PCI_DEVICE_ID_DEC_21143 )
-      pcib_conf_write32( signature, 0x40, 0 );
 
    pcib_conf_read32(signature, 16, &value);
Index: c/src/libchip/network/elnk.c
===================================================================
--- c/src/libchip/network/elnk.c	(revision fb77bc8af064b3566d624095faafe679197d42ba)
+++ c/src/libchip/network/elnk.c	(revision bb9e843a12e03d0b04c236f5f70400d859e7581e)
@@ -3140,6 +3140,6 @@
 #if defined(__i386__)
    int          signature;
-   int          value;
-   char         interrupt;
+   unsigned int   value;
+   unsigned char  interrupt;
 #endif
 #if defined(__PPC__)
@@ -3180,5 +3180,6 @@
       for( i=0; !done && xl_devs[i].xl_vid; i++)
       {
-         for(unum= 1; !done && BSP_pciFindDevice( xl_devs[i].xl_vid, xl_devs[i].xl_did, unum-1,
+         for(unum= 1; !done &&
+		pci_find_device( xl_devs[i].xl_vid, xl_devs[i].xl_did, unum-1,
                                          &sysboards[numFound].pbus,
                                          &sysboards[numFound].pdev,
Index: c/src/libchip/network/if_fxp.c
===================================================================
--- c/src/libchip/network/if_fxp.c	(revision fb77bc8af064b3566d624095faafe679197d42ba)
+++ c/src/libchip/network/if_fxp.c	(revision bb9e843a12e03d0b04c236f5f70400d859e7581e)
@@ -460,11 +460,10 @@
 	 * find device on pci bus
 	 */
-    { int j;
+    { int j; int pbus, pdev, pfun;
 
       for (j=0; fxp_ident_table[j].devid; j++ ) {
-		i = pcib_find_by_devid( 0x8086,
-			fxp_ident_table[j].devid,
-			unitNumber-1,
- 			&(sc->pci_signature));
+		i = pci_find_device( 0x8086, fxp_ident_table[j].devid,
+			unitNumber-1, &pbus, &pdev, &pfun );
+ 		sc->pci_signature =  PCIB_DEVSIG_MAKE( pbus, pdev, pfun );
 		DBGLVL_PRINTK(2,"fxp_attach: find_devid returned %d "
 		      "and pci signature 0x%x\n",
