diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2011-07-04 19:05:56 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2012-09-18 21:56:24 -0400 |
commit | e5621545e2461730af23054f355d348109881eb9 (patch) | |
tree | f000ec80099ca75ad6092b01e818c0d6cd0a0f38 | |
parent | e3f5ec1108ee01b555d5894722884e40dbec058f (diff) |
sfc: Expose FPGA bitfile partition through MTD
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
-rw-r--r-- | drivers/net/ethernet/sfc/mtd.c | 4 |
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[] = { | |||
585 | [MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1] = { 1, "sfc_exp_rom_cfg" }, | 585 | [MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1] = { 1, "sfc_exp_rom_cfg" }, |
586 | [MC_CMD_NVRAM_TYPE_PHY_PORT0] = { 0, "sfc_phy_fw" }, | 586 | [MC_CMD_NVRAM_TYPE_PHY_PORT0] = { 0, "sfc_phy_fw" }, |
587 | [MC_CMD_NVRAM_TYPE_PHY_PORT1] = { 1, "sfc_phy_fw" }, | 587 | [MC_CMD_NVRAM_TYPE_PHY_PORT1] = { 1, "sfc_phy_fw" }, |
588 | [MC_CMD_NVRAM_TYPE_FPGA] = { 0, "sfc_fpga" }, | ||
588 | }; | 589 | }; |
589 | 590 | ||
590 | static int siena_mtd_probe_partition(struct efx_nic *efx, | 591 | static int siena_mtd_probe_partition(struct efx_nic *efx, |
@@ -598,7 +599,8 @@ static int siena_mtd_probe_partition(struct efx_nic *efx, | |||
598 | bool protected; | 599 | bool protected; |
599 | int rc; | 600 | int rc; |
600 | 601 | ||
601 | if (type >= ARRAY_SIZE(siena_nvram_types)) | 602 | if (type >= ARRAY_SIZE(siena_nvram_types) || |
603 | siena_nvram_types[type].name == NULL) | ||
602 | return -ENODEV; | 604 | return -ENODEV; |
603 | 605 | ||
604 | info = &siena_nvram_types[type]; | 606 | info = &siena_nvram_types[type]; |