patch-2.2.17 linux/drivers/char/rio/riotable.c

Next file: linux/drivers/char/rio/riotty.c
Previous file: linux/drivers/char/rio/rioroute.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.16/drivers/char/rio/riotable.c linux/drivers/char/rio/riotable.c
@@ -34,7 +34,6 @@
 #endif
 
 #define __NO_VERSION__
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/malloc.h>
 #include <linux/errno.h>
@@ -121,7 +120,7 @@
 	** (9)	That names aren't duplicated
 	** xx (10) That hosts that actually exist are mentioned in the table. xx
 	*/
-	rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(1)\n")); 
+	rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(1)\n"); 
 	if ( p->RIOSystemUp ) {		/* (1) */
 		p->RIOError.Error = HOST_HAS_ALREADY_BEEN_BOOTED;
 		return EBUSY;
@@ -134,7 +133,7 @@
 	for ( Entry=0; Entry<TOTAL_MAP_ENTRIES; Entry++ ) {
 		MapP = &p->RIOConnectTable[Entry];
 		if ((MapP->Flags & RTA16_SECOND_SLOT) == 0) {
-			rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(2)\n"));
+			rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(2)\n");
 			cptr = MapP->Name;		/* (2) */
 			cptr[MAX_NAME_LEN-1]='\0';
 			if ( cptr[0]=='\0' ) {
@@ -162,19 +161,19 @@
 			continue;
 		}
 
-		rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(3)\n"));
+		rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(3)\n");
 		if ( !MapP->RtaUniqueNum && !MapP->HostUniqueNum ) { /* (3) */
 			if ( MapP->ID || MapP->SysPort || MapP->Flags ) {
-				rio_dprint(RIO_DEBUG_TABLE, ("%s pretending to be empty but isn't\n",MapP->Name));
+				rio_dprintk (RIO_DEBUG_TABLE, "%s pretending to be empty but isn't\n",MapP->Name);
 				p->RIOError.Error = TABLE_ENTRY_ISNT_PROPERLY_NULL;
 				p->RIOError.Entry = Entry;
 				return ENXIO;
 			}
-			rio_dprint(RIO_DEBUG_TABLE, ("!RIO: Daemon: test (3) passes\n"));
+			rio_dprintk (RIO_DEBUG_TABLE, "!RIO: Daemon: test (3) passes\n");
 			continue;
 		}
 
-		rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(4)\n"));
+		rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(4)\n");
 		for ( Host=0; Host<p->RIONumHosts; Host++ ) { /* (4) */
 			if ( p->RIOHosts[Host].UniqueNum==MapP->HostUniqueNum ) {
 				HostP = &p->RIOHosts[Host];
@@ -188,8 +187,8 @@
 		}
 
 		if ( Host >= p->RIONumHosts ) {
-			rio_dprint(RIO_DEBUG_TABLE, ("RTA %s has unknown host unique number 0x%x\n",
-									MapP->Name,MapP->HostUniqueNum));
+			rio_dprintk (RIO_DEBUG_TABLE, "RTA %s has unknown host unique number 0x%x\n",
+									MapP->Name, MapP->HostUniqueNum);
 			MapP->HostUniqueNum = 0;
 			/* MapP->RtaUniqueNum	= 0; */
 			/* MapP->ID			= 0; */
@@ -199,18 +198,18 @@
 			continue;
 		}
 
-		rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(5)\n")); 
+		rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(5)\n"); 
 		if ( MapP->RtaUniqueNum ) { /* (5) */
 			if ( !MapP->ID ) {
-				rio_dprint(RIO_DEBUG_TABLE, ("RIO: RTA %s has been allocated an ID of zero!\n",
-							MapP->Name));
+				rio_dprintk (RIO_DEBUG_TABLE, "RIO: RTA %s has been allocated an ID of zero!\n",
+							MapP->Name);
 				p->RIOError.Error		 = ZERO_RTA_ID;
 				p->RIOError.Entry = Entry;
 				return ENXIO;
 			}
 			if ( MapP->ID > MAX_RUP ) {
-				rio_dprint(RIO_DEBUG_TABLE, ("RIO: RTA %s has been allocated an illegal ID %d\n",
-							MapP->Name, MapP->ID));
+				rio_dprintk (RIO_DEBUG_TABLE, "RIO: RTA %s has been allocated an illegal ID %d\n",
+							MapP->Name, MapP->ID);
 				p->RIOError.Error = ID_NUMBER_OUT_OF_RANGE;
 				p->RIOError.Entry = Entry;
 				return ENXIO;
@@ -219,8 +218,8 @@
 				if ( MapP->HostUniqueNum == 
 						p->RIOConnectTable[SubEnt].HostUniqueNum && 
 						MapP->ID == p->RIOConnectTable[SubEnt].ID ) {
-					rio_dprint(RIO_DEBUG_TABLE, ("Dupl. ID number allocated to RTA %s and RTA %s\n",
-							MapP->Name,p->RIOConnectTable[SubEnt].Name));
+					rio_dprintk (RIO_DEBUG_TABLE, "Dupl. ID number allocated to RTA %s and RTA %s\n",
+							MapP->Name, p->RIOConnectTable[SubEnt].Name);
 					p->RIOError.Error = DUPLICATED_RTA_ID;
 					p->RIOError.Entry = Entry;
 					p->RIOError.Other = SubEnt;
@@ -233,29 +232,29 @@
 				if ((MapP->RtaUniqueNum == 
 						p->RIOConnectTable[SubEnt].RtaUniqueNum)
 				 		&& (MapP->ID2 != p->RIOConnectTable[SubEnt].ID)) {
-					rio_dprint(RIO_DEBUG_TABLE, ("RTA %s has duplicate unique number\n",MapP->Name));
-					rio_dprint(RIO_DEBUG_TABLE, ("RTA %s has duplicate unique number\n",
-										p->RIOConnectTable[SubEnt].Name));
+					rio_dprintk (RIO_DEBUG_TABLE, "RTA %s has duplicate unique number\n",MapP->Name);
+					rio_dprintk (RIO_DEBUG_TABLE, "RTA %s has duplicate unique number\n",
+										p->RIOConnectTable[SubEnt].Name);
 					p->RIOError.Error = DUPLICATE_UNIQUE_NUMBER;
 					p->RIOError.Entry = Entry;
 					p->RIOError.Other = SubEnt;
 					return ENXIO;
 				}
 			}
-			rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(7a)\n")); 
+			rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(7a)\n"); 
 			/* (7a) */
 			if ((MapP->SysPort != NO_PORT)&&(MapP->SysPort % PORTS_PER_RTA)) {
-				rio_dprint(RIO_DEBUG_TABLE, ("TTY Port number %d-RTA %s is not a multiple of %d!\n",
-					(int)MapP->SysPort,MapP->Name,PORTS_PER_RTA));
+				rio_dprintk (RIO_DEBUG_TABLE, "TTY Port number %d-RTA %s is not a multiple of %d!\n",
+					(int)MapP->SysPort,MapP->Name, PORTS_PER_RTA);
 				p->RIOError.Error = TTY_NUMBER_OUT_OF_RANGE;
 				p->RIOError.Entry = Entry;
 				return ENXIO;
 			}
-			rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(7b)\n")); 
+			rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(7b)\n"); 
 			/* (7b) */
 			if ((MapP->SysPort != NO_PORT)&&(MapP->SysPort >= RIO_PORTS)) {
-				rio_dprint(RIO_DEBUG_TABLE, ("TTY Port number %d for RTA %s is too big\n",
-							(int)MapP->SysPort,MapP->Name));
+				rio_dprintk (RIO_DEBUG_TABLE, "TTY Port number %d for RTA %s is too big\n",
+							(int)MapP->SysPort, MapP->Name);
 				p->RIOError.Error = TTY_NUMBER_OUT_OF_RANGE;
 				p->RIOError.Entry = Entry;
 				return ENXIO;
@@ -264,22 +263,22 @@
 				if ( p->RIOConnectTable[SubEnt].Flags & RTA16_SECOND_SLOT )
 						continue;
 				if ( p->RIOConnectTable[SubEnt].RtaUniqueNum ) {
-					rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(8)\n")); 
+					rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(8)\n"); 
 					/* (8) */
 					if ( (MapP->SysPort != NO_PORT) && (MapP->SysPort == 
 									p->RIOConnectTable[SubEnt].SysPort) ) {
-						rio_dprint(RIO_DEBUG_TABLE, ("RTA %s:same TTY port # as RTA %s (%d)\n",
+						rio_dprintk (RIO_DEBUG_TABLE, "RTA %s:same TTY port # as RTA %s (%d)\n",
 							MapP->Name, p->RIOConnectTable[SubEnt].Name,
-							(int)MapP->SysPort));
+							(int)MapP->SysPort);
 						p->RIOError.Error = TTY_NUMBER_IN_USE;
 						p->RIOError.Entry = Entry;
 						p->RIOError.Other = SubEnt;
 						return ENXIO;
 					}
-					rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(9)\n")); 
+					rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(9)\n"); 
 					if (RIOStrCmp(MapP->Name,
 							p->RIOConnectTable[SubEnt].Name)==0 && !(MapP->Flags & RTA16_SECOND_SLOT)) { /* (9) */
-						rio_dprint(RIO_DEBUG_TABLE, ("RTA name %s used twice\n",MapP->Name));
+						rio_dprintk (RIO_DEBUG_TABLE, "RTA name %s used twice\n", MapP->Name);
 						p->RIOError.Error = NAME_USED_TWICE;
 						p->RIOError.Entry = Entry;
 						p->RIOError.Other = SubEnt;
@@ -289,17 +288,17 @@
 			}
 		}
 		else { /* (6) */
-			rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: entering(6)\n")); 
+			rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: entering(6)\n"); 
 			if ( MapP->ID ) {
-				rio_dprint(RIO_DEBUG_TABLE, ("RIO:HOST %s has been allocated ID that isn't zero!\n",
-					MapP->Name));
+				rio_dprintk (RIO_DEBUG_TABLE, "RIO:HOST %s has been allocated ID that isn't zero!\n",
+					MapP->Name);
 				p->RIOError.Error = HOST_ID_NOT_ZERO;
 				p->RIOError.Entry = Entry;
 				return ENXIO;
 			}
 			if ( MapP->SysPort != NO_PORT ) {
-				rio_dprint(RIO_DEBUG_TABLE, ("RIO: HOST %s has been allocated port numbers!\n",
-					MapP->Name));
+				rio_dprintk (RIO_DEBUG_TABLE, "RIO: HOST %s has been allocated port numbers!\n",
+					MapP->Name);
 				p->RIOError.Error = HOST_SYSPORT_BAD;
 				p->RIOError.Entry = Entry;
 				return ENXIO;
@@ -327,7 +326,7 @@
 	** Copy in the new table entries
 	*/
 	for ( Entry=0; Entry< TOTAL_MAP_ENTRIES; Entry++ ) {
-		rio_dprint(RIO_DEBUG_TABLE, ("RIONewTable: Copy table for Host entry %d\n", Entry));
+		rio_dprintk (RIO_DEBUG_TABLE, "RIONewTable: Copy table for Host entry %d\n", Entry);
 		MapP = &p->RIOConnectTable[Entry];
 
 		/*
@@ -345,7 +344,7 @@
 		** If it is a host, then we only need to fill in the name field.
 		*/
 		if ( MapP->ID==0 ) {
-			rio_dprint(RIO_DEBUG_TABLE, ("Host entry found. Name %s\n",MapP->Name));
+			rio_dprintk (RIO_DEBUG_TABLE, "Host entry found. Name %s\n", MapP->Name);
 			bcopy(MapP->Name,HostP->Name,MAX_NAME_LEN);
 			continue;
 		}
@@ -358,7 +357,7 @@
 		HostMapP = &HostP->Mapping[MapP->ID-1];
 
 		if (MapP->Flags & SLOT_IN_USE) {
-			rio_dprint(RIO_DEBUG_TABLE, ("Rta entry found. Name %s\n",MapP->Name));
+			rio_dprintk (RIO_DEBUG_TABLE, "Rta entry found. Name %s\n", MapP->Name);
 			/*
 			** structure assign, then sort out the bits we shouldn't have done
 			*/
@@ -371,7 +370,7 @@
 			RIOReMapPorts(p, HostP, HostMapP );
 		}
 		else {
-			rio_dprint(RIO_DEBUG_TABLE, ("TENTATIVE Rta entry found. Name %s\n",MapP->Name));
+			rio_dprintk (RIO_DEBUG_TABLE, "TENTATIVE Rta entry found. Name %s\n", MapP->Name);
 		}
 	}
 
@@ -421,11 +420,11 @@
 		*/
 		if (Host1 != Host)
 		{
-			rio_dprint(RIO_DEBUG_TABLE, ("Default name %s already used\n", p->RIOHosts[Host].Name));
+			rio_dprintk (RIO_DEBUG_TABLE, "Default name %s already used\n", p->RIOHosts[Host].Name);
 			bcopy("HOST 1",p->RIOHosts[Host].Name,7);
 			p->RIOHosts[Host].Name[5] += Host1;
 		}
-		rio_dprint(RIO_DEBUG_TABLE, ("Assigning default name %s\n", p->RIOHosts[Host].Name));
+		rio_dprintk (RIO_DEBUG_TABLE, "Assigning default name %s\n", p->RIOHosts[Host].Name);
 	}
 	return 0;
 }
@@ -448,13 +447,13 @@
 
 	disable(oldspl);		/* strange but true! */
  
-	rio_dprint(RIO_DEBUG_TABLE, ("Generating a table to return to config.rio\n"));
+	rio_dprintk (RIO_DEBUG_TABLE, "Generating a table to return to config.rio\n");
 
 	bzero((caddr_t)&p->RIOConnectTable[0], 
 					sizeof(struct Map) * TOTAL_MAP_ENTRIES );
 
 	for ( Host=0; Host<RIO_HOSTS; Host++ ) {
-		rio_dprint(RIO_DEBUG_TABLE, ("Processing host %d\n", Host));
+		rio_dprintk (RIO_DEBUG_TABLE, "Processing host %d\n", Host);
 		HostP = &p->RIOHosts[Host];
 		MapP = &p->RIOConnectTable[Next++];
 		MapP->HostUniqueNum = HostP->UniqueNum;
@@ -502,8 +501,8 @@
 	int work_done = 0;
 	unsigned long flags;
 
-	rio_dprint(RIO_DEBUG_TABLE, ("Delete entry on host %x, rta %x\n",
-								MapP->HostUniqueNum,MapP->RtaUniqueNum));
+	rio_dprintk (RIO_DEBUG_TABLE, "Delete entry on host %x, rta %x\n",
+								MapP->HostUniqueNum, MapP->RtaUniqueNum);
 
 	for ( host=0; host < p->RIONumHosts; host++ ) {
 		HostP = &p->RIOHosts[host];
@@ -518,15 +517,15 @@
 		for ( entry=0; entry<MAX_RUP; entry++ ) {
 			if ( MapP->RtaUniqueNum == HostP->Mapping[entry].RtaUniqueNum ) {
 				HostMapP = &HostP->Mapping[entry];
-				rio_dprint(RIO_DEBUG_TABLE, ("Found entry offset %d on host %s\n", 
-						entry,HostP->Name));
+				rio_dprintk (RIO_DEBUG_TABLE, "Found entry offset %d on host %s\n", 
+						entry, HostP->Name);
 
 				/*
 				** Check all four links of the unit are disconnected
 				*/
 				for ( link=0; link< LINKS_PER_UNIT; link++ ) {
 					if ( HostMapP->Topology[link].Unit != ROUTE_DISCONNECT ) {
-						rio_dprint(RIO_DEBUG_TABLE, ("Entry is in use and cannot be deleted!\n"));
+						rio_dprintk (RIO_DEBUG_TABLE, "Entry is in use and cannot be deleted!\n");
 						p->RIOError.Error = UNIT_IS_IN_USE;
 						rio_spin_unlock_irqrestore( &HostP->HostLock, flags);
 						return EBUSY;
@@ -541,7 +540,7 @@
 				if ( SysPort != NO_PORT ) {
 					for (port=SysPort; port < SysPort+PORTS_PER_RTA; port++) {
 						PortP = p->RIOPortp[port];
-						rio_dprint(RIO_DEBUG_TABLE, ("Unmap port\n"));
+						rio_dprintk (RIO_DEBUG_TABLE, "Unmap port\n");
 
 						rio_spin_lock_irqsave( &PortP->portSem, flags );
 
@@ -549,7 +548,7 @@
 
 						if ( PortP->State & (RIO_MOPEN|RIO_LOPEN) ) {
 
-							rio_dprint(RIO_DEBUG_TABLE, ("Gob on port\n"));
+							rio_dprintk (RIO_DEBUG_TABLE, "Gob on port\n");
 							PortP->TxBufferIn = PortP->TxBufferOut = 0;
 							/* What should I do 
 							wakeup( &PortP->TxBufferIn );
@@ -586,25 +585,25 @@
 								*/
 								Pkt = (PKT *) RIO_PTR(HostP->Caddr,
 								 	RWORD(*TxPktP));
-								rio_dprint(RIO_DEBUG_TABLE, (
+								rio_dprintk (RIO_DEBUG_TABLE, 
 						"Tx packet (%x) destination: Old %x:%x New %x:%x\n",
 								 *TxPktP, Pkt->dest_unit,
-								 Pkt->dest_port, dest_unit, dest_port));
+								 Pkt->dest_port, dest_unit, dest_port);
 								WWORD(Pkt->dest_unit, dest_unit);
 								WWORD(Pkt->dest_port, dest_port);
 							}
-							rio_dprint(RIO_DEBUG_TABLE, (
+							rio_dprintk (RIO_DEBUG_TABLE, 
 						"Port %d phb destination: Old %x:%x New %x:%x\n",
 							 port, PortP->PhbP->destination & 0xff,
 							 (PortP->PhbP->destination >> 8) & 0xff,
-							 dest_unit, dest_port));
+							 dest_unit, dest_port);
 							WWORD(PortP->PhbP->destination,
 							 dest_unit + (dest_port << 8));
 						}
 						rio_spin_unlock_irqrestore(&PortP->portSem, flags);
 					}
 				}
-				rio_dprint(RIO_DEBUG_TABLE, ("Entry nulled.\n"));
+				rio_dprintk (RIO_DEBUG_TABLE, "Entry nulled.\n");
 				bzero((char *)HostMapP,sizeof(struct Map));
 				work_done++;
 			}
@@ -626,7 +625,7 @@
 	if ( work_done )
 		return 0;
 
-	rio_dprint(RIO_DEBUG_TABLE, ("Couldn't find entry to be deleted\n"));
+	rio_dprintk (RIO_DEBUG_TABLE, "Couldn't find entry to be deleted\n");
 	p->RIOError.Error = COULDNT_FIND_ENTRY;
 	return ENXIO;
 }
@@ -639,32 +638,32 @@
     int	link;
 
 
-    rio_dprint(RIO_DEBUG_TABLE, ("Assign entry on host %x, rta %x, ID %d, Sysport %d\n",
+    rio_dprintk (RIO_DEBUG_TABLE, "Assign entry on host %x, rta %x, ID %d, Sysport %d\n",
 				MapP->HostUniqueNum,MapP->RtaUniqueNum,
-				MapP->ID, (int)MapP->SysPort ));
+				MapP->ID, (int)MapP->SysPort);
 
     if ((MapP->ID != (ushort)-1) &&
 	((int)MapP->ID < (int)1 || (int)MapP->ID > MAX_RUP ))
     {
-	rio_dprint(RIO_DEBUG_TABLE, ("Bad ID in map entry!\n"));
+	rio_dprintk (RIO_DEBUG_TABLE, "Bad ID in map entry!\n");
 	p->RIOError.Error = ID_NUMBER_OUT_OF_RANGE;
 	return EINVAL;
     }
     if (MapP->RtaUniqueNum == 0)
     {
-	rio_dprint(RIO_DEBUG_TABLE, ("Rta Unique number zero!\n"));
+	rio_dprintk (RIO_DEBUG_TABLE, "Rta Unique number zero!\n");
 	p->RIOError.Error = RTA_UNIQUE_NUMBER_ZERO;
 	return EINVAL;
     }
     if ( (MapP->SysPort != NO_PORT) && (MapP->SysPort % PORTS_PER_RTA) )
     {
-	rio_dprint(RIO_DEBUG_TABLE, ("Port %d not multiple of %d!\n",(int)MapP->SysPort,PORTS_PER_RTA));
+	rio_dprintk (RIO_DEBUG_TABLE, "Port %d not multiple of %d!\n",(int)MapP->SysPort,PORTS_PER_RTA);
 	p->RIOError.Error = TTY_NUMBER_OUT_OF_RANGE;
 	return EINVAL;
     }
     if ( (MapP->SysPort != NO_PORT) && (MapP->SysPort >= RIO_PORTS) )
     {
-	rio_dprint(RIO_DEBUG_TABLE, ("Port %d not valid!\n",(int)MapP->SysPort));
+	rio_dprintk (RIO_DEBUG_TABLE, "Port %d not valid!\n",(int)MapP->SysPort);
 	p->RIOError.Error = TTY_NUMBER_OUT_OF_RANGE;
 	return EINVAL;
     }
@@ -678,7 +677,7 @@
     {
     if ( *sptr<' ' || *sptr>'~' )
     {
-	rio_dprint(RIO_DEBUG_TABLE, ("Name entry contains non-printing characters!\n"));
+	rio_dprintk (RIO_DEBUG_TABLE, "Name entry contains non-printing characters!\n");
 	p->RIOError.Error = BAD_CHARACTER_IN_NAME;
 	return EINVAL;
     }
@@ -703,8 +702,8 @@
 	    {
 		int nNewID;
 
-		rio_dprint(RIO_DEBUG_TABLE, ("Attempting to get a new ID for rta \"%s\"\n",
-		      MapP->Name));
+		rio_dprintk (RIO_DEBUG_TABLE, "Attempting to get a new ID for rta \"%s\"\n",
+		      MapP->Name);
 		/*
 		** The idea here is to allow RTA's to be assigned
 		** before they actually appear on the network.
@@ -722,7 +721,7 @@
 		    return EBUSY;
 		}
 		MapP->ID = (ushort)nNewID + 1;
-		rio_dprint(RIO_DEBUG_TABLE, ("Allocated ID %d for this new RTA.\n",MapP->ID));
+		rio_dprintk (RIO_DEBUG_TABLE, "Allocated ID %d for this new RTA.\n", MapP->ID);
 		HostMapP = &p->RIOHosts[host].Mapping[nNewID];
 		HostMapP->RtaUniqueNum = MapP->RtaUniqueNum;
 		HostMapP->HostUniqueNum = MapP->HostUniqueNum;
@@ -748,9 +747,9 @@
 		    HostMapP->Flags |= RTA16_SECOND_SLOT;
 		    HostMapP->ID2 = MapP->ID2 = p->RIOHosts[host].Mapping[unit].ID;
 		    p->RIOHosts[host].Mapping[unit].ID2 = MapP->ID;
-		    rio_dprint(RIO_DEBUG_TABLE, ("Cross referenced id %d to ID %d.\n",
+		    rio_dprintk (RIO_DEBUG_TABLE, "Cross referenced id %d to ID %d.\n",
 			  MapP->ID,
-			  p->RIOHosts[host].Mapping[unit].ID));
+			  p->RIOHosts[host].Mapping[unit].ID);
 		}
 	    }
 
@@ -758,7 +757,7 @@
 
 	    if ( HostMapP->Flags & SLOT_IN_USE )
 	    {
-		rio_dprint(RIO_DEBUG_TABLE, ("Map table slot for ID %d is already in use.\n",MapP->ID));
+		rio_dprintk (RIO_DEBUG_TABLE, "Map table slot for ID %d is already in use.\n", MapP->ID);
 		p->RIOError.Error = ID_ALREADY_IN_USE;
 		return EBUSY;
 	    }
@@ -792,15 +791,15 @@
 		    p->RIOLastPortsBooted = HostMapP->SysPort;
 	    }
 	    if (MapP->Flags & RTA16_SECOND_SLOT)
-	        rio_dprint(RIO_DEBUG_TABLE, ("Second map of RTA %s added to configuration\n",
-		 p->RIOHosts[host].Mapping[MapP->ID2 - 1].Name));
+	        rio_dprintk (RIO_DEBUG_TABLE, "Second map of RTA %s added to configuration\n",
+		 p->RIOHosts[host].Mapping[MapP->ID2 - 1].Name);
 	    else
-	        rio_dprint(RIO_DEBUG_TABLE, ("RTA %s added to configuration\n",MapP->Name));
+	        rio_dprintk (RIO_DEBUG_TABLE, "RTA %s added to configuration\n", MapP->Name);
 	    return 0;
 	}
     }
     p->RIOError.Error = UNKNOWN_HOST_NUMBER;
-    rio_dprint(RIO_DEBUG_TABLE, ("Unknown host %x\n",MapP->HostUniqueNum));
+    rio_dprintk (RIO_DEBUG_TABLE, "Unknown host %x\n", MapP->HostUniqueNum);
     return ENXIO;
 }
 
@@ -823,7 +822,7 @@
 	CheckHostMapP( HostMapP );
 #endif
 
-	rio_dprint(RIO_DEBUG_TABLE, ("Mapping sysport %d to id %d\n",(int)HostMapP->SysPort, HostMapP->ID));
+	rio_dprintk (RIO_DEBUG_TABLE, "Mapping sysport %d to id %d\n", (int)HostMapP->SysPort, HostMapP->ID);
 
 	/*
 	** We need to tell the UnixRups which sysport the rup corresponds to
@@ -834,26 +833,26 @@
 		return(0);
 
 	RtaType = GetUnitType(HostMapP->RtaUniqueNum);
-	rio_dprint(RIO_DEBUG_TABLE, ("Mapping sysport %d-%d\n",
-				(int)HostMapP->SysPort,(int)HostMapP->SysPort+PORTS_PER_RTA-1));
+	rio_dprintk (RIO_DEBUG_TABLE, "Mapping sysport %d-%d\n",
+				(int)HostMapP->SysPort, (int)HostMapP->SysPort+PORTS_PER_RTA-1);
 
 	/*
 	** now map each of its eight ports
 	*/
 	for ( SubEnt=0; SubEnt<PORTS_PER_RTA; SubEnt++) {
-	  rio_dprint  (RIO_DEBUG_TABLE, ("subent = %d, HostMapP->SysPort = %d\n", 
-		  SubEnt, (int) HostMapP->SysPort));
+	  rio_dprintk (RIO_DEBUG_TABLE, "subent = %d, HostMapP->SysPort = %d\n", 
+		  SubEnt, (int)HostMapP->SysPort);
 		SysPort = HostMapP->SysPort+SubEnt;		/* portnumber within system */
 					/* portnumber on host */
 		
 		HostPort = (HostMapP->ID-1)*PORTS_PER_RTA+SubEnt; 
 
-		rio_dprint (RIO_DEBUG_TABLE, ("c1 p = %p, p->rioPortp = %p\n", p, p->RIOPortp));
+		rio_dprintk (RIO_DEBUG_TABLE, "c1 p = %p, p->rioPortp = %p\n", p, p->RIOPortp);
 		PortP = p->RIOPortp[SysPort];
 #if 0
 		PortP->TtyP	= &p->channel[SysPort];
 #endif
-		rio_dprint(RIO_DEBUG_TABLE, ("Map port\n"));
+		rio_dprintk (RIO_DEBUG_TABLE, "Map port\n");
 
 		/*
 		** Point at all the real neat data structures
@@ -1009,12 +1008,12 @@
 	struct Map *HostMapP;
 	char *sptr;
 
-	rio_dprint(RIO_DEBUG_TABLE, ("Change name entry on host %x, rta %x, ID %d, Sysport %d\n",
+	rio_dprintk (RIO_DEBUG_TABLE, "Change name entry on host %x, rta %x, ID %d, Sysport %d\n",
 								MapP->HostUniqueNum,MapP->RtaUniqueNum,
-								MapP->ID, (int)MapP->SysPort ));
+								MapP->ID, (int)MapP->SysPort);
 
 	if ( MapP->ID > MAX_RUP ) {
-		rio_dprint(RIO_DEBUG_TABLE, ("Bad ID in map entry!\n"));
+		rio_dprintk (RIO_DEBUG_TABLE, "Bad ID in map entry!\n");
 		p->RIOError.Error = ID_NUMBER_OUT_OF_RANGE;
 		return EINVAL;
 	}
@@ -1024,7 +1023,7 @@
 
 	while ( *sptr ) {
 		if ( *sptr<' ' || *sptr>'~' ) {
-			rio_dprint(RIO_DEBUG_TABLE, ("Name entry contains non-printing characters!\n"));
+			rio_dprintk (RIO_DEBUG_TABLE, "Name entry contains non-printing characters!\n");
 			p->RIOError.Error = BAD_CHARACTER_IN_NAME;
 			return EINVAL;
 		}
@@ -1053,6 +1052,6 @@
 		}
 	}
 	p->RIOError.Error = UNKNOWN_HOST_NUMBER;
-	rio_dprint(RIO_DEBUG_TABLE, ("Unknown host %x\n",MapP->HostUniqueNum));
+	rio_dprintk (RIO_DEBUG_TABLE, "Unknown host %x\n", MapP->HostUniqueNum);
 	return ENXIO;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)