net: davinci_emac: Fix incorrect masking of tx and rx error channel
authorColin Ian King <colin.king@canonical.com>
Tue, 20 Apr 2021 17:16:14 +0000 (18:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Apr 2021 00:12:18 +0000 (17:12 -0700)
commitd83b8aa5207d81f9f6daec9888390f079cc5db3f
tree605e4c35c87ea75f23a5a20b55fa6204bc249e48
parent333980481b99edb24ebd5d1a53af70a15d9146de
net: davinci_emac: Fix incorrect masking of tx and rx error channel

The bit-masks used for the TXERRCH and RXERRCH (tx and rx error channels)
are incorrect and always lead to a zero result. The mask values are
currently the incorrect post-right shifted values, fix this by setting
them to the currect values.

(I double checked these against the TMS320TCI6482 data sheet, section
5.30, page 127 to ensure I had the correct mask values for the TXERRCH
and RXERRCH fields in the MACSTATUS register).

Addresses-Coverity: ("Operands don't affect result")
Fixes: a6286ee630f6 ("net: Add TI DaVinci EMAC driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/davinci_emac.c