diff options
author | Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> | 2018-09-18 12:22:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-19 05:09:57 +0200 |
commit | 2fe397a3959de8a472f165e6d152f64cb77fa2cc (patch) | |
tree | 3e8953c631443845a823646b5a38257ee8b48d87 /drivers/net/ethernet/renesas/ravb_ptp.c | |
parent | net: bnxt: Fix a uninitialized variable warning. (diff) | |
download | linux-2fe397a3959de8a472f165e6d152f64cb77fa2cc.tar.xz linux-2fe397a3959de8a472f165e6d152f64cb77fa2cc.zip |
ravb: do not write 1 to reserved bits
EtherAVB hardware requires 0 to be written to status register bits in
order to clear them, however, care must be taken not to:
1. Clear other bits, by writing zero to them
2. Write one to reserved bits
This patch corrects the ravb driver with respect to the second point above.
This is done by defining reserved bit masks for the affected registers and,
after auditing the code, ensure all sites that may write a one to a
reserved bit use are suitably masked.
Signed-off-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/renesas/ravb_ptp.c')
-rw-r--r-- | drivers/net/ethernet/renesas/ravb_ptp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/renesas/ravb_ptp.c b/drivers/net/ethernet/renesas/ravb_ptp.c index 0721b5c35d91..dce2a40a31e3 100644 --- a/drivers/net/ethernet/renesas/ravb_ptp.c +++ b/drivers/net/ethernet/renesas/ravb_ptp.c @@ -315,7 +315,7 @@ void ravb_ptp_interrupt(struct net_device *ndev) } } - ravb_write(ndev, ~gis, GIS); + ravb_write(ndev, ~(gis | GIS_RESERVED), GIS); } void ravb_ptp_init(struct net_device *ndev, struct platform_device *pdev) |