Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
8c986544
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
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看板
提交
8c986544
编写于
3月 31, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
eata_pio: switch to ->show_info()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
e633c1e5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
46 deletion
+10
-46
drivers/scsi/eata_pio.c
drivers/scsi/eata_pio.c
+10
-46
未找到文件。
drivers/scsi/eata_pio.c
浏览文件 @
8c986544
...
@@ -92,58 +92,22 @@ static unsigned long queue_counter;
...
@@ -92,58 +92,22 @@ static unsigned long queue_counter;
static
struct
scsi_host_template
driver_template
;
static
struct
scsi_host_template
driver_template
;
/*
static
int
eata_pio_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
shost
)
* eata_proc_info
* inout : decides on the direction of the dataflow and the meaning of the
* variables
* buffer: If inout==FALSE data is being written to it else read from it
* *start: If inout==FALSE start of the valid data in the buffer
* offset: If inout==FALSE offset from the beginning of the imaginary file
* from which we start writing into the buffer
* length: If inout==FALSE max number of bytes to be written into the buffer
* else number of bytes in the buffer
*/
static
int
eata_pio_proc_info
(
struct
Scsi_Host
*
shost
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
rw
)
{
{
int
len
=
0
;
seq_printf
(
m
,
"EATA (Extended Attachment) PIO driver version: "
off_t
begin
=
0
,
pos
=
0
;
if
(
rw
)
return
-
ENOSYS
;
len
+=
sprintf
(
buffer
+
len
,
"EATA (Extended Attachment) PIO driver version: "
"%d.%d%s
\n
"
,
VER_MAJOR
,
VER_MINOR
,
VER_SUB
);
"%d.%d%s
\n
"
,
VER_MAJOR
,
VER_MINOR
,
VER_SUB
);
len
+=
sprintf
(
buffer
+
len
,
"queued commands: %10ld
\n
"
seq_printf
(
m
,
"queued commands: %10ld
\n
"
"processed interrupts:%10ld
\n
"
,
queue_counter
,
int_counter
);
"processed interrupts:%10ld
\n
"
,
queue_counter
,
int_counter
);
len
+=
sprintf
(
buffer
+
len
,
"
\n
scsi%-2d: HBA %.10s
\n
"
,
seq_printf
(
m
,
"
\n
scsi%-2d: HBA %.10s
\n
"
,
shost
->
host_no
,
SD
(
shost
)
->
name
);
shost
->
host_no
,
SD
(
shost
)
->
name
);
len
+=
sprintf
(
buffer
+
len
,
"Firmware revision: v%s
\n
"
,
seq_printf
(
m
,
"Firmware revision: v%s
\n
"
,
SD
(
shost
)
->
revision
);
SD
(
shost
)
->
revision
);
len
+=
sprintf
(
buffer
+
len
,
"IO: PIO
\n
"
);
seq_printf
(
m
,
"IO: PIO
\n
"
);
len
+=
sprintf
(
buffer
+
len
,
"Base IO : %#.4x
\n
"
,
(
u32
)
shost
->
base
);
seq_printf
(
m
,
"Base IO : %#.4x
\n
"
,
(
u32
)
shost
->
base
);
len
+=
sprintf
(
buffer
+
len
,
"Host Bus: %s
\n
"
,
seq_printf
(
m
,
"Host Bus: %s
\n
"
,
(
SD
(
shost
)
->
bustype
==
'P'
)
?
"PCI "
:
(
SD
(
shost
)
->
bustype
==
'P'
)
?
"PCI "
:
(
SD
(
shost
)
->
bustype
==
'E'
)
?
"EISA"
:
"ISA "
);
(
SD
(
shost
)
->
bustype
==
'E'
)
?
"EISA"
:
"ISA "
);
return
0
;
pos
=
begin
+
len
;
if
(
pos
<
offset
)
{
len
=
0
;
begin
=
pos
;
}
if
(
pos
>
offset
+
length
)
goto
stop_output
;
stop_output:
DBG
(
DBG_PROC
,
printk
(
"2pos: %ld offset: %ld len: %d
\n
"
,
pos
,
offset
,
len
));
*
start
=
buffer
+
(
offset
-
begin
);
/* Start of wanted data */
len
-=
(
offset
-
begin
);
/* Start slop */
if
(
len
>
length
)
len
=
length
;
/* Ending slop */
DBG
(
DBG_PROC
,
printk
(
"3pos: %ld offset: %ld len: %d
\n
"
,
pos
,
offset
,
len
));
return
len
;
}
}
static
int
eata_pio_release
(
struct
Scsi_Host
*
sh
)
static
int
eata_pio_release
(
struct
Scsi_Host
*
sh
)
...
@@ -985,7 +949,7 @@ static int eata_pio_detect(struct scsi_host_template *tpnt)
...
@@ -985,7 +949,7 @@ static int eata_pio_detect(struct scsi_host_template *tpnt)
static
struct
scsi_host_template
driver_template
=
{
static
struct
scsi_host_template
driver_template
=
{
.
proc_name
=
"eata_pio"
,
.
proc_name
=
"eata_pio"
,
.
name
=
"EATA (Extended Attachment) PIO driver"
,
.
name
=
"EATA (Extended Attachment) PIO driver"
,
.
proc_info
=
eata_pio_proc
_info
,
.
show_info
=
eata_pio_show
_info
,
.
detect
=
eata_pio_detect
,
.
detect
=
eata_pio_detect
,
.
release
=
eata_pio_release
,
.
release
=
eata_pio_release
,
.
queuecommand
=
eata_pio_queue
,
.
queuecommand
=
eata_pio_queue
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录