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
cac19703
Commit
cac19703
authored
Mar 31, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fusion: switch to ->show_info()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
09dae7fc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
95 deletions
+11
-95
drivers/message/fusion/mptfc.c
drivers/message/fusion/mptfc.c
+1
-1
drivers/message/fusion/mptsas.c
drivers/message/fusion/mptsas.c
+1
-1
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptscsih.c
+7
-91
drivers/message/fusion/mptscsih.h
drivers/message/fusion/mptscsih.h
+1
-1
drivers/message/fusion/mptspi.c
drivers/message/fusion/mptspi.c
+1
-1
No files found.
drivers/message/fusion/mptfc.c
View file @
cac19703
...
@@ -109,7 +109,7 @@ static int mptfc_host_reset(struct scsi_cmnd *SCpnt);
...
@@ -109,7 +109,7 @@ static int mptfc_host_reset(struct scsi_cmnd *SCpnt);
static
struct
scsi_host_template
mptfc_driver_template
=
{
static
struct
scsi_host_template
mptfc_driver_template
=
{
.
module
=
THIS_MODULE
,
.
module
=
THIS_MODULE
,
.
proc_name
=
"mptfc"
,
.
proc_name
=
"mptfc"
,
.
proc_info
=
mptscsih_proc
_info
,
.
show_info
=
mptscsih_show
_info
,
.
name
=
"MPT FC Host"
,
.
name
=
"MPT FC Host"
,
.
info
=
mptscsih_info
,
.
info
=
mptscsih_info
,
.
queuecommand
=
mptfc_qcmd
,
.
queuecommand
=
mptfc_qcmd
,
...
...
drivers/message/fusion/mptsas.c
View file @
cac19703
...
@@ -1977,7 +1977,7 @@ static enum blk_eh_timer_return mptsas_eh_timed_out(struct scsi_cmnd *sc)
...
@@ -1977,7 +1977,7 @@ static enum blk_eh_timer_return mptsas_eh_timed_out(struct scsi_cmnd *sc)
static
struct
scsi_host_template
mptsas_driver_template
=
{
static
struct
scsi_host_template
mptsas_driver_template
=
{
.
module
=
THIS_MODULE
,
.
module
=
THIS_MODULE
,
.
proc_name
=
"mptsas"
,
.
proc_name
=
"mptsas"
,
.
proc_info
=
mptscsih_proc
_info
,
.
show_info
=
mptscsih_show
_info
,
.
name
=
"MPT SAS Host"
,
.
name
=
"MPT SAS Host"
,
.
info
=
mptscsih_info
,
.
info
=
mptscsih_info
,
.
queuecommand
=
mptsas_qcmd
,
.
queuecommand
=
mptsas_qcmd
,
...
...
drivers/message/fusion/mptscsih.c
View file @
cac19703
...
@@ -1284,101 +1284,17 @@ mptscsih_info(struct Scsi_Host *SChost)
...
@@ -1284,101 +1284,17 @@ mptscsih_info(struct Scsi_Host *SChost)
return
h
->
info_kbuf
;
return
h
->
info_kbuf
;
}
}
struct
info_str
{
int
mptscsih_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
host
)
char
*
buffer
;
int
length
;
int
offset
;
int
pos
;
};
static
void
mptscsih_copy_mem_info
(
struct
info_str
*
info
,
char
*
data
,
int
len
)
{
if
(
info
->
pos
+
len
>
info
->
length
)
len
=
info
->
length
-
info
->
pos
;
if
(
info
->
pos
+
len
<
info
->
offset
)
{
info
->
pos
+=
len
;
return
;
}
if
(
info
->
pos
<
info
->
offset
)
{
data
+=
(
info
->
offset
-
info
->
pos
);
len
-=
(
info
->
offset
-
info
->
pos
);
}
if
(
len
>
0
)
{
memcpy
(
info
->
buffer
+
info
->
pos
,
data
,
len
);
info
->
pos
+=
len
;
}
}
static
int
mptscsih_copy_info
(
struct
info_str
*
info
,
char
*
fmt
,
...)
{
va_list
args
;
char
buf
[
81
];
int
len
;
va_start
(
args
,
fmt
);
len
=
vsprintf
(
buf
,
fmt
,
args
);
va_end
(
args
);
mptscsih_copy_mem_info
(
info
,
buf
,
len
);
return
len
;
}
static
int
mptscsih_host_info
(
MPT_ADAPTER
*
ioc
,
char
*
pbuf
,
off_t
offset
,
int
len
)
{
struct
info_str
info
;
info
.
buffer
=
pbuf
;
info
.
length
=
len
;
info
.
offset
=
offset
;
info
.
pos
=
0
;
mptscsih_copy_info
(
&
info
,
"%s: %s, "
,
ioc
->
name
,
ioc
->
prod_name
);
mptscsih_copy_info
(
&
info
,
"%s%08xh, "
,
MPT_FW_REV_MAGIC_ID_STRING
,
ioc
->
facts
.
FWVersion
.
Word
);
mptscsih_copy_info
(
&
info
,
"Ports=%d, "
,
ioc
->
facts
.
NumberOfPorts
);
mptscsih_copy_info
(
&
info
,
"MaxQ=%d
\n
"
,
ioc
->
req_depth
);
return
((
info
.
pos
>
info
.
offset
)
?
info
.
pos
-
info
.
offset
:
0
);
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/**
* mptscsih_proc_info - Return information about MPT adapter
* @host: scsi host struct
* @buffer: if write, user data; if read, buffer for user
* @start: returns the buffer address
* @offset: if write, 0; if read, the current offset into the buffer from
* the previous read.
* @length: if write, return length;
* @func: write = 1; read = 0
*
* (linux scsi_host_template.info routine)
*/
int
mptscsih_proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
func
)
{
{
MPT_SCSI_HOST
*
hd
=
shost_priv
(
host
);
MPT_SCSI_HOST
*
hd
=
shost_priv
(
host
);
MPT_ADAPTER
*
ioc
=
hd
->
ioc
;
MPT_ADAPTER
*
ioc
=
hd
->
ioc
;
int
size
=
0
;
if
(
func
)
{
seq_printf
(
m
,
"%s: %s, "
,
ioc
->
name
,
ioc
->
prod_name
);
/*
seq_printf
(
m
,
"%s%08xh, "
,
MPT_FW_REV_MAGIC_ID_STRING
,
ioc
->
facts
.
FWVersion
.
Word
);
* write is not supported
seq_printf
(
m
,
"Ports=%d, "
,
ioc
->
facts
.
NumberOfPorts
);
*/
seq_printf
(
m
,
"MaxQ=%d
\n
"
,
ioc
->
req_depth
);
}
else
{
if
(
start
)
*
start
=
buffer
;
size
=
mptscsih_host_info
(
ioc
,
buffer
,
offset
,
length
);
}
return
size
;
return
0
;
}
}
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
...
@@ -3348,7 +3264,7 @@ EXPORT_SYMBOL(mptscsih_shutdown);
...
@@ -3348,7 +3264,7 @@ EXPORT_SYMBOL(mptscsih_shutdown);
EXPORT_SYMBOL
(
mptscsih_suspend
);
EXPORT_SYMBOL
(
mptscsih_suspend
);
EXPORT_SYMBOL
(
mptscsih_resume
);
EXPORT_SYMBOL
(
mptscsih_resume
);
#endif
#endif
EXPORT_SYMBOL
(
mptscsih_
proc
_info
);
EXPORT_SYMBOL
(
mptscsih_
show
_info
);
EXPORT_SYMBOL
(
mptscsih_info
);
EXPORT_SYMBOL
(
mptscsih_info
);
EXPORT_SYMBOL
(
mptscsih_qcmd
);
EXPORT_SYMBOL
(
mptscsih_qcmd
);
EXPORT_SYMBOL
(
mptscsih_slave_destroy
);
EXPORT_SYMBOL
(
mptscsih_slave_destroy
);
...
...
drivers/message/fusion/mptscsih.h
View file @
cac19703
...
@@ -111,7 +111,7 @@ extern void mptscsih_shutdown(struct pci_dev *);
...
@@ -111,7 +111,7 @@ extern void mptscsih_shutdown(struct pci_dev *);
extern
int
mptscsih_suspend
(
struct
pci_dev
*
pdev
,
pm_message_t
state
);
extern
int
mptscsih_suspend
(
struct
pci_dev
*
pdev
,
pm_message_t
state
);
extern
int
mptscsih_resume
(
struct
pci_dev
*
pdev
);
extern
int
mptscsih_resume
(
struct
pci_dev
*
pdev
);
#endif
#endif
extern
int
mptscsih_
proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
func
);
extern
int
mptscsih_
show_info
(
struct
seq_file
*
,
struct
Scsi_Host
*
);
extern
const
char
*
mptscsih_info
(
struct
Scsi_Host
*
SChost
);
extern
const
char
*
mptscsih_info
(
struct
Scsi_Host
*
SChost
);
extern
int
mptscsih_qcmd
(
struct
scsi_cmnd
*
SCpnt
,
void
(
*
done
)(
struct
scsi_cmnd
*
));
extern
int
mptscsih_qcmd
(
struct
scsi_cmnd
*
SCpnt
,
void
(
*
done
)(
struct
scsi_cmnd
*
));
extern
int
mptscsih_IssueTaskMgmt
(
MPT_SCSI_HOST
*
hd
,
u8
type
,
u8
channel
,
extern
int
mptscsih_IssueTaskMgmt
(
MPT_SCSI_HOST
*
hd
,
u8
type
,
u8
channel
,
...
...
drivers/message/fusion/mptspi.c
View file @
cac19703
...
@@ -831,7 +831,7 @@ static void mptspi_slave_destroy(struct scsi_device *sdev)
...
@@ -831,7 +831,7 @@ static void mptspi_slave_destroy(struct scsi_device *sdev)
static
struct
scsi_host_template
mptspi_driver_template
=
{
static
struct
scsi_host_template
mptspi_driver_template
=
{
.
module
=
THIS_MODULE
,
.
module
=
THIS_MODULE
,
.
proc_name
=
"mptspi"
,
.
proc_name
=
"mptspi"
,
.
proc_info
=
mptscsih_proc
_info
,
.
show_info
=
mptscsih_show
_info
,
.
name
=
"MPT SPI Host"
,
.
name
=
"MPT SPI Host"
,
.
info
=
mptscsih_info
,
.
info
=
mptscsih_info
,
.
queuecommand
=
mptspi_qcmd
,
.
queuecommand
=
mptspi_qcmd
,
...
...
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