]> git.baikalelectronics.ru Git - kernel.git/commit
tsnep: Fix tsnep_tx_unmap() error path usage
authorGerhard Engleder <gerhard@engleder-embedded.com>
Thu, 4 Aug 2022 18:39:35 +0000 (20:39 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Aug 2022 03:44:33 +0000 (20:44 -0700)
commit4d9db3171d30f6bec186ee570bf70e3d06849f77
tree01277f80afcf77a5b337c9c8b89fc85377c51a1c
parentcfef3d124bc01193c7647f3cd7d8fad7552c86b8
tsnep: Fix tsnep_tx_unmap() error path usage

If tsnep_tx_map() fails, then tsnep_tx_unmap() shall start at the write
index like tsnep_tx_map(). This is different to the normal operation.
Thus, add an additional parameter to tsnep_tx_unmap() to enable start at
different positions for successful TX and failed TX.

Fixes: 39f5f79fd454 ("tsnep: Add TSN endpoint Ethernet MAC driver")
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/engleder/tsnep_main.c