* [PATCH net 0/3] s390/qeth: fixes 2020-02-20
@ 2020-02-20 14:54 Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 1/3] s390/qeth: vnicc Fix EOPNOTSUPP precedence Julian Wiedmann
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Julian Wiedmann @ 2020-02-20 14:54 UTC (permalink / raw)
To: David Miller
Cc: netdev, linux-s390, Heiko Carstens, Ursula Braun, Julian Wiedmann
Hi Dave,
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.
Thanks,
Julian
Alexandra Winter (1):
s390/qeth: vnicc Fix EOPNOTSUPP precedence
Julian Wiedmann (2):
s390/qeth: don't warn for napi with 0 budget
s390/qeth: fix off-by-one in RX copybreak check
drivers/s390/net/qeth_core_main.c | 3 +--
drivers/s390/net/qeth_l2_main.c | 29 +++++++++++++----------------
2 files changed, 14 insertions(+), 18 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net 1/3] s390/qeth: vnicc Fix EOPNOTSUPP precedence
2020-02-20 14:54 [PATCH net 0/3] s390/qeth: fixes 2020-02-20 Julian Wiedmann
@ 2020-02-20 14:54 ` Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 2/3] s390/qeth: don't warn for napi with 0 budget Julian Wiedmann
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Julian Wiedmann @ 2020-02-20 14:54 UTC (permalink / raw)
To: David Miller
Cc: netdev, linux-s390, Heiko Carstens, Ursula Braun,
Alexandra Winter, Julian Wiedmann
From: Alexandra Winter <wintera@linux.ibm.com>
When getting or setting VNICC parameters, the error code EOPNOTSUPP
should have precedence over EBUSY.
EBUSY is used because vnicc feature and bridgeport feature are mutually
exclusive, which is a temporary condition.
Whereas EOPNOTSUPP indicates that the HW does not support all or parts of
the vnicc feature.
This issue causes the vnicc sysfs params to show 'blocked by bridgeport'
for HW that does not support VNICC at all.
Fixes: caa1f0b10d18 ("s390/qeth: add VNICC enable/disable support")
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/s390/net/qeth_l2_main.c | 29 +++++++++++++----------------
1 file changed, 13 insertions(+), 16 deletions(-)
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c
index 692bd2623401..9972d96820f3 100644
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1707,15 +1707,14 @@ int qeth_l2_vnicc_set_state(struct qeth_card *card, u32 vnicc, bool state)
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 */
if (!(card->options.vnicc.sup_chars & vnicc) ||
!(card->options.vnicc.set_char_sup & vnicc))
return -EOPNOTSUPP;
+ if (qeth_bridgeport_is_in_use(card))
+ return -EBUSY;
+
/* set enable/disable command and store wanted characteristic */
if (state) {
cmd = IPA_VNICC_ENABLE;
@@ -1761,14 +1760,13 @@ int qeth_l2_vnicc_get_state(struct qeth_card *card, u32 vnicc, bool *state)
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 */
if (!(card->options.vnicc.sup_chars & vnicc))
return -EOPNOTSUPP;
+ if (qeth_bridgeport_is_in_use(card))
+ return -EBUSY;
+
/* if card is ready, query current VNICC state */
if (qeth_card_hw_is_reachable(card))
rc = qeth_l2_vnicc_query_chars(card);
@@ -1786,15 +1784,14 @@ int qeth_l2_vnicc_set_timeout(struct qeth_card *card, u32 timeout)
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 */
if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) ||
!(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING))
return -EOPNOTSUPP;
+ if (qeth_bridgeport_is_in_use(card))
+ return -EBUSY;
+
/* do we need to do anything? */
if (card->options.vnicc.learning_timeout == timeout)
return rc;
@@ -1823,14 +1820,14 @@ int qeth_l2_vnicc_get_timeout(struct qeth_card *card, u32 *timeout)
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 */
if (!(card->options.vnicc.sup_chars & QETH_VNICC_LEARNING) ||
!(card->options.vnicc.getset_timeout_sup & QETH_VNICC_LEARNING))
return -EOPNOTSUPP;
+
+ if (qeth_bridgeport_is_in_use(card))
+ return -EBUSY;
+
/* if card is ready, get timeout. Otherwise, just return stored value */
*timeout = card->options.vnicc.learning_timeout;
if (qeth_card_hw_is_reachable(card))
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 2/3] s390/qeth: don't warn for napi with 0 budget
2020-02-20 14:54 [PATCH net 0/3] s390/qeth: fixes 2020-02-20 Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 1/3] s390/qeth: vnicc Fix EOPNOTSUPP precedence Julian Wiedmann
@ 2020-02-20 14:54 ` Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 3/3] s390/qeth: fix off-by-one in RX copybreak check Julian Wiedmann
2020-02-20 18:31 ` [PATCH net 0/3] s390/qeth: fixes 2020-02-20 David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Julian Wiedmann @ 2020-02-20 14:54 UTC (permalink / raw)
To: David Miller
Cc: netdev, linux-s390, Heiko Carstens, Ursula Braun, Julian Wiedmann
Calling napi->poll() with 0 budget is a legitimate use by netpoll.
Fixes: a1c3ed4c9ca0 ("qeth: NAPI support for l2 and l3 discipline")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/s390/net/qeth_core_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 9639938581f5..2264c6619def 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -5447,7 +5447,6 @@ static int qeth_extract_skbs(struct qeth_card *card, int budget,
{
int work_done = 0;
- WARN_ON_ONCE(!budget);
*done = false;
while (budget) {
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 3/3] s390/qeth: fix off-by-one in RX copybreak check
2020-02-20 14:54 [PATCH net 0/3] s390/qeth: fixes 2020-02-20 Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 1/3] s390/qeth: vnicc Fix EOPNOTSUPP precedence Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 2/3] s390/qeth: don't warn for napi with 0 budget Julian Wiedmann
@ 2020-02-20 14:54 ` Julian Wiedmann
2020-02-20 18:31 ` [PATCH net 0/3] s390/qeth: fixes 2020-02-20 David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Julian Wiedmann @ 2020-02-20 14:54 UTC (permalink / raw)
To: David Miller
Cc: netdev, linux-s390, Heiko Carstens, Ursula Braun, Julian Wiedmann
The RX copybreak is intended as the _max_ value where the frame's data
should be copied. So for frame_len == copybreak, don't build an SG skb.
Fixes: 4a71df50047f ("qeth: new qeth device driver")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
---
drivers/s390/net/qeth_core_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 2264c6619def..5efcaa43615b 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -5344,7 +5344,7 @@ static int qeth_extract_skb(struct qeth_card *card,
}
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) &&
!IS_OSN(card));
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net 0/3] s390/qeth: fixes 2020-02-20
2020-02-20 14:54 [PATCH net 0/3] s390/qeth: fixes 2020-02-20 Julian Wiedmann
` (2 preceding siblings ...)
2020-02-20 14:54 ` [PATCH net 3/3] s390/qeth: fix off-by-one in RX copybreak check Julian Wiedmann
@ 2020-02-20 18:31 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2020-02-20 18:31 UTC (permalink / raw)
To: jwi; +Cc: netdev, linux-s390, heiko.carstens, ubraun
From: Julian Wiedmann <jwi@linux.ibm.com>
Date: Thu, 20 Feb 2020 15:54:53 +0100
> 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.
Series applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-20 18:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-20 14:54 [PATCH net 0/3] s390/qeth: fixes 2020-02-20 Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 1/3] s390/qeth: vnicc Fix EOPNOTSUPP precedence Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 2/3] s390/qeth: don't warn for napi with 0 budget Julian Wiedmann
2020-02-20 14:54 ` [PATCH net 3/3] s390/qeth: fix off-by-one in RX copybreak check Julian Wiedmann
2020-02-20 18:31 ` [PATCH net 0/3] s390/qeth: fixes 2020-02-20 David Miller
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).