]> git.baikalelectronics.ru Git - kernel.git/commit
sfc: Clean up waits for flash/EEPROM operations
authorBen Hutchings <bhutchings@solarflare.com>
Sat, 13 Dec 2008 05:33:50 +0000 (21:33 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Dec 2008 05:57:35 +0000 (21:57 -0800)
commitc092aeb1d1ab24e1969f4e7975ee08233e1cfbb1
treefb48f89ea32ef55e336242e33d6ccfd1f5ff4295
parent8ced5b453f0f1eb1a30d5106392566749fc0d682
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>
drivers/net/sfc/falcon.c
drivers/net/sfc/mtd.c
drivers/net/sfc/spi.h