Created
January 2, 2023 10:59
-
-
Save alessandrocarminati/5087e12afc7b5b4828ab77e9ad73e1db to your computer and use it in GitHub Desktop.
Patch prevent splash rtl8152 - linux-6.0.5-rt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/net/core/netpoll.c 2022-10-26 12:53:32.000000000 +0200 | |
+++ b/net/core/netpoll.c 2022-12-14 16:27:07.362323956 +0100 | |
@@ -102,7 +102,7 @@ | |
struct netpoll_info *npinfo = | |
container_of(work, struct netpoll_info, tx_work.work); | |
struct sk_buff *skb; | |
- unsigned long flags; | |
+// unsigned long flags; | |
while ((skb = skb_dequeue(&npinfo->txq))) { | |
struct net_device *dev = skb->dev; | |
@@ -114,7 +114,7 @@ | |
continue; | |
} | |
- local_irq_save(flags); | |
+ local_bh_disable();//local_irq_save(flags); | |
/* check if skb->queue_mapping is still valid */ | |
q_index = skb_get_queue_mapping(skb); | |
if (unlikely(q_index >= dev->real_num_tx_queues)) { | |
@@ -127,13 +127,13 @@ | |
!dev_xmit_complete(netpoll_start_xmit(skb, dev, txq))) { | |
skb_queue_head(&npinfo->txq, skb); | |
HARD_TX_UNLOCK(dev, txq); | |
- local_irq_restore(flags); | |
+ local_bh_enable();///local_irq_restore(flags); | |
schedule_delayed_work(&npinfo->tx_work, HZ/10); | |
return; | |
} | |
HARD_TX_UNLOCK(dev, txq); | |
- local_irq_restore(flags); | |
+ local_bh_enable();//local_irq_restore(flags); | |
} | |
} | |
@@ -314,7 +314,7 @@ | |
/* It is up to the caller to keep npinfo alive. */ | |
struct netpoll_info *npinfo; | |
- lockdep_assert_irqs_disabled(); | |
+// lockdep_assert_irqs_disabled(); | |
dev = np->dev; | |
npinfo = rcu_dereference_bh(dev->npinfo); | |
@@ -350,9 +350,9 @@ | |
udelay(USEC_PER_POLL); | |
} | |
- WARN_ONCE(!irqs_disabled(), | |
- "netpoll_send_skb_on_dev(): %s enabled interrupts in poll (%pS)\n", | |
- dev->name, dev->netdev_ops->ndo_start_xmit); | |
+// WARN_ONCE(!irqs_disabled(), | |
+// "netpoll_send_skb_on_dev(): %s enabled interrupts in poll (%pS)\n", | |
+// dev->name, dev->netdev_ops->ndo_start_xmit); | |
} | |
@@ -365,16 +365,16 @@ | |
netdev_tx_t netpoll_send_skb(struct netpoll *np, struct sk_buff *skb) | |
{ | |
- unsigned long flags; | |
+ //unsigned long flags; | |
netdev_tx_t ret; | |
if (unlikely(!np)) { | |
dev_kfree_skb_irq(skb); | |
ret = NET_XMIT_DROP; | |
} else { | |
- local_irq_save(flags); | |
+ local_bh_disable();//local_irq_save(flags); | |
ret = __netpoll_send_skb(np, skb); | |
- local_irq_restore(flags); | |
+ local_bh_enable();//local_irq_restore(flags); | |
} | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment