Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
8c986544
Commit
8c986544
authored
Mar 31, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eata_pio: switch to ->show_info()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
e633c1e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
46 deletions
+10
-46
drivers/scsi/eata_pio.c
drivers/scsi/eata_pio.c
+10
-46
No files found.
drivers/scsi/eata_pio.c
View file @
8c986544
...
...
@@ -92,58 +92,22 @@ static unsigned long queue_counter;
static
struct
scsi_host_template
driver_template
;
/*
* 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
)
static
int
eata_pio_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
shost
)
{
int
len
=
0
;
off_t
begin
=
0
,
pos
=
0
;
if
(
rw
)
return
-
ENOSYS
;
len
+=
sprintf
(
buffer
+
len
,
"EATA (Extended Attachment) PIO driver version: "
seq_printf
(
m
,
"EATA (Extended Attachment) PIO driver version: "
"%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
);
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
);
len
+=
sprintf
(
buffer
+
len
,
"Firmware revision: v%s
\n
"
,
seq_printf
(
m
,
"Firmware revision: v%s
\n
"
,
SD
(
shost
)
->
revision
);
len
+=
sprintf
(
buffer
+
len
,
"IO: PIO
\n
"
);
len
+=
sprintf
(
buffer
+
len
,
"Base IO : %#.4x
\n
"
,
(
u32
)
shost
->
base
);
len
+=
sprintf
(
buffer
+
len
,
"Host Bus: %s
\n
"
,
seq_printf
(
m
,
"IO: PIO
\n
"
);
seq_printf
(
m
,
"Base IO : %#.4x
\n
"
,
(
u32
)
shost
->
base
);
seq_printf
(
m
,
"Host Bus: %s
\n
"
,
(
SD
(
shost
)
->
bustype
==
'P'
)
?
"PCI "
:
(
SD
(
shost
)
->
bustype
==
'E'
)
?
"EISA"
:
"ISA "
);
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
;
return
0
;
}
static
int
eata_pio_release
(
struct
Scsi_Host
*
sh
)
...
...
@@ -985,7 +949,7 @@ static int eata_pio_detect(struct scsi_host_template *tpnt)
static
struct
scsi_host_template
driver_template
=
{
.
proc_name
=
"eata_pio"
,
.
name
=
"EATA (Extended Attachment) PIO driver"
,
.
proc_info
=
eata_pio_proc
_info
,
.
show_info
=
eata_pio_show
_info
,
.
detect
=
eata_pio_detect
,
.
release
=
eata_pio_release
,
.
queuecommand
=
eata_pio_queue
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment