Lines Matching refs:UnitId
587 static int RIOCheckIsolated(struct rio_info *p, struct Host *HostP, unsigned int UnitId)
592 if (RIOCheck(HostP, UnitId)) {
593 rio_dprintk(RIO_DEBUG_ROUTE, "Unit %d is NOT isolated\n", UnitId);
598 RIOIsolate(p, HostP, UnitId);
609 static int RIOIsolate(struct rio_info *p, struct Host *HostP, unsigned int UnitId)
613 UnitId--; /* this trick relies on the Unit Id being UNSIGNED! */
615 if (UnitId >= MAX_RUP) /* dontcha just lurv unsigned maths! */
618 if (HostP->Mapping[UnitId].Flags & BEEN_HERE)
621 HostP->Mapping[UnitId].Flags |= BEEN_HERE;
624 rio_dprintk(RIO_DEBUG_ROUTE, "RIOMesgIsolated %s", HostP->Mapping[UnitId].Name);
627 unit = HostP->Mapping[UnitId].Topology[link].Unit;
628 HostP->Mapping[UnitId].Topology[link].Unit = ROUTE_DISCONNECT;
629 HostP->Mapping[UnitId].Topology[link].Link = NO_LINK;
632 HostP->Mapping[UnitId].Flags &= ~BEEN_HERE;
636 static int RIOCheck(struct Host *HostP, unsigned int UnitId)
640 /* rio_dprint(RIO_DEBUG_ROUTE, ("Check to see if unit %d has a route to the host\n",UnitId)); */
641 rio_dprintk(RIO_DEBUG_ROUTE, "RIOCheck : UnitID = %d\n", UnitId);
643 if (UnitId == HOST_ID) {
644 /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d is NOT isolated - it IS the host!\n", UnitId)); */
648 UnitId--;
650 if (UnitId >= MAX_RUP) {
651 /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d - ignored.\n", UnitId)); */
656 if (HostP->Mapping[UnitId].Topology[link].Unit == HOST_ID) {
658 UnitId, 'A'+link)); */
663 if (HostP->Mapping[UnitId].Flags & BEEN_HERE) {
664 /* rio_dprint(RIO_DEBUG_ROUTE, ("Been to Unit %d before - ignoring\n", UnitId)); */
668 HostP->Mapping[UnitId].Flags |= BEEN_HERE;
671 /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d check link (%c)\n", UnitId,'A'+link)); */
672 if (RIOCheck(HostP, HostP->Mapping[UnitId].Topology[link].Unit)) {
673 /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d is connected to something that knows the host via link (%c)\n", UnitId,link+'A')); */
674 HostP->Mapping[UnitId].Flags &= ~BEEN_HERE;
679 HostP->Mapping[UnitId].Flags &= ~BEEN_HERE;
681 /* rio_dprint(RIO_DEBUG_ROUTE, ("Unit %d DOESNT KNOW THE HOST!\n", UnitId)); */