Lines Matching defs:PortP
457 struct Port *PortP;
497 PortP = p->RIOPortp[port];
500 rio_spin_lock_irqsave(&PortP->portSem, sem_flags);
502 PortP->Mapped = 0;
504 if (PortP->State & (RIO_MOPEN | RIO_LOPEN)) {
507 PortP->TxBufferIn = PortP->TxBufferOut = 0;
509 wakeup( &PortP->TxBufferIn );
510 wakeup( &PortP->TxBufferOut);
512 PortP->InUse = NOT_INUSE;
514 wakeup( &PortP->InUse );
515 signal(PortP->TtyP->t_pgrp,SIGKILL);
516 ttyflush(PortP->TtyP,(FREAD|FWRITE));
518 PortP->State |= RIO_CLOSING | RIO_DELETED;
526 if (PortP->SecondBlock) {
532 for (TxPktP = PortP->TxStart; TxPktP <= PortP->TxEnd; TxPktP++) {
545 rio_dprintk(RIO_DEBUG_TABLE, "Port %d phb destination: Old %x:%x New %x:%x\n", port, readb(&PortP->PhbP->destination) & 0xff, (readb(&PortP->PhbP->destination) >> 8) & 0xff, dest_unit, dest_port);
546 writew(dest_unit + (dest_port << 8), &PortP->PhbP->destination);
548 rio_spin_unlock_irqrestore(&PortP->portSem, sem_flags);
730 struct Port *PortP;
761 PortP = p->RIOPortp[SysPort];
767 rio_spin_lock_irqsave(&PortP->portSem, flags);
768 PortP->HostP = HostP;
769 PortP->Caddr = HostP->Caddr;
776 struct PHB __iomem *PhbP = PortP->PhbP = &HostP->PhbP[HostPort];
777 PortP->TxAdd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_add));
778 PortP->TxStart = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_start));
779 PortP->TxEnd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->tx_end));
780 PortP->RxRemove = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_remove));
781 PortP->RxStart = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_start));
782 PortP->RxEnd = (u16 __iomem *) RIO_PTR(HostP->Caddr, readw(&PhbP->rx_end));
784 PortP->PhbP = NULL;
789 PortP->HostPort = HostPort;
793 PortP->RupNum = HostMapP->ID - 1;
795 PortP->ID2 = HostMapP->ID2 - 1;
796 PortP->SecondBlock = 1;
798 PortP->ID2 = 0;
799 PortP->SecondBlock = 0;
801 PortP->RtaUniqueNum = HostMapP->RtaUniqueNum;
806 if (PortP->Mapped) {
807 rio_spin_unlock_irqrestore(&PortP->portSem, flags);
812 PortP->State = 0;
813 PortP->Config = 0;
816 ** then we need to set flags in the PortP->Config.
820 PortP->Config |= p->RIOModuleTypes[HostP->UnixRups[HostMapP->ID - 1].ModTypes].Flags[SubEnt % PORTS_PER_MODULE];
823 PortP->Config |= p->RIOModuleTypes[LONYBLE(HostP->UnixRups[HostMapP->ID - 1].ModTypes)].Flags[SubEnt % PORTS_PER_MODULE];
825 PortP->Config |= p->RIOModuleTypes[HINYBLE(HostP->UnixRups[HostMapP->ID - 1].ModTypes)].Flags[SubEnt % PORTS_PER_MODULE];
831 PortP->PortState = 0;
832 PortP->ModemLines = 0;
833 PortP->ModemState = 0;
834 PortP->CookMode = COOK_WELL;
835 PortP->ParamSem = 0;
836 PortP->FlushCmdBodge = 0;
837 PortP->WflushFlag = 0;
838 PortP->MagicFlags = 0;
839 PortP->Lock = 0;
840 PortP->Store = 0;
841 PortP->FirstOpen = 1;
846 PortP->RxDataStart = 0;
847 PortP->Cor2Copy = 0;
848 PortP->Name = &HostMapP->Name[0];
849 PortP->statsGather = 0;
850 PortP->txchars = 0;
851 PortP->rxchars = 0;
852 PortP->opens = 0;
853 PortP->closes = 0;
854 PortP->ioctls = 0;
855 if (PortP->TxRingBuffer)
856 memset(PortP->TxRingBuffer, 0, p->RIOBufferSize);
858 PortP->TxRingBuffer = kzalloc(p->RIOBufferSize, GFP_KERNEL);
860 PortP->TxBufferOut = 0;
861 PortP->TxBufferIn = 0;
862 PortP->Debug = 0;
869 PortP->LastRxTgl = ~(u8) PHB_RX_TGL;
874 PortP->Mapped = 1;
875 rio_spin_unlock_irqrestore(&PortP->portSem, flags);