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
nexedi
linux
Commits
f0002e95
Commit
f0002e95
authored
Mar 31, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aix7xxx_old: switch to ->show_info()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
3f025677
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
163 deletions
+60
-163
drivers/scsi/aic7xxx_old.c
drivers/scsi/aic7xxx_old.c
+1
-1
drivers/scsi/aic7xxx_old/aic7xxx_proc.c
drivers/scsi/aic7xxx_old/aic7xxx_proc.c
+59
-162
No files found.
drivers/scsi/aic7xxx_old.c
View file @
f0002e95
...
@@ -11108,7 +11108,7 @@ MODULE_VERSION(AIC7XXX_H_VERSION);
...
@@ -11108,7 +11108,7 @@ MODULE_VERSION(AIC7XXX_H_VERSION);
static
struct
scsi_host_template
driver_template
=
{
static
struct
scsi_host_template
driver_template
=
{
.
proc_info
=
aic7xxx_proc
_info
,
.
show_info
=
aic7xxx_show
_info
,
.
detect
=
aic7xxx_detect
,
.
detect
=
aic7xxx_detect
,
.
release
=
aic7xxx_release
,
.
release
=
aic7xxx_release
,
.
info
=
aic7xxx_info
,
.
info
=
aic7xxx_info
,
...
...
drivers/scsi/aic7xxx_old/aic7xxx_proc.c
View file @
f0002e95
...
@@ -30,62 +30,23 @@
...
@@ -30,62 +30,23 @@
*-M*************************************************************************/
*-M*************************************************************************/
#define BLS (&aic7xxx_buffer[size])
#define HDRB \
#define HDRB \
" 0 - 4K 4 - 16K 16 - 64K 64 - 256K 256K - 1M 1M+"
" 0 - 4K 4 - 16K 16 - 64K 64 - 256K 256K - 1M 1M+"
#ifdef PROC_DEBUG
extern
int
vsprintf
(
char
*
,
const
char
*
,
va_list
);
static
void
proc_debug
(
const
char
*
fmt
,
...)
{
va_list
ap
;
char
buf
[
256
];
va_start
(
ap
,
fmt
);
vsprintf
(
buf
,
fmt
,
ap
);
printk
(
buf
);
va_end
(
ap
);
}
#else
/* PROC_DEBUG */
# define proc_debug(fmt, args...)
#endif
/* PROC_DEBUG */
static
int
aic7xxx_buffer_size
=
0
;
static
char
*
aic7xxx_buffer
=
NULL
;
/*+F*************************************************************************
* Function:
* aic7xxx_set_info
*
* Description:
* Set parameters for the driver from the /proc filesystem.
*-F*************************************************************************/
static
int
aic7xxx_set_info
(
char
*
buffer
,
int
length
,
struct
Scsi_Host
*
HBAptr
)
{
proc_debug
(
"aic7xxx_set_info(): %s
\n
"
,
buffer
);
return
(
-
ENOSYS
);
/* Currently this is a no-op */
}
/*+F*************************************************************************
/*+F*************************************************************************
* Function:
* Function:
* aic7xxx_
proc
_info
* aic7xxx_
show
_info
*
*
* Description:
* Description:
* Return information to handle /proc support for the driver.
* Return information to handle /proc support for the driver.
*-F*************************************************************************/
*-F*************************************************************************/
int
int
aic7xxx_proc_info
(
struct
Scsi_Host
*
HBAptr
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
aic7xxx_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
HBAptr
)
int
inout
)
{
{
struct
aic7xxx_host
*
p
;
struct
aic7xxx_host
*
p
;
struct
aic_dev_data
*
aic_dev
;
struct
aic_dev_data
*
aic_dev
;
struct
scsi_device
*
sdptr
;
struct
scsi_device
*
sdptr
;
int
size
=
0
;
unsigned
char
i
;
unsigned
char
i
;
unsigned
char
tindex
;
unsigned
char
tindex
;
...
@@ -94,66 +55,21 @@ aic7xxx_proc_info ( struct Scsi_Host *HBAptr, char *buffer, char **start, off_t
...
@@ -94,66 +55,21 @@ aic7xxx_proc_info ( struct Scsi_Host *HBAptr, char *buffer, char **start, off_t
if
(
!
p
)
if
(
!
p
)
{
{
size
+=
sprintf
(
buffer
,
"Can't find adapter for host number %d
\n
"
,
HBAptr
->
host_no
);
seq_printf
(
m
,
"Can't find adapter for host number %d
\n
"
,
HBAptr
->
host_no
);
if
(
size
>
length
)
return
0
;
{
return
(
size
);
}
else
{
return
(
length
);
}
}
if
(
inout
==
TRUE
)
/* Has data been written to the file? */
{
return
(
aic7xxx_set_info
(
buffer
,
length
,
HBAptr
));
}
}
p
=
(
struct
aic7xxx_host
*
)
HBAptr
->
hostdata
;
p
=
(
struct
aic7xxx_host
*
)
HBAptr
->
hostdata
;
/*
seq_printf
(
m
,
"Adaptec AIC7xxx driver version: "
);
* It takes roughly 1K of space to hold all relevant card info, not
seq_printf
(
m
,
"%s/"
,
AIC7XXX_C_VERSION
);
* counting any proc stats, so we start out with a 1.5k buffer size and
seq_printf
(
m
,
"%s"
,
AIC7XXX_H_VERSION
);
* if proc_stats is defined, then we sweep the stats structure to see
seq_printf
(
m
,
"
\n
"
);
* how many drives we will be printing out for and add 384 bytes per
seq_printf
(
m
,
"Adapter Configuration:
\n
"
);
* device with active stats.
seq_printf
(
m
,
" SCSI Adapter: %s
\n
"
,
*
* Hmmmm...that 1.5k seems to keep growing as items get added so they
* can be easily viewed for debugging purposes. So, we bumped that
* 1.5k to 4k so we can quit having to bump it all the time.
*/
size
=
4096
;
list_for_each_entry
(
aic_dev
,
&
p
->
aic_devs
,
list
)
size
+=
512
;
if
(
aic7xxx_buffer_size
!=
size
)
{
if
(
aic7xxx_buffer
!=
NULL
)
{
kfree
(
aic7xxx_buffer
);
aic7xxx_buffer_size
=
0
;
}
aic7xxx_buffer
=
kmalloc
(
size
,
GFP_KERNEL
);
}
if
(
aic7xxx_buffer
==
NULL
)
{
size
=
sprintf
(
buffer
,
"AIC7xxx - kmalloc error at line %d
\n
"
,
__LINE__
);
return
size
;
}
aic7xxx_buffer_size
=
size
;
size
=
0
;
size
+=
sprintf
(
BLS
,
"Adaptec AIC7xxx driver version: "
);
size
+=
sprintf
(
BLS
,
"%s/"
,
AIC7XXX_C_VERSION
);
size
+=
sprintf
(
BLS
,
"%s"
,
AIC7XXX_H_VERSION
);
size
+=
sprintf
(
BLS
,
"
\n
"
);
size
+=
sprintf
(
BLS
,
"Adapter Configuration:
\n
"
);
size
+=
sprintf
(
BLS
,
" SCSI Adapter: %s
\n
"
,
board_names
[
p
->
board_name_index
]);
board_names
[
p
->
board_name_index
]);
if
(
p
->
flags
&
AHC_TWIN
)
if
(
p
->
flags
&
AHC_TWIN
)
s
ize
+=
sprintf
(
BLS
,
" Twin Channel Controller "
);
s
eq_printf
(
m
,
" Twin Channel Controller "
);
else
else
{
{
char
*
channel
=
""
;
char
*
channel
=
""
;
...
@@ -184,86 +100,86 @@ aic7xxx_proc_info ( struct Scsi_Host *HBAptr, char *buffer, char **start, off_t
...
@@ -184,86 +100,86 @@ aic7xxx_proc_info ( struct Scsi_Host *HBAptr, char *buffer, char **start, off_t
ultra
=
"Ultra-2 LVD/SE "
;
ultra
=
"Ultra-2 LVD/SE "
;
else
if
(
p
->
features
&
AHC_ULTRA
)
else
if
(
p
->
features
&
AHC_ULTRA
)
ultra
=
"Ultra "
;
ultra
=
"Ultra "
;
s
ize
+=
sprintf
(
BLS
,
" %s%sController%s "
,
s
eq_printf
(
m
,
" %s%sController%s "
,
ultra
,
wide
,
channel
);
ultra
,
wide
,
channel
);
}
}
switch
(
p
->
chip
&
~
AHC_CHIPID_MASK
)
switch
(
p
->
chip
&
~
AHC_CHIPID_MASK
)
{
{
case
AHC_VL
:
case
AHC_VL
:
s
ize
+=
sprintf
(
BLS
,
"at VLB slot %d
\n
"
,
p
->
pci_device_fn
);
s
eq_printf
(
m
,
"at VLB slot %d
\n
"
,
p
->
pci_device_fn
);
break
;
break
;
case
AHC_EISA
:
case
AHC_EISA
:
s
ize
+=
sprintf
(
BLS
,
"at EISA slot %d
\n
"
,
p
->
pci_device_fn
);
s
eq_printf
(
m
,
"at EISA slot %d
\n
"
,
p
->
pci_device_fn
);
break
;
break
;
default:
default:
s
ize
+=
sprintf
(
BLS
,
"at PCI %d/%d/%d
\n
"
,
p
->
pci_bus
,
s
eq_printf
(
m
,
"at PCI %d/%d/%d
\n
"
,
p
->
pci_bus
,
PCI_SLOT
(
p
->
pci_device_fn
),
PCI_FUNC
(
p
->
pci_device_fn
));
PCI_SLOT
(
p
->
pci_device_fn
),
PCI_FUNC
(
p
->
pci_device_fn
));
break
;
break
;
}
}
if
(
!
(
p
->
maddr
)
)
if
(
!
(
p
->
maddr
)
)
{
{
s
ize
+=
sprintf
(
BLS
,
" Programmed I/O Base: %lx
\n
"
,
p
->
base
);
s
eq_printf
(
m
,
" Programmed I/O Base: %lx
\n
"
,
p
->
base
);
}
}
else
else
{
{
s
ize
+=
sprintf
(
BLS
,
" PCI MMAPed I/O Base: 0x%lx
\n
"
,
p
->
mbase
);
s
eq_printf
(
m
,
" PCI MMAPed I/O Base: 0x%lx
\n
"
,
p
->
mbase
);
}
}
if
(
(
p
->
chip
&
(
AHC_VL
|
AHC_EISA
))
)
if
(
(
p
->
chip
&
(
AHC_VL
|
AHC_EISA
))
)
{
{
s
ize
+=
sprintf
(
BLS
,
" BIOS Memory Address: 0x%08x
\n
"
,
p
->
bios_address
);
s
eq_printf
(
m
,
" BIOS Memory Address: 0x%08x
\n
"
,
p
->
bios_address
);
}
}
s
ize
+=
sprintf
(
BLS
,
" Adapter SEEPROM Config: %s
\n
"
,
s
eq_printf
(
m
,
" Adapter SEEPROM Config: %s
\n
"
,
(
p
->
flags
&
AHC_SEEPROM_FOUND
)
?
"SEEPROM found and used."
:
(
p
->
flags
&
AHC_SEEPROM_FOUND
)
?
"SEEPROM found and used."
:
((
p
->
flags
&
AHC_USEDEFAULTS
)
?
"SEEPROM not found, using defaults."
:
((
p
->
flags
&
AHC_USEDEFAULTS
)
?
"SEEPROM not found, using defaults."
:
"SEEPROM not found, using leftover BIOS values."
)
);
"SEEPROM not found, using leftover BIOS values."
)
);
s
ize
+=
sprintf
(
BLS
,
" Adaptec SCSI BIOS: %s
\n
"
,
s
eq_printf
(
m
,
" Adaptec SCSI BIOS: %s
\n
"
,
(
p
->
flags
&
AHC_BIOS_ENABLED
)
?
"Enabled"
:
"Disabled"
);
(
p
->
flags
&
AHC_BIOS_ENABLED
)
?
"Enabled"
:
"Disabled"
);
s
ize
+=
sprintf
(
BLS
,
" IRQ: %d
\n
"
,
HBAptr
->
irq
);
s
eq_printf
(
m
,
" IRQ: %d
\n
"
,
HBAptr
->
irq
);
s
ize
+=
sprintf
(
BLS
,
" SCBs: Active %d, Max Active %d,
\n
"
,
s
eq_printf
(
m
,
" SCBs: Active %d, Max Active %d,
\n
"
,
p
->
activescbs
,
p
->
max_activescbs
);
p
->
activescbs
,
p
->
max_activescbs
);
s
ize
+=
sprintf
(
BLS
,
" Allocated %d, HW %d, "
s
eq_printf
(
m
,
" Allocated %d, HW %d, "
"Page %d
\n
"
,
p
->
scb_data
->
numscbs
,
p
->
scb_data
->
maxhscbs
,
"Page %d
\n
"
,
p
->
scb_data
->
numscbs
,
p
->
scb_data
->
maxhscbs
,
p
->
scb_data
->
maxscbs
);
p
->
scb_data
->
maxscbs
);
if
(
p
->
flags
&
AHC_EXTERNAL_SRAM
)
if
(
p
->
flags
&
AHC_EXTERNAL_SRAM
)
s
ize
+=
sprintf
(
BLS
,
" Using External SCB SRAM
\n
"
);
s
eq_printf
(
m
,
" Using External SCB SRAM
\n
"
);
s
ize
+=
sprintf
(
BLS
,
" Interrupts: %ld"
,
p
->
isr_count
);
s
eq_printf
(
m
,
" Interrupts: %ld"
,
p
->
isr_count
);
if
(
p
->
chip
&
AHC_EISA
)
if
(
p
->
chip
&
AHC_EISA
)
{
{
s
ize
+=
sprintf
(
BLS
,
" %s
\n
"
,
s
eq_printf
(
m
,
" %s
\n
"
,
(
p
->
pause
&
IRQMS
)
?
"(Level Sensitive)"
:
"(Edge Triggered)"
);
(
p
->
pause
&
IRQMS
)
?
"(Level Sensitive)"
:
"(Edge Triggered)"
);
}
}
else
else
{
{
s
ize
+=
sprintf
(
BLS
,
"
\n
"
);
s
eq_printf
(
m
,
"
\n
"
);
}
}
s
ize
+=
sprintf
(
BLS
,
" BIOS Control Word: 0x%04x
\n
"
,
s
eq_printf
(
m
,
" BIOS Control Word: 0x%04x
\n
"
,
p
->
bios_control
);
p
->
bios_control
);
s
ize
+=
sprintf
(
BLS
,
" Adapter Control Word: 0x%04x
\n
"
,
s
eq_printf
(
m
,
" Adapter Control Word: 0x%04x
\n
"
,
p
->
adapter_control
);
p
->
adapter_control
);
s
ize
+=
sprintf
(
BLS
,
" Extended Translation: %sabled
\n
"
,
s
eq_printf
(
m
,
" Extended Translation: %sabled
\n
"
,
(
p
->
flags
&
AHC_EXTEND_TRANS_A
)
?
"En"
:
"Dis"
);
(
p
->
flags
&
AHC_EXTEND_TRANS_A
)
?
"En"
:
"Dis"
);
s
ize
+=
sprintf
(
BLS
,
"Disconnect Enable Flags: 0x%04x
\n
"
,
p
->
discenable
);
s
eq_printf
(
m
,
"Disconnect Enable Flags: 0x%04x
\n
"
,
p
->
discenable
);
if
(
p
->
features
&
(
AHC_ULTRA
|
AHC_ULTRA2
))
if
(
p
->
features
&
(
AHC_ULTRA
|
AHC_ULTRA2
))
{
{
s
ize
+=
sprintf
(
BLS
,
" Ultra Enable Flags: 0x%04x
\n
"
,
p
->
ultraenb
);
s
eq_printf
(
m
,
" Ultra Enable Flags: 0x%04x
\n
"
,
p
->
ultraenb
);
}
}
s
ize
+=
sprintf
(
BLS
,
"Default Tag Queue Depth: %d
\n
"
,
aic7xxx_default_queue_depth
);
s
eq_printf
(
m
,
"Default Tag Queue Depth: %d
\n
"
,
aic7xxx_default_queue_depth
);
s
ize
+=
sprintf
(
BLS
,
" Tagged Queue By Device array for aic7xxx host "
s
eq_printf
(
m
,
" Tagged Queue By Device array for aic7xxx host "
"instance %d:
\n
"
,
p
->
instance
);
"instance %d:
\n
"
,
p
->
instance
);
s
ize
+=
sprintf
(
BLS
,
" {"
);
s
eq_printf
(
m
,
" {"
);
for
(
i
=
0
;
i
<
(
MAX_TARGETS
-
1
);
i
++
)
for
(
i
=
0
;
i
<
(
MAX_TARGETS
-
1
);
i
++
)
s
ize
+=
sprintf
(
BLS
,
"%d,"
,
aic7xxx_tag_info
[
p
->
instance
].
tag_commands
[
i
]);
s
eq_printf
(
m
,
"%d,"
,
aic7xxx_tag_info
[
p
->
instance
].
tag_commands
[
i
]);
s
ize
+=
sprintf
(
BLS
,
"%d}
\n
"
,
aic7xxx_tag_info
[
p
->
instance
].
tag_commands
[
i
]);
s
eq_printf
(
m
,
"%d}
\n
"
,
aic7xxx_tag_info
[
p
->
instance
].
tag_commands
[
i
]);
s
ize
+=
sprintf
(
BLS
,
"
\n
"
);
s
eq_printf
(
m
,
"
\n
"
);
s
ize
+=
sprintf
(
BLS
,
"Statistics:
\n\n
"
);
s
eq_printf
(
m
,
"Statistics:
\n\n
"
);
list_for_each_entry
(
aic_dev
,
&
p
->
aic_devs
,
list
)
list_for_each_entry
(
aic_dev
,
&
p
->
aic_devs
,
list
)
{
{
sdptr
=
aic_dev
->
SDptr
;
sdptr
=
aic_dev
->
SDptr
;
tindex
=
sdptr
->
channel
<<
3
|
sdptr
->
id
;
tindex
=
sdptr
->
channel
<<
3
|
sdptr
->
id
;
s
ize
+=
sprintf
(
BLS
,
"(scsi%d:%d:%d:%d)
\n
"
,
s
eq_printf
(
m
,
"(scsi%d:%d:%d:%d)
\n
"
,
p
->
host_no
,
sdptr
->
channel
,
sdptr
->
id
,
sdptr
->
lun
);
p
->
host_no
,
sdptr
->
channel
,
sdptr
->
id
,
sdptr
->
lun
);
s
ize
+=
sprintf
(
BLS
,
" Device using %s/%s"
,
s
eq_printf
(
m
,
" Device using %s/%s"
,
(
aic_dev
->
cur
.
width
==
MSG_EXT_WDTR_BUS_16_BIT
)
?
(
aic_dev
->
cur
.
width
==
MSG_EXT_WDTR_BUS_16_BIT
)
?
"Wide"
:
"Narrow"
,
"Wide"
:
"Narrow"
,
(
aic_dev
->
cur
.
offset
!=
0
)
?
(
aic_dev
->
cur
.
offset
!=
0
)
?
...
@@ -279,78 +195,59 @@ aic7xxx_proc_info ( struct Scsi_Host *HBAptr, char *buffer, char **start, off_t
...
@@ -279,78 +195,59 @@ aic7xxx_proc_info ( struct Scsi_Host *HBAptr, char *buffer, char **start, off_t
sync_rate
=
aic7xxx_find_syncrate
(
p
,
&
period
,
0
,
&
options
);
sync_rate
=
aic7xxx_find_syncrate
(
p
,
&
period
,
0
,
&
options
);
if
(
sync_rate
!=
NULL
)
if
(
sync_rate
!=
NULL
)
{
{
s
ize
+=
sprintf
(
BLS
,
"%s MByte/sec, offset %d
\n
"
,
s
eq_printf
(
m
,
"%s MByte/sec, offset %d
\n
"
,
sync_rate
->
rate
[
rate
],
sync_rate
->
rate
[
rate
],
aic_dev
->
cur
.
offset
);
aic_dev
->
cur
.
offset
);
}
}
else
else
{
{
s
ize
+=
sprintf
(
BLS
,
"3.3 MByte/sec, offset %d
\n
"
,
s
eq_printf
(
m
,
"3.3 MByte/sec, offset %d
\n
"
,
aic_dev
->
cur
.
offset
);
aic_dev
->
cur
.
offset
);
}
}
}
}
s
ize
+=
sprintf
(
BLS
,
" Transinfo settings: "
);
s
eq_printf
(
m
,
" Transinfo settings: "
);
s
ize
+=
sprintf
(
BLS
,
"current(%d/%d/%d/%d), "
,
s
eq_printf
(
m
,
"current(%d/%d/%d/%d), "
,
aic_dev
->
cur
.
period
,
aic_dev
->
cur
.
period
,
aic_dev
->
cur
.
offset
,
aic_dev
->
cur
.
offset
,
aic_dev
->
cur
.
width
,
aic_dev
->
cur
.
width
,
aic_dev
->
cur
.
options
);
aic_dev
->
cur
.
options
);
s
ize
+=
sprintf
(
BLS
,
"goal(%d/%d/%d/%d), "
,
s
eq_printf
(
m
,
"goal(%d/%d/%d/%d), "
,
aic_dev
->
goal
.
period
,
aic_dev
->
goal
.
period
,
aic_dev
->
goal
.
offset
,
aic_dev
->
goal
.
offset
,
aic_dev
->
goal
.
width
,
aic_dev
->
goal
.
width
,
aic_dev
->
goal
.
options
);
aic_dev
->
goal
.
options
);
s
ize
+=
sprintf
(
BLS
,
"user(%d/%d/%d/%d)
\n
"
,
s
eq_printf
(
m
,
"user(%d/%d/%d/%d)
\n
"
,
p
->
user
[
tindex
].
period
,
p
->
user
[
tindex
].
period
,
p
->
user
[
tindex
].
offset
,
p
->
user
[
tindex
].
offset
,
p
->
user
[
tindex
].
width
,
p
->
user
[
tindex
].
width
,
p
->
user
[
tindex
].
options
);
p
->
user
[
tindex
].
options
);
if
(
sdptr
->
simple_tags
)
if
(
sdptr
->
simple_tags
)
{
{
s
ize
+=
sprintf
(
BLS
,
" Tagged Command Queueing Enabled, Ordered Tags %s, Depth %d/%d
\n
"
,
sdptr
->
ordered_tags
?
"Enabled"
:
"Disabled"
,
sdptr
->
queue_depth
,
aic_dev
->
max_q_depth
);
s
eq_printf
(
m
,
" Tagged Command Queueing Enabled, Ordered Tags %s, Depth %d/%d
\n
"
,
sdptr
->
ordered_tags
?
"Enabled"
:
"Disabled"
,
sdptr
->
queue_depth
,
aic_dev
->
max_q_depth
);
}
}
if
(
aic_dev
->
barrier_total
)
if
(
aic_dev
->
barrier_total
)
s
ize
+=
sprintf
(
BLS
,
" Total transfers %ld:
\n
(%ld/%ld/%ld/%ld reads/writes/REQ_BARRIER/Ordered Tags)
\n
"
,
s
eq_printf
(
m
,
" Total transfers %ld:
\n
(%ld/%ld/%ld/%ld reads/writes/REQ_BARRIER/Ordered Tags)
\n
"
,
aic_dev
->
r_total
+
aic_dev
->
w_total
,
aic_dev
->
r_total
,
aic_dev
->
w_total
,
aic_dev
->
r_total
+
aic_dev
->
w_total
,
aic_dev
->
r_total
,
aic_dev
->
w_total
,
aic_dev
->
barrier_total
,
aic_dev
->
ordered_total
);
aic_dev
->
barrier_total
,
aic_dev
->
ordered_total
);
else
else
s
ize
+=
sprintf
(
BLS
,
" Total transfers %ld:
\n
(%ld/%ld reads/writes)
\n
"
,
s
eq_printf
(
m
,
" Total transfers %ld:
\n
(%ld/%ld reads/writes)
\n
"
,
aic_dev
->
r_total
+
aic_dev
->
w_total
,
aic_dev
->
r_total
,
aic_dev
->
w_total
);
aic_dev
->
r_total
+
aic_dev
->
w_total
,
aic_dev
->
r_total
,
aic_dev
->
w_total
);
s
ize
+=
sprintf
(
BLS
,
"%s
\n
"
,
HDRB
);
s
eq_printf
(
m
,
"%s
\n
"
,
HDRB
);
s
ize
+=
sprintf
(
BLS
,
" Reads:"
);
s
eq_printf
(
m
,
" Reads:"
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
aic_dev
->
r_bins
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
aic_dev
->
r_bins
);
i
++
)
{
{
s
ize
+=
sprintf
(
BLS
,
" %10ld"
,
aic_dev
->
r_bins
[
i
]);
s
eq_printf
(
m
,
" %10ld"
,
aic_dev
->
r_bins
[
i
]);
}
}
s
ize
+=
sprintf
(
BLS
,
"
\n
"
);
s
eq_printf
(
m
,
"
\n
"
);
s
ize
+=
sprintf
(
BLS
,
" Writes:"
);
s
eq_printf
(
m
,
" Writes:"
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
aic_dev
->
w_bins
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
aic_dev
->
w_bins
);
i
++
)
{
{
size
+=
sprintf
(
BLS
,
" %10ld"
,
aic_dev
->
w_bins
[
i
]);
seq_printf
(
m
,
" %10ld"
,
aic_dev
->
w_bins
[
i
]);
}
size
+=
sprintf
(
BLS
,
"
\n
"
);
size
+=
sprintf
(
BLS
,
"
\n\n
"
);
}
if
(
size
>=
aic7xxx_buffer_size
)
{
printk
(
KERN_WARNING
"aic7xxx: Overflow in aic7xxx_proc.c
\n
"
);
}
if
(
offset
>
size
-
1
)
{
kfree
(
aic7xxx_buffer
);
aic7xxx_buffer
=
NULL
;
aic7xxx_buffer_size
=
length
=
0
;
*
start
=
NULL
;
}
}
else
seq_printf
(
m
,
"
\n
"
);
{
seq_printf
(
m
,
"
\n\n
"
);
*
start
=
buffer
;
length
=
min_t
(
int
,
length
,
size
-
offset
);
memcpy
(
buffer
,
&
aic7xxx_buffer
[
offset
],
length
);
}
}
return
0
;
return
(
length
);
}
}
/*
/*
...
...
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