Skip to content

Commit 8b7b7ad

Browse files
committed
Merge: [s390]: [IBM 9.3 FEAT] Upgrade the QETH driver to latest from upstream, e.g. kernel 6.3
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2495 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2160097 Tested: by IBM Build-Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=52483305 Commits: 10d6393 net/af_iucv: support drop monitoring 4eb9eda net/af_iucv: clean up a try_then_request_module() ff8424b net/af_iucv: remove wrappers around iucv (de-)registration 50348fa net/iucv: get rid of register asm usage 682026a net/iucv: fix kernel doc comments 7c8e1a9 net/af_iucv: fix kernel doc comments ab847d0 s390/iucv: sort out physical vs virtual pointers usage dd4e356 s390/ctcm: cleanup indenting 180f513 s390/qeth: Use constant for IP address buffers dde8769 s390/qeth: Convert sysfs sprintf to sysfs_emit 74c05a3 s390/qeth: Convert sprintf/snprintf to scnprintf Signed-off-by: Tobias Huschle <thuschle@redhat.com> Approved-by: Steve Best <sbest@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com>
2 parents 5e1e10c + 2f8d4e8 commit 8b7b7ad

File tree

12 files changed

+281
-315
lines changed

12 files changed

+281
-315
lines changed

drivers/s390/net/ctcm_fsms.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,15 @@ static void chx_rx(fsm_instance *fi, int event, void *arg)
370370
CTCM_FUNTAIL, dev->name, len);
371371
priv->stats.rx_dropped++;
372372
priv->stats.rx_length_errors++;
373-
goto again;
373+
goto again;
374374
}
375375
if (len > ch->max_bufsize) {
376376
CTCM_DBF_TEXT_(TRACE, CTC_DBF_NOTICE,
377377
"%s(%s): got packet with length %d > %d\n",
378378
CTCM_FUNTAIL, dev->name, len, ch->max_bufsize);
379379
priv->stats.rx_dropped++;
380380
priv->stats.rx_length_errors++;
381-
goto again;
381+
goto again;
382382
}
383383

384384
/*
@@ -403,7 +403,7 @@ static void chx_rx(fsm_instance *fi, int event, void *arg)
403403
*((__u16 *)skb->data) = len;
404404
priv->stats.rx_dropped++;
405405
priv->stats.rx_length_errors++;
406-
goto again;
406+
goto again;
407407
}
408408
if (block_len > 2) {
409409
*((__u16 *)skb->data) = block_len - 2;
@@ -1006,7 +1006,7 @@ static void ctcm_chx_txretry(fsm_instance *fi, int event, void *arg)
10061006
use gptr as mpc indicator */
10071007
if (!(gptr && (fsm_getstate(gptr->fsm) != MPCG_STATE_READY)))
10081008
ctcm_chx_restart(fi, event, arg);
1009-
goto done;
1009+
goto done;
10101010
}
10111011

10121012
CTCM_DBF_TEXT_(TRACE, CTC_DBF_DEBUG,
@@ -1024,7 +1024,7 @@ static void ctcm_chx_txretry(fsm_instance *fi, int event, void *arg)
10241024
CTCM_FUNTAIL, ch->id);
10251025
fsm_event(priv->fsm, DEV_EVENT_TXDOWN, dev);
10261026
ctcm_chx_restart(fi, event, arg);
1027-
goto done;
1027+
goto done;
10281028
}
10291029
fsm_addtimer(&ch->timer, 1000, CTC_EVENT_TIMER, ch);
10301030
if (event == CTC_EVENT_TIMER) /* for TIMER not yet locked */
@@ -1251,12 +1251,12 @@ static void ctcmpc_chx_txdone(fsm_instance *fi, int event, void *arg)
12511251
if ((ch->collect_len <= 0) || (grp->in_sweep != 0)) {
12521252
spin_unlock(&ch->collect_lock);
12531253
fsm_newstate(fi, CTC_STATE_TXIDLE);
1254-
goto done;
1254+
goto done;
12551255
}
12561256

12571257
if (ctcm_checkalloc_buffer(ch)) {
12581258
spin_unlock(&ch->collect_lock);
1259-
goto done;
1259+
goto done;
12601260
}
12611261
ch->trans_skb->data = ch->trans_skb_data;
12621262
skb_reset_tail_pointer(ch->trans_skb);
@@ -1389,7 +1389,7 @@ static void ctcmpc_chx_rx(fsm_instance *fi, int event, void *arg)
13891389
CTCM_DBF_TEXT_(MPC_ERROR, CTC_DBF_ERROR,
13901390
"%s(%s): TRANS_SKB = NULL",
13911391
CTCM_FUNTAIL, dev->name);
1392-
goto again;
1392+
goto again;
13931393
}
13941394

13951395
if (len < TH_HEADER_LENGTH) {
@@ -1409,7 +1409,7 @@ static void ctcmpc_chx_rx(fsm_instance *fi, int event, void *arg)
14091409
"%s(%s): skb allocation failed",
14101410
CTCM_FUNTAIL, dev->name);
14111411
fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev);
1412-
goto again;
1412+
goto again;
14131413
}
14141414
switch (fsm_getstate(grp->fsm)) {
14151415
case MPCG_STATE_RESET:
@@ -1441,9 +1441,9 @@ static void ctcmpc_chx_rx(fsm_instance *fi, int event, void *arg)
14411441
skb_reset_tail_pointer(ch->trans_skb);
14421442
ch->trans_skb->len = 0;
14431443
ch->ccw[1].count = ch->max_bufsize;
1444-
if (do_debug_ccw)
1444+
if (do_debug_ccw)
14451445
ctcmpc_dumpit((char *)&ch->ccw[0],
1446-
sizeof(struct ccw1) * 3);
1446+
sizeof(struct ccw1) * 3);
14471447
dolock = !in_irq();
14481448
if (dolock)
14491449
spin_lock_irqsave(
@@ -1562,7 +1562,7 @@ void ctcmpc_chx_rxidle(fsm_instance *fi, int event, void *arg)
15621562
if (rc != 0) {
15631563
fsm_newstate(fi, CTC_STATE_RXINIT);
15641564
ctcm_ccw_check_rc(ch, rc, "initial RX");
1565-
goto done;
1565+
goto done;
15661566
}
15671567
break;
15681568
default:
@@ -1677,10 +1677,10 @@ static void ctcmpc_chx_attnbusy(fsm_instance *fsm, int event, void *arg)
16771677
if (fsm_getstate(ch->fsm) == CH_XID0_INPROGRESS) {
16781678
fsm_newstate(ch->fsm, CH_XID0_PENDING) ;
16791679
fsm_deltimer(&grp->timer);
1680-
goto done;
1680+
goto done;
16811681
}
16821682
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
1683-
goto done;
1683+
goto done;
16841684
case MPCG_STATE_XID2INITX:
16851685
/* XID2 was received before ATTN Busy for second
16861686
channel.Send yside xid for second channel.
@@ -1768,7 +1768,7 @@ static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg)
17681768
/* give the previous IO time to complete */
17691769
fsm_addtimer(&wch->sweep_timer,
17701770
200, CTC_EVENT_RSWEEP_TIMER, wch);
1771-
goto done;
1771+
goto done;
17721772
}
17731773

17741774
skb = skb_dequeue(&wch->sweep_queue);
@@ -1780,7 +1780,7 @@ static void ctcmpc_chx_send_sweep(fsm_instance *fsm, int event, void *arg)
17801780
ctcm_clear_busy_do(dev);
17811781
dev_kfree_skb_any(skb);
17821782
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
1783-
goto done;
1783+
goto done;
17841784
} else {
17851785
refcount_inc(&skb->users);
17861786
skb_queue_tail(&wch->io_queue, skb);

drivers/s390/net/ctcm_main.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ static int ctcm_transmit_skb(struct channel *ch, struct sk_buff *skb)
494494
ch->collect_len += l;
495495
}
496496
spin_unlock_irqrestore(&ch->collect_lock, saveflags);
497-
goto done;
497+
goto done;
498498
}
499499
spin_unlock_irqrestore(&ch->collect_lock, saveflags);
500500
/*
@@ -685,7 +685,7 @@ static int ctcmpc_transmit_skb(struct channel *ch, struct sk_buff *skb)
685685
ch->collect_len += skb->len;
686686

687687
spin_unlock_irqrestore(&ch->collect_lock, saveflags);
688-
goto done;
688+
goto done;
689689
}
690690

691691
/*
@@ -892,7 +892,7 @@ static int ctcmpc_tx(struct sk_buff *skb, struct net_device *dev)
892892
"%s(%s): NULL sk_buff passed",
893893
CTCM_FUNTAIL, dev->name);
894894
priv->stats.tx_dropped++;
895-
goto done;
895+
goto done;
896896
}
897897
if (skb_headroom(skb) < (TH_HEADER_LENGTH + PDU_HEADER_LENGTH)) {
898898
CTCM_DBF_TEXT_(MPC_TRACE, CTC_DBF_ERROR,
@@ -915,7 +915,7 @@ static int ctcmpc_tx(struct sk_buff *skb, struct net_device *dev)
915915
priv->stats.tx_errors++;
916916
priv->stats.tx_carrier_errors++;
917917
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
918-
goto done;
918+
goto done;
919919
}
920920
newskb->protocol = skb->protocol;
921921
skb_reserve(newskb, TH_HEADER_LENGTH + PDU_HEADER_LENGTH);
@@ -938,7 +938,7 @@ static int ctcmpc_tx(struct sk_buff *skb, struct net_device *dev)
938938
priv->stats.tx_dropped++;
939939
priv->stats.tx_errors++;
940940
priv->stats.tx_carrier_errors++;
941-
goto done;
941+
goto done;
942942
}
943943

944944
if (ctcm_test_and_set_busy(dev)) {
@@ -950,7 +950,7 @@ static int ctcmpc_tx(struct sk_buff *skb, struct net_device *dev)
950950
priv->stats.tx_errors++;
951951
priv->stats.tx_carrier_errors++;
952952
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
953-
goto done;
953+
goto done;
954954
}
955955

956956
netif_trans_update(dev);
@@ -964,7 +964,7 @@ static int ctcmpc_tx(struct sk_buff *skb, struct net_device *dev)
964964
priv->stats.tx_carrier_errors++;
965965
ctcm_clear_busy(dev);
966966
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
967-
goto done;
967+
goto done;
968968
}
969969
ctcm_clear_busy(dev);
970970
done:
@@ -1428,7 +1428,7 @@ static int add_channel(struct ccw_device *cdev, enum ctcm_channel_types type,
14281428
"%s (%s) already in list, using old entry",
14291429
__func__, (*c)->id);
14301430

1431-
goto free_return;
1431+
goto free_return;
14321432
}
14331433

14341434
spin_lock_init(&ch->collect_lock);

drivers/s390/net/ctcm_mpc.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ void ctc_mpc_establish_connectivity(int port_num,
481481
grp->estconnfunc = NULL;
482482
}
483483
fsm_deltimer(&grp->timer);
484-
goto done;
484+
goto done;
485485
}
486486
if ((wch->in_mpcgroup) &&
487487
(fsm_getstate(wch->fsm) == CH_XID0_PENDING))
@@ -495,7 +495,7 @@ void ctc_mpc_establish_connectivity(int port_num,
495495
grp->estconnfunc = NULL;
496496
}
497497
fsm_deltimer(&grp->timer);
498-
goto done;
498+
goto done;
499499
}
500500
break;
501501
case MPCG_STATE_XID0IOWAIT:
@@ -896,8 +896,9 @@ void mpc_group_ready(unsigned long adev)
896896
grp->estconnfunc(grp->port_num, 0,
897897
grp->group_max_buflen);
898898
grp->estconnfunc = NULL;
899-
} else if (grp->allochanfunc)
899+
} else if (grp->allochanfunc) {
900900
grp->allochanfunc(grp->port_num, grp->group_max_buflen);
901+
}
901902

902903
grp->send_qllc_disc = 1;
903904
grp->changed_side = 0;
@@ -1109,7 +1110,7 @@ static void ctcmpc_unpack_skb(struct channel *ch, struct sk_buff *pskb)
11091110

11101111
priv->stats.rx_dropped++;
11111112
priv->stats.rx_length_errors++;
1112-
goto done;
1113+
goto done;
11131114
}
11141115
skb_reset_mac_header(pskb);
11151116
new_len = curr_pdu->pdu_offset;
@@ -1132,7 +1133,7 @@ static void ctcmpc_unpack_skb(struct channel *ch, struct sk_buff *pskb)
11321133
CTCM_FUNTAIL, dev->name);
11331134
priv->stats.rx_dropped++;
11341135
fsm_event(grp->fsm, MPCG_EVENT_INOP, dev);
1135-
goto done;
1136+
goto done;
11361137
}
11371138
skb_put_data(skb, pskb->data, new_len);
11381139

@@ -1543,7 +1544,7 @@ static int mpc_validate_xid(struct mpcg_info *mpcginfo)
15431544
CTCM_DBF_TEXT_(MPC_ERROR, CTC_DBF_ERROR,
15441545
"%s(%s): xid = NULL",
15451546
CTCM_FUNTAIL, ch->id);
1546-
goto done;
1547+
goto done;
15471548
}
15481549

15491550
CTCM_D3_DUMP((char *)xid, XID2_LENGTH);
@@ -1556,7 +1557,7 @@ static int mpc_validate_xid(struct mpcg_info *mpcginfo)
15561557
CTCM_DBF_TEXT_(MPC_ERROR, CTC_DBF_ERROR,
15571558
"%s(%s): r/w channel pairing mismatch",
15581559
CTCM_FUNTAIL, ch->id);
1559-
goto done;
1560+
goto done;
15601561
}
15611562

15621563
if (xid->xid2_dlc_type == XID2_READ_SIDE) {

drivers/s390/net/qeth_core_main.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2801,9 +2801,11 @@ static void qeth_print_status_message(struct qeth_card *card)
28012801
* of the level OSA sets the first character to zero
28022802
* */
28032803
if (!card->info.mcl_level[0]) {
2804-
sprintf(card->info.mcl_level, "%02x%02x",
2805-
card->info.mcl_level[2],
2806-
card->info.mcl_level[3]);
2804+
scnprintf(card->info.mcl_level,
2805+
sizeof(card->info.mcl_level),
2806+
"%02x%02x",
2807+
card->info.mcl_level[2],
2808+
card->info.mcl_level[3]);
28072809
break;
28082810
}
28092811
fallthrough;
@@ -6090,7 +6092,7 @@ void qeth_dbf_longtext(debug_info_t *id, int level, char *fmt, ...)
60906092
if (!debug_level_enabled(id, level))
60916093
return;
60926094
va_start(args, fmt);
6093-
vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args);
6095+
vscnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args);
60946096
va_end(args);
60956097
debug_text_event(id, level, dbf_txt_buf);
60966098
}
@@ -6330,8 +6332,8 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev)
63306332
goto err_dev;
63316333
}
63326334

6333-
snprintf(dbf_name, sizeof(dbf_name), "qeth_card_%s",
6334-
dev_name(&gdev->dev));
6335+
scnprintf(dbf_name, sizeof(dbf_name), "qeth_card_%s",
6336+
dev_name(&gdev->dev));
63356337
card->debug = qeth_get_dbf_entry(dbf_name);
63366338
if (!card->debug) {
63376339
rc = qeth_add_dbf_entry(card, dbf_name);

0 commit comments

Comments
 (0)