]> git.baikalelectronics.ru Git - kernel.git/commit
net/fsl_pq_mdio: use spin_event_timeout() to poll the indicator register
authorTimur Tabi <timur@freescale.com>
Mon, 9 Jul 2012 21:57:36 +0000 (16:57 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Jul 2012 22:15:34 +0000 (15:15 -0700)
commit4aa5365b78d968b4b81e7e519e9eee6b4910ed81
treef73fb997b8c203699cbe56a5a82296160f4f7fa2
parent2ec58b2db2e0bbcd0741b3171ddf9154939cc5b4
net/fsl_pq_mdio: use spin_event_timeout() to poll the indicator register

Macro spin_event_timeout() was designed for simple polling of hardware
registers with a timeout, so use it when we poll the MIIMIND register.
This allows us to return an error code instead of polling indefinitely.

Note that PHY_INIT_TIMEOUT is a count of loop iterations, so we can't use
it for spin_event_timeout(), which asks for microseconds.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fsl_pq_mdio.c