Index: c/src/libchip/network/if_dc.c
===================================================================
--- c/src/libchip/network/if_dc.c	(revision 2eb7d07e17ddcd96126f89de76be58e447b51d40)
+++ c/src/libchip/network/if_dc.c	(revision 7f7298c46856f10b7b6a2c99008d552e33a93747)
@@ -101,20 +101,26 @@
  */
 
+#if defined(DRIVER_SUPPORTED)
+	#undef DRIVER_SUPPORTED
+#endif
+
 #if defined(__i386__)
-  #define DRIVER_SUPPORTED
+  	#define DRIVER_SUPPORTED
 #endif
 
 #if defined(__PPC__) && (defined(mpc604) || defined(mpc750) || defined(mpc603e))
-  #define DRIVER_SUPPORTED
-#endif
-
-#undef DRIVER_SUPPORTED
-
-#if defined(DRIVER_SUPPORTED)
+  	#define DRIVER_SUPPORTED
+	#warning The if_dc driver is untested on the PPC platform !!!
+#endif
+  
+
+#if defined(DRIVER_SUPPORTED) /* this covers the file "globally"... */
+#include <bsp.h>
 #include <rtems.h>
+#include <rtems/pci.h>
+
 #include <rtems/error.h>
+#include <errno.h>
 #include <rtems/rtems_bsdnet.h>
-
- 
 
 #include <net/if_types.h>
@@ -131,4 +137,7 @@
 #include <bsp.h>
  
+/* moved to cpukit/include/rtems in CVS current ! */
+//#include "if_media.h"
+//#include "pci.h"
 #include <net/if_media.h>
 #include <rtems/pci.h>
@@ -189,4 +198,6 @@
 #define IRQ_EVENT	RTEMS_EVENT_13	/* Ha ... */
 static struct dc_softc dc_softc_devs[NDRIVER];
+
+#define UNUSED
 
 #if 0
@@ -284,5 +295,5 @@
 static void		dc_daemon(void *);
 static void 		dc_start(struct ifnet *);
-static int 		dc_ioctl(struct ifnet *, int, caddr_t);
+static int 		dc_ioctl(struct ifnet *, u_long, caddr_t);
 static void 		dc_init(void *);
 static void 		dc_stop(struct dc_softc *);
@@ -316,5 +327,7 @@
 static void 		dc_setcfg(struct dc_softc *, int);
 static u_int32_t 	dc_crc_le(struct dc_softc *, caddr_t);
+#ifndef UNUSED
 static u_int32_t 	dc_crc_be(caddr_t);
+#endif
 static void 		dc_setfilt_21143(struct dc_softc *);
 static void 		dc_setfilt_asix(struct dc_softc *);
@@ -1130,4 +1143,5 @@
 }
 
+#ifndef UNUSED
 /*
  * Calculate CRC of a multicast group address, return the lower 6 bits.
@@ -1157,5 +1171,5 @@
 	return((crc >> 26) & 0x0000003F);
 }
-
+#endif
 
 /*
@@ -1598,10 +1612,13 @@
 
 	while(t->dc_name != NULL) {
-		rc = pcib_find_by_devid(t->dc_vid, t->dc_did, \
-				(unitnum - 1), &t->dc_devsig);
+		rc = pci_find_device(t->dc_vid, t->dc_did, \
+				(unitnum - 1), &t->dc_bus, &t->dc_dev, &t->dc_fun);
 		if (rc == PCIB_ERR_SUCCESS) {
 			/* Check the PCI revision */
-			pcib_conf_read32(t->dc_devsig, DC_PCI_CFRV, &rev);
-		        rev &= 0xFF;
+			//pcib_conf_read32(t->dc_devsig, DC_PCI_CFRV, &rev);
+			pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+									DC_PCI_CFRV, &rev);
+			rev &= 0xFF;
+			
 			if (t->dc_did == DC_DEVICEID_98713 &&
 			    rev >= DC_REVISION_98713A)
@@ -1886,5 +1903,5 @@
 rtems_dc_driver_attach(struct rtems_bsdnet_ifconfig *config, int attaching)
 {
-	/*int			s, tmp = 0;*/
+	int				rc;	
 	u_char			eaddr[ETHER_ADDR_LEN];
 	
@@ -1895,10 +1912,8 @@
 	struct dc_softc		*sc;
 	struct ifnet		*ifp;
+	struct dc_type		*t;
 	u_int32_t		revision;
 	int			error = 0, mac_offset;
-#if defined(__i386__)
-	int          		sig;
-	int          		value;
-#endif
+	unsigned int		value;
 	
 	/*
@@ -1916,8 +1931,4 @@
 	}
 
-
-	/*
-	 * First, find a DEC board
-	 */
 	sc = &dc_softc_devs[unitNumber - 1];
 	ifp = &sc->arpcom.ac_if;
@@ -1945,4 +1956,5 @@
 		return 0;
 	}
+	t = sc->dc_info;
 
 	
@@ -1950,9 +1962,15 @@
 	 * Map control/status registers.
 	 */
-	sig = sc->dc_info->dc_devsig;
-	pcib_conf_read32(sig, PCI_COMMAND, &command);
+	//sig = sc->dc_info->dc_devsig;
+	pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+					PCI_COMMAND, &command);
+	//pcib_conf_read32(sig, PCI_COMMAND, &command);
 	command |= (PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
-	pcib_conf_write32(sig, PCI_COMMAND, command);
-	pcib_conf_read32(sig, PCI_COMMAND, &command);
+	pci_write_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+					PCI_COMMAND, command);
+	//pcib_conf_write32(sig, PCI_COMMAND, command);
+	pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+					PCI_COMMAND, &command);
+	//pcib_conf_read32(sig, PCI_COMMAND, &command);
 
 #ifdef DC_USEIOSPACE
@@ -1985,18 +2003,28 @@
 
 	/* sc->membase is the address of the card's CSRs !!! */
-	pcib_conf_read32(sig, DC_PCI_CFBMA, &value);
+	//pcib_conf_read32(sig, DC_PCI_CFBMA, &value);
+	pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+					DC_PCI_CFBMA, &value);
 	sc->membase = value;
 	
 	/* Allocate interrupt */
 	memset(&sc->irqInfo, 0, sizeof(rtems_irq_connect_data));
-	pcib_conf_read32(sig, DC_PCI_CFIT, &value);
+	//pcib_conf_read32(sig, DC_PCI_CFIT, &value);
+	pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+					DC_PCI_CFIT, &value);
+	
 	sc->irqInfo.name = value & 0xFF;
-
 	sc->irqInfo.hdl = (rtems_irq_hdl)dc_intr;
+	sc->irqInfo.handle = (void *)sc; /* new parameter */
 	sc->irqInfo.on = nop;
 	sc->irqInfo.off = nop;
 	sc->irqInfo.isOn = decISON;
 	
-	if(!(BSP_install_rtems_irq_handler( &sc->irqInfo ))) {
+#ifdef BSP_SHARED_HANDLER_SUPPORT
+	rc = BSP_install_rtems_shared_irq_handler( &sc->irqInfo );
+#else
+	rc = BSP_install_rtems_irq_handler( &sc->irqInfo );
+#endif
+	if(!rc) {
 		rtems_panic("Can't install dec2114x irq handler.\n");
 	}
@@ -2030,5 +2058,7 @@
 	sc->dc_info = dc_devtype(dev);
 	*/
-	pcib_conf_read32(sig, DC_PCI_CFRV, &revision);
+	//pcib_conf_read32(sig, DC_PCI_CFRV, &revision);
+	pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+					DC_PCI_CFRV, &revision);
 	revision &= 0x000000FF;
 
@@ -2053,8 +2083,12 @@
 		sc->dc_pmode = DC_PMODE_MII;
 		/* Increase the latency timer value. */
-		pcib_conf_read32(sig, DC_PCI_CFLT, &command);
+		//pcib_conf_read32(sig, DC_PCI_CFLT, &command);
+		pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+						DC_PCI_CFLT, &command);
 		command &= 0xFFFF00FF;
 		command |= 0x00008000;
-		pcib_conf_write32(sig, DC_PCI_CFLT, command);
+		//pcib_conf_write32(sig, DC_PCI_CFLT, command);
+		pci_write_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+						DC_PCI_CFLT, command);
 		break;
 	case DC_DEVICEID_AL981:
@@ -2143,5 +2177,7 @@
 	}
 	else {
-		pcib_conf_read32(sig, DC_PCI_CFLT, &value);
+		//pcib_conf_read32(sig, DC_PCI_CFLT, &value);
+		pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+						DC_PCI_CFLT, &value);
 		sc->dc_cachesize = (u_int8_t)(value & 0xFF);
 	}
@@ -2152,7 +2188,11 @@
 	/* Take 21143 out of snooze mode */
 	if (DC_IS_INTEL(sc)) {
-		pcib_conf_read32(sig, DC_PCI_CFDD, &command);
+		//pcib_conf_read32(sig, DC_PCI_CFDD, &command);
+		pci_read_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+						DC_PCI_CFDD, &command);
 		command &= ~(DC_CFDD_SNOOZE_MODE|DC_CFDD_SLEEP_MODE);
-		pcib_conf_write32(sig, DC_PCI_CFDD, command);
+		//pcib_conf_write32(sig, DC_PCI_CFDD, command);
+		pci_write_config_dword(t->dc_bus,t->dc_dev,t->dc_fun,\
+						DC_PCI_CFDD, command);
 	}
 	
@@ -2242,5 +2282,5 @@
 	ifp->if_name = unitName; /*sc->dc_name;*/
 	ifp->if_mtu = ETHERMTU;
-	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX;/* | IFF_MULTICAST;*/
+	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX; /* | IFF_MULTICAST;*/
 	ifp->if_ioctl = dc_ioctl;
 	ifp->if_output = ether_output;
@@ -2327,5 +2367,5 @@
 	*/
 
-#ifdef SRM_MEDIA
+#ifdef SRM_MEDIA /* only defined if __alpha__ is defined... */
         sc->dc_srm_media = 0;
 
@@ -3286,6 +3326,6 @@
 {
 	struct dc_softc		*sc;
-	struct mbuf		*m_head = NULL;
-	int			idx;
+	struct mbuf			*m_head = NULL;
+	unsigned int		idx;
 
 	sc = ifp->if_softc;
@@ -3582,5 +3622,5 @@
 static int dc_ioctl(ifp, command, data)
 	struct ifnet		*ifp;
-	int			command;
+	u_long			command;
 	caddr_t			data;
 {
@@ -3807,4 +3847,3 @@
 #endif
 
-
-#endif  /* end if supported */
+#endif /* end if supported */
Index: c/src/libchip/network/if_dcreg.h
===================================================================
--- c/src/libchip/network/if_dcreg.h	(revision 2eb7d07e17ddcd96126f89de76be58e447b51d40)
+++ c/src/libchip/network/if_dcreg.h	(revision 7f7298c46856f10b7b6a2c99008d552e33a93747)
@@ -475,5 +475,8 @@
 	u_int16_t		dc_did;
 	char			*dc_name;
-	int			dc_devsig;
+	int				dc_devsig;
+    int				dc_bus;
+	int				dc_dev;
+	int				dc_fun;
 };
 
@@ -679,5 +682,5 @@
 	struct arpcom		arpcom;		/* interface info */
 	rtems_irq_connect_data  irqInfo;
-	volatile unsigned32	membase;
+	volatile u_int32_t	membase;
 	rtems_id		daemontid;
 #if 0
