Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC Bus
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC Bus
Commits
c5a26d61
Commit
c5a26d61
authored
Sep 05, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel/fmc: better dumping of sdb trees
parent
3853c388
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
fmc-sdb.c
kernel/fmc-sdb.c
+6
-8
No files found.
kernel/fmc-sdb.c
View file @
c5a26d61
...
...
@@ -44,8 +44,6 @@ static struct sdb_array *__fmc_scan_sdb_tree(struct fmc_device *fmc,
/* So, the magic was there: get the count from offset 4*/
onew
=
__sdb_rd
(
fmc
,
address
+
4
,
convert
);
n
=
__be16_to_cpu
(
*
(
uint16_t
*
)
&
onew
);
dev_info
(
fmc
->
hwdev
,
"address %lx, %i items (%08x) - c %i
\n
"
,
address
,
n
,
onew
,
convert
);
arr
=
kzalloc
(
sizeof
(
*
arr
),
GFP_KERNEL
);
if
(
arr
)
{
arr
->
record
=
kzalloc
(
sizeof
(
arr
->
record
[
0
])
*
n
,
GFP_KERNEL
);
...
...
@@ -123,7 +121,7 @@ int fmc_free_sdb_tree(struct fmc_device *fmc)
}
EXPORT_SYMBOL
(
fmc_free_sdb_tree
);
static
void
__fmc_show_sdb_tree
(
struct
sdb_array
*
arr
)
static
void
__fmc_show_sdb_tree
(
struct
fmc_device
*
fmc
,
struct
sdb_array
*
arr
)
{
int
i
,
j
,
n
=
arr
->
len
,
level
=
arr
->
level
;
struct
sdb_array
*
ap
;
...
...
@@ -133,15 +131,15 @@ static void __fmc_show_sdb_tree(struct sdb_array *arr)
union
sdb_record
*
r
;
struct
sdb_product
*
p
;
struct
sdb_component
*
c
;
for
(
j
=
0
;
j
<
level
;
j
++
)
printk
(
" "
);
r
=
&
arr
->
record
[
i
];
c
=
&
r
->
dev
.
sdb_component
;
p
=
&
c
->
product
;
base
=
0
;
for
(
ap
=
arr
;
ap
;
ap
=
ap
->
parent
)
base
+=
ap
->
baseaddr
;
dev_info
(
fmc
->
hwdev
,
"SDB: "
);
for
(
j
=
0
;
j
<
level
;
j
++
)
printk
(
" "
);
switch
(
r
->
empty
.
record_type
)
{
case
sdb_type_interconnect
:
printk
(
"%08llx:%08x %.19s
\n
"
,
...
...
@@ -168,7 +166,7 @@ static void __fmc_show_sdb_tree(struct sdb_array *arr)
PTR_ERR
(
arr
->
subtree
[
i
]));
break
;
}
__fmc_show_sdb_tree
(
arr
->
subtree
[
i
]);
__fmc_show_sdb_tree
(
fmc
,
arr
->
subtree
[
i
]);
break
;
case
sdb_type_integration
:
printk
(
"integration
\n
"
);
...
...
@@ -187,7 +185,7 @@ void fmc_show_sdb_tree(struct fmc_device *fmc)
{
if
(
!
fmc
->
sdb
)
return
;
__fmc_show_sdb_tree
(
fmc
->
sdb
);
__fmc_show_sdb_tree
(
fmc
,
fmc
->
sdb
);
}
EXPORT_SYMBOL
(
fmc_show_sdb_tree
);
...
...
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