sfc: Support extraction of CAPABILITIES from GET_BOARD_CFG response.
authorMatthew Slattery <mslattery@solarflare.com>
Wed, 14 Jul 2010 14:36:19 +0000 (15:36 +0100)
committerBen Hutchings <bhutchings@solarflare.com>
Fri, 27 Jan 2012 00:10:49 +0000 (00:10 +0000)
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/mcdi.c
drivers/net/ethernet/sfc/mcdi.h
drivers/net/ethernet/sfc/mtd.c
drivers/net/ethernet/sfc/siena.c

index e5837a6485a160f9d68bec65ec4bdcd47548222d..f1cad22b30fabb56031cb34d1a3024dca0bb1ce9 100644 (file)
@@ -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;
 
index c59667bf64accec4b545690de86a36d4bd3621c6..4dd39fcca678e55712cc395dab11f57ab4d57da1 100644 (file)
@@ -97,7 +97,7 @@ extern void efx_mcdi_print_fwver(struct efx_nic *efx, char *buf, size_t len);
 extern int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
                               bool *was_attached_out);
 extern int efx_mcdi_get_board_cfg(struct efx_nic *efx, u8 *mac_address,
-                                 u16 *fw_subtype_list);
+                                 u16 *fw_subtype_list, u32 *capabilities);
 extern int efx_mcdi_log_ctrl(struct efx_nic *efx, bool evq, bool uart,
                             u32 dest_evq);
 extern int efx_mcdi_nvram_types(struct efx_nic *efx, u32 *nvram_types_out);
index b702862a09244f8efd2bf4923eaa44389f234ce3..eff49da458ed06bdb0f4501ce5d010c27d203707 100644 (file)
@@ -631,7 +631,7 @@ static int siena_mtd_get_fw_subtypes(struct efx_nic *efx,
        uint16_t fw_subtype_list[MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM];
        int rc;
 
-       rc = efx_mcdi_get_board_cfg(efx, NULL, fw_subtype_list);
+       rc = efx_mcdi_get_board_cfg(efx, NULL, fw_subtype_list, NULL);
        if (rc)
                return rc;
 
index d681f2597e741d934f27ab3a17a93b6fe8985690..65cb5e4f426444a389730966009756e1f3a67664 100644 (file)
@@ -216,7 +216,7 @@ static int siena_reset_hw(struct efx_nic *efx, enum reset_type method)
 
 static int siena_probe_nvconfig(struct efx_nic *efx)
 {
-       return efx_mcdi_get_board_cfg(efx, efx->net_dev->perm_addr, NULL);
+       return efx_mcdi_get_board_cfg(efx, efx->net_dev->perm_addr, NULL, NULL);
 }
 
 static int siena_probe_nic(struct efx_nic *efx)
This page took 0.028042 seconds and 5 git commands to generate.