* [PATCH net-next] sfc: add missing NVRAM partition types for EF10
@ 2018-11-07 18:12 Edward Cree
2018-11-08 6:58 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Edward Cree @ 2018-11-07 18:12 UTC (permalink / raw)
To: davem; +Cc: linux-net-drivers, netdev
Expose the MUM/SUC Firmware, UEFI Expansion ROM and MC Status partitions
of the NIC's NVRAM as MTDs if found on the NIC. The first two are needed
in order to properly update them when performing firmware updates; the MC
Status partition is used to determine whether a signed firmware image was
accepted or rejected by a Secure NIC.
Signed-off-by: Edward Cree <ecree@solarflare.com>
---
drivers/net/ethernet/sfc/ef10.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 7eeac3d6cfe8..b6a50058bb8d 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -6041,6 +6041,10 @@ static const struct efx_ef10_nvram_type_info efx_ef10_nvram_types[] = {
{ NVRAM_PARTITION_TYPE_EXPROM_CONFIG_PORT3, 0, 3, "sfc_exp_rom_cfg" },
{ NVRAM_PARTITION_TYPE_LICENSE, 0, 0, "sfc_license" },
{ NVRAM_PARTITION_TYPE_PHY_MIN, 0xff, 0, "sfc_phy_fw" },
+ /* MUM and SUC firmware share the same partition type */
+ { NVRAM_PARTITION_TYPE_MUM_FIRMWARE, 0, 0, "sfc_mumfw" },
+ { NVRAM_PARTITION_TYPE_EXPANSION_UEFI, 0, 0, "sfc_uefi" },
+ { NVRAM_PARTITION_TYPE_STATUS, 0, 0, "sfc_status" }
};
static int efx_ef10_mtd_probe_partition(struct efx_nic *efx,
@@ -6091,6 +6095,9 @@ static int efx_ef10_mtd_probe_partition(struct efx_nic *efx,
part->common.mtd.flags = MTD_CAP_NORFLASH;
part->common.mtd.size = size;
part->common.mtd.erasesize = erase_size;
+ /* sfc_status is read-only */
+ if (!erase_size)
+ part->common.mtd.flags |= MTD_NO_ERASE;
return 0;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] sfc: add missing NVRAM partition types for EF10
2018-11-07 18:12 [PATCH net-next] sfc: add missing NVRAM partition types for EF10 Edward Cree
@ 2018-11-08 6:58 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-11-08 6:58 UTC (permalink / raw)
To: ecree; +Cc: linux-net-drivers, netdev
From: Edward Cree <ecree@solarflare.com>
Date: Wed, 7 Nov 2018 18:12:42 +0000
> Expose the MUM/SUC Firmware, UEFI Expansion ROM and MC Status partitions
> of the NIC's NVRAM as MTDs if found on the NIC. The first two are needed
> in order to properly update them when performing firmware updates; the MC
> Status partition is used to determine whether a signed firmware image was
> accepted or rejected by a Secure NIC.
>
> Signed-off-by: Edward Cree <ecree@solarflare.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-08 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-07 18:12 [PATCH net-next] sfc: add missing NVRAM partition types for EF10 Edward Cree
2018-11-08 6:58 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).