Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
9d4e5c54
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看板
提交
9d4e5c54
编写于
3月 31, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fas216: switch to ->show_info()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
6b3a8bbf
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
49 addition
and
142 deletion
+49
-142
drivers/scsi/arm/arxescsi.c
drivers/scsi/arm/arxescsi.c
+7
-33
drivers/scsi/arm/cumana_2.c
drivers/scsi/arm/cumana_2.c
+9
-34
drivers/scsi/arm/eesox.c
drivers/scsi/arm/eesox.c
+9
-33
drivers/scsi/arm/fas216.c
drivers/scsi/arm/fas216.c
+12
-19
drivers/scsi/arm/fas216.h
drivers/scsi/arm/fas216.h
+3
-3
drivers/scsi/arm/powertec.c
drivers/scsi/arm/powertec.c
+9
-20
未找到文件。
drivers/scsi/arm/arxescsi.c
浏览文件 @
9d4e5c54
...
...
@@ -220,47 +220,21 @@ static const char *arxescsi_info(struct Scsi_Host *host)
return
string
;
}
/*
* Function: int arxescsi_proc_info(char *buffer, char **start, off_t offset,
* int length, int host_no, int inout)
* Purpose : Return information about the driver to a user process accessing
* the /proc filesystem.
* Params : buffer - a buffer to write information to
* start - a pointer into this buffer set by this routine to the start
* of the required information.
* offset - offset into information that we have read up to.
* length - length of buffer
* host_no - host number to return information for
* inout - 0 for reading, 1 for writing.
* Returns : length of data written to buffer.
*/
static
int
arxescsi_proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
)
arxescsi_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
host
)
{
struct
arxescsi_info
*
info
;
char
*
p
=
buffer
;
int
pos
;
info
=
(
struct
arxescsi_info
*
)
host
->
hostdata
;
if
(
inout
==
1
)
return
-
EINVAL
;
p
+=
sprintf
(
p
,
"ARXE 16-bit SCSI driver v%s
\n
"
,
VERSION
);
p
+=
fas216_print_host
(
&
info
->
info
,
p
);
p
+=
fas216_print_stats
(
&
info
->
info
,
p
);
p
+=
fas216_print_devices
(
&
info
->
info
,
p
);
*
start
=
buffer
+
offset
;
pos
=
p
-
buffer
-
offset
;
if
(
pos
>
length
)
pos
=
length
;
return
pos
;
seq_printf
(
m
,
"ARXE 16-bit SCSI driver v%s
\n
"
,
VERSION
);
fas216_print_host
(
&
info
->
info
,
m
);
fas216_print_stats
(
&
info
->
info
,
m
);
fas216_print_devices
(
&
info
->
info
,
m
);
return
0
;
}
static
struct
scsi_host_template
arxescsi_template
=
{
.
proc_info
=
arxescsi_proc
_info
,
.
show_info
=
arxescsi_show
_info
,
.
name
=
"ARXE SCSI card"
,
.
info
=
arxescsi_info
,
.
queuecommand
=
fas216_noqueue_command
,
...
...
drivers/scsi/arm/cumana_2.c
浏览文件 @
9d4e5c54
...
...
@@ -337,50 +337,25 @@ cumanascsi_2_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
return
ret
;
}
/* Prototype: int cumanascsi_2_proc_info(char *buffer, char **start, off_t offset,
* int length, int host_no, int inout)
* Purpose : Return information about the driver to a user process accessing
* the /proc filesystem.
* Params : buffer - a buffer to write information to
* start - a pointer into this buffer set by this routine to the start
* of the required information.
* offset - offset into information that we have read up to.
* length - length of buffer
* host_no - host number to return information for
* inout - 0 for reading, 1 for writing.
* Returns : length of data written to buffer.
*/
int
cumanascsi_2_proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
)
static
int
cumanascsi_2_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
host
)
{
struct
cumanascsi2_info
*
info
;
char
*
p
=
buffer
;
int
pos
;
if
(
inout
==
1
)
return
cumanascsi_2_set_proc_info
(
host
,
buffer
,
length
);
info
=
(
struct
cumanascsi2_info
*
)
host
->
hostdata
;
p
+=
sprintf
(
p
,
"Cumana SCSI II driver v%s
\n
"
,
VERSION
);
p
+=
fas216_print_host
(
&
info
->
info
,
p
);
p
+=
sprintf
(
p
,
"Term : o%s
\n
"
,
seq_printf
(
m
,
"Cumana SCSI II driver v%s
\n
"
,
VERSION
);
fas216_print_host
(
&
info
->
info
,
m
);
seq_printf
(
m
,
"Term : o%s
\n
"
,
info
->
terms
?
"n"
:
"ff"
);
p
+=
fas216_print_stats
(
&
info
->
info
,
p
);
p
+=
fas216_print_devices
(
&
info
->
info
,
p
);
*
start
=
buffer
+
offset
;
pos
=
p
-
buffer
-
offset
;
if
(
pos
>
length
)
pos
=
length
;
return
pos
;
fas216_print_stats
(
&
info
->
info
,
m
);
fas216_print_devices
(
&
info
->
info
,
m
);
return
0
;
}
static
struct
scsi_host_template
cumanascsi2_template
=
{
.
module
=
THIS_MODULE
,
.
proc_info
=
cumanascsi_2_proc_info
,
.
show_info
=
cumanascsi_2_show_info
,
.
write_info
=
cumanascsi_2_set_proc_info
,
.
name
=
"Cumana SCSI II"
,
.
info
=
cumanascsi_2_info
,
.
queuecommand
=
fas216_queue_command
,
...
...
drivers/scsi/arm/eesox.c
浏览文件 @
9d4e5c54
...
...
@@ -422,45 +422,20 @@ eesoxscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
return
ret
;
}
/* Prototype: int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,
* int length, int host_no, int inout)
* Purpose : Return information about the driver to a user process accessing
* the /proc filesystem.
* Params : buffer - a buffer to write information to
* start - a pointer into this buffer set by this routine to the start
* of the required information.
* offset - offset into information that we have read up to.
* length - length of buffer
* host_no - host number to return information for
* inout - 0 for reading, 1 for writing.
* Returns : length of data written to buffer.
*/
int
eesoxscsi_proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
)
static
int
eesoxscsi_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
host
)
{
struct
eesoxscsi_info
*
info
;
char
*
p
=
buffer
;
int
pos
;
if
(
inout
==
1
)
return
eesoxscsi_set_proc_info
(
host
,
buffer
,
length
);
info
=
(
struct
eesoxscsi_info
*
)
host
->
hostdata
;
p
+=
sprintf
(
p
,
"EESOX SCSI driver v%s
\n
"
,
VERSION
);
p
+=
fas216_print_host
(
&
info
->
info
,
p
);
p
+=
sprintf
(
p
,
"Term : o%s
\n
"
,
seq_printf
(
m
,
"EESOX SCSI driver v%s
\n
"
,
VERSION
);
fas216_print_host
(
&
info
->
info
,
m
);
seq_printf
(
m
,
"Term : o%s
\n
"
,
info
->
control
&
EESOX_TERM_ENABLE
?
"n"
:
"ff"
);
p
+=
fas216_print_stats
(
&
info
->
info
,
p
);
p
+=
fas216_print_devices
(
&
info
->
info
,
p
);
*
start
=
buffer
+
offset
;
pos
=
p
-
buffer
-
offset
;
if
(
pos
>
length
)
pos
=
length
;
return
pos
;
fas216_print_stats
(
&
info
->
info
,
m
);
fas216_print_devices
(
&
info
->
info
,
m
);
return
0
;
}
static
ssize_t
eesoxscsi_show_term
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
...
...
@@ -498,7 +473,8 @@ static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR,
static
struct
scsi_host_template
eesox_template
=
{
.
module
=
THIS_MODULE
,
.
proc_info
=
eesoxscsi_proc_info
,
.
show_info
=
eesoxscsi_show_info
,
.
write_info
=
eesoxscsi_set_proc_info
,
.
name
=
"EESOX SCSI"
,
.
info
=
eesoxscsi_info
,
.
queuecommand
=
fas216_queue_command
,
...
...
drivers/scsi/arm/fas216.c
浏览文件 @
9d4e5c54
...
...
@@ -2958,9 +2958,9 @@ void fas216_release(struct Scsi_Host *host)
queue_free
(
&
info
->
queues
.
issue
);
}
int
fas216_print_host
(
FAS216_Info
*
info
,
char
*
buffer
)
void
fas216_print_host
(
FAS216_Info
*
info
,
struct
seq_file
*
m
)
{
return
sprintf
(
buffer
,
seq_printf
(
m
,
"
\n
"
"Chip : %s
\n
"
" Address: 0x%p
\n
"
...
...
@@ -2970,11 +2970,9 @@ int fas216_print_host(FAS216_Info *info, char *buffer)
info
->
scsi
.
irq
,
info
->
scsi
.
dma
);
}
int
fas216_print_stats
(
FAS216_Info
*
info
,
char
*
buffer
)
void
fas216_print_stats
(
FAS216_Info
*
info
,
struct
seq_file
*
m
)
{
char
*
p
=
buffer
;
p
+=
sprintf
(
p
,
"
\n
"
seq_printf
(
m
,
"
\n
"
"Command Statistics:
\n
"
" Queued : %u
\n
"
" Issued : %u
\n
"
...
...
@@ -2991,38 +2989,33 @@ int fas216_print_stats(FAS216_Info *info, char *buffer)
info
->
stats
.
writes
,
info
->
stats
.
miscs
,
info
->
stats
.
disconnects
,
info
->
stats
.
aborts
,
info
->
stats
.
bus_resets
,
info
->
stats
.
host_resets
);
return
p
-
buffer
;
}
int
fas216_print_devices
(
FAS216_Info
*
info
,
char
*
buffer
)
void
fas216_print_devices
(
FAS216_Info
*
info
,
struct
seq_file
*
m
)
{
struct
fas216_device
*
dev
;
struct
scsi_device
*
scd
;
char
*
p
=
buffer
;
p
+=
sprintf
(
p
,
"Device/Lun TaggedQ Parity Sync
\n
"
);
seq_printf
(
m
,
"Device/Lun TaggedQ Parity Sync
\n
"
);
shost_for_each_device
(
scd
,
info
->
host
)
{
dev
=
&
info
->
device
[
scd
->
id
];
p
+=
sprintf
(
p
,
" %d/%d "
,
scd
->
id
,
scd
->
lun
);
seq_printf
(
m
,
" %d/%d "
,
scd
->
id
,
scd
->
lun
);
if
(
scd
->
tagged_supported
)
p
+=
sprintf
(
p
,
"%3sabled(%3d) "
,
seq_printf
(
m
,
"%3sabled(%3d) "
,
scd
->
simple_tags
?
"en"
:
"dis"
,
scd
->
current_tag
);
else
p
+=
sprintf
(
p
,
"unsupported "
);
seq_printf
(
m
,
"unsupported "
);
p
+=
sprintf
(
p
,
"%3sabled "
,
dev
->
parity_enabled
?
"en"
:
"dis"
);
seq_printf
(
m
,
"%3sabled "
,
dev
->
parity_enabled
?
"en"
:
"dis"
);
if
(
dev
->
sof
)
p
+=
sprintf
(
p
,
"offset %d, %d ns
\n
"
,
seq_printf
(
m
,
"offset %d, %d ns
\n
"
,
dev
->
sof
,
dev
->
period
*
4
);
else
p
+=
sprintf
(
p
,
"async
\n
"
);
seq_printf
(
m
,
"async
\n
"
);
}
return
p
-
buffer
;
}
EXPORT_SYMBOL
(
fas216_init
);
...
...
drivers/scsi/arm/fas216.h
浏览文件 @
9d4e5c54
...
...
@@ -358,9 +358,9 @@ extern void fas216_remove (struct Scsi_Host *instance);
*/
extern
void
fas216_release
(
struct
Scsi_Host
*
instance
);
extern
int
fas216_print_host
(
FAS216_Info
*
info
,
char
*
buffer
);
extern
int
fas216_print_stats
(
FAS216_Info
*
info
,
char
*
buffer
);
extern
int
fas216_print_devices
(
FAS216_Info
*
info
,
char
*
buffer
);
extern
void
fas216_print_host
(
FAS216_Info
*
info
,
struct
seq_file
*
m
);
extern
void
fas216_print_stats
(
FAS216_Info
*
info
,
struct
seq_file
*
m
);
extern
void
fas216_print_devices
(
FAS216_Info
*
info
,
struct
seq_file
*
m
);
/* Function: int fas216_eh_abort(struct scsi_cmnd *SCpnt)
* Purpose : abort this command
...
...
drivers/scsi/arm/powertec.c
浏览文件 @
9d4e5c54
...
...
@@ -237,32 +237,20 @@ powertecscsi_set_proc_info(struct Scsi_Host *host, char *buffer, int length)
* inout - 0 for reading, 1 for writing.
* Returns : length of data written to buffer.
*/
int
powertecscsi_proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
)
static
int
powertecscsi_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
host
)
{
struct
powertec_info
*
info
;
char
*
p
=
buffer
;
int
pos
;
if
(
inout
==
1
)
return
powertecscsi_set_proc_info
(
host
,
buffer
,
length
);
info
=
(
struct
powertec_info
*
)
host
->
hostdata
;
p
+=
sprintf
(
p
,
"PowerTec SCSI driver v%s
\n
"
,
VERSION
);
p
+=
fas216_print_host
(
&
info
->
info
,
p
);
p
+=
sprintf
(
p
,
"Term : o%s
\n
"
,
seq_printf
(
m
,
"PowerTec SCSI driver v%s
\n
"
,
VERSION
);
fas216_print_host
(
&
info
->
info
,
m
);
seq_printf
(
m
,
"Term : o%s
\n
"
,
info
->
term_ctl
?
"n"
:
"ff"
);
p
+=
fas216_print_stats
(
&
info
->
info
,
p
);
p
+=
fas216_print_devices
(
&
info
->
info
,
p
);
*
start
=
buffer
+
offset
;
pos
=
p
-
buffer
-
offset
;
if
(
pos
>
length
)
pos
=
length
;
return
pos
;
fas216_print_stats
(
&
info
->
info
,
m
);
fas216_print_devices
(
&
info
->
info
,
m
);
return
0
;
}
static
ssize_t
powertecscsi_show_term
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
...
...
@@ -291,7 +279,8 @@ static DEVICE_ATTR(bus_term, S_IRUGO | S_IWUSR,
static
struct
scsi_host_template
powertecscsi_template
=
{
.
module
=
THIS_MODULE
,
.
proc_info
=
powertecscsi_proc_info
,
.
show_info
=
powertecscsi_show_info
,
.
write_info
=
powertecscsi_set_proc_info
,
.
name
=
"PowerTec SCSI"
,
.
info
=
powertecscsi_info
,
.
queuecommand
=
fas216_queue_command
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录