aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrygorii Strashko <[email protected]>2020-10-30 22:07:00 +0200
committerJakub Kicinski <[email protected]>2020-11-02 16:41:07 -0800
commit6a40e2890e6e1dd1ba4db2e1748e59ed3907fefb (patch)
tree82ed119f81326543ade18b888583d7dac3c65008
parentc6275c02a09730b365fffe3372fbe768cef8eb37 (diff)
net: ethernet: ti: am65-cpsw: use cppi5_desc_is_tdcm()
Use cppi5_desc_is_tdcm() helper for teardown indicator detection instead of hard-coded value. Signed-off-by: Grygorii Strashko <[email protected]> Reviewed-by: Jesse Brandeburg <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--drivers/net/ethernet/ti/am65-cpsw-nuss.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 6cea338df7ad..65c5446e324e 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -767,7 +767,7 @@ static int am65_cpsw_nuss_rx_packets(struct am65_cpsw_common *common,
return ret;
}
- if (desc_dma & 0x1) {
+ if (cppi5_desc_is_tdcm(desc_dma)) {
dev_dbg(dev, "%s RX tdown flow: %u\n", __func__, flow_idx);
return 0;
}
@@ -935,7 +935,7 @@ static int am65_cpsw_nuss_tx_compl_packets(struct am65_cpsw_common *common,
if (res == -ENODATA)
break;
- if (desc_dma & 0x1) {
+ if (cppi5_desc_is_tdcm(desc_dma)) {
if (atomic_dec_and_test(&common->tdown_cnt))
complete(&common->tdown_complete);
break;