Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b8e3f1e authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

[PATCH] rioboot: lindent



This is the result of indent -kr -i8 -bri0 -l255

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 74769abf
Loading
Loading
Loading
Loading
+704 −811
Original line number Original line Diff line number Diff line
@@ -82,9 +82,7 @@ static char *_rioboot_c_sccs_ = "@(#)rioboot.c 1.3";


static int RIOBootComplete(struct rio_info *p, struct Host *HostP, uint Rup, struct PktCmd *PktCmdP);
static int RIOBootComplete(struct rio_info *p, struct Host *HostP, uint Rup, struct PktCmd *PktCmdP);


static uchar
static uchar RIOAtVec2Ctrl[] = {
RIOAtVec2Ctrl[] =
{
	/* 0 */ INTERRUPT_DISABLE,
	/* 0 */ INTERRUPT_DISABLE,
	/* 1 */ INTERRUPT_DISABLE,
	/* 1 */ INTERRUPT_DISABLE,
	/* 2 */ INTERRUPT_DISABLE,
	/* 2 */ INTERRUPT_DISABLE,
@@ -106,8 +104,7 @@ RIOAtVec2Ctrl[] =
/*
/*
** Load in the RTA boot code.
** Load in the RTA boot code.
*/
*/
int
int RIOBootCodeRTA(p, rbp)
RIOBootCodeRTA(p, rbp)
struct rio_info *p;
struct rio_info *p;
struct DownLoad *rbp;
struct DownLoad *rbp;
{
{
@@ -145,8 +142,7 @@ struct DownLoad * rbp;
	 ** so calculate how far we have to move the data up the buffer
	 ** so calculate how far we have to move the data up the buffer
	 ** to achieve this.
	 ** to achieve this.
	 */
	 */
	offset = (RTA_BOOT_DATA_SIZE - (rbp->Count % RTA_BOOT_DATA_SIZE)) % 
	offset = (RTA_BOOT_DATA_SIZE - (rbp->Count % RTA_BOOT_DATA_SIZE)) % RTA_BOOT_DATA_SIZE;
							RTA_BOOT_DATA_SIZE;


	/*
	/*
	 ** Be clean, and clear the 'unused' portion of the boot buffer,
	 ** Be clean, and clear the 'unused' portion of the boot buffer,
@@ -159,8 +155,7 @@ struct DownLoad * rbp;
	 ** Copy the data from user space.
	 ** Copy the data from user space.
	 */
	 */


	if ( copyin((int)rbp->DataP,((caddr_t)(p->RIOBootPackets))+offset,
	if (copyin((int) rbp->DataP, ((caddr_t) (p->RIOBootPackets)) + offset, rbp->Count) == COPYFAIL) {
				rbp->Count) ==COPYFAIL ) {
		rio_dprintk(RIO_DEBUG_BOOT, "Bad data copy from user space\n");
		rio_dprintk(RIO_DEBUG_BOOT, "Bad data copy from user space\n");
		p->RIOError.Error = COPYIN_FAILED;
		p->RIOError.Error = COPYIN_FAILED;
		/* restore(oldspl); */
		/* restore(oldspl); */
@@ -187,10 +182,7 @@ void rio_start_card_running (struct Host * HostP)
	switch (HostP->Type) {
	switch (HostP->Type) {
	case RIO_AT:
	case RIO_AT:
		rio_dprintk(RIO_DEBUG_BOOT, "Start ISA card running\n");
		rio_dprintk(RIO_DEBUG_BOOT, "Start ISA card running\n");
		WBYTE(HostP->Control, 
		WBYTE(HostP->Control, BOOT_FROM_RAM | EXTERNAL_BUS_ON | HostP->Mode | RIOAtVec2Ctrl[HostP->Ivec & 0xF]);
		      BOOT_FROM_RAM | EXTERNAL_BUS_ON
		      | HostP->Mode
		      | RIOAtVec2Ctrl[HostP->Ivec & 0xF] );
		break;
		break;


#ifdef FUTURE_RELEASE
#ifdef FUTURE_RELEASE
@@ -239,8 +231,7 @@ void rio_start_card_running (struct Host * HostP)
** Put your rubber pants on before messing with this code - even the magic
** Put your rubber pants on before messing with this code - even the magic
** numbers have trouble understanding what they are doing here.
** numbers have trouble understanding what they are doing here.
*/
*/
int
int RIOBootCodeHOST(p, rbp)
RIOBootCodeHOST(p, rbp)
struct rio_info *p;
struct rio_info *p;
register struct DownLoad *rbp;
register struct DownLoad *rbp;
{
{
@@ -264,8 +255,7 @@ register struct DownLoad *rbp;
		rio_dprintk(RIO_DEBUG_BOOT, "Attempt to boot host %d\n", host);
		rio_dprintk(RIO_DEBUG_BOOT, "Attempt to boot host %d\n", host);
		HostP = &p->RIOHosts[host];
		HostP = &p->RIOHosts[host];


		rio_dprintk (RIO_DEBUG_BOOT,  "Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n",
		rio_dprintk(RIO_DEBUG_BOOT, "Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n", HostP->Type, HostP->Mode, HostP->Ivec);
		    HostP->Type, HostP->Mode, HostP->Ivec);




		if ((HostP->Flags & RUN_STATE) != RC_WAITING) {
		if ((HostP->Flags & RUN_STATE) != RC_WAITING) {
@@ -337,8 +327,7 @@ register struct DownLoad *rbp;
			HostP->Copy(DownCode, StartP, rbp->Count);
			HostP->Copy(DownCode, StartP, rbp->Count);


			sysfree(DownCode, rbp->Count);
			sysfree(DownCode, rbp->Count);
		}
		} else if (copyin((int) rbp->DataP, StartP, rbp->Count) == COPYFAIL) {
		else if ( copyin((int)rbp->DataP,StartP,rbp->Count)==COPYFAIL ) {
			rio_dprintk(RIO_DEBUG_BOOT, "Bad copyin of host data\n");
			rio_dprintk(RIO_DEBUG_BOOT, "Bad copyin of host data\n");
			p->RIOError.Error = COPYIN_FAILED;
			p->RIOError.Error = COPYIN_FAILED;
			func_exit();
			func_exit();
@@ -468,8 +457,7 @@ register struct DownLoad *rbp;
		 ** As there is nothing dodgy or obscure about the
		 ** As there is nothing dodgy or obscure about the
		 ** above code, this is guaranteed to work every time.
		 ** above code, this is guaranteed to work every time.
		 */
		 */
		rio_dprintk (RIO_DEBUG_BOOT,  "Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n",
		rio_dprintk(RIO_DEBUG_BOOT, "Host Type = 0x%x, Mode = 0x%x, IVec = 0x%x\n", HostP->Type, HostP->Mode, HostP->Ivec);
		    HostP->Type, HostP->Mode, HostP->Ivec);


		rio_start_card_running(HostP);
		rio_start_card_running(HostP);


@@ -479,8 +467,7 @@ register struct DownLoad *rbp;
		 ** Now, wait for upto five seconds for the Tp to setup the parmmap
		 ** Now, wait for upto five seconds for the Tp to setup the parmmap
		 ** pointer:
		 ** pointer:
		 */
		 */
		for ( wait_count=0; (wait_count<p->RIOConf.StartupTime)&&
		for (wait_count = 0; (wait_count < p->RIOConf.StartupTime) && (RWORD(HostP->__ParmMapR) == OldParmMap); wait_count++) {
			(RWORD(HostP->__ParmMapR)==OldParmMap); wait_count++ ) {
			rio_dprintk(RIO_DEBUG_BOOT, "Checkout %d, 0x%x\n", wait_count, RWORD(HostP->__ParmMapR));
			rio_dprintk(RIO_DEBUG_BOOT, "Checkout %d, 0x%x\n", wait_count, RWORD(HostP->__ParmMapR));
			delay(HostP, HUNDRED_MS);
			delay(HostP, HUNDRED_MS);


@@ -493,15 +480,10 @@ register struct DownLoad *rbp;
		if (RWORD(HostP->__ParmMapR) == OldParmMap) {
		if (RWORD(HostP->__ParmMapR) == OldParmMap) {
			rio_dprintk(RIO_DEBUG_BOOT, "parmmap 0x%x\n", RWORD(HostP->__ParmMapR));
			rio_dprintk(RIO_DEBUG_BOOT, "parmmap 0x%x\n", RWORD(HostP->__ParmMapR));
			rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail\n");
			rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail\n");

			HostP->Flags &= ~RUN_STATE;
#define	HOST_DISABLE \
			HostP->Flags |= RC_STUFFED;
		HostP->Flags &= ~RUN_STATE; \
			RIOHostReset(HostP->Type, (struct DpRam *) HostP->CardP, HostP->Slot);
		HostP->Flags |= RC_STUFFED; \
		continue}
		RIOHostReset( HostP->Type, (struct DpRam *)HostP->CardP, HostP->Slot );\
		continue

			HOST_DISABLE;
		}


		rio_dprintk(RIO_DEBUG_BOOT, "Running 0x%x\n", RWORD(HostP->__ParmMapR));
		rio_dprintk(RIO_DEBUG_BOOT, "Running 0x%x\n", RWORD(HostP->__ParmMapR));


@@ -516,8 +498,7 @@ register struct DownLoad *rbp;
		 */
		 */
		ParmMapP = (PARM_MAP *) RIO_PTR(Cad, RWORD(HostP->__ParmMapR));
		ParmMapP = (PARM_MAP *) RIO_PTR(Cad, RWORD(HostP->__ParmMapR));
		rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %x\n", (int) ParmMapP);
		rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %x\n", (int) ParmMapP);
		ParmMapP = (PARM_MAP *)((unsigned long)Cad + 
		ParmMapP = (PARM_MAP *) ((unsigned long) Cad + (unsigned long) ((RWORD((HostP->__ParmMapR))) & 0xFFFF));
						(unsigned long)((RWORD((HostP->__ParmMapR))) & 0xFFFF)); 
		rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %x\n", (int) ParmMapP);
		rio_dprintk(RIO_DEBUG_BOOT, "ParmMapP : %x\n", (int) ParmMapP);


		/*
		/*
@@ -528,8 +509,10 @@ register struct DownLoad *rbp;
		if ((RWORD(ParmMapP->links) & 0xFFFF) != 0xFFFF) {
		if ((RWORD(ParmMapP->links) & 0xFFFF) != 0xFFFF) {
			rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
			rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
			rio_dprintk(RIO_DEBUG_BOOT, "Links = 0x%x\n", RWORD(ParmMapP->links));
			rio_dprintk(RIO_DEBUG_BOOT, "Links = 0x%x\n", RWORD(ParmMapP->links));
			HOST_DISABLE;
			HostP->Flags &= ~RUN_STATE;
		}
			HostP->Flags |= RC_STUFFED;
			RIOHostReset(HostP->Type, (struct DpRam *) HostP->CardP, HostP->Slot);
		continue}


		WWORD(ParmMapP->links, RIO_LINK_ENABLE);
		WWORD(ParmMapP->links, RIO_LINK_ENABLE);


@@ -539,19 +522,19 @@ register struct DownLoad *rbp;
		 */
		 */
		rio_dprintk(RIO_DEBUG_BOOT, "Looking for init_done - %d ticks\n", p->RIOConf.StartupTime);
		rio_dprintk(RIO_DEBUG_BOOT, "Looking for init_done - %d ticks\n", p->RIOConf.StartupTime);
		HostP->timeout_id = 0;
		HostP->timeout_id = 0;
		for ( wait_count=0; (wait_count<p->RIOConf.StartupTime) && 
		for (wait_count = 0; (wait_count < p->RIOConf.StartupTime) && !RWORD(ParmMapP->init_done); wait_count++) {
						!RWORD(ParmMapP->init_done); wait_count++ ) {
			rio_dprintk(RIO_DEBUG_BOOT, "Waiting for init_done\n");
			rio_dprintk(RIO_DEBUG_BOOT, "Waiting for init_done\n");
			delay(HostP, HUNDRED_MS);
			delay(HostP, HUNDRED_MS);
		}
		}
		rio_dprintk(RIO_DEBUG_BOOT, "OK! init_done!\n");
		rio_dprintk(RIO_DEBUG_BOOT, "OK! init_done!\n");


		if (RWORD(ParmMapP->error) != E_NO_ERROR || 
		if (RWORD(ParmMapP->error) != E_NO_ERROR || !RWORD(ParmMapP->init_done)) {
							!RWORD(ParmMapP->init_done) ) {
			rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
			rio_dprintk(RIO_DEBUG_BOOT, "RIO Mesg Run Fail %s\n", HostP->Name);
			rio_dprintk(RIO_DEBUG_BOOT, "Timedout waiting for init_done\n");
			rio_dprintk(RIO_DEBUG_BOOT, "Timedout waiting for init_done\n");
			HOST_DISABLE;
			HostP->Flags &= ~RUN_STATE;
		}
			HostP->Flags |= RC_STUFFED;
			RIOHostReset(HostP->Type, (struct DpRam *) HostP->CardP, HostP->Slot);
		continue}


		rio_dprintk(RIO_DEBUG_BOOT, "Got init_done\n");
		rio_dprintk(RIO_DEBUG_BOOT, "Got init_done\n");


@@ -595,8 +578,7 @@ register struct DownLoad *rbp;
		/*
		/*
		 ** point the PortP->Phbs at the real Phbs
		 ** point the PortP->Phbs at the real Phbs
		 */
		 */
		for ( PortN=p->RIOFirstPortsMapped; 
		for (PortN = p->RIOFirstPortsMapped; PortN < p->RIOLastPortsMapped + PORTS_PER_RTA; PortN++) {
				PortN<p->RIOLastPortsMapped+PORTS_PER_RTA; PortN++ ) {
			if (p->RIOPortp[PortN]->HostP == HostP) {
			if (p->RIOPortp[PortN]->HostP == HostP) {
				struct Port *PortP = p->RIOPortp[PortN];
				struct Port *PortP = p->RIOPortp[PortN];
				struct PHB *PhbP;
				struct PHB *PhbP;
@@ -653,8 +635,7 @@ register struct DownLoad *rbp;
** Boot an RTA. If we have successfully processed this boot, then
** Boot an RTA. If we have successfully processed this boot, then
** return 1. If we havent, then return 0.
** return 1. If we havent, then return 0.
*/
*/
int
int RIOBootRup(p, Rup, HostP, PacketP)
RIOBootRup( p, Rup, HostP, PacketP)
struct rio_info *p;
struct rio_info *p;
uint Rup;
uint Rup;
struct Host *HostP;
struct Host *HostP;
@@ -682,8 +663,7 @@ struct PKT *PacketP;
	 ** this first and then get a command block, then handle every other
	 ** this first and then get a command block, then handle every other
	 ** case, relinquishing the command block if disaster strikes!
	 ** case, relinquishing the command block if disaster strikes!
	 */
	 */
	if ( (RBYTE(PacketP->len) & PKT_CMD_BIT) && 
	if ((RBYTE(PacketP->len) & PKT_CMD_BIT) && (RBYTE(PktCmdP->Command) == BOOT_COMPLETED))
			(RBYTE(PktCmdP->Command)==BOOT_COMPLETED) )
		return RIOBootComplete(p, HostP, Rup, PktCmdP);
		return RIOBootComplete(p, HostP, Rup, PktCmdP);


	/*
	/*
@@ -713,8 +693,7 @@ struct PKT *PacketP;
		 ** We only expect one type of command - a BOOT_REQUEST!
		 ** We only expect one type of command - a BOOT_REQUEST!
		 */
		 */
		if (RBYTE(PktCmdP->Command) != BOOT_REQUEST) {
		if (RBYTE(PktCmdP->Command) != BOOT_REQUEST) {
			rio_dprintk (RIO_DEBUG_BOOT, "Unexpected command %d on BOOT RUP %d of host %d\n", 
			rio_dprintk(RIO_DEBUG_BOOT, "Unexpected command %d on BOOT RUP %d of host %d\n", PktCmdP->Command, Rup, HostP - p->RIOHosts);
						PktCmdP->Command,Rup,HostP-p->RIOHosts);
			ShowPacket(DBG_BOOT, PacketP);
			ShowPacket(DBG_BOOT, PacketP);
			RIOFreeCmdBlk(CmdBlkP);
			RIOFreeCmdBlk(CmdBlkP);
			return 1;
			return 1;
@@ -751,9 +730,7 @@ struct PKT *PacketP;


		bcopy("BOOT", (void *) &CmdBlkP->Packet.data[BOOT_SEQUENCE_LEN], 4);
		bcopy("BOOT", (void *) &CmdBlkP->Packet.data[BOOT_SEQUENCE_LEN], 4);


		rio_dprintk (RIO_DEBUG_BOOT, "Boot RTA on Host %d Rup %d - %d (0x%x) packets to 0x%x\n",
		rio_dprintk(RIO_DEBUG_BOOT, "Boot RTA on Host %d Rup %d - %d (0x%x) packets to 0x%x\n", HostP - p->RIOHosts, Rup, p->RIONumBootPkts, p->RIONumBootPkts, p->RIOConf.RtaLoadBase);
			HostP-p->RIOHosts, Rup, p->RIONumBootPkts, p->RIONumBootPkts, 
								p->RIOConf.RtaLoadBase);


		/*
		/*
		 ** If this host is in slave mode, send the RTA an invalid boot
		 ** If this host is in slave mode, send the RTA an invalid boot
@@ -775,15 +752,13 @@ struct PKT *PacketP;
	rio_dprintk(RIO_DEBUG_BOOT, "Boot block %d on Host %d Rup%d\n", sequence, HostP - p->RIOHosts, Rup);
	rio_dprintk(RIO_DEBUG_BOOT, "Boot block %d on Host %d Rup%d\n", sequence, HostP - p->RIOHosts, Rup);


	if (sequence >= p->RIONumBootPkts) {
	if (sequence >= p->RIONumBootPkts) {
		rio_dprintk (RIO_DEBUG_BOOT, "Got a request for packet %d, max is %d\n", sequence, 
		rio_dprintk(RIO_DEBUG_BOOT, "Got a request for packet %d, max is %d\n", sequence, p->RIONumBootPkts);
					p->RIONumBootPkts);
		ShowPacket(DBG_BOOT, PacketP);
		ShowPacket(DBG_BOOT, PacketP);
	}
	}


	PktReplyP->Sequence = sequence;
	PktReplyP->Sequence = sequence;


	bcopy( p->RIOBootPackets[ p->RIONumBootPkts - sequence - 1 ], 
	bcopy(p->RIOBootPackets[p->RIONumBootPkts - sequence - 1], PktReplyP->BootData, RTA_BOOT_DATA_SIZE);
				PktReplyP->BootData, RTA_BOOT_DATA_SIZE );


	CmdBlkP->Packet.len = PKT_MAX_DATA_LEN;
	CmdBlkP->Packet.len = PKT_MAX_DATA_LEN;
	ShowPacket(DBG_BOOT, &CmdBlkP->Packet);
	ShowPacket(DBG_BOOT, &CmdBlkP->Packet);
@@ -809,10 +784,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	char *MyType, *MyName;
	char *MyType, *MyName;
	uint MyLink;
	uint MyLink;
	ushort RtaType;
	ushort RtaType;
	uint	RtaUniq = (RBYTE(PktCmdP->UniqNum[0])) +
	uint RtaUniq = (RBYTE(PktCmdP->UniqNum[0])) + (RBYTE(PktCmdP->UniqNum[1]) << 8) + (RBYTE(PktCmdP->UniqNum[2]) << 16) + (RBYTE(PktCmdP->UniqNum[3]) << 24);
			  (RBYTE(PktCmdP->UniqNum[1]) << 8) +
			  (RBYTE(PktCmdP->UniqNum[2]) << 16) +
			  (RBYTE(PktCmdP->UniqNum[3]) << 24);


	/* Was RIOBooting-- . That's bad. If an RTA sends two of them, the
	/* Was RIOBooting-- . That's bad. If an RTA sends two of them, the
	   driver will never think that the RTA has booted... -- REW */
	   driver will never think that the RTA has booted... -- REW */
@@ -825,18 +797,14 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	 */
	 */
	RtaType = GetUnitType(RtaUniq);
	RtaType = GetUnitType(RtaUniq);
	if (Rup >= (ushort) MAX_RUP) {
	if (Rup >= (ushort) MAX_RUP) {
	    rio_dprintk (RIO_DEBUG_BOOT, "RIO: Host %s has booted an RTA(%d) on link %c\n",
		rio_dprintk(RIO_DEBUG_BOOT, "RIO: Host %s has booted an RTA(%d) on link %c\n", HostP->Name, 8 * RtaType, RBYTE(PktCmdP->LinkNum) + 'A');
	     HostP->Name, 8 * RtaType, RBYTE(PktCmdP->LinkNum)+'A');
	} else {
	} else {
	    rio_dprintk (RIO_DEBUG_BOOT, "RIO: RTA %s has booted an RTA(%d) on link %c\n",
		rio_dprintk(RIO_DEBUG_BOOT, "RIO: RTA %s has booted an RTA(%d) on link %c\n", HostP->Mapping[Rup].Name, 8 * RtaType, RBYTE(PktCmdP->LinkNum) + 'A');
	     HostP->Mapping[Rup].Name, 8 * RtaType,
	     RBYTE(PktCmdP->LinkNum)+'A');
	}
	}


	rio_dprintk(RIO_DEBUG_BOOT, "UniqNum is 0x%x\n", RtaUniq);
	rio_dprintk(RIO_DEBUG_BOOT, "UniqNum is 0x%x\n", RtaUniq);


        if ( ( RtaUniq == 0x00000000 ) || ( RtaUniq == 0xffffffff ) )
	if ((RtaUniq == 0x00000000) || (RtaUniq == 0xffffffff)) {
	{
		rio_dprintk(RIO_DEBUG_BOOT, "Illegal RTA Uniq Number\n");
		rio_dprintk(RIO_DEBUG_BOOT, "Illegal RTA Uniq Number\n");
		return TRUE;
		return TRUE;
	}
	}
@@ -846,24 +814,18 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	 ** system, or the system is in slave mode, do not attempt to create
	 ** system, or the system is in slave mode, do not attempt to create
	 ** a new table entry for it.
	 ** a new table entry for it.
	 */
	 */
	if (!RIOBootOk(p, HostP, RtaUniq))
	if (!RIOBootOk(p, HostP, RtaUniq)) {
	{
		MyLink = RBYTE(PktCmdP->LinkNum);
		MyLink = RBYTE(PktCmdP->LinkNum);
	    if (Rup < (ushort) MAX_RUP)
		if (Rup < (ushort) MAX_RUP) {
	    {
			/*
			/*
			 ** RtaUniq was clone booted (by this RTA). Instruct this RTA
			 ** RtaUniq was clone booted (by this RTA). Instruct this RTA
			 ** to hold off further attempts to boot on this link for 30
			 ** to hold off further attempts to boot on this link for 30
			 ** seconds.
			 ** seconds.
			 */
			 */
		if (RIOSuspendBootRta(HostP, HostP->Mapping[Rup].ID, MyLink))
			if (RIOSuspendBootRta(HostP, HostP->Mapping[Rup].ID, MyLink)) {
		{
				rio_dprintk(RIO_DEBUG_BOOT, "RTA failed to suspend booting on link %c\n", 'A' + MyLink);
		    rio_dprintk (RIO_DEBUG_BOOT, "RTA failed to suspend booting on link %c\n",
		     'A' + MyLink);
		}
			}
			}
	    else
		} else {
	    {
			/*
			/*
			 ** RtaUniq was booted by this host. Set the booting link
			 ** RtaUniq was booted by this host. Set the booting link
			 ** to hold off for 30 seconds to give another unit a
			 ** to hold off for 30 seconds to give another unit a
@@ -871,8 +833,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
			 */
			 */
			WWORD(HostP->LinkStrP[MyLink].WaitNoBoot, 30);
			WWORD(HostP->LinkStrP[MyLink].WaitNoBoot, 30);
		}
		}
	    rio_dprintk (RIO_DEBUG_BOOT, "RTA %x not owned - suspend booting down link %c on unit %x\n",
		rio_dprintk(RIO_DEBUG_BOOT, "RTA %x not owned - suspend booting down link %c on unit %x\n", RtaUniq, 'A' + MyLink, HostP->Mapping[Rup].RtaUniqueNum);
	      RtaUniq, 'A' + MyLink, HostP->Mapping[Rup].RtaUniqueNum);
		return TRUE;
		return TRUE;
	}
	}


@@ -887,19 +848,15 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	 ** to force an open on any ports that where previously open on this
	 ** to force an open on any ports that where previously open on this
	 ** unit.
	 ** unit.
	 */
	 */
        for ( entry=0; entry<MAX_RUP; entry++ )
	for (entry = 0; entry < MAX_RUP; entry++) {
	{
		uint sysport;
		uint sysport;


	    if ((HostP->Mapping[entry].Flags & SLOT_IN_USE) && 
		if ((HostP->Mapping[entry].Flags & SLOT_IN_USE) && (HostP->Mapping[entry].RtaUniqueNum == RtaUniq)) {
	       (HostP->Mapping[entry].RtaUniqueNum==RtaUniq))
	    {
			HostP->Mapping[entry].Flags |= RTA_BOOTED | RTA_NEWBOOT;
			HostP->Mapping[entry].Flags |= RTA_BOOTED | RTA_NEWBOOT;
#ifdef NEED_TO_FIX
#ifdef NEED_TO_FIX
			RIO_SV_BROADCAST(HostP->svFlags[entry]);
			RIO_SV_BROADCAST(HostP->svFlags[entry]);
#endif
#endif
		if ( (sysport=HostP->Mapping[entry].SysPort) != NO_PORT )
			if ((sysport = HostP->Mapping[entry].SysPort) != NO_PORT) {
		{
				if (sysport < p->RIOFirstPortsBooted)
				if (sysport < p->RIOFirstPortsBooted)
					p->RIOFirstPortsBooted = sysport;
					p->RIOFirstPortsBooted = sysport;
				if (sysport > p->RIOLastPortsBooted)
				if (sysport > p->RIOLastPortsBooted)
@@ -907,8 +864,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
				/*
				/*
				 ** For a 16 port RTA, check the second bank of 8 ports
				 ** For a 16 port RTA, check the second bank of 8 ports
				 */
				 */
		   if (RtaType == TYPE_RTA16)
				if (RtaType == TYPE_RTA16) {
		   {
					entry2 = HostP->Mapping[entry].ID2 - 1;
					entry2 = HostP->Mapping[entry].ID2 - 1;
					HostP->Mapping[entry2].Flags |= RTA_BOOTED | RTA_NEWBOOT;
					HostP->Mapping[entry2].Flags |= RTA_BOOTED | RTA_NEWBOOT;
#ifdef NEED_TO_FIX
#ifdef NEED_TO_FIX
@@ -922,8 +878,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
				}
				}
			}
			}
			if (RtaType == TYPE_RTA16) {
			if (RtaType == TYPE_RTA16) {
		   rio_dprintk (RIO_DEBUG_BOOT, "RTA will be given IDs %d+%d\n",
				rio_dprintk(RIO_DEBUG_BOOT, "RTA will be given IDs %d+%d\n", entry + 1, entry2 + 1);
		    entry+1, entry2+1);
			} else {
			} else {
				rio_dprintk(RIO_DEBUG_BOOT, "RTA will be given ID %d\n", entry + 1);
				rio_dprintk(RIO_DEBUG_BOOT, "RTA will be given ID %d\n", entry + 1);
			}
			}
@@ -933,16 +888,13 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st


	rio_dprintk(RIO_DEBUG_BOOT, "RTA not configured for this host\n");
	rio_dprintk(RIO_DEBUG_BOOT, "RTA not configured for this host\n");


	if ( Rup >= (ushort)MAX_RUP )
	if (Rup >= (ushort) MAX_RUP) {
	{
		/*
		/*
		 ** It was a host that did the booting
		 ** It was a host that did the booting
		 */
		 */
		MyType = "Host";
		MyType = "Host";
		MyName = HostP->Name;
		MyName = HostP->Name;
	}
	} else {
	else
	{
		/*
		/*
		 ** It was an RTA that did the booting
		 ** It was an RTA that did the booting
		 */
		 */
@@ -960,22 +912,15 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	 **
	 **
	 ** If we find one, then we re-use that slot.
	 ** If we find one, then we re-use that slot.
	 */
	 */
	for ( entry=0; entry<MAX_RUP; entry++ )
	for (entry = 0; entry < MAX_RUP; entry++) {
	{
		if ((HostP->Mapping[entry].Flags & SLOT_TENTATIVE) && (HostP->Mapping[entry].RtaUniqueNum == RtaUniq)) {
	    if ( (HostP->Mapping[entry].Flags & SLOT_TENTATIVE) &&
			if (RtaType == TYPE_RTA16) {
		 (HostP->Mapping[entry].RtaUniqueNum == RtaUniq) )
	    {
		if (RtaType == TYPE_RTA16)
		{
				entry2 = HostP->Mapping[entry].ID2 - 1;
				entry2 = HostP->Mapping[entry].ID2 - 1;
		    if ( (HostP->Mapping[entry2].Flags & SLOT_TENTATIVE) &&
				if ((HostP->Mapping[entry2].Flags & SLOT_TENTATIVE) && (HostP->Mapping[entry2].RtaUniqueNum == RtaUniq))
			 (HostP->Mapping[entry2].RtaUniqueNum == RtaUniq) )
					rio_dprintk(RIO_DEBUG_BOOT, "Found previous tentative slots (%d+%d)\n", entry, entry2);
			rio_dprintk (RIO_DEBUG_BOOT, "Found previous tentative slots (%d+%d)\n",
			 entry, entry2);
				else
				else
					continue;
					continue;
		}
			} else
		else
				rio_dprintk(RIO_DEBUG_BOOT, "Found previous tentative slot (%d)\n", entry);
				rio_dprintk(RIO_DEBUG_BOOT, "Found previous tentative slot (%d)\n", entry);
			if (!p->RIONoMessage)
			if (!p->RIONoMessage)
				cprintf("RTA connected to %s '%s' (%c) not configured.\n", MyType, MyName, MyLink + 'A');
				cprintf("RTA connected to %s '%s' (%c) not configured.\n", MyType, MyName, MyLink + 'A');
@@ -1008,25 +953,16 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	rio_dprintk(RIO_DEBUG_BOOT, "Have we seen RTA %x before?\n", RtaUniq);
	rio_dprintk(RIO_DEBUG_BOOT, "Have we seen RTA %x before?\n", RtaUniq);
	found = 0;
	found = 0;
	Flag = 0;		/* Convince the compiler this variable is initialized */
	Flag = 0;		/* Convince the compiler this variable is initialized */
	for ( host = 0; !found && (host < p->RIONumHosts); host++ )
	for (host = 0; !found && (host < p->RIONumHosts); host++) {
	{
		for (rta = 0; rta < MAX_RUP; rta++) {
	    for ( rta=0; rta<MAX_RUP; rta++ )
			if ((p->RIOHosts[host].Mapping[rta].Flags & (SLOT_IN_USE | SLOT_TENTATIVE)) && (p->RIOHosts[host].Mapping[rta].RtaUniqueNum == RtaUniq)) {
	    {
		if ((p->RIOHosts[host].Mapping[rta].Flags &
		 (SLOT_IN_USE | SLOT_TENTATIVE)) &&
		 (p->RIOHosts[host].Mapping[rta].RtaUniqueNum==RtaUniq))
		{
				Flag = p->RIOHosts[host].Mapping[rta].Flags;
				Flag = p->RIOHosts[host].Mapping[rta].Flags;
				MapP = &p->RIOHosts[host].Mapping[rta];
				MapP = &p->RIOHosts[host].Mapping[rta];
		    if (RtaType == TYPE_RTA16)
				if (RtaType == TYPE_RTA16) {
		    {
					MapP2 = &p->RIOHosts[host].Mapping[MapP->ID2 - 1];
					MapP2 = &p->RIOHosts[host].Mapping[MapP->ID2 - 1];
			rio_dprintk (RIO_DEBUG_BOOT, "This RTA is units %d+%d from host %s\n",
					rio_dprintk(RIO_DEBUG_BOOT, "This RTA is units %d+%d from host %s\n", rta + 1, MapP->ID2, p->RIOHosts[host].Name);
			 rta+1, MapP->ID2, p->RIOHosts[host].Name);
				} else
		    }
					rio_dprintk(RIO_DEBUG_BOOT, "This RTA is unit %d from host %s\n", rta + 1, p->RIOHosts[host].Name);
		    else
			rio_dprintk (RIO_DEBUG_BOOT, "This RTA is unit %d from host %s\n",
			 rta+1, p->RIOHosts[host].Name);
				found = 1;
				found = 1;
				break;
				break;
			}
			}
@@ -1042,33 +978,22 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	 **
	 **
	 ** Check for a SLOT_IN_USE entry for this RTA in the config table.
	 ** Check for a SLOT_IN_USE entry for this RTA in the config table.
	 */
	 */
	if ( !MapP )
	if (!MapP) {
	{
		rio_dprintk(RIO_DEBUG_BOOT, "Look for RTA %x in RIOSavedTable\n", RtaUniq);
		rio_dprintk(RIO_DEBUG_BOOT, "Look for RTA %x in RIOSavedTable\n", RtaUniq);
	    for ( rta=0; rta < TOTAL_MAP_ENTRIES; rta++ )
		for (rta = 0; rta < TOTAL_MAP_ENTRIES; rta++) {
	    {
			rio_dprintk(RIO_DEBUG_BOOT, "Check table entry %d (%x)", rta, p->RIOSavedTable[rta].RtaUniqueNum);
		rio_dprintk (RIO_DEBUG_BOOT, "Check table entry %d (%x)",
		      rta,
		      p->RIOSavedTable[rta].RtaUniqueNum);


		if ( (p->RIOSavedTable[rta].Flags & SLOT_IN_USE) &&
			if ((p->RIOSavedTable[rta].Flags & SLOT_IN_USE) && (p->RIOSavedTable[rta].RtaUniqueNum == RtaUniq)) {
		 (p->RIOSavedTable[rta].RtaUniqueNum == RtaUniq) )
		{
				MapP = &p->RIOSavedTable[rta];
				MapP = &p->RIOSavedTable[rta];
				Flag = p->RIOSavedTable[rta].Flags;
				Flag = p->RIOSavedTable[rta].Flags;
		    if (RtaType == TYPE_RTA16)
				if (RtaType == TYPE_RTA16) {
		    {
					for (entry2 = rta + 1; entry2 < TOTAL_MAP_ENTRIES; entry2++) {
                        for (entry2 = rta + 1; entry2 < TOTAL_MAP_ENTRIES;
                         entry2++)
                        {
						if (p->RIOSavedTable[entry2].RtaUniqueNum == RtaUniq)
						if (p->RIOSavedTable[entry2].RtaUniqueNum == RtaUniq)
							break;
							break;
					}
					}
					MapP2 = &p->RIOSavedTable[entry2];
					MapP2 = &p->RIOSavedTable[entry2];
                        rio_dprintk (RIO_DEBUG_BOOT, "This RTA is from table entries %d+%d\n",
					rio_dprintk(RIO_DEBUG_BOOT, "This RTA is from table entries %d+%d\n", rta, entry2);
                              rta, entry2);
				} else
		    }
		    else
					rio_dprintk(RIO_DEBUG_BOOT, "This RTA is from table entry %d\n", rta);
					rio_dprintk(RIO_DEBUG_BOOT, "This RTA is from table entry %d\n", rta);
				break;
				break;
			}
			}
@@ -1089,19 +1014,14 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	 ** tentative entry in the table.
	 ** tentative entry in the table.
	 */
	 */
	EmptySlot = 1;
	EmptySlot = 1;
	if (RtaType == TYPE_RTA16)
	if (RtaType == TYPE_RTA16) {
	{
		if (RIOFindFreeID(p, HostP, &entry, &entry2) == 0) {
	    if (RIOFindFreeID(p, HostP, &entry, &entry2) == 0)
	    {
			RIODefaultName(p, HostP, entry);
			RIODefaultName(p, HostP, entry);
			FillSlot(entry, entry2, RtaUniq, HostP);
			FillSlot(entry, entry2, RtaUniq, HostP);
			EmptySlot = 0;
			EmptySlot = 0;
		}
		}
	}
	} else {
	else
		if (RIOFindFreeID(p, HostP, &entry, NULL) == 0) {
	{
	    if (RIOFindFreeID(p, HostP, &entry, NULL) == 0)
	    {
			RIODefaultName(p, HostP, entry);
			RIODefaultName(p, HostP, entry);
			FillSlot(entry, 0, RtaUniq, HostP);
			FillSlot(entry, 0, RtaUniq, HostP);
			EmptySlot = 0;
			EmptySlot = 0;
@@ -1119,18 +1039,13 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	 ** If we found a SLOT_TENTATIVE entry on another host for this
	 ** If we found a SLOT_TENTATIVE entry on another host for this
	 ** RTA in the driver table, just delete the other host entry.
	 ** RTA in the driver table, just delete the other host entry.
	 */
	 */
	if (EmptySlot == 0)
	if (EmptySlot == 0) {
	{
		if (MapP) {
	    if ( MapP )
			if (Flag & SLOT_IN_USE) {
	    {
				rio_dprintk(RIO_DEBUG_BOOT, "This RTA configured on another host - move entry to current host (1)\n");
		if (Flag & SLOT_IN_USE)
		{
		    rio_dprintk (RIO_DEBUG_BOOT, 
    "This RTA configured on another host - move entry to current host (1)\n");
				HostP->Mapping[entry].SysPort = MapP->SysPort;
				HostP->Mapping[entry].SysPort = MapP->SysPort;
				CCOPY(MapP->Name, HostP->Mapping[entry].Name, MAX_NAME_LEN);
				CCOPY(MapP->Name, HostP->Mapping[entry].Name, MAX_NAME_LEN);
		    HostP->Mapping[entry].Flags =
				HostP->Mapping[entry].Flags = SLOT_IN_USE | RTA_BOOTED | RTA_NEWBOOT;
		     SLOT_IN_USE | RTA_BOOTED | RTA_NEWBOOT;
#ifdef NEED_TO_FIX
#ifdef NEED_TO_FIX
				RIO_SV_BROADCAST(HostP->svFlags[entry]);
				RIO_SV_BROADCAST(HostP->svFlags[entry]);
#endif
#endif
@@ -1140,23 +1055,16 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
				if (HostP->Mapping[entry].SysPort > p->RIOLastPortsBooted)
				if (HostP->Mapping[entry].SysPort > p->RIOLastPortsBooted)
					p->RIOLastPortsBooted = HostP->Mapping[entry].SysPort;
					p->RIOLastPortsBooted = HostP->Mapping[entry].SysPort;
				rio_dprintk(RIO_DEBUG_BOOT, "SysPort %d, Name %s\n", (int) MapP->SysPort, MapP->Name);
				rio_dprintk(RIO_DEBUG_BOOT, "SysPort %d, Name %s\n", (int) MapP->SysPort, MapP->Name);
		}
			} else {
		else
				rio_dprintk(RIO_DEBUG_BOOT, "This RTA has a tentative entry on another host - delete that entry (1)\n");
		{
				HostP->Mapping[entry].Flags = SLOT_TENTATIVE | RTA_BOOTED | RTA_NEWBOOT;
		    rio_dprintk (RIO_DEBUG_BOOT, 
   "This RTA has a tentative entry on another host - delete that entry (1)\n");
		    HostP->Mapping[entry].Flags =
		     SLOT_TENTATIVE | RTA_BOOTED | RTA_NEWBOOT;
#ifdef NEED_TO_FIX
#ifdef NEED_TO_FIX
				RIO_SV_BROADCAST(HostP->svFlags[entry]);
				RIO_SV_BROADCAST(HostP->svFlags[entry]);
#endif
#endif
			}
			}
		if (RtaType == TYPE_RTA16)
			if (RtaType == TYPE_RTA16) {
		{
				if (Flag & SLOT_IN_USE) {
		    if (Flag & SLOT_IN_USE)
					HostP->Mapping[entry2].Flags = SLOT_IN_USE | RTA_BOOTED | RTA_NEWBOOT | RTA16_SECOND_SLOT;
		    {
			HostP->Mapping[entry2].Flags = SLOT_IN_USE |
			 RTA_BOOTED | RTA_NEWBOOT | RTA16_SECOND_SLOT;
#ifdef NEED_TO_FIX
#ifdef NEED_TO_FIX
					RIO_SV_BROADCAST(HostP->svFlags[entry2]);
					RIO_SV_BROADCAST(HostP->svFlags[entry2]);
#endif
#endif
@@ -1169,13 +1077,9 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
						p->RIOFirstPortsBooted = HostP->Mapping[entry2].SysPort;
						p->RIOFirstPortsBooted = HostP->Mapping[entry2].SysPort;
					if (HostP->Mapping[entry2].SysPort > p->RIOLastPortsBooted)
					if (HostP->Mapping[entry2].SysPort > p->RIOLastPortsBooted)
						p->RIOLastPortsBooted = HostP->Mapping[entry2].SysPort;
						p->RIOLastPortsBooted = HostP->Mapping[entry2].SysPort;
			rio_dprintk (RIO_DEBUG_BOOT, "SysPort %d, Name %s\n",
					rio_dprintk(RIO_DEBUG_BOOT, "SysPort %d, Name %s\n", (int) HostP->Mapping[entry2].SysPort, HostP->Mapping[entry].Name);
			       (int)HostP->Mapping[entry2].SysPort,
				} else
			       HostP->Mapping[entry].Name);
					HostP->Mapping[entry2].Flags = SLOT_TENTATIVE | RTA_BOOTED | RTA_NEWBOOT | RTA16_SECOND_SLOT;
		    }
		    else
			HostP->Mapping[entry2].Flags = SLOT_TENTATIVE |
			 RTA_BOOTED | RTA_NEWBOOT | RTA16_SECOND_SLOT;
#ifdef NEED_TO_FIX
#ifdef NEED_TO_FIX
				RIO_SV_BROADCAST(HostP->svFlags[entry2]);
				RIO_SV_BROADCAST(HostP->svFlags[entry2]);
#endif
#endif
@@ -1184,8 +1088,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
			bzero((caddr_t) MapP, sizeof(struct Map));
			bzero((caddr_t) MapP, sizeof(struct Map));
			if (!p->RIONoMessage)
			if (!p->RIONoMessage)
				cprintf("An orphaned RTA has been adopted by %s '%s' (%c).\n", MyType, MyName, MyLink + 'A');
				cprintf("An orphaned RTA has been adopted by %s '%s' (%c).\n", MyType, MyName, MyLink + 'A');
	    }
		} else if (!p->RIONoMessage)
	    else if (! p->RIONoMessage)
			cprintf("RTA connected to %s '%s' (%c) not configured.\n", MyType, MyName, MyLink + 'A');
			cprintf("RTA connected to %s '%s' (%c) not configured.\n", MyType, MyName, MyLink + 'A');
		RIOSetChange(p);
		RIOSetChange(p);
		return TRUE;
		return TRUE;
@@ -1198,10 +1101,8 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
	 */
	 */
	if (!p->RIONoMessage)
	if (!p->RIONoMessage)
		cprintf("The RTA connected to %s '%s' (%c) cannot be configured.  You cannot configure more than 128 ports to one host card.\n", MyType, MyName, MyLink + 'A');
		cprintf("The RTA connected to %s '%s' (%c) cannot be configured.  You cannot configure more than 128 ports to one host card.\n", MyType, MyName, MyLink + 'A');
	for ( entry=0; entry<HostP->NumExtraBooted; entry++ )
	for (entry = 0; entry < HostP->NumExtraBooted; entry++) {
	{
		if (HostP->ExtraUnits[entry] == RtaUniq) {
	    if ( HostP->ExtraUnits[entry] == RtaUniq )
	    {
			/*
			/*
			 ** already got it!
			 ** already got it!
			 */
			 */
@@ -1226,8 +1127,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
** We no longer support the RIOBootMode variable. It is all done from the
** We no longer support the RIOBootMode variable. It is all done from the
** "boot/noboot" field in the rio.cf file.
** "boot/noboot" field in the rio.cf file.
*/
*/
int
int RIOBootOk(p, HostP, RtaUniq)
RIOBootOk(p, HostP, RtaUniq)
struct rio_info *p;
struct rio_info *p;
struct Host *HostP;
struct Host *HostP;
ulong RtaUniq;
ulong RtaUniq;
@@ -1239,12 +1139,8 @@ ulong RtaUniq;
	 ** Search bindings table for RTA or its parent.
	 ** Search bindings table for RTA or its parent.
	 ** If it exists, return 0, else 1.
	 ** If it exists, return 0, else 1.
	 */
	 */
	for (Entry = 0;
	for (Entry = 0; (Entry < MAX_RTA_BINDINGS) && (p->RIOBindTab[Entry] != 0); Entry++) {
	    ( Entry < MAX_RTA_BINDINGS ) && ( p->RIOBindTab[Entry] != 0 );
		if ((p->RIOBindTab[Entry] == HostUniq) || (p->RIOBindTab[Entry] == RtaUniq))
	    Entry++)
	{
		if ( (p->RIOBindTab[Entry] == HostUniq) ||
		     (p->RIOBindTab[Entry] == RtaUniq) )
			return 0;
			return 0;
	}
	}
	return 1;
	return 1;
@@ -1255,8 +1151,7 @@ ulong RtaUniq;
** slots tentative, and the second one RTA_SECOND_SLOT as well.
** slots tentative, and the second one RTA_SECOND_SLOT as well.
*/
*/


void
void FillSlot(entry, entry2, RtaUniq, HostP)
FillSlot(entry, entry2, RtaUniq, HostP)
int entry;
int entry;
int entry2;
int entry2;
uint RtaUniq;
uint RtaUniq;
@@ -1273,8 +1168,7 @@ struct Host *HostP;
	HostP->Mapping[entry].ID = entry + 1;
	HostP->Mapping[entry].ID = entry + 1;
	HostP->Mapping[entry].ID2 = 0;
	HostP->Mapping[entry].ID2 = 0;
	if (entry2) {
	if (entry2) {
		HostP->Mapping[entry2].Flags = (RTA_BOOTED | RTA_NEWBOOT | 
		HostP->Mapping[entry2].Flags = (RTA_BOOTED | RTA_NEWBOOT | SLOT_TENTATIVE | RTA16_SECOND_SLOT);
								SLOT_TENTATIVE | RTA16_SECOND_SLOT);
		HostP->Mapping[entry2].SysPort = NO_PORT;
		HostP->Mapping[entry2].SysPort = NO_PORT;
		HostP->Mapping[entry2].RtaUniqueNum = RtaUniq;
		HostP->Mapping[entry2].RtaUniqueNum = RtaUniq;
		HostP->Mapping[entry2].HostUniqueNum = HostP->UniqueNum;
		HostP->Mapping[entry2].HostUniqueNum = HostP->UniqueNum;
@@ -1296,4 +1190,3 @@ struct Host *HostP;
		}
		}
	}
	}
}
}