aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/mtd.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-12-13 00:33:50 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-13 00:57:35 -0500
commitbe4ea89c8df06f48d0d64cf1d9d20009e83c77c8 (patch)
treefb48f89ea32ef55e336242e33d6ccfd1f5ff4295 /drivers/net/sfc/mtd.c
parent1ab00629f06fb3c47de6373cd92d086f33775444 (diff)
sfc: Clean up waits for flash/EEPROM operations
Make falcon_spi_wait() ignore the write timer - it is only relevant to write commands, it only works for the device that contains VPD, and it might not be initialised properly at all. Rename falcon_spi_fast_wait() to falcon_spi_wait_write(), reflecting its use, and make it wait up to 10 ms (not 1 ms) since buffered writes to EEPROM may take this long to complete. Make both wait functions sleep instead of busy-waiting. Replace wait for command completion at top of falcon_spi_cmd() with a single poll; no command should be running when the function starts. Correct some comments. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/mtd.c')
-rw-r--r--drivers/net/sfc/mtd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/sfc/mtd.c b/drivers/net/sfc/mtd.c
index a1e6c2875fc..665cafb88d6 100644
--- a/drivers/net/sfc/mtd.c
+++ b/drivers/net/sfc/mtd.c
@@ -76,7 +76,7 @@ static int efx_spi_unlock(const struct efx_spi_device *spi)
76 rc = falcon_spi_cmd(spi, SPI_WRSR, -1, &status, NULL, sizeof(status)); 76 rc = falcon_spi_cmd(spi, SPI_WRSR, -1, &status, NULL, sizeof(status));
77 if (rc) 77 if (rc)
78 return rc; 78 return rc;
79 rc = falcon_spi_fast_wait(spi); 79 rc = falcon_spi_wait_write(spi);
80 if (rc) 80 if (rc)
81 return rc; 81 return rc;
82 82