summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/mtd.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2011-07-05 00:05:56 +0100
committerBen Hutchings <bhutchings@solarflare.com>2012-09-19 02:56:24 +0100
commite5621545e2461730af23054f355d348109881eb9 (patch)
treef000ec80099ca75ad6092b01e818c0d6cd0a0f38 /drivers/net/ethernet/sfc/mtd.c
parente3f5ec1108ee01b555d5894722884e40dbec058f (diff)
downloadblackbird-op-linux-e5621545e2461730af23054f355d348109881eb9.tar.gz
blackbird-op-linux-e5621545e2461730af23054f355d348109881eb9.zip
sfc: Expose FPGA bitfile partition through MTD
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/mtd.c')
-rw-r--r--drivers/net/ethernet/sfc/mtd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sfc/mtd.c b/drivers/net/ethernet/sfc/mtd.c
index 8f4604d5d642..08f825b71ac8 100644
--- a/drivers/net/ethernet/sfc/mtd.c
+++ b/drivers/net/ethernet/sfc/mtd.c
@@ -585,6 +585,7 @@ static const struct siena_nvram_type_info siena_nvram_types[] = {
[MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1] = { 1, "sfc_exp_rom_cfg" },
[MC_CMD_NVRAM_TYPE_PHY_PORT0] = { 0, "sfc_phy_fw" },
[MC_CMD_NVRAM_TYPE_PHY_PORT1] = { 1, "sfc_phy_fw" },
+ [MC_CMD_NVRAM_TYPE_FPGA] = { 0, "sfc_fpga" },
};
static int siena_mtd_probe_partition(struct efx_nic *efx,
@@ -598,7 +599,8 @@ static int siena_mtd_probe_partition(struct efx_nic *efx,
bool protected;
int rc;
- if (type >= ARRAY_SIZE(siena_nvram_types))
+ if (type >= ARRAY_SIZE(siena_nvram_types) ||
+ siena_nvram_types[type].name == NULL)
return -ENODEV;
info = &siena_nvram_types[type];
OpenPOWER on IntegriCloud