* [PATCH net-next] r8169: remove not needed check in rtl8169_start_xmit
@ 2020-11-17 20:34 Heiner Kallweit
2020-11-19 1:27 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2020-11-17 20:34 UTC (permalink / raw)
To: Jakub Kicinski, David Miller, Realtek linux nic maintainers; +Cc: netdev
In rtl_tx() the released descriptors are zero'ed by
rtl8169_unmap_tx_skb(). And in the beginning of rtl8169_start_xmit()
we check that enough descriptors are free, therefore there's no way
the DescOwn bit can be set here.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index e05df043c..5766d191f 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4180,17 +4180,12 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
bool stop_queue, door_bell;
u32 opts[2];
- txd_first = tp->TxDescArray + entry;
-
if (unlikely(!rtl_tx_slots_avail(tp))) {
if (net_ratelimit())
netdev_err(dev, "BUG! Tx Ring full when queue awake!\n");
goto err_stop_0;
}
- if (unlikely(le32_to_cpu(txd_first->opts1) & DescOwn))
- goto err_stop_0;
-
opts[1] = rtl8169_tx_vlan_tag(skb);
opts[0] = 0;
@@ -4203,6 +4198,8 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
entry, false)))
goto err_dma_0;
+ txd_first = tp->TxDescArray + entry;
+
if (frags) {
if (rtl8169_xmit_frags(tp, skb, opts, entry))
goto err_dma_1;
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] r8169: remove not needed check in rtl8169_start_xmit
2020-11-17 20:34 [PATCH net-next] r8169: remove not needed check in rtl8169_start_xmit Heiner Kallweit
@ 2020-11-19 1:27 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-11-19 1:27 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: David Miller, Realtek linux nic maintainers, netdev
On Tue, 17 Nov 2020 21:34:09 +0100 Heiner Kallweit wrote:
> In rtl_tx() the released descriptors are zero'ed by
> rtl8169_unmap_tx_skb(). And in the beginning of rtl8169_start_xmit()
> we check that enough descriptors are free, therefore there's no way
> the DescOwn bit can be set here.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-19 1:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 20:34 [PATCH net-next] r8169: remove not needed check in rtl8169_start_xmit Heiner Kallweit
2020-11-19 1:27 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).