PATCH: Yet more rio cleaning (2 of 2)
- Remove more unused headers
- Remove various typedefs
- Correct type of PaddrP (physical addresses should be ulong)
- Kill use of bcopy
- More printk cleanups
- Kill true/false
- Clean up direct access to pci BARs
Signed-off-by Alan Cox <[email protected]>
drivers/char/rio/rioboot.c +37 -41
@@ -47,15 +47,12 @@#include "linux_compat.h" #include "rio_linux.h" -#include "typdef.h" #include "pkt.h" #include "daemon.h" #include "rio.h" #include "riospace.h" -#include "top.h" #include "cmdpkt.h" #include "map.h" -#include "riotypes.h" #include "rup.h" #include "port.h" #include "riodrvr.h"
@@ -68,7 +65,6 @@#include "unixrup.h" #include "board.h" #include "host.h" -#include "error.h" #include "phb.h" #include "link.h" #include "cmdblk.h"
@@ -386,7 +382,7 @@*/ offset = (p->RIOConf.HostLoadBase -2 ) -0x7FFC ; -writeb (NFIX (((ushort) (~offset) >> (ushort )12 ) &0xF ), DestP); +writeb (NFIX (((unsigned short ) (~offset) >> (unsigned short )12 ) &0xF ), DestP);writeb (PFIX ((offset >>8 ) &0xF ), DestP +1 );writeb (PFIX ((offset >>4 ) &0xF ), DestP +2 );writeb (JUMP (offset &0xF ), DestP +3 );
@@ -515,10 +511,10 @@** 32 bit pointers for the driver in ioremap space. */ HostP->ParmMapP = ParmMapP; - HostP->PhbP = (PHB *)RIO_PTR (Cad,readw (&ParmMapP->phb_ptr)); - HostP->RupP = (RUP *)RIO_PTR (Cad,readw (&ParmMapP->rups)); - HostP->PhbNumP = (ushort *)RIO_PTR (Cad,readw (&ParmMapP->phb_num_ptr)); - HostP->LinkStrP = (LPB *)RIO_PTR (Cad,readw (&ParmMapP->link_str_ptr)); + HostP->PhbP = (struct PHB *)RIO_PTR (Cad,readw (&ParmMapP->phb_ptr)); + HostP->RupP = (struct RUP *)RIO_PTR (Cad,readw (&ParmMapP->rups)); + HostP->PhbNumP = (unsigned short *)RIO_PTR (Cad,readw (&ParmMapP->phb_num_ptr)); + HostP->LinkStrP = (struct LPB *)RIO_PTR (Cad,readw (&ParmMapP->link_str_ptr));/* ** point the UnixRups at the real Rups
@@ -639,7 +635,7 @@/* ** Fill in the default info on the command block */ - CmdBlkP->Packet.dest_unit = Rup < (ushort )MAX_RUP ? Rup :0 ; + CmdBlkP->Packet.dest_unit = Rup < (unsigned short )MAX_RUP ? Rup :0 ; CmdBlkP->Packet.dest_port =BOOT_RUP ; CmdBlkP->Packet.src_unit =0 ; CmdBlkP->Packet.src_port =BOOT_RUP ;
@@ -748,7 +744,7 @@*/ RtaType =GetUnitType (RtaUniq); -if (Rup >= (ushort )MAX_RUP ) +if (Rup >= (unsigned short )MAX_RUP )rio_dprintk (RIO_DEBUG_BOOT ,"RIO: Host %s has booted an RTA(%d) on link %c\n" , HostP->Name,8 * RtaType,readb (&PktCmdP->LinkNum) +'A' );else rio_dprintk (RIO_DEBUG_BOOT ,"RIO: RTA %s has booted an RTA(%d) on link %c\n" , HostP->Mapping[Rup].Name,8 * RtaType,readb (&PktCmdP->LinkNum) +'A' );
@@ -757,7 +753,7 @@if (RtaUniq ==0x00000000 || RtaUniq ==0xffffffff ) {rio_dprintk (RIO_DEBUG_BOOT ,"Illegal RTA Uniq Number\n" ); -return TRUE; +return 1 ; }/*
@@ -785,7 +781,7 @@*/ writew (30 , &HostP->LinkStrP[MyLink].WaitNoBoot);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); -return TRUE; +return 1 ; }/*
@@ -826,7 +822,7 @@rio_dprintk (RIO_DEBUG_BOOT ,"RTA will be given IDs %d+%d\n" , entry +1 , entry2 +1 ); else rio_dprintk(RIO_DEBUG_BOOT, "RTA will be given ID %d\n", entry + 1); -return TRUE; +return 1 ; } }
@@ -868,7 +864,7 @@rio_dprintk (RIO_DEBUG_BOOT ,"Found previous tentative slot (%d)\n" , entry);if (!p->RIONoMessage)printk ("RTA connected to %s '%s' (%c) not configured.\n" , MyType, MyName, MyLink +'A' ); -return TRUE; +return 1 ; } }
@@ -961,13 +957,13 @@if (RtaType ==TYPE_RTA16 ) {if (RIOFindFreeID (p, HostP, &entry, &entry2) ==0 ) {RIODefaultName (p, HostP, entry); -FillSlot (entry, entry2, RtaUniq, HostP); +rio_fill_host_slot (entry, entry2, RtaUniq, HostP); EmptySlot =0 ; } }else {if (RIOFindFreeID (p, HostP, &entry,NULL ) ==0 ) {RIODefaultName (p, HostP, entry); -FillSlot (entry,0 , RtaUniq, HostP); +rio_fill_host_slot (entry,0 , RtaUniq, HostP); EmptySlot =0 ; } }
@@ -1023,7 +1019,7 @@ }else if (!p->RIONoMessage)printk ("RTA connected to %s '%s' (%c) not configured.\n" , MyType, MyName, MyLink +'A' );RIOSetChange (p); -return TRUE; +return 1 ; }/*
@@ -1038,7 +1034,7 @@/* ** already got it! */ -return TRUE; +return 1 ; } }/*
@@ -1046,13 +1042,13 @@*/ if (HostP->NumExtraBooted <MAX_EXTRA_UNITS ) HostP->ExtraUnits[HostP->NumExtraBooted++] = RtaUniq; -return TRUE; +return 1 ; }/* ** If the RTA or its host appears in the RIOBindTab[] structure then -** we mustn't boot the RTA and should return FALSE. +** we mustn't boot the RTA and should return 0. ** This operation is slightly different from the other drivers for RIO ** in that this is designed to work with the new utilities ** not config.rio and is FAR SIMPLER.
@@ -1080,38 +1076,38 @@** slots tentative, and the second one RTA_SECOND_SLOT as well. */ -void FillSlot (int entry,int entry2,unsigned int RtaUniq,struct Host *HostP) +void rio_fill_host_slot (int entry,int entry2,unsigned int rta_uniq,struct Host *host) {int link; -rio_dprintk (RIO_DEBUG_BOOT ,"FillSlot(%d, %d, 0x%x...)\n" , entry, entry2, RtaUniq); +rio_dprintk (RIO_DEBUG_BOOT ,"rio_fill_host_slot(%d, %d, 0x%x...)\n" , entry, entry2, rta_uniq); - HostP->Mapping[entry].Flags = (RTA_BOOTED |RTA_NEWBOOT |SLOT_TENTATIVE ); - HostP->Mapping[entry].SysPort =NO_PORT ; - HostP->Mapping[entry].RtaUniqueNum = RtaUniq; - HostP->Mapping[entry].HostUniqueNum = HostP->UniqueNum; - HostP->Mapping[entry].ID = entry +1 ; - HostP->Mapping[entry].ID2 =0 ; + host->Mapping[entry].Flags = (RTA_BOOTED |RTA_NEWBOOT |SLOT_TENTATIVE ); + host->Mapping[entry].SysPort =NO_PORT ; + host->Mapping[entry].RtaUniqueNum = rta_uniq; + host->Mapping[entry].HostUniqueNum = host->UniqueNum; + host->Mapping[entry].ID = entry +1 ; + host->Mapping[entry].ID2 =0 ;if (entry2) { - HostP->Mapping[entry2].Flags = (RTA_BOOTED |RTA_NEWBOOT |SLOT_TENTATIVE |RTA16_SECOND_SLOT ); - HostP->Mapping[entry2].SysPort =NO_PORT ; - HostP->Mapping[entry2].RtaUniqueNum = RtaUniq; - HostP->Mapping[entry2].HostUniqueNum = HostP->UniqueNum; - HostP->Mapping[entry2].Name[0 ] ='\0' ; - HostP->Mapping[entry2].ID = entry2 +1 ; - HostP->Mapping[entry2].ID2 = entry +1 ; - HostP->Mapping[entry].ID2 = entry2 +1 ; + host->Mapping[entry2].Flags = (RTA_BOOTED |RTA_NEWBOOT |SLOT_TENTATIVE |RTA16_SECOND_SLOT ); + host->Mapping[entry2].SysPort =NO_PORT ; + host->Mapping[entry2].RtaUniqueNum = rta_uniq; + host->Mapping[entry2].HostUniqueNum = host->UniqueNum; + host->Mapping[entry2].Name[0 ] ='\0' ; + host->Mapping[entry2].ID = entry2 +1 ; + host->Mapping[entry2].ID2 = entry +1 ; + host->Mapping[entry].ID2 = entry2 +1 ; }/* ** Must set these up, so that utilities show ** topology of 16 port RTAs correctly */ for (link =0 ; link <LINKS_PER_UNIT ; link++) { - HostP->Mapping[entry].Topology[link].Unit =ROUTE_DISCONNECT ; - HostP->Mapping[entry].Topology[link].Link =NO_LINK ; + host->Mapping[entry].Topology[link].Unit =ROUTE_DISCONNECT ; + host->Mapping[entry].Topology[link].Link =NO_LINK ;if (entry2) { - HostP->Mapping[entry2].Topology[link].Unit =ROUTE_DISCONNECT ; - HostP->Mapping[entry2].Topology[link].Link =NO_LINK ; + host->Mapping[entry2].Topology[link].Unit =ROUTE_DISCONNECT ; + host->Mapping[entry2].Topology[link].Link =NO_LINK ; } } }
drivers/char/rio/riocmd.c +20 -32
178 lines not on this page · raw message
drivers/char/rio/rioctrl.c +14 -19
@@ -51,15 +51,12 @@#include "linux_compat.h" #include "rio_linux.h" -#include "typdef.h" #include "pkt.h" #include "daemon.h" #include "rio.h" #include "riospace.h" -#include "top.h" #include "cmdpkt.h" #include "map.h" -#include "riotypes.h" #include "rup.h" #include "port.h" #include "riodrvr.h"
@@ -72,12 +69,10 @@#include "unixrup.h" #include "board.h" #include "host.h" -#include "error.h" #include "phb.h" #include "link.h" #include "cmdblk.h" #include "route.h" -#include "control.h" #include "cirrus.h" #include "rioioctl.h"
@@ -144,7 +139,7 @@ushort loop;int Entry;struct Port *PortP; -PKT *PacketP; +struct PKT *PacketP;int retval =0 ;unsigned long flags;
@@ -154,7 +149,7 @@ Host =0 ; PortP =NULL ; -rio_dprintk (RIO_DEBUG_CTRL ,"control ioctl cmd: 0x%x arg: 0x%p\n" , cmd, arg); +rio_dprintk (RIO_DEBUG_CTRL ,"control ioctl cmd: 0x%x arg: %p\n" , cmd, arg);switch (cmd) {/*
@@ -572,8 +567,8 @@ PortSetup.Store = p->RIOPortp[port]->Store; PortSetup.Lock = p->RIOPortp[port]->Lock; PortSetup.XpCps = p->RIOPortp[port]->Xprint.XpCps; -bcopy (p->RIOPortp[port]->Xprint.XpOn, PortSetup.XpOn,MAX_XP_CTRL_LEN ); -bcopy (p->RIOPortp[port]->Xprint.XpOff, PortSetup.XpOff,MAX_XP_CTRL_LEN ); +memcpy (PortSetup.XpOn, p->RIOPortp[port]->Xprint.XpOn,MAX_XP_CTRL_LEN ); +memcpy (PortSetup.XpOff, p->RIOPortp[port]->Xprint.XpOff,MAX_XP_CTRL_LEN ); PortSetup.XpOn[MAX_XP_CTRL_LEN -1 ] ='\0' ; PortSetup.XpOff[MAX_XP_CTRL_LEN -1 ] ='\0' ;
@@ -1404,7 +1399,7 @@return RIO_FAIL ; } -rio_dprintk (RIO_DEBUG_CTRL ,"Command blk 0x%p - InUse now %d\n" , CmdBlkP, PortP->InUse); +rio_dprintk (RIO_DEBUG_CTRL ,"Command blk %p - InUse now %d\n" , CmdBlkP, PortP->InUse); PktCmdP = (struct PktCmd_M *) &CmdBlkP->Packet.data[0 ];
@@ -1430,38 +1425,38 @@switch (Cmd) {case MEMDUMP : -rio_dprintk (RIO_DEBUG_CTRL ,"Queue MEMDUMP command blk 0x%p (addr 0x%x)\n" , CmdBlkP, (int ) SubCmd.Addr); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue MEMDUMP command blk %p (addr 0x%x)\n" , CmdBlkP, (int ) SubCmd.Addr); PktCmdP->SubCommand =MEMDUMP ; PktCmdP->SubAddr = SubCmd.Addr;break ;case FCLOSE : -rio_dprintk (RIO_DEBUG_CTRL ,"Queue FCLOSE command blk 0x%p\n" , CmdBlkP); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue FCLOSE command blk %p\n" , CmdBlkP);break ;case READ_REGISTER : -rio_dprintk (RIO_DEBUG_CTRL ,"Queue READ_REGISTER (0x%x) command blk 0x%p\n" , (int ) SubCmd.Addr, CmdBlkP); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue READ_REGISTER (0x%x) command blk %p\n" , (int ) SubCmd.Addr, CmdBlkP); PktCmdP->SubCommand =READ_REGISTER ; PktCmdP->SubAddr = SubCmd.Addr;break ;case RESUME : -rio_dprintk (RIO_DEBUG_CTRL ,"Queue RESUME command blk 0x%p\n" , CmdBlkP); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue RESUME command blk %p\n" , CmdBlkP);break ;case RFLUSH : -rio_dprintk (RIO_DEBUG_CTRL ,"Queue RFLUSH command blk 0x%p\n" , CmdBlkP); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue RFLUSH command blk %p\n" , CmdBlkP); CmdBlkP->PostFuncP = RIORFlushEnable;break ;case SUSPEND : -rio_dprintk (RIO_DEBUG_CTRL ,"Queue SUSPEND command blk 0x%p\n" , CmdBlkP); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue SUSPEND command blk %p\n" , CmdBlkP);break ;case MGET : -rio_dprintk (RIO_DEBUG_CTRL ,"Queue MGET command blk 0x%p\n" , CmdBlkP); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue MGET command blk %p\n" , CmdBlkP);break ;case MSET :case MBIC :case MBIS : CmdBlkP->Packet.data[4 ] = (char ) PortP->ModemLines; -rio_dprintk (RIO_DEBUG_CTRL ,"Queue MSET/MBIC/MBIS command blk 0x%p\n" , CmdBlkP); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue MSET/MBIC/MBIS command blk %p\n" , CmdBlkP);break ;case WFLUSH :
@@ -1475,7 +1470,7 @@RIOFreeCmdBlk (CmdBlkP);return (RIO_FAIL ); }else { -rio_dprintk (RIO_DEBUG_CTRL ,"Queue WFLUSH command blk 0x%p\n" , CmdBlkP); +rio_dprintk (RIO_DEBUG_CTRL ,"Queue WFLUSH command blk %p\n" , CmdBlkP); CmdBlkP->PostFuncP = RIOWFlushMark; }break ;
drivers/char/rio/rio.h +45 -130
219 lines not on this page · raw message
drivers/char/rio/rioinit.c +11 -16
@@ -51,15 +51,12 @@#include "linux_compat.h" -#include "typdef.h" #include "pkt.h" #include "daemon.h" #include "rio.h" #include "riospace.h" -#include "top.h" #include "cmdpkt.h" #include "map.h" -#include "riotypes.h" #include "rup.h" #include "port.h" #include "riodrvr.h"
@@ -72,19 +69,17 @@#include "unixrup.h" #include "board.h" #include "host.h" -#include "error.h" #include "phb.h" #include "link.h" #include "cmdblk.h" #include "route.h" -#include "control.h" #include "cirrus.h" #include "rioioctl.h" #include "rio_linux.h" int RIOPCIinit (struct rio_info *p,int Mode); -static int RIOScrub (int ,BYTE *,int ); +static int RIOScrub (int ,u8 *,int );/**
@@ -125,7 +120,7 @@/* set this later */ p->RIOHosts[p->RIONumHosts].Slot =-1 ; p->RIOHosts[p->RIONumHosts].Mode =SLOW_LINKS |SLOW_AT_BUS | bits; -writeb (BOOT_FROM_RAM |EXTERNAL_BUS_OFF | p->RIOHosts[p->RIONumHosts].Mode |INTERRUPT_DISABLE , +writeb (BOOT_FROM_RAM |EXTERNAL_BUS_OFF | p->RIOHosts[p->RIONumHosts].Mode |INTERRUPT_DISABLE , &p->RIOHosts[p->RIONumHosts].Control);writeb (0xFF , &p->RIOHosts[p->RIONumHosts].ResetInt); writeb(BOOT_FROM_RAM | EXTERNAL_BUS_OFF | p->RIOHosts[p->RIONumHosts].Mode | INTERRUPT_DISABLE,
@@ -156,7 +151,7 @@** RAM test a board. ** Nothing too complicated, just enough to check it out. */ -int RIOBoardTest (paddr_t paddr,caddr_t caddr,unsigned char type,int slot) +int RIOBoardTest (unsigned long paddr,caddr_t caddr,unsigned char type,int slot) {struct DpRam *DpRam = (struct DpRam *)caddr;char *ram[4 ];
@@ -164,7 +159,7 @@int op, bank;int nbanks; -rio_dprintk (RIO_DEBUG_INIT ,"RIO-init: Reset host type=%d, DpRam=0x%p, slot=%d\n" , +rio_dprintk (RIO_DEBUG_INIT ,"RIO-init: Reset host type=%d, DpRam=%p, slot=%d\n" , type, DpRam, slot);RIOHostReset (type, DpRam, slot);
@@ -193,10 +188,10 @@if (nbanks ==3 ) { -rio_dprintk (RIO_DEBUG_INIT ,"RIO-init: Memory: 0x%p(0x%x), 0x%p(0x%x), 0x%p(0x%x)\n" , +rio_dprintk (RIO_DEBUG_INIT ,"RIO-init: Memory: %p(0x%x), %p(0x%x), %p(0x%x)\n" , ram[0 ], size[0 ], ram[1 ], size[1 ], ram[2 ], size[2 ]); }else { -rio_dprintk (RIO_DEBUG_INIT ,"RIO-init: 0x%p(0x%x), 0x%p(0x%x), 0x%p(0x%x), 0x%p(0x%x)\n" , +rio_dprintk (RIO_DEBUG_INIT ,"RIO-init: %p(0x%x), %p(0x%x), %p(0x%x), %p(0x%x)\n" , ram[0 ], size[0 ], ram[1 ], size[1 ], ram[2 ], size[2 ], ram[3 ], size[3 ]); }
@@ -207,7 +202,7 @@*/ for (op=0 ; op<TEST_END ; op++) {for (bank=0 ; bank<nbanks; bank++) { -if (RIOScrub (op, (BYTE *)ram[bank], size[bank]) ==RIO_FAIL ) { +if (RIOScrub (op, (u8 *)ram[bank], size[bank]) ==RIO_FAIL ) {rio_dprintk (RIO_DEBUG_INIT ,"RIO-init: RIOScrub band %d, op %d failed\n" , bank, op);return RIO_FAIL ;
@@ -216,7 +211,7 @@ }rio_dprintk (RIO_DEBUG_INIT ,"Test completed\n" ); -return RIO_SUCCESS ; +return 0 ; }
@@ -232,7 +227,7 @@** to check that the data from the previous phase was retained. */ -static int RIOScrub (int op,BYTE *ram,int size) +static int RIOScrub (int op,u8 *ram,int size) {int off;unsigned char oldbyte;
@@ -364,7 +359,7 @@ }writew (newword, ram + off); } -return RIO_SUCCESS ; +return 0 ; }
@@ -412,7 +407,7 @@writeb (0xFF , &DpRamP->DpResetTpu);udelay (3 );rio_dprintk (RIO_DEBUG_INIT ,"RIOHostReset: Don't know if it worked. Try reset again\n" ); -writeb (BOOT_FROM_RAM |EXTERNAL_BUS_OFF |INTERRUPT_DISABLE | +writeb (BOOT_FROM_RAM |EXTERNAL_BUS_OFF |INTERRUPT_DISABLE |BYTE_OPERATION |SLOW_LINKS |SLOW_AT_BUS , &DpRamP->DpControl);writeb (0xFF , &DpRamP->DpResetTpu);udelay (3 );
drivers/char/rio/riointr.c +1 -8
@@ -54,15 +54,12 @@#include "linux_compat.h" #include "rio_linux.h" -#include "typdef.h" #include "pkt.h" #include "daemon.h" #include "rio.h" #include "riospace.h" -#include "top.h" #include "cmdpkt.h" #include "map.h" -#include "riotypes.h" #include "rup.h" #include "port.h" #include "riodrvr.h"
@@ -75,12 +72,10 @@#include "unixrup.h" #include "board.h" #include "host.h" -#include "error.h" #include "phb.h" #include "link.h" #include "cmdblk.h" #include "route.h" -#include "control.h" #include "cirrus.h" #include "rioioctl.h"
@@ -396,7 +391,6 @@/* For now don't handle RTA reboots. -- REW. Reenabled. Otherwise RTA reboots didn't work. Duh. -- REW */ if (PortP->MagicFlags) { -#if 1 if (PortP->MagicFlags &MAGIC_REBOOT ) {/* ** well, the RTA has been rebooted, and there is room
@@ -413,13 +407,12 @@ PortP->InUse =NOT_INUSE ;rio_spin_unlock (&PortP->portSem); -if (RIOParam (PortP,OPEN , ((PortP->Cor2Copy & (COR2_RTSFLOW |COR2_CTSFLOW )) == (COR2_RTSFLOW |COR2_CTSFLOW )) ? TRUE : FALSE,DONT_SLEEP ) ==RIO_FAIL ) { +if (RIOParam (PortP,OPEN , ((PortP->Cor2Copy & (COR2_RTSFLOW |COR2_CTSFLOW )) == (COR2_RTSFLOW |COR2_CTSFLOW )) ?1 :0 ,DONT_SLEEP ) ==RIO_FAIL ) {continue ;/* with next port */ }rio_spin_lock (&PortP->portSem); PortP->MagicFlags &= ~MAGIC_REBOOT ; } -#endif /* ** As mentioned above, this is a tacky hack to cope
drivers/char/rio/rio_linux.c +10 -60
168 lines not on this page · raw message
drivers/char/rio/rioparam.c +16 -23
@@ -52,15 +52,12 @@#include "linux_compat.h" #include "rio_linux.h" -#include "typdef.h" #include "pkt.h" #include "daemon.h" #include "rio.h" #include "riospace.h" -#include "top.h" #include "cmdpkt.h" #include "map.h" -#include "riotypes.h" #include "rup.h" #include "port.h" #include "riodrvr.h"
@@ -73,17 +70,13 @@#include "unixrup.h" #include "board.h" #include "host.h" -#include "error.h" #include "phb.h" #include "link.h" #include "cmdblk.h" #include "route.h" -#include "control.h" #include "cirrus.h" #include "rioioctl.h" #include "param.h" -#include "list.h" -#include "sam.h"
@@ -162,7 +155,7 @@struct tty_struct *TtyP;int retval;struct phb_param *phb_param_ptr; -PKT *PacketP; +struct PKT *PacketP;int res;u8 Cor1 =0 , Cor2 =0 , Cor4 =0 , Cor5 =0 ;u8 TxXon =0 , TxXoff =0 , RxXon =0 , RxXoff =0 ;
@@ -228,7 +221,7 @@if (PortP->State &RIO_DELETED ) {rio_spin_unlock_irqrestore (&PortP->portSem, flags);func_exit (); -return RIO_SUCCESS ; +return 0 ; } }
@@ -240,7 +233,7 @@ }rio_dprintk (RIO_DEBUG_PARAM ,"can_add_transmit() returns %x\n" , res); -rio_dprintk (RIO_DEBUG_PARAM ,"Packet is 0x%p\n" , PacketP); +rio_dprintk (RIO_DEBUG_PARAM ,"Packet is %p\n" , PacketP); phb_param_ptr = (struct phb_param *) PacketP->data;
@@ -579,7 +572,7 @@*/ func_exit (); -return RIO_SUCCESS ; +return 0 ; }
@@ -587,11 +580,11 @@** We can add another packet to a transmit queue if the packet pointer pointed ** to by the TxAdd pointer has PKT_IN_USE clear in its address. */ -int can_add_transmit (PKT **PktP,struct Port *PortP) +int can_add_transmit (struct PKT **PktP,struct Port *PortP) { -PKT *tp; +struct PKT *tp; - *PktP = tp = (PKT *)RIO_PTR (PortP->Caddr,readw (PortP->TxAdd)); + *PktP = tp = (struct PKT *)RIO_PTR (PortP->Caddr,readw (PortP->TxAdd));return !((unsigned long ) tp &PKT_IN_USE ); }
@@ -615,10 +608,10 @@* Put a packet onto the end of the * free list ****************************************/ -void put_free_end (struct Host *HostP,PKT *PktP) +void put_free_end (struct Host *HostP,struct PKT *PktP) { -FREE_LIST *tmp_pointer; -ushort old_end, new_end; +struct rio_free_list *tmp_pointer; +unsigned short old_end, new_end;unsigned long flags;rio_spin_lock_irqsave (&HostP->HostLock, flags);
@@ -632,15 +625,15 @@if ((old_end =readw (&HostP->ParmMapP->free_list_end)) !=TPNULL ) { new_end =RIO_OFF (HostP->Caddr, PktP); - tmp_pointer = (FREE_LIST *)RIO_PTR (HostP->Caddr, old_end); + tmp_pointer = (struct rio_free_list *)RIO_PTR (HostP->Caddr, old_end);writew (new_end, &tmp_pointer->next); -writew (old_end, &((FREE_LIST *) PktP)->prev); -writew (TPNULL , &((FREE_LIST *) PktP)->next); +writew (old_end, &((struct rio_free_list *) PktP)->prev); +writew (TPNULL , &((struct rio_free_list *) PktP)->next);writew (new_end, &HostP->ParmMapP->free_list_end); }else {/* First packet on the free list this should never happen! */ rio_dprintk (RIO_DEBUG_PFE ,"put_free_end(): This should never happen\n" );writew (RIO_OFF (HostP->Caddr, PktP), &HostP->ParmMapP->free_list_end); - tmp_pointer = (FREE_LIST *) PktP; + tmp_pointer = (struct rio_free_list *) PktP;writew (TPNULL , &tmp_pointer->prev);writew (TPNULL , &tmp_pointer->next); }
@@ -654,10 +647,10 @@** relevant packet, [having cleared the PKT_IN_USE bit]. If PKT_IN_USE is clear, ** then can_remove_receive() returns 0. */ -int can_remove_receive (PKT **PktP,struct Port *PortP) +int can_remove_receive (struct PKT **PktP,struct Port *PortP) {if (readw (PortP->RxRemove) &PKT_IN_USE ) { - *PktP = (PKT *)RIO_PTR (PortP->Caddr,readw (PortP->RxRemove) & ~PKT_IN_USE ); + *PktP = (struct PKT *)RIO_PTR (PortP->Caddr,readw (PortP->RxRemove) & ~PKT_IN_USE );return 1 ; }return 0 ;
drivers/char/rio/rioroute.c +43 -67
287 lines not on this page · raw message
drivers/char/rio/riotable.c +22 -29
175 lines not on this page · raw message
drivers/char/rio/riotty.c +49 -130
304 lines not on this page · raw message
drivers/char/rio/riotypes.h +0 -64
64 lines not on this page · raw message
drivers/char/rio/rom.h +0 -62
62 lines not on this page · raw message
drivers/char/rio/sam.h +0 -67
67 lines not on this page · raw message
drivers/char/rio/space.h +0 -45
45 lines not on this page · raw message
drivers/char/rio/top.h +0 -48
48 lines not on this page · raw message
drivers/char/rio/typdef.h +0 -74
74 lines not on this page · raw message
drivers/char/rio/unixrup.h +3 -3
@@ -45,9 +45,9 @@struct CmdBlk *CmdsWaitingP;/* Commands waiting to be done */ struct CmdBlk *CmdPendingP;/* The command currently being sent */ struct RUP *RupP;/* the Rup to send it to */ -uint Id;/* Id number */ -uint BaseSysPort;/* SysPort of first tty on this RTA */ -uint ModTypes;/* Modules on this RTA */ +unsigned int Id;/* Id number */ +unsigned int BaseSysPort;/* SysPort of first tty on this RTA */ +unsigned int ModTypes;/* Modules on this RTA */ spinlock_t RupLock;/* Lock structure for MPX */ /* struct lockb RupLock; *//* Lock structure for MPX */ };