Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
56b8e8e5
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
56b8e8e5
编写于
3月 31, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
acornscsi: switch to ->show_info()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
9d4e5c54
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
17 addition
and
41 deletion
+17
-41
drivers/scsi/arm/acornscsi.c
drivers/scsi/arm/acornscsi.c
+17
-41
未找到文件。
drivers/scsi/arm/acornscsi.c
浏览文件 @
56b8e8e5
...
@@ -2836,20 +2836,15 @@ char *acornscsi_info(struct Scsi_Host *host)
...
@@ -2836,20 +2836,15 @@ char *acornscsi_info(struct Scsi_Host *host)
return
string
;
return
string
;
}
}
int
acornscsi_proc_info
(
struct
Scsi_Host
*
instance
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
static
int
acornscsi_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
instance
)
int
length
,
int
inout
)
{
{
int
pos
,
begin
=
0
,
devidx
;
int
devidx
;
struct
scsi_device
*
scd
;
struct
scsi_device
*
scd
;
AS_Host
*
host
;
AS_Host
*
host
;
char
*
p
=
buffer
;
if
(
inout
==
1
)
return
-
EINVAL
;
host
=
(
AS_Host
*
)
instance
->
hostdata
;
host
=
(
AS_Host
*
)
instance
->
hostdata
;
p
+=
sprintf
(
p
,
"AcornSCSI driver v%d.%d.%d"
seq_printf
(
m
,
"AcornSCSI driver v%d.%d.%d"
#ifdef CONFIG_SCSI_ACORNSCSI_SYNC
#ifdef CONFIG_SCSI_ACORNSCSI_SYNC
" SYNC"
" SYNC"
#endif
#endif
...
@@ -2864,14 +2859,14 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
...
@@ -2864,14 +2859,14 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
#endif
#endif
"
\n\n
"
,
VER_MAJOR
,
VER_MINOR
,
VER_PATCH
);
"
\n\n
"
,
VER_MAJOR
,
VER_MINOR
,
VER_PATCH
);
p
+=
sprintf
(
p
,
"SBIC: WD33C93A Address: %p IRQ : %d
\n
"
,
seq_printf
(
m
,
"SBIC: WD33C93A Address: %p IRQ : %d
\n
"
,
host
->
base
+
SBIC_REGIDX
,
host
->
scsi
.
irq
);
host
->
base
+
SBIC_REGIDX
,
host
->
scsi
.
irq
);
#ifdef USE_DMAC
#ifdef USE_DMAC
p
+=
sprintf
(
p
,
"DMAC: uPC71071 Address: %p IRQ : %d
\n\n
"
,
seq_printf
(
m
,
"DMAC: uPC71071 Address: %p IRQ : %d
\n\n
"
,
host
->
base
+
DMAC_OFFSET
,
host
->
scsi
.
irq
);
host
->
base
+
DMAC_OFFSET
,
host
->
scsi
.
irq
);
#endif
#endif
p
+=
sprintf
(
p
,
"Statistics:
\n
"
seq_printf
(
m
,
"Statistics:
\n
"
"Queued commands: %-10u Issued commands: %-10u
\n
"
"Queued commands: %-10u Issued commands: %-10u
\n
"
"Done commands : %-10u Reads : %-10u
\n
"
"Done commands : %-10u Reads : %-10u
\n
"
"Writes : %-10u Others : %-10u
\n
"
"Writes : %-10u Others : %-10u
\n
"
...
@@ -2886,7 +2881,7 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
...
@@ -2886,7 +2881,7 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
for
(
devidx
=
0
;
devidx
<
9
;
devidx
++
)
{
for
(
devidx
=
0
;
devidx
<
9
;
devidx
++
)
{
unsigned
int
statptr
,
prev
;
unsigned
int
statptr
,
prev
;
p
+=
sprintf
(
p
,
"
\n
%c:"
,
devidx
==
8
?
'H'
:
(
'0'
+
devidx
));
seq_printf
(
m
,
"
\n
%c:"
,
devidx
==
8
?
'H'
:
(
'0'
+
devidx
));
statptr
=
host
->
status_ptr
[
devidx
]
-
10
;
statptr
=
host
->
status_ptr
[
devidx
]
-
10
;
if
((
signed
int
)
statptr
<
0
)
if
((
signed
int
)
statptr
<
0
)
...
@@ -2896,7 +2891,7 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
...
@@ -2896,7 +2891,7 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
for
(;
statptr
!=
host
->
status_ptr
[
devidx
];
statptr
=
(
statptr
+
1
)
&
(
STATUS_BUFFER_SIZE
-
1
))
{
for
(;
statptr
!=
host
->
status_ptr
[
devidx
];
statptr
=
(
statptr
+
1
)
&
(
STATUS_BUFFER_SIZE
-
1
))
{
if
(
host
->
status
[
devidx
][
statptr
].
when
)
{
if
(
host
->
status
[
devidx
][
statptr
].
when
)
{
p
+=
sprintf
(
p
,
"%c%02X:%02X+%2ld"
,
seq_printf
(
m
,
"%c%02X:%02X+%2ld"
,
host
->
status
[
devidx
][
statptr
].
irq
?
'-'
:
' '
,
host
->
status
[
devidx
][
statptr
].
irq
?
'-'
:
' '
,
host
->
status
[
devidx
][
statptr
].
ph
,
host
->
status
[
devidx
][
statptr
].
ph
,
host
->
status
[
devidx
][
statptr
].
ssr
,
host
->
status
[
devidx
][
statptr
].
ssr
,
...
@@ -2907,51 +2902,32 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
...
@@ -2907,51 +2902,32 @@ int acornscsi_proc_info(struct Scsi_Host *instance, char *buffer, char **start,
}
}
}
}
p
+=
sprintf
(
p
,
"
\n
Attached devices:
\n
"
);
seq_printf
(
m
,
"
\n
Attached devices:
\n
"
);
shost_for_each_device
(
scd
,
instance
)
{
shost_for_each_device
(
scd
,
instance
)
{
p
+=
sprintf
(
p
,
"Device/Lun TaggedQ Sync
\n
"
);
seq_printf
(
m
,
"Device/Lun TaggedQ Sync
\n
"
);
p
+=
sprintf
(
p
,
" %d/%d "
,
scd
->
id
,
scd
->
lun
);
seq_printf
(
m
,
" %d/%d "
,
scd
->
id
,
scd
->
lun
);
if
(
scd
->
tagged_supported
)
if
(
scd
->
tagged_supported
)
p
+=
sprintf
(
p
,
"%3sabled(%3d) "
,
seq_printf
(
m
,
"%3sabled(%3d) "
,
scd
->
simple_tags
?
"en"
:
"dis"
,
scd
->
simple_tags
?
"en"
:
"dis"
,
scd
->
current_tag
);
scd
->
current_tag
);
else
else
p
+=
sprintf
(
p
,
"unsupported "
);
seq_printf
(
m
,
"unsupported "
);
if
(
host
->
device
[
scd
->
id
].
sync_xfer
&
15
)
if
(
host
->
device
[
scd
->
id
].
sync_xfer
&
15
)
p
+=
sprintf
(
p
,
"offset %d, %d ns
\n
"
,
seq_printf
(
m
,
"offset %d, %d ns
\n
"
,
host
->
device
[
scd
->
id
].
sync_xfer
&
15
,
host
->
device
[
scd
->
id
].
sync_xfer
&
15
,
acornscsi_getperiod
(
host
->
device
[
scd
->
id
].
sync_xfer
));
acornscsi_getperiod
(
host
->
device
[
scd
->
id
].
sync_xfer
));
else
else
p
+=
sprintf
(
p
,
"async
\n
"
);
seq_printf
(
m
,
"async
\n
"
);
pos
=
p
-
buffer
;
if
(
pos
+
begin
<
offset
)
{
begin
+=
pos
;
p
=
buffer
;
}
pos
=
p
-
buffer
;
if
(
pos
+
begin
>
offset
+
length
)
{
scsi_device_put
(
scd
);
break
;
}
}
}
return
0
;
pos
=
p
-
buffer
;
*
start
=
buffer
+
(
offset
-
begin
);
pos
-=
offset
-
begin
;
if
(
pos
>
length
)
pos
=
length
;
return
pos
;
}
}
static
struct
scsi_host_template
acornscsi_template
=
{
static
struct
scsi_host_template
acornscsi_template
=
{
.
module
=
THIS_MODULE
,
.
module
=
THIS_MODULE
,
.
proc_info
=
acornscsi_proc
_info
,
.
show_info
=
acornscsi_show
_info
,
.
name
=
"AcornSCSI"
,
.
name
=
"AcornSCSI"
,
.
info
=
acornscsi_info
,
.
info
=
acornscsi_info
,
.
queuecommand
=
acornscsi_queuecmd
,
.
queuecommand
=
acornscsi_queuecmd
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录