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
e3f5ec11
Commit
e3f5ec11
authored
Jul 05, 2011
by
Ben Hutchings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfc: Support variable-length response to MCDI GET_BOARD_CFG
Signed-off-by:
Ben Hutchings
<
bhutchings@solarflare.com
>
parent
bfeed902
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
drivers/net/ethernet/sfc/mcdi.c
drivers/net/ethernet/sfc/mcdi.c
+4
-2
drivers/net/ethernet/sfc/mtd.c
drivers/net/ethernet/sfc/mtd.c
+2
-1
No files found.
drivers/net/ethernet/sfc/mcdi.c
View file @
e3f5ec11
...
...
@@ -683,12 +683,14 @@ int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address,
if
(
mac_address
)
memcpy
(
mac_address
,
outbuf
+
offset
,
ETH_ALEN
);
if
(
fw_subtype_list
)
{
/* Byte-swap and truncate or zero-pad as necessary */
offset
=
MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST
;
for
(
i
=
0
;
i
<
MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_M
IN
NUM
;
i
<
MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_M
AX
NUM
;
i
++
)
{
fw_subtype_list
[
i
]
=
le16_to_cpup
((
__le16
*
)(
outbuf
+
offset
));
(
offset
+
2
<=
outlen
)
?
le16_to_cpup
((
__le16
*
)(
outbuf
+
offset
))
:
0
;
offset
+=
2
;
}
}
...
...
drivers/net/ethernet/sfc/mtd.c
View file @
e3f5ec11
...
...
@@ -627,7 +627,8 @@ static int siena_mtd_get_fw_subtypes(struct efx_nic *efx,
struct
efx_mtd
*
efx_mtd
)
{
struct
efx_mtd_partition
*
part
;
uint16_t
fw_subtype_list
[
MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM
];
uint16_t
fw_subtype_list
[
MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MAXNUM
];
int
rc
;
rc
=
efx_mcdi_get_board_cfg
(
efx
,
NULL
,
fw_subtype_list
,
NULL
);
...
...
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