Skip to content

Commit 581243d

Browse files
julianwiedmanngregkh
authored andcommitted
s390/qeth: issue STARTLAN as first IPA command
[ Upstream commit 1034051045d125579ab1e8fcd5a724eeb0e70149 ] STARTLAN needs to be the first IPA command after MPC initialization completes. So move the qeth_send_startlan() call from the layer disciplines into the core path, right after the MPC handshake. While at it, replace the magic LAN OFFLINE return code with the existing enum. Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 3652b0b commit 581243d

4 files changed

Lines changed: 17 additions & 35 deletions

File tree

drivers/s390/net/qeth_core.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,6 @@ void qeth_clear_thread_running_bit(struct qeth_card *, unsigned long);
909909
int qeth_core_hardsetup_card(struct qeth_card *);
910910
void qeth_print_status_message(struct qeth_card *);
911911
int qeth_init_qdio_queues(struct qeth_card *);
912-
int qeth_send_startlan(struct qeth_card *);
913912
int qeth_send_ipa_cmd(struct qeth_card *, struct qeth_cmd_buffer *,
914913
int (*reply_cb)
915914
(struct qeth_card *, struct qeth_reply *, unsigned long),

drivers/s390/net/qeth_core_main.c

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2955,7 +2955,7 @@ int qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob,
29552955
}
29562956
EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd);
29572957

2958-
int qeth_send_startlan(struct qeth_card *card)
2958+
static int qeth_send_startlan(struct qeth_card *card)
29592959
{
29602960
int rc;
29612961
struct qeth_cmd_buffer *iob;
@@ -2968,7 +2968,6 @@ int qeth_send_startlan(struct qeth_card *card)
29682968
rc = qeth_send_ipa_cmd(card, iob, NULL, NULL);
29692969
return rc;
29702970
}
2971-
EXPORT_SYMBOL_GPL(qeth_send_startlan);
29722971

29732972
static int qeth_default_setadapterparms_cb(struct qeth_card *card,
29742973
struct qeth_reply *reply, unsigned long data)
@@ -5080,6 +5079,20 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
50805079
goto out;
50815080
}
50825081

5082+
rc = qeth_send_startlan(card);
5083+
if (rc) {
5084+
QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
5085+
if (rc == IPA_RC_LAN_OFFLINE) {
5086+
dev_warn(&card->gdev->dev,
5087+
"The LAN is offline\n");
5088+
card->lan_online = 0;
5089+
} else {
5090+
rc = -ENODEV;
5091+
goto out;
5092+
}
5093+
} else
5094+
card->lan_online = 1;
5095+
50835096
card->options.ipa4.supported_funcs = 0;
50845097
card->options.ipa6.supported_funcs = 0;
50855098
card->options.adp.supported_funcs = 0;
@@ -5091,14 +5104,14 @@ int qeth_core_hardsetup_card(struct qeth_card *card)
50915104
if (qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
50925105
rc = qeth_query_setadapterparms(card);
50935106
if (rc < 0) {
5094-
QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
5107+
QETH_DBF_TEXT_(SETUP, 2, "7err%d", rc);
50955108
goto out;
50965109
}
50975110
}
50985111
if (qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST)) {
50995112
rc = qeth_query_setdiagass(card);
51005113
if (rc < 0) {
5101-
QETH_DBF_TEXT_(SETUP, 2, "7err%d", rc);
5114+
QETH_DBF_TEXT_(SETUP, 2, "8err%d", rc);
51025115
goto out;
51035116
}
51045117
}

drivers/s390/net/qeth_l2_main.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,21 +1203,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
12031203
/* softsetup */
12041204
QETH_DBF_TEXT(SETUP, 2, "softsetp");
12051205

1206-
rc = qeth_send_startlan(card);
1207-
if (rc) {
1208-
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
1209-
if (rc == 0xe080) {
1210-
dev_warn(&card->gdev->dev,
1211-
"The LAN is offline\n");
1212-
card->lan_online = 0;
1213-
goto contin;
1214-
}
1215-
rc = -ENODEV;
1216-
goto out_remove;
1217-
} else
1218-
card->lan_online = 1;
1219-
1220-
contin:
12211206
if ((card->info.type == QETH_CARD_TYPE_OSD) ||
12221207
(card->info.type == QETH_CARD_TYPE_OSX)) {
12231208
if (qeth_l2_start_ipassists(card))

drivers/s390/net/qeth_l3_main.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3298,21 +3298,6 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
32983298
/* softsetup */
32993299
QETH_DBF_TEXT(SETUP, 2, "softsetp");
33003300

3301-
rc = qeth_send_startlan(card);
3302-
if (rc) {
3303-
QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
3304-
if (rc == 0xe080) {
3305-
dev_warn(&card->gdev->dev,
3306-
"The LAN is offline\n");
3307-
card->lan_online = 0;
3308-
goto contin;
3309-
}
3310-
rc = -ENODEV;
3311-
goto out_remove;
3312-
} else
3313-
card->lan_online = 1;
3314-
3315-
contin:
33163301
rc = qeth_l3_setadapter_parms(card);
33173302
if (rc)
33183303
QETH_DBF_TEXT_(SETUP, 2, "2err%04x", rc);

0 commit comments

Comments
 (0)