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
1150 1150
1151static void qeth_release_skbs(struct qeth_qdio_out_buffer *buf)1151static void qeth_release_skbs(struct qeth_qdio_out_buffer *buf)
1152{1152{
1153 struct sk_buff *skb;
1154
1153 /* release may never happen from within CQ tasklet scope */1155 /* release may never happen from within CQ tasklet scope */
1154 WARN_ON_ONCE(atomic_read(&buf->state) == QETH_QDIO_BUF_IN_CQ);1156 WARN_ON_ONCE(atomic_read(&buf->state) == QETH_QDIO_BUF_IN_CQ);
1155 1157
1156 if (atomic_read(&buf->state) == QETH_QDIO_BUF_PENDING)1158 if (atomic_read(&buf->state) == QETH_QDIO_BUF_PENDING)
1157 qeth_notify_skbs(buf->q, buf, TX_NOTIFY_GENERALERROR);1159 qeth_notify_skbs(buf->q, buf, TX_NOTIFY_GENERALERROR);
1158 1160
1159 __skb_queue_purge(&buf->skb_list);1161 while ((skb = __skb_dequeue(&buf->skb_list)) != NULL)
1162 consume_skb(skb);
1160}1163}
1161 1164
1162static void qeth_clear_output_buffer(struct qeth_qdio_out_q *queue,1165static 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
629 } /* else fall through */629 } /* else fall through */
630 630
631 QETH_TXQ_STAT_INC(queue, tx_dropped);631 QETH_TXQ_STAT_INC(queue, tx_dropped);
632 QETH_TXQ_STAT_INC(queue, tx_errors);632 kfree_skb(skb);
633 dev_kfree_skb_any(skb);
634 netif_wake_queue(dev);633 netif_wake_queue(dev);
635 return NETDEV_TX_OK;634 return NETDEV_TX_OK;
636}635}
@@ -645,6 +644,8 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev) · 8 unmodified lines
645 struct qeth_card *card = dev_get_drvdata(&gdev->dev);644 struct qeth_card *card = dev_get_drvdata(&gdev->dev);
646 int rc;645 int rc;
647 646
647 qeth_l2_vnicc_set_defaults(card);
648
648 if (gdev->dev.type == &qeth_generic_devtype) {649 if (gdev->dev.type == &qeth_generic_devtype) {
649 rc = qeth_l2_create_device_attributes(&gdev->dev);650 rc = qeth_l2_create_device_attributes(&gdev->dev);
650 if (rc)651 if (rc)
@@ -652,8 +653,6 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev) · 1 unmodified line
652 }653 }
653 654
654 hash_init(card->mac_htable);655 hash_init(card->mac_htable);
655 card->info.hwtrap = 0;
656 qeth_l2_vnicc_set_defaults(card);
657 return 0;656 return 0;
658}657}
659 658
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
2096 2096
2097tx_drop:2097tx_drop:
2098 QETH_TXQ_STAT_INC(queue, tx_dropped);2098 QETH_TXQ_STAT_INC(queue, tx_dropped);
2099 QETH_TXQ_STAT_INC(queue, tx_errors);2099 kfree_skb(skb);
2100 dev_kfree_skb_any(skb);
2101 netif_wake_queue(dev);2100 netif_wake_queue(dev);
2102 return NETDEV_TX_OK;2101 return NETDEV_TX_OK;
2103}2102}
@@ -2253,14 +2252,15 @@ static int qeth_l3_probe_device(struct ccwgroup_device *gdev) · 149 unmodified lines
2253 struct qeth_card *card = dev_get_drvdata(&gdev->dev);2252 struct qeth_card *card = dev_get_drvdata(&gdev->dev);
2254 int rc;2253 int rc;
2255 2254
2255 hash_init(card->ip_htable);
2256
2256 if (gdev->dev.type == &qeth_generic_devtype) {2257 if (gdev->dev.type == &qeth_generic_devtype) {
2257 rc = qeth_l3_create_device_attributes(&gdev->dev);2258 rc = qeth_l3_create_device_attributes(&gdev->dev);
2258 if (rc)2259 if (rc)
2259 return rc;2260 return rc;
2260 }2261 }
2261 hash_init(card->ip_htable);2262
2262 hash_init(card->ip_mc_htable);2263 hash_init(card->ip_mc_htable);
2263 card->info.hwtrap = 0;
2264 return 0;2264 return 0;
2265}2265}
2266 2266

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