]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
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)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:41 +0000 (17:46 -0600)
commit1316a74c0e0387169ca8c7cef6957bf3cc83153c
treed700705bce9055d12f6575facdf3716362419a7d
parent2dee66a1b0b6517286ebc348cda3db649eb658ee
net: davinci_emac: Fix incorrect masking of tx and rx error channel

BugLink: https://bugs.launchpad.net/bugs/1929455
[ Upstream commit d83b8aa5207d81f9f6daec9888390f079cc5db3f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/ethernet/ti/davinci_emac.c