Commit 0d5b8d70 authored by David S. Miller's avatar David S. Miller

Merge branch 's390-fixes'

Julian Wiedmann says:

====================
s390/qeth: fixes 2020-02-20

please apply the following patch series for qeth to netdev's net tree.

This corrects three minor issues:
1) return a more fitting errno when VNICC cmds are not supported,
2) remove a bogus WARN in the NAPI code, and
3) be _very_ pedantic about the RX copybreak.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 16a556ee 54a61fbc
...@@ -5344,7 +5344,7 @@ static int qeth_extract_skb(struct qeth_card *card, ...@@ -5344,7 +5344,7 @@ static int qeth_extract_skb(struct qeth_card *card,
} }
use_rx_sg = (card->options.cq == QETH_CQ_ENABLED) || use_rx_sg = (card->options.cq == QETH_CQ_ENABLED) ||
((skb_len >= card->options.rx_sg_cb) && (skb_len > card->options.rx_sg_cb &&
!atomic_read(&card->force_alloc_skb) && !atomic_read(&card->force_alloc_skb) &&
!IS_OSN(card)); !IS_OSN(card));
...@@ -5447,7 +5447,6 @@ static int qeth_extract_skbs(struct qeth_card *card, int budget, ...@@ -5447,7 +5447,6 @@ static int qeth_extract_skbs(struct qeth_card *card, int budget,
{ {
int work_done = 0; int work_done = 0;
WARN_ON_ONCE(!budget);
*done = false; *done = false;
while (budget) { while (budget) {
......
...@@ -1707,15 +1707,14 @@ int qeth_l2_vnicc_set_state(struct qeth_card *card, u32 vnicc, bool state) ...@@ -1707,15 +1707,14 @@ int qeth_l2_vnicc_set_state(struct qeth_card *card, u32 vnicc, bool state)
QETH_CARD_TEXT(card, 2, "vniccsch"); QETH_CARD_TEXT(card, 2, "vniccsch");
/* do not change anything if BridgePort is enabled */
if (qeth_bridgeport_is_in_use(card))
return -EBUSY;
/* check if characteristic and enable/disable are supported */ /* check if characteristic and enable/disable are supported */
if (!(card->options.vnicc.sup_chars & vnicc) || if (!(card->options.vnicc.sup_chars & vnicc) ||
!(card->options.vnicc.set_char_sup & vnicc)) !(card->options.vnicc.set_char_sup & vnicc))
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (qeth_bridgeport_is_in_use(card))
return -EBUSY;
/* set enable/disable command and store wanted characteristic */ /* set enable/disable command and store wanted characteristic */
if (state) { if (state) {
cmd = IPA_VNICC_ENABLE; cmd = IPA_VNICC_ENABLE;
...@@ -1761,14 +1760,13 @@ int qeth_l2_vnicc_get_state(struct qeth_card *card, u32 vnicc, bool *state) ...@@ -1761,14 +1760,13 @@ int qeth_l2_vnicc_get_state(struct qeth_card *card, u32 vnicc, bool *state)
QETH_CARD_TEXT(card, 2, "vniccgch"); QETH_CARD_TEXT(card, 2, "vniccgch");
/* do not get anything if BridgePort is enabled */
if (qeth_bridgeport_is_in_use(card))
return -EBUSY;
/* check if characteristic is supported */ /* check if characteristic is supported */
if (!(card->options.vnicc.sup_chars & vnicc)) if (!(card->options.vnicc.sup_chars & vnicc))
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (qeth_bridgeport_is_in_use(card))
return -EBUSY;
/* if card is ready, query current VNICC state */ /* if card is ready, query current VNICC state */
if (qeth_card_hw_is_reachable(card)) if (qeth_card_hw_is_reachable(card))
rc = qeth_l2_vnicc_query_chars(card); rc = qeth_l2_vnicc_query_chars(card);
...@@ -1786,15 +1784,14 @@ int qeth_l2_vnicc_set_timeout(struct qeth_card *card, u32 timeout) ...@@ -1786,15 +1784,14 @@ int qeth_l2_vnicc_set_timeout(struct qeth_card *card, u32 timeout)
QETH_CARD_TEXT(card, 2, "vniccsto"); QETH_CARD_TEXT(card, 2, "vniccsto");
/* do not change anything if BridgePort is enabled */
if (qeth_bridgeport_is_in_use(card))
return -EBUSY;
/* check if characteristic and set_timeout are supported */ /* check if characteristic and set_timeout are supported */
if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) || if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) ||
!(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING)) !(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING))
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (qeth_bridgeport_is_in_use(card))
return -EBUSY;
/* do we need to do anything? */ /* do we need to do anything? */
if (card->options.vnicc.learning_timeout == timeout) if (card->options.vnicc.learning_timeout == timeout)
return rc; return rc;
...@@ -1823,14 +1820,14 @@ int qeth_l2_vnicc_get_timeout(struct qeth_card *card, u32 *timeout) ...@@ -1823,14 +1820,14 @@ int qeth_l2_vnicc_get_timeout(struct qeth_card *card, u32 *timeout)
QETH_CARD_TEXT(card, 2, "vniccgto"); QETH_CARD_TEXT(card, 2, "vniccgto");
/* do not get anything if BridgePort is enabled */
if (qeth_bridgeport_is_in_use(card))
return -EBUSY;
/* check if characteristic and get_timeout are supported */ /* check if characteristic and get_timeout are supported */
if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) || if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) ||
!(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING)) !(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING))
return -EOPNOTSUPP; return -EOPNOTSUPP;
if (qeth_bridgeport_is_in_use(card))
return -EBUSY;
/* if card is ready, get timeout. Otherwise, just return stored value */ /* if card is ready, get timeout. Otherwise, just return stored value */
*timeout = card->options.vnicc.learning_timeout; *timeout = card->options.vnicc.learning_timeout;
if (qeth_card_hw_is_reachable(card)) if (qeth_card_hw_is_reachable(card))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment