History

Merge branch 's390-qeth-fixes'

Julian Wiedmann says: ==================== s390/qeth: fixes 2019-03-18 please apply the following three patches to -net. The first two are fixes for minor race conditions in the probe code, while the third one gets dropwatch working (again). ====================

David S. Miller committed 7 years ago

Commit d0645cf2 parents fae846e 104b4853 files · +11 −9Browse files

Unified · Split

3 files
  1. drivers/s390/net/qeth_core_main.c +4 −1
  2. drivers/s390/net/qeth_l2_main.c +3 −4
  3. drivers/s390/net/qeth_l3_main.c +4 −4
drivers/s390/net/qeth_core_main.c+4−1
@@ -1150,13 +1150,16 @@ static void qeth_notify_skbs(struct qeth_qdio_out_q *q, · 1149 unmodified lines
11501150
11511151 static void qeth_release_skbs(struct qeth_qdio_out_buffer *buf)
11521152 {
1153+ struct sk_buff *skb;
1154+
11531155 /* release may never happen from within CQ tasklet scope */
11541156 WARN_ON_ONCE(atomic_read(&buf->state) == QETH_QDIO_BUF_IN_CQ);
11551157
11561158 if (atomic_read(&buf->state) == QETH_QDIO_BUF_PENDING)
11571159 qeth_notify_skbs(buf->q, buf, TX_NOTIFY_GENERALERROR);
11581160
1159− __skb_queue_purge(&buf->skb_list);
1161+ while ((skb = __skb_dequeue(&buf->skb_list)) != NULL)
1162+ consume_skb(skb);
11601163 }
11611164
11621165 static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,
drivers/s390/net/qeth_l2_main.c+3−4
@@ -629,8 +629,7 @@ static netdev_tx_t qeth_l2_hard_start_xmit(struct sk_buff *skb, · 628 unmodified lines
629629 } /* else fall through */
630630
631631 QETH_TXQ_STAT_INC(queue, tx_dropped);
632− QETH_TXQ_STAT_INC(queue, tx_errors);
633− dev_kfree_skb_any(skb);
632+ kfree_skb(skb);
634633 netif_wake_queue(dev);
635634 return NETDEV_TX_OK;
636635 }
@@ -645,6 +644,8 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev) · 8 unmodified lines
645644 struct qeth_card *card = dev_get_drvdata(&gdev->dev);
646645 int rc;
647646
647+ qeth_l2_vnicc_set_defaults(card);
648+
648649 if (gdev->dev.type == &qeth_generic_devtype) {
649650 rc = qeth_l2_create_device_attributes(&gdev->dev);
650651 if (rc)
@@ -652,8 +653,6 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev) · 1 unmodified line
652653 }
653654
654655 hash_init(card->mac_htable);
655− card->info.hwtrap = 0;
656− qeth_l2_vnicc_set_defaults(card);
657656 return 0;
658657 }
659658
drivers/s390/net/qeth_l3_main.c+4−4
@@ -2096,8 +2096,7 @@ static netdev_tx_t qeth_l3_hard_start_xmit(struct sk_buff *skb, · 2095 unmodified lines
20962096
20972097 tx_drop:
20982098 QETH_TXQ_STAT_INC(queue, tx_dropped);
2099− QETH_TXQ_STAT_INC(queue, tx_errors);
2100− dev_kfree_skb_any(skb);
2099+ kfree_skb(skb);
21012100 netif_wake_queue(dev);
21022101 return NETDEV_TX_OK;
21032102 }
@@ -2253,14 +2252,15 @@ static int qeth_l3_probe_device(struct ccwgroup_device *gdev) · 149 unmodified lines
22532252 struct qeth_card *card = dev_get_drvdata(&gdev->dev);
22542253 int rc;
22552254
2255+ hash_init(card->ip_htable);
2256+
22562257 if (gdev->dev.type == &qeth_generic_devtype) {
22572258 rc = qeth_l3_create_device_attributes(&gdev->dev);
22582259 if (rc)
22592260 return rc;
22602261 }
2261− hash_init(card->ip_htable);
2262+
22622263 hash_init(card->ip_mc_htable);
2263− card->info.hwtrap = 0;
22642264 return 0;
22652265 }
22662266

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t