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
8349f7f6
Commit
8349f7f6
authored
Oct 16, 2013
by
Ben Hutchings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sfc: Store flags from MC_CMD_DRV_ATTACH for later use
Signed-off-by:
Ben Hutchings
<
bhutchings@solarflare.com
>
parent
ac36baf8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
drivers/net/ethernet/sfc/mcdi.c
drivers/net/ethernet/sfc/mcdi.c
+16
-2
drivers/net/ethernet/sfc/mcdi.h
drivers/net/ethernet/sfc/mcdi.h
+2
-0
No files found.
drivers/net/ethernet/sfc/mcdi.c
View file @
8349f7f6
...
@@ -1132,13 +1132,27 @@ static int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
...
@@ -1132,13 +1132,27 @@ static int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
goto
fail
;
goto
fail
;
}
}
if
(
driver_operating
)
{
if
(
outlen
>=
MC_CMD_DRV_ATTACH_EXT_OUT_LEN
)
{
efx
->
mcdi
->
fn_flags
=
MCDI_DWORD
(
outbuf
,
DRV_ATTACH_EXT_OUT_FUNC_FLAGS
);
}
else
{
/* Synthesise flags for Siena */
efx
->
mcdi
->
fn_flags
=
1
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL
|
1
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED
|
(
efx_port_num
(
efx
)
==
0
)
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY
;
}
}
/* We currently assume we have control of the external link
/* We currently assume we have control of the external link
* and are completely trusted by firmware. Abort probing
* and are completely trusted by firmware. Abort probing
* if that's not true for this function.
* if that's not true for this function.
*/
*/
if
(
driver_operating
&&
if
(
driver_operating
&&
outlen
>=
MC_CMD_DRV_ATTACH_EXT_OUT_LEN
&&
(
efx
->
mcdi
->
fn_flags
&
(
MCDI_DWORD
(
outbuf
,
DRV_ATTACH_EXT_OUT_FUNC_FLAGS
)
&
(
1
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL
|
(
1
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL
|
1
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED
))
!=
1
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED
))
!=
(
1
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL
|
(
1
<<
MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL
|
...
...
drivers/net/ethernet/sfc/mcdi.h
View file @
8349f7f6
...
@@ -94,12 +94,14 @@ struct efx_mcdi_mtd_partition {
...
@@ -94,12 +94,14 @@ struct efx_mcdi_mtd_partition {
* struct efx_mcdi_data - extra state for NICs that implement MCDI
* struct efx_mcdi_data - extra state for NICs that implement MCDI
* @iface: Interface/protocol state
* @iface: Interface/protocol state
* @hwmon: Hardware monitor state
* @hwmon: Hardware monitor state
* @fn_flags: Flags for this function, as returned by %MC_CMD_DRV_ATTACH.
*/
*/
struct
efx_mcdi_data
{
struct
efx_mcdi_data
{
struct
efx_mcdi_iface
iface
;
struct
efx_mcdi_iface
iface
;
#ifdef CONFIG_SFC_MCDI_MON
#ifdef CONFIG_SFC_MCDI_MON
struct
efx_mcdi_mon
hwmon
;
struct
efx_mcdi_mon
hwmon
;
#endif
#endif
u32
fn_flags
;
};
};
#ifdef CONFIG_SFC_MCDI_MON
#ifdef CONFIG_SFC_MCDI_MON
...
...
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