bnxt_en: Restore PTP tx_avail count in case of skb_pad() error
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Tue, 18 Jun 2024 21:53:13 +0000 (14:53 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 20 Jun 2024 13:46:15 +0000 (06:46 -0700)
commit1e7962114c10957fe4d10a15eb714578a394e90b
treecc661dc71a2e522333f4f6b466264f248d33c997
parentb7bfcb4c7ce44fd0070ce8bccbc91c56341f05c1
bnxt_en: Restore PTP tx_avail count in case of skb_pad() error

The current code only restores PTP tx_avail count when we get DMA
mapping errors.  Fix it so that the PTP tx_avail count will be
restored for both DMA mapping errors and skb_pad() errors.
Otherwise PTP TX timestamp will not be available after a PTP
packet hits the skb_pad() error.

Fixes: 83bb623c968e ("bnxt_en: Transmit and retrieve packet timestamps")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240618215313.29631-4-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/bnxt/bnxt.c