]> git.openfabrics.org - ~emulex/infiniband.git/commit
sfc: Eliminate struct efx_mtd
authorBen Hutchings <bhutchings@solarflare.com>
Wed, 28 Nov 2012 04:38:10 +0000 (04:38 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Thu, 22 Aug 2013 18:26:04 +0000 (19:26 +0100)
commitb766630b351c68c0383831dba9b81a905e5e84c6
treea76241779bfa03c7eabf0c9712d30cf0e23fb5e5
parentecd0a6f0f2c70a3b713bc77d8a32d6b4ad5ad49b
sfc: Eliminate struct efx_mtd

Currently we use struct efx_mtd to represent a physical NVRAM device
and struct efx_mtd_partition to represent a partition on that device.
But this only really makes sense for Falcon, as we don't know or care
whether MC-managed NVRAM partitions are on one or more physical
devices.  It complicates iteration and provides little benefit.
Therefore:

- Replace the pointer to efx_mtd in mtd_info::priv with a pointer to efx_nic
- Move the falcon_spi_device pointer into the union in struct efx_mtd_partition
- Move the device name to efx_mtd_partition::dev_type_name
- Move the efx_mtd_ops pointer to efx_nic::mtd_ops
- Make efx_nic::mtd_list a list of partitions

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/mtd.c
drivers/net/ethernet/sfc/net_driver.h