diff options
Diffstat (limited to 'drivers/char/rio/riocmd.c')
-rw-r--r-- | drivers/char/rio/riocmd.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/char/rio/riocmd.c b/drivers/char/rio/riocmd.c index e6d2b14b5e65..4df6ab2206a1 100644 --- a/drivers/char/rio/riocmd.c +++ b/drivers/char/rio/riocmd.c | |||
@@ -180,7 +180,7 @@ int RIOCommandRta(struct rio_info *p, unsigned long RtaUnique, int (*func) (stru | |||
180 | } | 180 | } |
181 | 181 | ||
182 | 182 | ||
183 | int RIOIdentifyRta(struct rio_info *p, void * arg) | 183 | int RIOIdentifyRta(struct rio_info *p, void __user * arg) |
184 | { | 184 | { |
185 | unsigned int Host; | 185 | unsigned int Host; |
186 | 186 | ||
@@ -245,7 +245,7 @@ int RIOIdentifyRta(struct rio_info *p, void * arg) | |||
245 | } | 245 | } |
246 | 246 | ||
247 | 247 | ||
248 | int RIOKillNeighbour(struct rio_info *p, void * arg) | 248 | int RIOKillNeighbour(struct rio_info *p, void __user * arg) |
249 | { | 249 | { |
250 | uint Host; | 250 | uint Host; |
251 | uint ID; | 251 | uint ID; |
@@ -370,9 +370,9 @@ int RIOFoadWakeup(struct rio_info *p) | |||
370 | /* | 370 | /* |
371 | ** Incoming command on the COMMAND_RUP to be processed. | 371 | ** Incoming command on the COMMAND_RUP to be processed. |
372 | */ | 372 | */ |
373 | static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struct PKT * PacketP) | 373 | static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struct PKT __iomem *PacketP) |
374 | { | 374 | { |
375 | struct PktCmd *PktCmdP = (struct PktCmd *) PacketP->data; | 375 | struct PktCmd __iomem *PktCmdP = (struct PktCmd __iomem *)PacketP->data; |
376 | struct Port *PortP; | 376 | struct Port *PortP; |
377 | struct UnixRup *UnixRupP; | 377 | struct UnixRup *UnixRupP; |
378 | unsigned short SysPort; | 378 | unsigned short SysPort; |
@@ -407,12 +407,12 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc | |||
407 | } else | 407 | } else |
408 | rio_dprintk(RIO_DEBUG_CMD, "CONTROL information: This is the RUP for link ``%c'' of host ``%s''\n", ('A' + Rup - MAX_RUP), HostP->Name); | 408 | rio_dprintk(RIO_DEBUG_CMD, "CONTROL information: This is the RUP for link ``%c'' of host ``%s''\n", ('A' + Rup - MAX_RUP), HostP->Name); |
409 | 409 | ||
410 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Destination 0x%x:0x%x\n", PacketP->dest_unit, PacketP->dest_port); | 410 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Destination 0x%x:0x%x\n", readb(&PacketP->dest_unit), readb(&PacketP->dest_port)); |
411 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Source 0x%x:0x%x\n", PacketP->src_unit, PacketP->src_port); | 411 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Source 0x%x:0x%x\n", readb(&PacketP->src_unit), readb(&PacketP->src_port)); |
412 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Length 0x%x (%d)\n", PacketP->len, PacketP->len); | 412 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Length 0x%x (%d)\n", readb(&PacketP->len), readb(&PacketP->len)); |
413 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Control 0x%x (%d)\n", PacketP->control, PacketP->control); | 413 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Control 0x%x (%d)\n", readb(&PacketP->control), readb(&PacketP->control)); |
414 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Check 0x%x (%d)\n", PacketP->csum, PacketP->csum); | 414 | rio_dprintk(RIO_DEBUG_CMD, "PACKET information: Check 0x%x (%d)\n", readw(&PacketP->csum), readw(&PacketP->csum)); |
415 | rio_dprintk(RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x, " "Command Code 0x%x\n", PktCmdP->PhbNum, PktCmdP->Command); | 415 | rio_dprintk(RIO_DEBUG_CMD, "COMMAND information: Host Port Number 0x%x, " "Command Code 0x%x\n", readb(&PktCmdP->PhbNum), readb(&PktCmdP->Command)); |
416 | return 1; | 416 | return 1; |
417 | } | 417 | } |
418 | PortP = p->RIOPortp[SysPort]; | 418 | PortP = p->RIOPortp[SysPort]; |
@@ -601,7 +601,7 @@ int RIOQueueCmdBlk(struct Host *HostP, uint Rup, struct CmdBlk *CmdBlkP) | |||
601 | /* | 601 | /* |
602 | ** Whammy! blat that pack! | 602 | ** Whammy! blat that pack! |
603 | */ | 603 | */ |
604 | HostP->Copy((caddr_t) & CmdBlkP->Packet, RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(struct PKT)); | 604 | HostP->Copy(&CmdBlkP->Packet, RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->txpkt)), sizeof(struct PKT)); |
605 | 605 | ||
606 | /* | 606 | /* |
607 | ** place command packet on the pending position. | 607 | ** place command packet on the pending position. |
@@ -655,7 +655,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) | |||
655 | { | 655 | { |
656 | struct CmdBlk *CmdBlkP; | 656 | struct CmdBlk *CmdBlkP; |
657 | struct UnixRup *UnixRupP; | 657 | struct UnixRup *UnixRupP; |
658 | struct PKT *PacketP; | 658 | struct PKT __iomem *PacketP; |
659 | unsigned short Rup; | 659 | unsigned short Rup; |
660 | unsigned long flags; | 660 | unsigned long flags; |
661 | 661 | ||
@@ -676,7 +676,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) | |||
676 | if (readw(&UnixRupP->RupP->rxcontrol) != RX_RUP_INACTIVE) { | 676 | if (readw(&UnixRupP->RupP->rxcontrol) != RX_RUP_INACTIVE) { |
677 | int FreeMe; | 677 | int FreeMe; |
678 | 678 | ||
679 | PacketP = (struct PKT *) RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->rxpkt)); | 679 | PacketP = (struct PKT __iomem *) RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->rxpkt)); |
680 | 680 | ||
681 | switch (readb(&PacketP->dest_port)) { | 681 | switch (readb(&PacketP->dest_port)) { |
682 | case BOOT_RUP: | 682 | case BOOT_RUP: |
@@ -694,9 +694,9 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) | |||
694 | */ | 694 | */ |
695 | rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags); | 695 | rio_spin_unlock_irqrestore(&UnixRupP->RupLock, flags); |
696 | FreeMe = RIOCommandRup(p, Rup, HostP, PacketP); | 696 | FreeMe = RIOCommandRup(p, Rup, HostP, PacketP); |
697 | if (PacketP->data[5] == MEMDUMP) { | 697 | if (readb(&PacketP->data[5]) == MEMDUMP) { |
698 | rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", *(unsigned short *) & (PacketP->data[6])); | 698 | rio_dprintk(RIO_DEBUG_CMD, "Memdump from 0x%x complete\n", readw(&(PacketP->data[6]))); |
699 | HostP->Copy((caddr_t) & (PacketP->data[8]), (caddr_t) p->RIOMemDump, 32); | 699 | rio_memcpy_fromio(p->RIOMemDump, &(PacketP->data[8]), 32); |
700 | } | 700 | } |
701 | rio_spin_lock_irqsave(&UnixRupP->RupLock, flags); | 701 | rio_spin_lock_irqsave(&UnixRupP->RupLock, flags); |
702 | break; | 702 | break; |
@@ -782,7 +782,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP) | |||
782 | /* | 782 | /* |
783 | ** Whammy! blat that pack! | 783 | ** Whammy! blat that pack! |
784 | */ | 784 | */ |
785 | HostP->Copy((caddr_t) & CmdBlkP->Packet, RIO_PTR(HostP->Caddr, UnixRupP->RupP->txpkt), sizeof(struct PKT)); | 785 | HostP->Copy(&CmdBlkP->Packet, RIO_PTR(HostP->Caddr, readw(&UnixRupP->RupP->txpkt)), sizeof(struct PKT)); |
786 | 786 | ||
787 | /* | 787 | /* |
788 | ** remove the command from the rup command queue... | 788 | ** remove the command from the rup command queue... |
@@ -824,7 +824,7 @@ int RIOWFlushMark(unsigned long iPortP, struct CmdBlk *CmdBlkP) | |||
824 | int RIORFlushEnable(unsigned long iPortP, struct CmdBlk *CmdBlkP) | 824 | int RIORFlushEnable(unsigned long iPortP, struct CmdBlk *CmdBlkP) |
825 | { | 825 | { |
826 | struct Port *PortP = (struct Port *) iPortP; | 826 | struct Port *PortP = (struct Port *) iPortP; |
827 | struct PKT *PacketP; | 827 | struct PKT __iomem *PacketP; |
828 | unsigned long flags; | 828 | unsigned long flags; |
829 | 829 | ||
830 | rio_spin_lock_irqsave(&PortP->portSem, flags); | 830 | rio_spin_lock_irqsave(&PortP->portSem, flags); |