diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2008-11-04 15:33:11 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-11-06 00:49:56 -0500 |
commit | 0a95f56323ce93dac354c1b2d54bf959a985cf7d (patch) | |
tree | fbf11f9284c25fc5c0520fda649c3850d180da3b /drivers/net/sfc/falcon.c | |
parent | 2883f552f2c6c6ccb2021643652c6d930f205f6f (diff) |
sfc: Clean up non-volatile memory partitioning
Move flash and EEPROM partition boundary constants into spi.h and rename
them to be consistent.
Add a comment on the partitioning.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/sfc/falcon.c')
-rw-r--r-- | drivers/net/sfc/falcon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 31ed1f49de00..3f74ceff6a2e 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -2253,13 +2253,13 @@ int falcon_read_nvram(struct efx_nic *efx, struct falcon_nvconfig *nvconfig_out) | |||
2253 | __le16 *word, *limit; | 2253 | __le16 *word, *limit; |
2254 | u32 csum; | 2254 | u32 csum; |
2255 | 2255 | ||
2256 | region = kmalloc(NVCONFIG_END, GFP_KERNEL); | 2256 | region = kmalloc(FALCON_NVCONFIG_END, GFP_KERNEL); |
2257 | if (!region) | 2257 | if (!region) |
2258 | return -ENOMEM; | 2258 | return -ENOMEM; |
2259 | nvconfig = region + NVCONFIG_OFFSET; | 2259 | nvconfig = region + NVCONFIG_OFFSET; |
2260 | 2260 | ||
2261 | spi = efx->spi_flash ? efx->spi_flash : efx->spi_eeprom; | 2261 | spi = efx->spi_flash ? efx->spi_flash : efx->spi_eeprom; |
2262 | rc = falcon_spi_read(spi, 0, NVCONFIG_END, NULL, region); | 2262 | rc = falcon_spi_read(spi, 0, FALCON_NVCONFIG_END, NULL, region); |
2263 | if (rc) { | 2263 | if (rc) { |
2264 | EFX_ERR(efx, "Failed to read %s\n", | 2264 | EFX_ERR(efx, "Failed to read %s\n", |
2265 | efx->spi_flash ? "flash" : "EEPROM"); | 2265 | efx->spi_flash ? "flash" : "EEPROM"); |
@@ -2283,7 +2283,7 @@ int falcon_read_nvram(struct efx_nic *efx, struct falcon_nvconfig *nvconfig_out) | |||
2283 | limit = (__le16 *) (nvconfig + 1); | 2283 | limit = (__le16 *) (nvconfig + 1); |
2284 | } else { | 2284 | } else { |
2285 | word = region; | 2285 | word = region; |
2286 | limit = region + NVCONFIG_END; | 2286 | limit = region + FALCON_NVCONFIG_END; |
2287 | } | 2287 | } |
2288 | for (csum = 0; word < limit; ++word) | 2288 | for (csum = 0; word < limit; ++word) |
2289 | csum += le16_to_cpu(*word); | 2289 | csum += le16_to_cpu(*word); |