freebsd-dev/sys/dev/sfxge
Andrew Rybchenko 9ad7e03f72 sfxge: select whether to read current or backup partition in Medford A/B scheme
The dynamic config on Medford is stored using two partitions in flash, and at
any time one is the 'current' partition, used to provide the active config,
and the other 'backup' partition is used for writes.  This means that there
are two potential partitions that can be used to service reads, and which is
required can depend on, for example, whether the read is to get the current
contents or to verify a write.

When the partition write lock is held, the default behaviour is to read from
the backup partition, which was wrong for most reads in the common code which
require the current partition. This change allows the current partition to be
read whilst the write lock is held.
There is one read in Manftest which needs the backup partition.

ef10_nvram_partn_read_mode() is created to avoid changing
ef10_nvram_partn_read() which shares a prototype with the equivalent Falcon
and Siena methods.

MC_CMD_NVRAM_READ_IN_V2 adds an extra field, but firmware which doesn't support
it just ignores it.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4974
2016-01-19 06:03:44 +00:00
..
common sfxge: select whether to read current or backup partition in Medford A/B scheme 2016-01-19 06:03:44 +00:00
sfxge_dma.c sfxge: add 7xxx NICs family support 2015-05-25 08:34:55 +00:00
sfxge_ev.c sfxge: add 7xxx NICs family support 2015-05-25 08:34:55 +00:00
sfxge_intr.c sfxge: add 7xxx NICs family support 2015-05-25 08:34:55 +00:00
sfxge_ioc.h sfxge: add 7xxx NICs family support 2015-05-25 08:34:55 +00:00
sfxge_mcdi.c sfxge: support for MCDI logging implemented 2015-12-05 07:04:11 +00:00
sfxge_nvram.c sfxge: add 7xxx NICs family support 2015-05-25 08:34:55 +00:00
sfxge_port.c sfxge: mask ifmedia options (pauses) when looking for matching mode 2015-05-27 08:57:48 +00:00
sfxge_rx.c sfxge: add 7xxx NICs family support 2015-05-25 08:34:55 +00:00
sfxge_rx.h sfxge: add 7xxx NICs family support 2015-05-25 08:34:55 +00:00
sfxge_tx.c sfxge: support FATSOv2 2016-01-15 06:25:26 +00:00
sfxge_tx.h sfxge: support FATSOv2 2016-01-15 06:25:26 +00:00
sfxge_version.h sfxge: do not use DEBUG_FLAGS to enable extra debug checks 2015-05-29 05:44:56 +00:00
sfxge.c sfxge: add tunable for maximum start attetmps after reset 2015-12-11 06:20:31 +00:00
sfxge.h sfxge: support FATSOv2 2016-01-15 06:25:26 +00:00