diff options
author | Matthew Slattery <mslattery@solarflare.com> | 2010-07-14 15:36:19 +0100 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-01-27 00:10:49 +0000 |
commit | 6aa9c7f625e8ce07060467051b68fc068118ee64 (patch) | |
tree | c4a68f16a11c66b2a91079173e7a123137dc211a /drivers/net/ethernet/sfc/mcdi.c | |
parent | 5f3f9d6c441faa323444b2f6b092d630fcd7d04c (diff) |
sfc: Support extraction of CAPABILITIES from GET_BOARD_CFG response.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/mcdi.c')
-rw-r--r-- | drivers/net/ethernet/sfc/mcdi.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c index e5837a6485a..f1cad22b30f 100644 --- a/drivers/net/ethernet/sfc/mcdi.c +++ b/drivers/net/ethernet/sfc/mcdi.c @@ -678,7 +678,7 @@ fail: } int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, - u16 *fw_subtype_list) + u16 *fw_subtype_list, u32 *capabilities) { uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LENMIN]; size_t outlen; @@ -708,6 +708,14 @@ int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, outbuf + MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST, MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM * sizeof(fw_subtype_list[0])); + if (capabilities) { + if (port_num) + *capabilities = MCDI_DWORD(outbuf, + GET_BOARD_CFG_OUT_CAPABILITIES_PORT1); + else + *capabilities = MCDI_DWORD(outbuf, + GET_BOARD_CFG_OUT_CAPABILITIES_PORT0); + } return 0; |