]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
gianfar: Fix setup of RX time stamping
authorManfred Rudigier <Manfred.Rudigier@omicron.at>
Fri, 11 Jun 2010 01:49:05 +0000 (01:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jun 2010 21:40:02 +0000 (14:40 -0700)
commit97553f7f3e7a0305d017df9cc6e9589f64878437
tree15e2db21159b73d88020b9be834a7243ab7c433f
parentd8d326dc7ae6bec2a999d674c5babb6bf490587a
gianfar: Fix setup of RX time stamping

Previously the RCTRL_TS_ENABLE bit was set unconditionally. However, if
the RCTRL_TS_ENABLE is set without TMR_CTRL[TE], the driver does not work
properly on some boards (Anton had problems with the MPC8313ERDB and
MPC8568EMDS).

With this patch the bit will only be set if requested from user space
with the SIOCSHWTSTAMP ioctl command, meaning that time stamping is
disabled during normal operation. Users who are not interested in time
stamps will not experience problems with buggy CPU revisions or
performance drops any more.

The setting of TMR_CTRL[TE] is still up to the user. This is considered
safe because users wanting HW timestamps must initialize the eTSEC clock
first anyway, e.g. with the recently submitted PTP clock driver.

Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at>
Reviewed-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/gianfar.c