Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
d886cb58
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
d886cb58
编写于
5月 27, 2006
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] trivial annotations in rio
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
a8bd6070
变更
17
展开全部
隐藏空白更改
内联
并排
Showing
17 changed file
with
228 addition
and
230 deletion
+228
-230
drivers/char/rio/daemon.h
drivers/char/rio/daemon.h
+6
-6
drivers/char/rio/func.h
drivers/char/rio/func.h
+13
-12
drivers/char/rio/host.h
drivers/char/rio/host.h
+8
-8
drivers/char/rio/port.h
drivers/char/rio/port.h
+8
-8
drivers/char/rio/rio.h
drivers/char/rio/rio.h
+2
-2
drivers/char/rio/rio_linux.c
drivers/char/rio/rio_linux.c
+15
-14
drivers/char/rio/rio_linux.h
drivers/char/rio/rio_linux.h
+5
-5
drivers/char/rio/rioboot.c
drivers/char/rio/rioboot.c
+26
-26
drivers/char/rio/riocmd.c
drivers/char/rio/riocmd.c
+10
-10
drivers/char/rio/rioctrl.c
drivers/char/rio/rioctrl.c
+80
-84
drivers/char/rio/rioinit.c
drivers/char/rio/rioinit.c
+14
-14
drivers/char/rio/riointr.c
drivers/char/rio/riointr.c
+9
-9
drivers/char/rio/rioparam.c
drivers/char/rio/rioparam.c
+14
-14
drivers/char/rio/rioroute.c
drivers/char/rio/rioroute.c
+6
-6
drivers/char/rio/riotable.c
drivers/char/rio/riotable.c
+10
-10
drivers/char/rio/riotty.c
drivers/char/rio/riotty.c
+1
-1
drivers/char/rio/unixrup.h
drivers/char/rio/unixrup.h
+1
-1
未找到文件。
drivers/char/rio/daemon.h
浏览文件 @
d886cb58
...
...
@@ -51,7 +51,7 @@ struct Error {
};
struct
DownLoad
{
char
*
DataP
;
char
__user
*
DataP
;
unsigned
int
Count
;
unsigned
int
ProductCode
;
};
...
...
@@ -83,18 +83,18 @@ struct PortSetup {
struct
LpbReq
{
unsigned
int
Host
;
unsigned
int
Link
;
struct
LPB
*
LpbP
;
struct
LPB
__user
*
LpbP
;
};
struct
RupReq
{
unsigned
int
HostNum
;
unsigned
int
RupNum
;
struct
RUP
*
RupP
;
struct
RUP
__user
*
RupP
;
};
struct
PortReq
{
unsigned
int
SysPort
;
struct
Port
*
PortP
;
struct
Port
__user
*
PortP
;
};
struct
StreamInfo
{
...
...
@@ -105,12 +105,12 @@ struct StreamInfo {
struct
HostReq
{
unsigned
int
HostNum
;
struct
Host
*
HostP
;
struct
Host
__user
*
HostP
;
};
struct
HostDpRam
{
unsigned
int
HostNum
;
struct
DpRam
*
DpRamP
;
struct
DpRam
__user
*
DpRamP
;
};
struct
DebugCtrl
{
...
...
drivers/char/rio/func.h
浏览文件 @
d886cb58
...
...
@@ -46,7 +46,7 @@ int RIOBootCodeRTA(struct rio_info *, struct DownLoad *);
int
RIOBootCodeHOST
(
struct
rio_info
*
,
struct
DownLoad
*
);
int
RIOBootCodeUNKNOWN
(
struct
rio_info
*
,
struct
DownLoad
*
);
void
msec_timeout
(
struct
Host
*
);
int
RIOBootRup
(
struct
rio_info
*
,
unsigned
int
,
struct
Host
*
,
struct
PKT
*
);
int
RIOBootRup
(
struct
rio_info
*
,
unsigned
int
,
struct
Host
*
,
struct
PKT
__iomem
*
);
int
RIOBootOk
(
struct
rio_info
*
,
struct
Host
*
,
unsigned
long
);
int
RIORtaBound
(
struct
rio_info
*
,
unsigned
int
);
void
rio_fill_host_slot
(
int
,
int
,
unsigned
int
,
struct
Host
*
);
...
...
@@ -55,8 +55,8 @@ void rio_fill_host_slot(int, int, unsigned int, struct Host *);
int
RIOFoadRta
(
struct
Host
*
,
struct
Map
*
);
int
RIOZombieRta
(
struct
Host
*
,
struct
Map
*
);
int
RIOCommandRta
(
struct
rio_info
*
,
unsigned
long
,
int
(
*
func
)
(
struct
Host
*
,
struct
Map
*
));
int
RIOIdentifyRta
(
struct
rio_info
*
,
void
*
);
int
RIOKillNeighbour
(
struct
rio_info
*
,
void
*
);
int
RIOIdentifyRta
(
struct
rio_info
*
,
void
__user
*
);
int
RIOKillNeighbour
(
struct
rio_info
*
,
void
__user
*
);
int
RIOSuspendBootRta
(
struct
Host
*
,
int
,
int
);
int
RIOFoadWakeup
(
struct
rio_info
*
);
struct
CmdBlk
*
RIOGetCmdBlk
(
void
);
...
...
@@ -68,7 +68,8 @@ int RIORFlushEnable(unsigned long, struct CmdBlk *);
int
RIOUnUse
(
unsigned
long
,
struct
CmdBlk
*
);
/* rioctrl.c */
int
riocontrol
(
struct
rio_info
*
,
dev_t
,
int
,
caddr_t
,
int
);
int
riocontrol
(
struct
rio_info
*
,
dev_t
,
int
,
unsigned
long
,
int
);
int
RIOPreemptiveCmd
(
struct
rio_info
*
,
struct
Port
*
,
unsigned
char
);
/* rioinit.c */
...
...
@@ -77,13 +78,13 @@ void RIOInitHosts(struct rio_info *, struct RioHostInfo *);
void
RIOISAinit
(
struct
rio_info
*
,
int
);
int
RIODoAT
(
struct
rio_info
*
,
int
,
int
);
caddr_t
RIOCheckForATCard
(
int
);
int
RIOAssignAT
(
struct
rio_info
*
,
int
,
caddr_t
,
int
);
int
RIOBoardTest
(
unsigned
long
,
caddr_t
,
unsigned
char
,
int
);
int
RIOAssignAT
(
struct
rio_info
*
,
int
,
void
__iomem
*
,
int
);
int
RIOBoardTest
(
unsigned
long
,
void
__iomem
*
,
unsigned
char
,
int
);
void
RIOAllocDataStructs
(
struct
rio_info
*
);
void
RIOSetupDataStructs
(
struct
rio_info
*
);
int
RIODefaultName
(
struct
rio_info
*
,
struct
Host
*
,
unsigned
int
);
struct
rioVersion
*
RIOVersid
(
void
);
void
RIOHostReset
(
unsigned
int
,
struct
DpRam
*
,
unsigned
int
);
void
RIOHostReset
(
unsigned
int
,
struct
DpRam
__iomem
*
,
unsigned
int
);
/* riointr.c */
void
RIOTxEnable
(
char
*
);
...
...
@@ -95,14 +96,14 @@ int RIOParam(struct Port *, int, int, int);
int
RIODelay
(
struct
Port
*
PortP
,
int
);
int
RIODelay_ni
(
struct
Port
*
PortP
,
int
);
void
ms_timeout
(
struct
Port
*
);
int
can_add_transmit
(
struct
PKT
**
,
struct
Port
*
);
int
can_add_transmit
(
struct
PKT
__iomem
**
,
struct
Port
*
);
void
add_transmit
(
struct
Port
*
);
void
put_free_end
(
struct
Host
*
,
struct
PKT
*
);
int
can_remove_receive
(
struct
PKT
**
,
struct
Port
*
);
void
put_free_end
(
struct
Host
*
,
struct
PKT
__iomem
*
);
int
can_remove_receive
(
struct
PKT
__iomem
**
,
struct
Port
*
);
void
remove_receive
(
struct
Port
*
);
/* rioroute.c */
int
RIORouteRup
(
struct
rio_info
*
,
unsigned
int
,
struct
Host
*
,
struct
PKT
*
);
int
RIORouteRup
(
struct
rio_info
*
,
unsigned
int
,
struct
Host
*
,
struct
PKT
__iomem
*
);
void
RIOFixPhbs
(
struct
rio_info
*
,
struct
Host
*
,
unsigned
int
);
unsigned
int
GetUnitType
(
unsigned
int
);
int
RIOSetChange
(
struct
rio_info
*
);
...
...
@@ -139,7 +140,7 @@ int rio_isr_thread(char *);
struct rio_info *rio_info_store(int cmd, struct rio_info *p);
#endif
extern
void
rio_copy_to_card
(
void
*
to
,
void
*
from
,
int
len
);
extern
void
rio_copy_to_card
(
void
__iomem
*
to
,
void
*
from
,
int
len
);
extern
int
rio_minor
(
struct
tty_struct
*
tty
);
extern
int
rio_ismodem
(
struct
tty_struct
*
tty
);
...
...
drivers/char/rio/host.h
浏览文件 @
d886cb58
...
...
@@ -48,8 +48,8 @@ struct Host {
unsigned
char
Ivec
;
/* POLLED or ivec number */
unsigned
char
Mode
;
/* Control stuff */
unsigned
char
Slot
;
/* Slot */
caddr_t
Caddr
;
/* KV address of DPRAM */
struct
DpRam
*
CardP
;
/* KV address of DPRAM, with overlay */
void
__iomem
*
Caddr
;
/* KV address of DPRAM */
struct
DpRam
__iomem
*
CardP
;
/* KV address of DPRAM, with overlay */
unsigned
long
PaddrP
;
/* Phys. address of DPRAM */
char
Name
[
MAX_NAME_LEN
];
/* The name of the host */
unsigned
int
UniqueNum
;
/* host unique number */
...
...
@@ -57,7 +57,7 @@ struct Host {
unsigned
int
WorkToBeDone
;
/* set to true each interrupt */
unsigned
int
InIntr
;
/* Being serviced? */
unsigned
int
IntSrvDone
;
/* host's interrupt has been serviced */
void
(
*
Copy
)
(
void
*
,
void
*
,
int
);
/* copy func */
void
(
*
Copy
)
(
void
*
,
void
__iomem
*
,
int
);
/* copy func */
struct
timer_list
timer
;
/*
** I M P O R T A N T !
...
...
@@ -83,11 +83,11 @@ struct Host {
struct
Top
Topology
[
LINKS_PER_UNIT
];
/* one per link */
struct
Map
Mapping
[
MAX_RUP
];
/* Mappings for host */
struct
PHB
*
PhbP
;
/* Pointer to the PHB array */
unsigned
short
*
PhbNumP
;
/* Ptr to Number of PHB's */
struct
LPB
*
LinkStrP
;
/* Link Structure Array */
struct
RUP
*
RupP
;
/* Sixteen real rups here */
struct
PARM_MAP
*
ParmMapP
;
/* points to the parmmap */
struct
PHB
__iomem
*
PhbP
;
/* Pointer to the PHB array */
unsigned
short
__iomem
*
PhbNumP
;
/* Ptr to Number of PHB's */
struct
LPB
__iomem
*
LinkStrP
;
/* Link Structure Array */
struct
RUP
__iomem
*
RupP
;
/* Sixteen real rups here */
struct
PARM_MAP
__iomem
*
ParmMapP
;
/* points to the parmmap */
unsigned
int
ExtraUnits
[
MAX_EXTRA_UNITS
];
/* unknown things */
unsigned
int
NumExtraBooted
;
/* how many of the above */
/*
...
...
drivers/char/rio/port.h
浏览文件 @
d886cb58
...
...
@@ -40,7 +40,7 @@ struct Port {
struct
gs_port
gs
;
int
PortNum
;
/* RIO port no., 0-511 */
struct
Host
*
HostP
;
caddr_t
Caddr
;
void
__iomem
*
Caddr
;
unsigned
short
HostPort
;
/* Port number on host card */
unsigned
char
RupNum
;
/* Number of RUP for port */
unsigned
char
ID2
;
/* Second ID of RTA for port */
...
...
@@ -92,13 +92,13 @@ struct Port {
#define RIO_RTSFLOW 0x0400
/* RIO's own RTSFLOW flag */
struct
PHB
*
PhbP
;
/* pointer to PHB for port */
u16
*
TxAdd
;
/* Add packets here */
u16
*
TxStart
;
/* Start of add array */
u16
*
TxEnd
;
/* End of add array */
u16
*
RxRemove
;
/* Remove packets here */
u16
*
RxStart
;
/* Start of remove array */
u16
*
RxEnd
;
/* End of remove array */
struct
PHB
__iomem
*
PhbP
;
/* pointer to PHB for port */
u16
__iomem
*
TxAdd
;
/* Add packets here */
u16
__iomem
*
TxStart
;
/* Start of add array */
u16
__iomem
*
TxEnd
;
/* End of add array */
u16
__iomem
*
RxRemove
;
/* Remove packets here */
u16
__iomem
*
RxStart
;
/* Start of remove array */
u16
__iomem
*
RxEnd
;
/* End of remove array */
unsigned
int
RtaUniqueNum
;
/* Unique number of RTA */
unsigned
short
PortState
;
/* status of port */
unsigned
short
ModemState
;
/* status of modem lines */
...
...
drivers/char/rio/rio.h
浏览文件 @
d886cb58
...
...
@@ -129,8 +129,8 @@
** RIO_OBJ takes hostp->Caddr and a UNIX pointer to an object and
** returns the offset into the DP RAM area.
*/
#define RIO_PTR(C,O) (((unsigned char *)(C))+(0xFFFF&(O)))
#define RIO_OFF(C,O) ((
long)(O)-(long
)(C))
#define RIO_PTR(C,O) (((unsigned char
__iomem
*)(C))+(0xFFFF&(O)))
#define RIO_OFF(C,O) ((
unsigned char __iomem *)(O)-(unsigned char __iomem *
)(C))
/*
** How to convert from various different device number formats:
...
...
drivers/char/rio/rio_linux.c
浏览文件 @
d886cb58
...
...
@@ -333,7 +333,7 @@ int RIODelay_ni(struct Port *PortP, int njiffies)
return
!
RIO_FAIL
;
}
void
rio_copy_to_card
(
void
*
to
,
void
*
from
,
int
len
)
void
rio_copy_to_card
(
void
__iomem
*
to
,
void
*
from
,
int
len
)
{
rio_memcpy_toio
(
NULL
,
to
,
from
,
len
);
}
...
...
@@ -573,7 +573,7 @@ static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd
func_enter
();
/* The "dev" argument isn't used. */
rc
=
riocontrol
(
p
,
0
,
cmd
,
(
void
*
)
arg
,
capable
(
CAP_SYS_ADMIN
));
rc
=
riocontrol
(
p
,
0
,
cmd
,
arg
,
capable
(
CAP_SYS_ADMIN
));
func_exit
();
return
rc
;
...
...
@@ -583,6 +583,7 @@ extern int RIOShortCommand(struct rio_info *p, struct Port *PortP, int command,
static
int
rio_ioctl
(
struct
tty_struct
*
tty
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
void
__user
*
argp
=
(
void
__user
*
)
arg
;
int
rc
;
struct
Port
*
PortP
;
int
ival
;
...
...
@@ -594,14 +595,14 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd
rc
=
0
;
switch
(
cmd
)
{
case
TIOCSSOFTCAR
:
if
((
rc
=
get_user
(
ival
,
(
unsigned
int
*
)
arg
))
==
0
)
{
if
((
rc
=
get_user
(
ival
,
(
unsigned
__user
*
)
argp
))
==
0
)
{
tty
->
termios
->
c_cflag
=
(
tty
->
termios
->
c_cflag
&
~
CLOCAL
)
|
(
ival
?
CLOCAL
:
0
);
}
break
;
case
TIOCGSERIAL
:
rc
=
-
EFAULT
;
if
(
access_ok
(
VERIFY_WRITE
,
(
void
*
)
arg
,
sizeof
(
struct
serial_struct
)))
rc
=
gs_getserial
(
&
PortP
->
gs
,
(
struct
serial_struct
*
)
arg
);
if
(
access_ok
(
VERIFY_WRITE
,
argp
,
sizeof
(
struct
serial_struct
)))
rc
=
gs_getserial
(
&
PortP
->
gs
,
argp
);
break
;
case
TCSBRK
:
if
(
PortP
->
State
&
RIO_DELETED
)
{
...
...
@@ -631,8 +632,8 @@ static int rio_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd
break
;
case
TIOCSSERIAL
:
rc
=
-
EFAULT
;
if
(
access_ok
(
VERIFY_READ
,
(
void
*
)
arg
,
sizeof
(
struct
serial_struct
)))
rc
=
gs_setserial
(
&
PortP
->
gs
,
(
struct
serial_struct
*
)
arg
);
if
(
access_ok
(
VERIFY_READ
,
argp
,
sizeof
(
struct
serial_struct
)))
rc
=
gs_setserial
(
&
PortP
->
gs
,
argp
);
break
;
default:
rc
=
-
ENOIOCTLCMD
;
...
...
@@ -919,7 +920,7 @@ static void __exit rio_release_drivers(void)
static
void
fix_rio_pci
(
struct
pci_dev
*
pdev
)
{
unsigned
long
hwbase
;
unsigned
char
*
rebase
;
unsigned
char
__iomem
*
rebase
;
unsigned
int
t
;
#define CNTRL_REG_OFFSET 0x50
...
...
@@ -999,7 +1000,7 @@ static int __init rio_init(void)
if
(((
1
<<
hp
->
Ivec
)
&
rio_irqmask
)
==
0
)
hp
->
Ivec
=
0
;
hp
->
Caddr
=
ioremap
(
p
->
RIOHosts
[
p
->
RIONumHosts
].
PaddrP
,
RIO_WINDOW_LEN
);
hp
->
CardP
=
(
struct
DpRam
*
)
hp
->
Caddr
;
hp
->
CardP
=
(
struct
DpRam
__iomem
*
)
hp
->
Caddr
;
hp
->
Type
=
RIO_PCI
;
hp
->
Copy
=
rio_copy_to_card
;
hp
->
Mode
=
RIO_PCI_BOOT_FROM_RAM
;
...
...
@@ -1021,7 +1022,7 @@ static int __init rio_init(void)
p
->
RIONumHosts
++
;
found
++
;
}
else
{
iounmap
(
(
char
*
)
(
p
->
RIOHosts
[
p
->
RIONumHosts
].
Caddr
)
);
iounmap
(
p
->
RIOHosts
[
p
->
RIONumHosts
].
Caddr
);
}
}
...
...
@@ -1047,7 +1048,7 @@ static int __init rio_init(void)
hp
->
Ivec
=
0
;
hp
->
Ivec
|=
0x8000
;
/* Mark as non-sharable */
hp
->
Caddr
=
ioremap
(
p
->
RIOHosts
[
p
->
RIONumHosts
].
PaddrP
,
RIO_WINDOW_LEN
);
hp
->
CardP
=
(
struct
DpRam
*
)
hp
->
Caddr
;
hp
->
CardP
=
(
struct
DpRam
__iomem
*
)
hp
->
Caddr
;
hp
->
Type
=
RIO_PCI
;
hp
->
Copy
=
rio_copy_to_card
;
hp
->
Mode
=
RIO_PCI_BOOT_FROM_RAM
;
...
...
@@ -1070,7 +1071,7 @@ static int __init rio_init(void)
p
->
RIONumHosts
++
;
found
++
;
}
else
{
iounmap
(
(
char
*
)
(
p
->
RIOHosts
[
p
->
RIONumHosts
].
Caddr
)
);
iounmap
(
p
->
RIOHosts
[
p
->
RIONumHosts
].
Caddr
);
}
#else
printk
(
KERN_ERR
"Found an older RIO PCI card, but the driver is not "
"compiled to support it.
\n
"
);
...
...
@@ -1085,7 +1086,7 @@ static int __init rio_init(void)
/* There was something about the IRQs of these cards. 'Forget what.--REW */
hp
->
Ivec
=
0
;
hp
->
Caddr
=
ioremap
(
p
->
RIOHosts
[
p
->
RIONumHosts
].
PaddrP
,
RIO_WINDOW_LEN
);
hp
->
CardP
=
(
struct
DpRam
*
)
hp
->
Caddr
;
hp
->
CardP
=
(
struct
DpRam
__iomem
*
)
hp
->
Caddr
;
hp
->
Type
=
RIO_AT
;
hp
->
Copy
=
rio_copy_to_card
;
/* AT card PCI???? - PVDL
* -- YES! this is now a normal copy. Only the
...
...
@@ -1111,7 +1112,7 @@ static int __init rio_init(void)
}
if
(
!
okboard
)
iounmap
(
(
char
*
)
(
hp
->
Caddr
)
);
iounmap
(
hp
->
Caddr
);
}
}
...
...
drivers/char/rio/rio_linux.h
浏览文件 @
d886cb58
...
...
@@ -131,24 +131,24 @@ struct vpd_prom {
#ifdef CONFIG_RIO_OLDPCI
static
inline
void
*
rio_memcpy_toio
(
void
*
dummy
,
void
*
dest
,
void
*
source
,
int
n
)
static
inline
void
__iomem
*
rio_memcpy_toio
(
void
__iomem
*
dummy
,
void
__iomem
*
dest
,
void
*
source
,
int
n
)
{
char
*
dst
=
dest
;
char
__iomem
*
dst
=
dest
;
char
*
src
=
source
;
while
(
n
--
)
{
writeb
(
*
src
++
,
dst
++
);
(
void
)
readb
(
dummy
);
(
void
)
readb
(
dummy
);
/* WTF? */
}
return
dest
;
}
static
inline
void
*
rio_memcpy_fromio
(
void
*
dest
,
void
*
source
,
int
n
)
static
inline
void
*
rio_memcpy_fromio
(
void
*
dest
,
void
__iomem
*
source
,
int
n
)
{
char
*
dst
=
dest
;
char
*
src
=
source
;
char
__iomem
*
src
=
source
;
while
(
n
--
)
*
dst
++
=
readb
(
src
++
);
...
...
drivers/char/rio/rioboot.c
浏览文件 @
d886cb58
...
...
@@ -71,7 +71,7 @@
#include "cmdblk.h"
#include "route.h"
static
int
RIOBootComplete
(
struct
rio_info
*
p
,
struct
Host
*
HostP
,
unsigned
int
Rup
,
struct
PktCmd
*
PktCmdP
);
static
int
RIOBootComplete
(
struct
rio_info
*
p
,
struct
Host
*
HostP
,
unsigned
int
Rup
,
struct
PktCmd
__iomem
*
PktCmdP
);
static
const
unsigned
char
RIOAtVec2Ctrl
[]
=
{
/* 0 */
INTERRUPT_DISABLE
,
...
...
@@ -204,13 +204,13 @@ void rio_start_card_running(struct Host *HostP)
int
RIOBootCodeHOST
(
struct
rio_info
*
p
,
struct
DownLoad
*
rbp
)
{
struct
Host
*
HostP
;
u8
*
Cad
;
PARM_MAP
*
ParmMapP
;
u8
__iomem
*
Cad
;
PARM_MAP
__iomem
*
ParmMapP
;
int
RupN
;
int
PortN
;
unsigned
int
host
;
u8
*
StartP
;
u8
*
DestP
;
u8
__iomem
*
StartP
;
u8
__iomem
*
DestP
;
int
wait_count
;
u16
OldParmMap
;
u16
offset
;
/* It is very important that this is a u16 */
...
...
@@ -262,7 +262,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
** Ensure that the host really is stopped.
** Disable it's external bus & twang its reset line.
*/
RIOHostReset
(
HostP
->
Type
,
(
struct
DpRam
*
)
HostP
->
CardP
,
HostP
->
Slot
);
RIOHostReset
(
HostP
->
Type
,
HostP
->
CardP
,
HostP
->
Slot
);
/*
** Copy the data directly from user space to the SRAM.
...
...
@@ -366,7 +366,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
** a short branch to 0x7FF8, where a long branch is coded.
*/
DestP
=
(
u8
*
)
&
Cad
[
0x7FF8
];
/* <<<---- READ THE ABOVE COMMENTS */
DestP
=
&
Cad
[
0x7FF8
];
/* <<<---- READ THE ABOVE COMMENTS */
#define NFIX(N) (0x60 | (N))
/* .O = (~(.O + N))<<4 */
#define PFIX(N) (0x20 | (N))
/* .O = (.O + N)<<4 */
...
...
@@ -438,7 +438,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
rio_dprintk
(
RIO_DEBUG_BOOT
,
"RIO Mesg Run Fail
\n
"
);
HostP
->
Flags
&=
~
RUN_STATE
;
HostP
->
Flags
|=
RC_STUFFED
;
RIOHostReset
(
HostP
->
Type
,
(
struct
DpRam
*
)
HostP
->
CardP
,
HostP
->
Slot
);
RIOHostReset
(
HostP
->
Type
,
HostP
->
CardP
,
HostP
->
Slot
);
continue
;
}
...
...
@@ -453,9 +453,9 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
/*
** Grab a 32 bit pointer to the parmmap structure
*/
ParmMapP
=
(
PARM_MAP
*
)
RIO_PTR
(
Cad
,
readw
(
&
HostP
->
__ParmMapR
));
ParmMapP
=
(
PARM_MAP
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
HostP
->
__ParmMapR
));
rio_dprintk
(
RIO_DEBUG_BOOT
,
"ParmMapP : %p
\n
"
,
ParmMapP
);
ParmMapP
=
(
PARM_MAP
*
)
((
unsigned
long
)
Cad
+
readw
(
&
HostP
->
__ParmMapR
));
ParmMapP
=
(
PARM_MAP
__iomem
*
)(
Cad
+
readw
(
&
HostP
->
__ParmMapR
));
rio_dprintk
(
RIO_DEBUG_BOOT
,
"ParmMapP : %p
\n
"
,
ParmMapP
);
/*
...
...
@@ -468,7 +468,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
rio_dprintk
(
RIO_DEBUG_BOOT
,
"Links = 0x%x
\n
"
,
readw
(
&
ParmMapP
->
links
));
HostP
->
Flags
&=
~
RUN_STATE
;
HostP
->
Flags
|=
RC_STUFFED
;
RIOHostReset
(
HostP
->
Type
,
(
struct
DpRam
*
)
HostP
->
CardP
,
HostP
->
Slot
);
RIOHostReset
(
HostP
->
Type
,
HostP
->
CardP
,
HostP
->
Slot
);
continue
;
}
...
...
@@ -491,7 +491,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
rio_dprintk
(
RIO_DEBUG_BOOT
,
"Timedout waiting for init_done
\n
"
);
HostP
->
Flags
&=
~
RUN_STATE
;
HostP
->
Flags
|=
RC_STUFFED
;
RIOHostReset
(
HostP
->
Type
,
(
struct
DpRam
*
)
HostP
->
CardP
,
HostP
->
Slot
);
RIOHostReset
(
HostP
->
Type
,
HostP
->
CardP
,
HostP
->
Slot
);
continue
;
}
...
...
@@ -512,10 +512,10 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
** 32 bit pointers for the driver in ioremap space.
*/
HostP
->
ParmMapP
=
ParmMapP
;
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
));
HostP
->
PhbP
=
(
struct
PHB
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
ParmMapP
->
phb_ptr
));
HostP
->
RupP
=
(
struct
RUP
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
ParmMapP
->
rups
));
HostP
->
PhbNumP
=
(
unsigned
short
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
ParmMapP
->
phb_num_ptr
));
HostP
->
LinkStrP
=
(
struct
LPB
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
ParmMapP
->
link_str_ptr
));
/*
** point the UnixRups at the real Rups
...
...
@@ -540,7 +540,7 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
for
(
PortN
=
p
->
RIOFirstPortsMapped
;
PortN
<
p
->
RIOLastPortsMapped
+
PORTS_PER_RTA
;
PortN
++
)
{
if
(
p
->
RIOPortp
[
PortN
]
->
HostP
==
HostP
)
{
struct
Port
*
PortP
=
p
->
RIOPortp
[
PortN
];
struct
PHB
*
PhbP
;
struct
PHB
__iomem
*
PhbP
;
/* int oldspl; */
if
(
!
PortP
->
Mapped
)
...
...
@@ -551,12 +551,12 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
PortP
->
PhbP
=
PhbP
;
PortP
->
TxAdd
=
(
u16
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
tx_add
));
PortP
->
TxStart
=
(
u16
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
tx_start
));
PortP
->
TxEnd
=
(
u16
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
tx_end
));
PortP
->
RxRemove
=
(
u16
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
rx_remove
));
PortP
->
RxStart
=
(
u16
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
rx_start
));
PortP
->
RxEnd
=
(
u16
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
rx_end
));
PortP
->
TxAdd
=
(
u16
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
tx_add
));
PortP
->
TxStart
=
(
u16
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
tx_start
));
PortP
->
TxEnd
=
(
u16
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
tx_end
));
PortP
->
RxRemove
=
(
u16
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
rx_remove
));
PortP
->
RxStart
=
(
u16
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
rx_start
));
PortP
->
RxEnd
=
(
u16
__iomem
*
)
RIO_PTR
(
Cad
,
readw
(
&
PhbP
->
rx_end
));
rio_spin_unlock_irqrestore
(
&
PortP
->
portSem
,
flags
);
/*
...
...
@@ -601,9 +601,9 @@ int RIOBootCodeHOST(struct rio_info *p, struct DownLoad *rbp)
* return 1. If we havent, then return 0.
*/
int
RIOBootRup
(
struct
rio_info
*
p
,
unsigned
int
Rup
,
struct
Host
*
HostP
,
struct
PKT
*
PacketP
)
int
RIOBootRup
(
struct
rio_info
*
p
,
unsigned
int
Rup
,
struct
Host
*
HostP
,
struct
PKT
__iomem
*
PacketP
)
{
struct
PktCmd
*
PktCmdP
=
(
struct
PktCmd
*
)
PacketP
->
data
;
struct
PktCmd
__iomem
*
PktCmdP
=
(
struct
PktCmd
__iomem
*
)
PacketP
->
data
;
struct
PktCmd_M
*
PktReplyP
;
struct
CmdBlk
*
CmdBlkP
;
unsigned
int
sequence
;
...
...
@@ -722,7 +722,7 @@ int RIOBootRup(struct rio_info *p, unsigned int Rup, struct Host *HostP, struct
* RtaUniq is the booted RTA.
*/
static
int
RIOBootComplete
(
struct
rio_info
*
p
,
struct
Host
*
HostP
,
unsigned
int
Rup
,
struct
PktCmd
*
PktCmdP
)
static
int
RIOBootComplete
(
struct
rio_info
*
p
,
struct
Host
*
HostP
,
unsigned
int
Rup
,
struct
PktCmd
__iomem
*
PktCmdP
)
{
struct
Map
*
MapP
=
NULL
;
struct
Map
*
MapP2
=
NULL
;
...
...
drivers/char/rio/riocmd.c
浏览文件 @
d886cb58
...
...
@@ -180,7 +180,7 @@ int RIOCommandRta(struct rio_info *p, unsigned long RtaUnique, int (*func) (stru
}
int
RIOIdentifyRta
(
struct
rio_info
*
p
,
void
*
arg
)
int
RIOIdentifyRta
(
struct
rio_info
*
p
,
void
__user
*
arg
)
{
unsigned
int
Host
;
...
...
@@ -245,7 +245,7 @@ int RIOIdentifyRta(struct rio_info *p, void * arg)
}
int
RIOKillNeighbour
(
struct
rio_info
*
p
,
void
*
arg
)
int
RIOKillNeighbour
(
struct
rio_info
*
p
,
void
__user
*
arg
)
{
uint
Host
;
uint
ID
;
...
...
@@ -370,9 +370,9 @@ int RIOFoadWakeup(struct rio_info *p)
/*
** Incoming command on the COMMAND_RUP to be processed.
*/
static
int
RIOCommandRup
(
struct
rio_info
*
p
,
uint
Rup
,
struct
Host
*
HostP
,
struct
PKT
*
PacketP
)
static
int
RIOCommandRup
(
struct
rio_info
*
p
,
uint
Rup
,
struct
Host
*
HostP
,
struct
PKT
__iomem
*
PacketP
)
{
struct
PktCmd
*
PktCmdP
=
(
struct
PktCmd
*
)
PacketP
->
data
;
struct
PktCmd
__iomem
*
PktCmdP
=
(
struct
PktCmd
__iomem
*
)
PacketP
->
data
;
struct
Port
*
PortP
;
struct
UnixRup
*
UnixRupP
;
unsigned
short
SysPort
;
...
...
@@ -601,7 +601,7 @@ int RIOQueueCmdBlk(struct Host *HostP, uint Rup, struct CmdBlk *CmdBlkP)
/*
** Whammy! blat that pack!
*/
HostP
->
Copy
(
(
caddr_t
)
&
CmdBlkP
->
Packet
,
RIO_PTR
(
HostP
->
Caddr
,
UnixRupP
->
RupP
->
txpkt
),
sizeof
(
struct
PKT
));
HostP
->
Copy
(
&
CmdBlkP
->
Packet
,
RIO_PTR
(
HostP
->
Caddr
,
UnixRupP
->
RupP
->
txpkt
),
sizeof
(
struct
PKT
));
/*
** place command packet on the pending position.
...
...
@@ -655,7 +655,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
{
struct
CmdBlk
*
CmdBlkP
;
struct
UnixRup
*
UnixRupP
;
struct
PKT
*
PacketP
;
struct
PKT
__iomem
*
PacketP
;
unsigned
short
Rup
;
unsigned
long
flags
;
...
...
@@ -676,7 +676,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
if
(
readw
(
&
UnixRupP
->
RupP
->
rxcontrol
)
!=
RX_RUP_INACTIVE
)
{
int
FreeMe
;
PacketP
=
(
struct
PKT
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
UnixRupP
->
RupP
->
rxpkt
));
PacketP
=
(
struct
PKT
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
UnixRupP
->
RupP
->
rxpkt
));
switch
(
readb
(
&
PacketP
->
dest_port
))
{
case
BOOT_RUP
:
...
...
@@ -696,7 +696,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
FreeMe
=
RIOCommandRup
(
p
,
Rup
,
HostP
,
PacketP
);
if
(
PacketP
->
data
[
5
]
==
MEMDUMP
)
{
rio_dprintk
(
RIO_DEBUG_CMD
,
"Memdump from 0x%x complete
\n
"
,
*
(
unsigned
short
*
)
&
(
PacketP
->
data
[
6
]));
HostP
->
Copy
(
(
caddr_t
)
&
(
PacketP
->
data
[
8
]),
(
caddr_t
)
p
->
RIOMemDump
,
32
);
HostP
->
Copy
(
&
(
PacketP
->
data
[
8
]),
p
->
RIOMemDump
,
32
);
}
rio_spin_lock_irqsave
(
&
UnixRupP
->
RupLock
,
flags
);
break
;
...
...
@@ -782,7 +782,7 @@ void RIOPollHostCommands(struct rio_info *p, struct Host *HostP)
/*
** Whammy! blat that pack!
*/
HostP
->
Copy
(
(
caddr_t
)
&
CmdBlkP
->
Packet
,
RIO_PTR
(
HostP
->
Caddr
,
UnixRupP
->
RupP
->
txpkt
),
sizeof
(
struct
PKT
));
HostP
->
Copy
(
&
CmdBlkP
->
Packet
,
RIO_PTR
(
HostP
->
Caddr
,
UnixRupP
->
RupP
->
txpkt
),
sizeof
(
struct
PKT
));
/*
** remove the command from the rup command queue...
...
...
@@ -824,7 +824,7 @@ int RIOWFlushMark(unsigned long iPortP, struct CmdBlk *CmdBlkP)
int
RIORFlushEnable
(
unsigned
long
iPortP
,
struct
CmdBlk
*
CmdBlkP
)
{
struct
Port
*
PortP
=
(
struct
Port
*
)
iPortP
;
struct
PKT
*
PacketP
;
struct
PKT
__iomem
*
PacketP
;
unsigned
long
flags
;
rio_spin_lock_irqsave
(
&
PortP
->
portSem
,
flags
);
...
...
drivers/char/rio/rioctrl.c
浏览文件 @
d886cb58
此差异已折叠。
点击以展开。
drivers/char/rio/rioinit.c
浏览文件 @
d886cb58
...
...
@@ -79,7 +79,7 @@ static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3";
int
RIOPCIinit
(
struct
rio_info
*
p
,
int
Mode
);
static
int
RIOScrub
(
int
,
u8
*
,
int
);
static
int
RIOScrub
(
int
,
u8
__iomem
*
,
int
);
/**
...
...
@@ -92,10 +92,10 @@ static int RIOScrub(int, u8 *, int);
** bits > 0 indicates 16 bit operation.
*/
int
RIOAssignAT
(
struct
rio_info
*
p
,
int
Base
,
caddr_t
virtAddr
,
int
mode
)
int
RIOAssignAT
(
struct
rio_info
*
p
,
int
Base
,
void
__iomem
*
virtAddr
,
int
mode
)
{
int
bits
;
struct
DpRam
*
cardp
=
(
struct
DpRa
m
*
)
virtAddr
;
struct
DpRam
__iomem
*
cardp
=
(
struct
DpRam
__iome
m
*
)
virtAddr
;
if
((
Base
<
ONE_MEG
)
||
(
mode
&
BYTE_ACCESS_MODE
))
bits
=
BYTE_OPERATION
;
...
...
@@ -107,7 +107,7 @@ int RIOAssignAT(struct rio_info *p, int Base, caddr_t virtAddr, int mode)
** transient stuff.
*/
p
->
RIOHosts
[
p
->
RIONumHosts
].
Caddr
=
virtAddr
;
p
->
RIOHosts
[
p
->
RIONumHosts
].
CardP
=
(
struct
DpRam
*
)
virtAddr
;
p
->
RIOHosts
[
p
->
RIONumHosts
].
CardP
=
virtAddr
;
/*
** Revision 01 AT host cards don't support WORD operations,
...
...
@@ -151,10 +151,10 @@ static u8 val[] = {
** RAM test a board.
** Nothing too complicated, just enough to check it out.
*/
int
RIOBoardTest
(
unsigned
long
paddr
,
caddr_t
caddr
,
unsigned
char
type
,
int
slot
)
int
RIOBoardTest
(
unsigned
long
paddr
,
void
__iomem
*
caddr
,
unsigned
char
type
,
int
slot
)
{
struct
DpRam
*
DpRam
=
(
struct
DpRam
*
)
caddr
;
char
*
ram
[
4
];
struct
DpRam
__iomem
*
DpRam
=
caddr
;
void
__iomem
*
ram
[
4
];
int
size
[
4
];
int
op
,
bank
;
int
nbanks
;
...
...
@@ -179,12 +179,12 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
size
[
2
]
=
DP_SRAM3_SIZE
;
size
[
3
]
=
DP_SCRATCH_SIZE
;
ram
[
0
]
=
(
char
*
)
&
DpRam
->
DpSram1
[
0
]
;
ram
[
1
]
=
(
char
*
)
&
DpRam
->
DpSram2
[
0
]
;
ram
[
2
]
=
(
char
*
)
&
DpRam
->
DpSram3
[
0
]
;
ram
[
0
]
=
DpRam
->
DpSram1
;
ram
[
1
]
=
DpRam
->
DpSram2
;
ram
[
2
]
=
DpRam
->
DpSram3
;
nbanks
=
(
type
==
RIO_PCI
)
?
3
:
4
;
if
(
nbanks
==
4
)
ram
[
3
]
=
(
char
*
)
&
DpRam
->
DpScratch
[
0
]
;
ram
[
3
]
=
DpRam
->
DpScratch
;
if
(
nbanks
==
3
)
{
...
...
@@ -202,7 +202,7 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
*/
for
(
op
=
0
;
op
<
TEST_END
;
op
++
)
{
for
(
bank
=
0
;
bank
<
nbanks
;
bank
++
)
{
if
(
RIOScrub
(
op
,
(
u8
*
)
ram
[
bank
],
size
[
bank
])
==
RIO_FAIL
)
{
if
(
RIOScrub
(
op
,
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
;
...
...
@@ -227,7 +227,7 @@ int RIOBoardTest(unsigned long paddr, caddr_t caddr, unsigned char type, int slo
** to check that the data from the previous phase was retained.
*/
static
int
RIOScrub
(
int
op
,
u8
*
ram
,
int
size
)
static
int
RIOScrub
(
int
op
,
u8
__iomem
*
ram
,
int
size
)
{
int
off
;
unsigned
char
oldbyte
;
...
...
@@ -393,7 +393,7 @@ struct rioVersion *RIOVersid(void)
return
&
stVersion
;
}
void
RIOHostReset
(
unsigned
int
Type
,
struct
DpRam
*
DpRamP
,
unsigned
int
Slot
)
void
RIOHostReset
(
unsigned
int
Type
,
struct
DpRam
__iomem
*
DpRamP
,
unsigned
int
Slot
)
{
/*
** Reset the Tpu
...
...
drivers/char/rio/riointr.c
浏览文件 @
d886cb58
...
...
@@ -102,7 +102,7 @@ void RIOTxEnable(char *en)
struct
rio_info
*
p
;
struct
tty_struct
*
tty
;
int
c
;
struct
PKT
*
PacketP
;
struct
PKT
__iomem
*
PacketP
;
unsigned
long
flags
;
PortP
=
(
struct
Port
*
)
en
;
...
...
@@ -144,7 +144,7 @@ void RIOTxEnable(char *en)
if
(
c
==
0
)
break
;
rio_memcpy_toio
(
PortP
->
HostP
->
Caddr
,
(
caddr_t
)
PacketP
->
data
,
PortP
->
gs
.
xmit_buf
+
PortP
->
gs
.
xmit_tail
,
c
);
rio_memcpy_toio
(
PortP
->
HostP
->
Caddr
,
PacketP
->
data
,
PortP
->
gs
.
xmit_buf
+
PortP
->
gs
.
xmit_tail
,
c
);
/* udelay (1); */
writeb
(
c
,
&
(
PacketP
->
len
));
...
...
@@ -219,7 +219,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From)
for
(
port
=
p
->
RIOFirstPortsBooted
;
port
<
p
->
RIOLastPortsBooted
+
PORTS_PER_RTA
;
port
++
)
{
struct
Port
*
PortP
=
p
->
RIOPortp
[
port
];
struct
tty_struct
*
ttyP
;
struct
PKT
*
PacketP
;
struct
PKT
__iomem
*
PacketP
;
/*
** not mapped in - most of the RIOPortp[] information
...
...
@@ -298,7 +298,7 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From)
for
(
port
=
p
->
RIOFirstPortsBooted
;
port
<
p
->
RIOLastPortsBooted
+
PORTS_PER_RTA
;
port
++
)
{
struct
Port
*
PortP
=
p
->
RIOPortp
[
port
];
struct
tty_struct
*
ttyP
;
struct
PKT
*
PacketP
;
struct
PKT
__iomem
*
PacketP
;
/*
** not mapped in - most of the RIOPortp[] information
...
...
@@ -427,13 +427,13 @@ void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From)
while
(
PortP
->
WflushFlag
&&
can_add_transmit
(
&
PacketP
,
PortP
)
&&
(
PortP
->
InUse
==
NOT_INUSE
))
{
int
p
;
struct
PktCmd
*
PktCmdP
;
struct
PktCmd
__iomem
*
PktCmdP
;
rio_dprintk
(
RIO_DEBUG_INTR
,
"Add WFLUSH marker to data queue
\n
"
);
/*
** make it look just like a WFLUSH command
*/
PktCmdP
=
(
struct
PktCmd
*
)
&
PacketP
->
data
[
0
];
PktCmdP
=
(
struct
PktCmd
__iomem
*
)
&
PacketP
->
data
[
0
];
writeb
(
WFLUSH
,
&
PktCmdP
->
Command
);
...
...
@@ -525,9 +525,9 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP)
{
struct
tty_struct
*
TtyP
;
unsigned
short
transCount
;
struct
PKT
*
PacketP
;
struct
PKT
__iomem
*
PacketP
;
register
unsigned
int
DataCnt
;
unsigned
char
*
ptr
;
unsigned
char
__iomem
*
ptr
;
unsigned
char
*
buf
;
int
copied
=
0
;
...
...
@@ -625,7 +625,7 @@ static void RIOReceive(struct rio_info *p, struct Port *PortP)
** to '#define', (this is the only place ___DEBUG_IT___ occurs in the
** driver).
*/
ptr
=
(
unsigned
char
*
)
PacketP
->
data
+
PortP
->
RxDataStart
;
ptr
=
(
unsigned
char
__iomem
*
)
PacketP
->
data
+
PortP
->
RxDataStart
;
tty_prepare_flip_string
(
TtyP
,
&
buf
,
transCount
);
rio_memcpy_fromio
(
buf
,
ptr
,
transCount
);
...
...
drivers/char/rio/rioparam.c
浏览文件 @
d886cb58
...
...
@@ -154,8 +154,8 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
{
struct
tty_struct
*
TtyP
;
int
retval
;
struct
phb_param
*
phb_param_ptr
;
struct
PKT
*
PacketP
;
struct
phb_param
__iomem
*
phb_param_ptr
;
struct
PKT
__iomem
*
PacketP
;
int
res
;
u8
Cor1
=
0
,
Cor2
=
0
,
Cor4
=
0
,
Cor5
=
0
;
u8
TxXon
=
0
,
TxXoff
=
0
,
RxXon
=
0
,
RxXoff
=
0
;
...
...
@@ -235,7 +235,7 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
rio_dprintk
(
RIO_DEBUG_PARAM
,
"can_add_transmit() returns %x
\n
"
,
res
);
rio_dprintk
(
RIO_DEBUG_PARAM
,
"Packet is %p
\n
"
,
PacketP
);
phb_param_ptr
=
(
struct
phb_param
*
)
PacketP
->
data
;
phb_param_ptr
=
(
struct
phb_param
__iomem
*
)
PacketP
->
data
;
switch
(
TtyP
->
termios
->
c_cflag
&
CSIZE
)
{
...
...
@@ -580,11 +580,11 @@ int RIOParam(struct Port *PortP, int cmd, int Modem, int SleepFlag)
** 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
(
struct
PKT
**
PktP
,
struct
Port
*
PortP
)
int
can_add_transmit
(
struct
PKT
__iomem
**
PktP
,
struct
Port
*
PortP
)
{
struct
PKT
*
tp
;
struct
PKT
__iomem
*
tp
;
*
PktP
=
tp
=
(
struct
PKT
*
)
RIO_PTR
(
PortP
->
Caddr
,
readw
(
PortP
->
TxAdd
));
*
PktP
=
tp
=
(
struct
PKT
__iomem
*
)
RIO_PTR
(
PortP
->
Caddr
,
readw
(
PortP
->
TxAdd
));
return
!
((
unsigned
long
)
tp
&
PKT_IN_USE
);
}
...
...
@@ -608,9 +608,9 @@ void add_transmit(struct Port *PortP)
* Put a packet onto the end of the
* free list
****************************************/
void
put_free_end
(
struct
Host
*
HostP
,
struct
PKT
*
PktP
)
void
put_free_end
(
struct
Host
*
HostP
,
struct
PKT
__iomem
*
PktP
)
{
struct
rio_free_list
*
tmp_pointer
;
struct
rio_free_list
__iomem
*
tmp_pointer
;
unsigned
short
old_end
,
new_end
;
unsigned
long
flags
;
...
...
@@ -625,15 +625,15 @@ void put_free_end(struct Host *HostP, struct PKT *PktP)
if
((
old_end
=
readw
(
&
HostP
->
ParmMapP
->
free_list_end
))
!=
TPNULL
)
{
new_end
=
RIO_OFF
(
HostP
->
Caddr
,
PktP
);
tmp_pointer
=
(
struct
rio_free_list
*
)
RIO_PTR
(
HostP
->
Caddr
,
old_end
);
tmp_pointer
=
(
struct
rio_free_list
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
old_end
);
writew
(
new_end
,
&
tmp_pointer
->
next
);
writew
(
old_end
,
&
((
struct
rio_free_list
*
)
PktP
)
->
prev
);
writew
(
TPNULL
,
&
((
struct
rio_free_list
*
)
PktP
)
->
next
);
writew
(
old_end
,
&
((
struct
rio_free_list
__iomem
*
)
PktP
)
->
prev
);
writew
(
TPNULL
,
&
((
struct
rio_free_list
__iomem
*
)
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
=
(
struct
rio_free_list
*
)
PktP
;
tmp_pointer
=
(
struct
rio_free_list
__iomem
*
)
PktP
;
writew
(
TPNULL
,
&
tmp_pointer
->
prev
);
writew
(
TPNULL
,
&
tmp_pointer
->
next
);
}
...
...
@@ -647,10 +647,10 @@ void put_free_end(struct Host *HostP, struct PKT *PktP)
** 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
(
struct
PKT
**
PktP
,
struct
Port
*
PortP
)
int
can_remove_receive
(
struct
PKT
__iomem
**
PktP
,
struct
Port
*
PortP
)
{
if
(
readw
(
PortP
->
RxRemove
)
&
PKT_IN_USE
)
{
*
PktP
=
(
struct
PKT
*
)
RIO_PTR
(
PortP
->
Caddr
,
readw
(
PortP
->
RxRemove
)
&
~
PKT_IN_USE
);
*
PktP
=
(
struct
PKT
__iomem
*
)
RIO_PTR
(
PortP
->
Caddr
,
readw
(
PortP
->
RxRemove
)
&
~
PKT_IN_USE
);
return
1
;
}
return
0
;
...
...
drivers/char/rio/rioroute.c
浏览文件 @
d886cb58
...
...
@@ -86,9 +86,9 @@ static void RIOConCon(struct rio_info *, struct Host *, unsigned int, unsigned i
** Incoming on the ROUTE_RUP
** I wrote this while I was tired. Forgive me.
*/
int
RIORouteRup
(
struct
rio_info
*
p
,
unsigned
int
Rup
,
struct
Host
*
HostP
,
struct
PKT
*
PacketP
)
int
RIORouteRup
(
struct
rio_info
*
p
,
unsigned
int
Rup
,
struct
Host
*
HostP
,
struct
PKT
__iomem
*
PacketP
)
{
struct
PktCmd
*
PktCmdP
=
(
struct
PktCmd
*
)
PacketP
->
data
;
struct
PktCmd
__iomem
*
PktCmdP
=
(
struct
PktCmd
__iomem
*
)
PacketP
->
data
;
struct
PktCmd_M
*
PktReplyP
;
struct
CmdBlk
*
CmdBlkP
;
struct
Port
*
PortP
;
...
...
@@ -517,8 +517,8 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit)
for
(
port
=
0
;
port
<
PORTS_PER_RTA
;
port
++
,
PortN
++
)
{
unsigned
short
dest_port
=
port
+
8
;
u16
*
TxPktP
;
struct
PKT
*
Pkt
;
u16
__iomem
*
TxPktP
;
struct
PKT
__iomem
*
Pkt
;
PortP
=
p
->
RIOPortp
[
PortN
];
...
...
@@ -555,12 +555,12 @@ void RIOFixPhbs(struct rio_info *p, struct Host *HostP, unsigned int unit)
** card. This needs to be translated into a 32 bit pointer
** so it can be accessed from the driver.
*/
Pkt
=
(
struct
PKT
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
TxPktP
));
Pkt
=
(
struct
PKT
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
TxPktP
));
/*
** If the packet is used, reset it.
*/
Pkt
=
(
struct
PKT
*
)
((
unsigned
long
)
Pkt
&
~
PKT_IN_USE
);
Pkt
=
(
struct
PKT
__iomem
*
)
((
unsigned
long
)
Pkt
&
~
PKT_IN_USE
);
writeb
(
dest_unit
,
&
Pkt
->
dest_unit
);
writeb
(
dest_port
,
&
Pkt
->
dest_port
);
}
...
...
drivers/char/rio/riotable.c
浏览文件 @
d886cb58
...
...
@@ -534,8 +534,8 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP)
if
(
PortP
->
SecondBlock
)
{
u16
dest_unit
=
HostMapP
->
ID
;
u16
dest_port
=
port
-
SysPort
;
u16
*
TxPktP
;
struct
PKT
*
Pkt
;
u16
__iomem
*
TxPktP
;
struct
PKT
__iomem
*
Pkt
;
for
(
TxPktP
=
PortP
->
TxStart
;
TxPktP
<=
PortP
->
TxEnd
;
TxPktP
++
)
{
/*
...
...
@@ -545,7 +545,7 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP)
** a 32 bit pointer so it can be
** accessed from the driver.
*/
Pkt
=
(
struct
PKT
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&*
TxPktP
));
Pkt
=
(
struct
PKT
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&*
TxPktP
));
rio_dprintk
(
RIO_DEBUG_TABLE
,
"Tx packet (%x) destination: Old %x:%x New %x:%x
\n
"
,
*
TxPktP
,
Pkt
->
dest_unit
,
Pkt
->
dest_port
,
dest_unit
,
dest_port
);
writew
(
dest_unit
,
&
Pkt
->
dest_unit
);
writew
(
dest_port
,
&
Pkt
->
dest_port
);
...
...
@@ -781,13 +781,13 @@ int RIOReMapPorts(struct rio_info *p, struct Host *HostP, struct Map *HostMapP)
** unless the host has been booted
*/
if
((
HostP
->
Flags
&
RUN_STATE
)
==
RC_RUNNING
)
{
struct
PHB
*
PhbP
=
PortP
->
PhbP
=
&
HostP
->
PhbP
[
HostPort
];
PortP
->
TxAdd
=
(
u16
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
tx_add
));
PortP
->
TxStart
=
(
u16
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
tx_start
));
PortP
->
TxEnd
=
(
u16
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
tx_end
));
PortP
->
RxRemove
=
(
u16
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
rx_remove
));
PortP
->
RxStart
=
(
u16
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
rx_start
));
PortP
->
RxEnd
=
(
u16
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
rx_end
));
struct
PHB
__iomem
*
PhbP
=
PortP
->
PhbP
=
&
HostP
->
PhbP
[
HostPort
];
PortP
->
TxAdd
=
(
u16
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
tx_add
));
PortP
->
TxStart
=
(
u16
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
tx_start
));
PortP
->
TxEnd
=
(
u16
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
tx_end
));
PortP
->
RxRemove
=
(
u16
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
rx_remove
));
PortP
->
RxStart
=
(
u16
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
rx_start
));
PortP
->
RxEnd
=
(
u16
__iomem
*
)
RIO_PTR
(
HostP
->
Caddr
,
readw
(
&
PhbP
->
rx_end
));
}
else
PortP
->
PhbP
=
NULL
;
...
...
drivers/char/rio/riotty.c
浏览文件 @
d886cb58
...
...
@@ -576,7 +576,7 @@ static void RIOClearUp(struct Port *PortP)
*/
int
RIOShortCommand
(
struct
rio_info
*
p
,
struct
Port
*
PortP
,
int
command
,
int
len
,
int
arg
)
{
struct
PKT
*
PacketP
;
struct
PKT
__iomem
*
PacketP
;
int
retries
=
20
;
/* at 10 per second -> 2 seconds */
unsigned
long
flags
;
...
...
drivers/char/rio/unixrup.h
浏览文件 @
d886cb58
...
...
@@ -44,7 +44,7 @@ static char *_unixrup_h_sccs_ = "@(#)unixrup.h 1.2";
struct
UnixRup
{
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 */
struct
RUP
__iomem
*
RupP
;
/* the Rup to send it to */
unsigned
int
Id
;
/* Id number */
unsigned
int
BaseSysPort
;
/* SysPort of first tty on this RTA */
unsigned
int
ModTypes
;
/* Modules on this RTA */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录