aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorMatthew Slattery <mslattery@solarflare.com>2010-07-14 10:36:19 -0400
committerBen Hutchings <bhutchings@solarflare.com>2012-01-26 19:10:49 -0500
commit6aa9c7f625e8ce07060467051b68fc068118ee64 (patch)
treec4a68f16a11c66b2a91079173e7a123137dc211a /drivers/net/ethernet
parent5f3f9d6c441faa323444b2f6b092d630fcd7d04c (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')
-rw-r--r--drivers/net/ethernet/sfc/mcdi.c10
-rw-r--r--drivers/net/ethernet/sfc/mcdi.h2
-rw-r--r--drivers/net/ethernet/sfc/mtd.c2
-rw-r--r--drivers/net/ethernet/sfc/siena.c2
4 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sfc/mcdi.c b/drivers/net/ethernet/sfc/mcdi.c
index e5837a6485a1..f1cad22b30fa 100644
--- a/drivers/net/ethernet/sfc/mcdi.c
+++ b/drivers/net/ethernet/sfc/mcdi.c
@@ -678,7 +678,7 @@ fail:
678} 678}
679 679
680int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, 680int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address,
681 u16 *fw_subtype_list) 681 u16 *fw_subtype_list, u32 *capabilities)
682{ 682{
683 uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LENMIN]; 683 uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LENMIN];
684 size_t outlen; 684 size_t outlen;
@@ -708,6 +708,14 @@ int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address,
708 outbuf + MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST, 708 outbuf + MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST,
709 MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM * 709 MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM *
710 sizeof(fw_subtype_list[0])); 710 sizeof(fw_subtype_list[0]));
711 if (capabilities) {
712 if (port_num)
713 *capabilities = MCDI_DWORD(outbuf,
714 GET_BOARD_CFG_OUT_CAPABILITIES_PORT1);
715 else
716 *capabilities = MCDI_DWORD(outbuf,
717 GET_BOARD_CFG_OUT_CAPABILITIES_PORT0);
718 }
711 719
712 return 0; 720 return 0;
713 721
diff --git a/drivers/net/ethernet/sfc/mcdi.h b/drivers/net/ethernet/sfc/mcdi.h
index c59667bf64ac..4dd39fcca678 100644
--- a/drivers/net/ethernet/sfc/mcdi.h
+++ b/drivers/net/ethernet/sfc/mcdi.h
@@ -97,7 +97,7 @@ extern void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len);
97extern int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating, 97extern int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
98 bool *was_attached_out); 98 bool *was_attached_out);
99extern int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address, 99extern int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address,
100 u16 *fw_subtype_list); 100 u16 *fw_subtype_list, u32 *capabilities);
101extern int efx_mcdi_log_ctrl(struct efx_nic *efx, bool evq, bool uart, 101extern int efx_mcdi_log_ctrl(struct efx_nic *efx, bool evq, bool uart,
102 u32 dest_evq); 102 u32 dest_evq);
103extern int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out); 103extern int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out);
diff --git a/drivers/net/ethernet/sfc/mtd.c b/drivers/net/ethernet/sfc/mtd.c
index b702862a0924..eff49da458ed 100644
--- a/drivers/net/ethernet/sfc/mtd.c
+++ b/drivers/net/ethernet/sfc/mtd.c
@@ -631,7 +631,7 @@ static int siena_mtd_get_fw_subtypes(struct efx_nic *efx,
631 uint16_t fw_subtype_list[MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM]; 631 uint16_t fw_subtype_list[MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM];
632 int rc; 632 int rc;
633 633
634 rc = efx_mcdi_get_board_cfg(efx, NULL, fw_subtype_list); 634 rc = efx_mcdi_get_board_cfg(efx, NULL, fw_subtype_list, NULL);
635 if (rc) 635 if (rc)
636 return rc; 636 return rc;
637 637
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c
index d681f2597e74..65cb5e4f4264 100644
--- a/drivers/net/ethernet/sfc/siena.c
+++ b/drivers/net/ethernet/sfc/siena.c
@@ -216,7 +216,7 @@ static int siena_reset_hw(struct efx_nic *efx, enum reset_type method)
216 216
217static int siena_probe_nvconfig(struct efx_nic *efx) 217static int siena_probe_nvconfig(struct efx_nic *efx)
218{ 218{
219 return efx_mcdi_get_board_cfg(efx, efx->net_dev->perm_addr, NULL); 219 return efx_mcdi_get_board_cfg(efx, efx->net_dev->perm_addr, NULL, NULL);
220} 220}
221 221
222static int siena_probe_nic(struct efx_nic *efx) 222static int siena_probe_nic(struct efx_nic *efx)