• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/char/rio/

Lines Matching refs:MapP

86 	struct Map *MapP;
122 MapP = &p->RIOConnectTable[Entry];
123 if ((MapP->Flags & RTA16_SECOND_SLOT) == 0) {
125 cptr = MapP->Name; /* (2) */
128 memcpy(MapP->Name, MapP->RtaUniqueNum ? "RTA NN" : "HOST NN", 8);
129 MapP->Name[5] = '0' + Entry / 10;
130 MapP->Name[6] = '0' + Entry % 10;
146 if (MapP->Flags & SLOT_TENTATIVE) {
147 MapP->HostUniqueNum = 0;
148 MapP->RtaUniqueNum = 0;
153 if (!MapP->RtaUniqueNum && !MapP->HostUniqueNum) { /* (3) */
154 if (MapP->ID || MapP->SysPort || MapP->Flags) {
155 rio_dprintk(RIO_DEBUG_TABLE, "%s pretending to be empty but isn't\n", MapP->Name);
166 if (p->RIOHosts[Host].UniqueNum == MapP->HostUniqueNum) {
172 MapP->Topology[0].Unit = Host;
178 rio_dprintk(RIO_DEBUG_TABLE, "RTA %s has unknown host unique number 0x%x\n", MapP->Name, MapP->HostUniqueNum);
179 MapP->HostUniqueNum = 0;
180 /* MapP->RtaUniqueNum = 0; */
181 /* MapP->ID = 0; */
182 /* MapP->Flags = 0; */
183 /* MapP->SysPort = 0; */
184 /* MapP->Name[0] = 0; */
189 if (MapP->RtaUniqueNum) { /* (5) */
190 if (!MapP->ID) {
191 rio_dprintk(RIO_DEBUG_TABLE, "RIO: RTA %s has been allocated an ID of zero!\n", MapP->Name);
196 if (MapP->ID > MAX_RUP) {
197 rio_dprintk(RIO_DEBUG_TABLE, "RIO: RTA %s has been allocated an invalid ID %d\n", MapP->Name, MapP->ID);
203 if (MapP->HostUniqueNum == p->RIOConnectTable[SubEnt].HostUniqueNum && MapP->ID == p->RIOConnectTable[SubEnt].ID) {
204 rio_dprintk(RIO_DEBUG_TABLE, "Dupl. ID number allocated to RTA %s and RTA %s\n", MapP->Name, p->RIOConnectTable[SubEnt].Name);
214 if ((MapP->RtaUniqueNum == p->RIOConnectTable[SubEnt].RtaUniqueNum)
215 && (MapP->ID2 != p->RIOConnectTable[SubEnt].ID)) {
216 rio_dprintk(RIO_DEBUG_TABLE, "RTA %s has duplicate unique number\n", MapP->Name);
226 if ((MapP->SysPort != NO_PORT) && (MapP->SysPort % PORTS_PER_RTA)) {
227 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);
234 if ((MapP->SysPort != NO_PORT) && (MapP->SysPort >= RIO_PORTS)) {
235 rio_dprintk(RIO_DEBUG_TABLE, "TTY Port number %d for RTA %s is too big\n", (int) MapP->SysPort, MapP->Name);
246 if ((MapP->SysPort != NO_PORT) && (MapP->SysPort == p->RIOConnectTable[SubEnt].SysPort)) {
247 rio_dprintk(RIO_DEBUG_TABLE, "RTA %s:same TTY port # as RTA %s (%d)\n", MapP->Name, p->RIOConnectTable[SubEnt].Name, (int) MapP->SysPort);
254 if (strcmp(MapP->Name, p->RIOConnectTable[SubEnt].Name) == 0 && !(MapP->Flags & RTA16_SECOND_SLOT)) { /* (9) */
255 rio_dprintk(RIO_DEBUG_TABLE, "RTA name %s used twice\n", MapP->Name);
265 if (MapP->ID) {
266 rio_dprintk(RIO_DEBUG_TABLE, "RIO:HOST %s has been allocated ID that isn't zero!\n", MapP->Name);
271 if (MapP->SysPort != NO_PORT) {
272 rio_dprintk(RIO_DEBUG_TABLE, "RIO: HOST %s has been allocated port numbers!\n", MapP->Name);
299 MapP = &p->RIOConnectTable[Entry];
304 if (MapP->HostUniqueNum == 0)
310 HostP = &p->RIOHosts[MapP->Topology[0].Unit];
315 if (MapP->ID == 0) {
316 rio_dprintk(RIO_DEBUG_TABLE, "Host entry found. Name %s\n", MapP->Name);
317 memcpy(HostP->Name, MapP->Name, MAX_NAME_LEN);
326 HostMapP = &HostP->Mapping[MapP->ID - 1];
328 if (MapP->Flags & SLOT_IN_USE) {
329 rio_dprintk(RIO_DEBUG_TABLE, "Rta entry found. Name %s\n", MapP->Name);
333 *HostMapP = *MapP;
336 if (MapP->Flags & RTA16_SECOND_SLOT)
341 rio_dprintk(RIO_DEBUG_TABLE, "TENTATIVE Rta entry found. Name %s\n", MapP->Name);
403 struct Map *MapP;
416 MapP = &p->RIOConnectTable[Next++];
417 MapP->HostUniqueNum = HostP->UniqueNum;
422 MapP->RtaUniqueNum = 0;
423 MapP->ID = 0;
424 MapP->Flags = SLOT_IN_USE;
425 MapP->SysPort = NO_PORT;
427 MapP->Topology[link] = HostP->Topology[link];
428 memcpy(MapP->Name, HostP->Name, MAX_NAME_LEN);
451 int RIODeleteRta(struct rio_info *p, struct Map *MapP)
461 rio_dprintk(RIO_DEBUG_TABLE, "Delete entry on host %x, rta %x\n", MapP->HostUniqueNum, MapP->RtaUniqueNum);
474 if (MapP->RtaUniqueNum == HostP->Mapping[entry].RtaUniqueNum) {
561 if (p->RIOSavedTable[entry].RtaUniqueNum == MapP->RtaUniqueNum) {
565 if (p->RIOConnectTable[entry].RtaUniqueNum == MapP->RtaUniqueNum) {
578 int RIOAssignRta(struct rio_info *p, struct Map *MapP)
586 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);
588 if ((MapP->ID != (u16) - 1) && ((int) MapP->ID < (int) 1 || (int) MapP->ID > MAX_RUP)) {
593 if (MapP->RtaUniqueNum == 0) {
598 if ((MapP->SysPort != NO_PORT) && (MapP->SysPort % PORTS_PER_RTA)) {
599 rio_dprintk(RIO_DEBUG_TABLE, "Port %d not multiple of %d!\n", (int) MapP->SysPort, PORTS_PER_RTA);
603 if ((MapP->SysPort != NO_PORT) && (MapP->SysPort >= RIO_PORTS)) {
604 rio_dprintk(RIO_DEBUG_TABLE, "Port %d not valid!\n", (int) MapP->SysPort);
612 MapP->Name[MAX_NAME_LEN - 1] = '\0';
613 sptr = MapP->Name;
624 if (MapP->HostUniqueNum == p->RIOHosts[host].UniqueNum) {
634 if (MapP->ID == (u16) - 1) {
637 rio_dprintk(RIO_DEBUG_TABLE, "Attempting to get a new ID for rta \"%s\"\n", MapP->Name);
653 MapP->ID = (u16) nNewID + 1;
654 rio_dprintk(RIO_DEBUG_TABLE, "Allocated ID %d for this new RTA.\n", MapP->ID);
656 HostMapP->RtaUniqueNum = MapP->RtaUniqueNum;
657 HostMapP->HostUniqueNum = MapP->HostUniqueNum;
658 HostMapP->ID = MapP->ID;
663 if (MapP->Flags & RTA16_SECOND_SLOT) {
667 if (p->RIOHosts[host].Mapping[unit].RtaUniqueNum == MapP->RtaUniqueNum)
674 HostMapP->ID2 = MapP->ID2 = p->RIOHosts[host].Mapping[unit].ID;
675 p->RIOHosts[host].Mapping[unit].ID2 = MapP->ID;
676 rio_dprintk(RIO_DEBUG_TABLE, "Cross referenced id %d to ID %d.\n", MapP->ID, p->RIOHosts[host].Mapping[unit].ID);
680 HostMapP = &p->RIOHosts[host].Mapping[MapP->ID - 1];
683 rio_dprintk(RIO_DEBUG_TABLE, "Map table slot for ID %d is already in use.\n", MapP->ID);
692 HostMapP->SysPort = MapP->SysPort;
693 if ((MapP->Flags & RTA16_SECOND_SLOT) == 0)
694 memcpy(HostMapP->Name, MapP->Name, MAX_NAME_LEN);
697 RIO_SV_BROADCAST(p->RIOHosts[host].svFlags[MapP->ID - 1]);
699 if (MapP->Flags & RTA16_SECOND_SLOT)
706 if (MapP->Flags & RTA16_SECOND_SLOT)
715 if (MapP->Flags & RTA16_SECOND_SLOT)
716 rio_dprintk(RIO_DEBUG_TABLE, "Second map of RTA %s added to configuration\n", p->RIOHosts[host].Mapping[MapP->ID2 - 1].Name);
718 rio_dprintk(RIO_DEBUG_TABLE, "RTA %s added to configuration\n", MapP->Name);
723 rio_dprintk(RIO_DEBUG_TABLE, "Unknown host %x\n", MapP->HostUniqueNum);
885 int RIOChangeName(struct rio_info *p, struct Map *MapP)
891 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);
893 if (MapP->ID > MAX_RUP) {
899 MapP->Name[MAX_NAME_LEN - 1] = '\0';
900 sptr = MapP->Name;
912 if (MapP->HostUniqueNum == p->RIOHosts[host].UniqueNum) {
917 if (MapP->ID == 0) {
918 memcpy(p->RIOHosts[host].Name, MapP->Name, MAX_NAME_LEN);
922 HostMapP = &p->RIOHosts[host].Mapping[MapP->ID - 1];
924 if (HostMapP->RtaUniqueNum != MapP->RtaUniqueNum) {
928 memcpy(HostMapP->Name, MapP->Name, MAX_NAME_LEN);
933 rio_dprintk(RIO_DEBUG_TABLE, "Unknown host %x\n", MapP->HostUniqueNum);