]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvmdio: make orion_mdio_wait_ready consistent
authorLeigh Brown <leigh@solinno.co.uk>
Tue, 29 Oct 2013 09:33:31 +0000 (09:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Oct 2013 22:53:35 +0000 (18:53 -0400)
commit6de3b357c49ec3c52e5b44b08a235675329a2e10
tree0f7c918c00f7c5e9f64fac6b2e0b65d21ecf5dba
parente1eca9a15b50821442b8bfcf41ca2684c5582202
net: mvmdio: make orion_mdio_wait_ready consistent

Amend orion_mdio_wait_ready so that the same timeout is used when
polling or using wait_event_timeout.  Set the timeout to 1ms.

Replace udelay with usleep_range to avoid a busy loop, and set the
polling interval range as 45us to 55us, so that the first sleep
will be enough in almost all cases.

Generate the same log message at timeout when polling or using
wait_event_timeout.

Signed-off-by: Leigh Brown <leigh@solinno.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvmdio.c