Skip to content

Commit 17d9723

Browse files
julianwiedmanndavem330
authored andcommitted
s390/qeth: remove HARDSETUP state
qeth_l?_stop_card() is _never_ called while in HARDSETUP state, and there's no other usage of the card state that relies on the DOWN -> HARDSETUP -> SOFTSETUP transition. As related cleanup, remove the check in qeth_realloc_buffer_pool() as it is already done by the callers. Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7f92316 commit 17d9723

File tree

5 files changed

+3
-21
lines changed

5 files changed

+3
-21
lines changed

drivers/s390/net/qeth_core.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ enum qeth_channel_states {
558558
*/
559559
enum qeth_card_states {
560560
CARD_STATE_DOWN,
561-
CARD_STATE_HARDSETUP,
562561
CARD_STATE_SOFTSETUP,
563562
};
564563

drivers/s390/net/qeth_core_main.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,6 @@ int qeth_realloc_buffer_pool(struct qeth_card *card, int bufcnt)
247247
{
248248
QETH_CARD_TEXT(card, 2, "realcbp");
249249

250-
if (card->state != CARD_STATE_DOWN)
251-
return -EPERM;
252-
253250
/* TODO: steel/add buffers from/to a running card's buffer pool (?) */
254251
qeth_clear_working_pool_list(card);
255252
qeth_free_buffer_pool(card);

drivers/s390/net/qeth_core_sys.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ static ssize_t qeth_dev_state_show(struct device *dev,
2424
switch (card->state) {
2525
case CARD_STATE_DOWN:
2626
return sprintf(buf, "DOWN\n");
27-
case CARD_STATE_HARDSETUP:
28-
return sprintf(buf, "HARDSETUP\n");
2927
case CARD_STATE_SOFTSETUP:
3028
if (card->dev->flags & IFF_UP)
3129
return sprintf(buf, "UP (LAN %s)\n",

drivers/s390/net/qeth_l2_main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,6 @@ static void qeth_l2_stop_card(struct qeth_card *card)
283283

284284
if (card->state == CARD_STATE_SOFTSETUP) {
285285
qeth_clear_ipacmd_list(card);
286-
card->state = CARD_STATE_HARDSETUP;
287-
}
288-
if (card->state == CARD_STATE_HARDSETUP) {
289286
qeth_drain_output_queues(card);
290287
card->state = CARD_STATE_DOWN;
291288
}
@@ -776,7 +773,6 @@ static int qeth_l2_set_online(struct qeth_card *card)
776773
qeth_trace_features(card);
777774
qeth_l2_trace_features(card);
778775

779-
card->state = CARD_STATE_HARDSETUP;
780776
qeth_print_status_message(card);
781777

782778
/* softsetup */

drivers/s390/net/qeth_l3_main.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card)
901901
return rc;
902902
}
903903

904-
static int qeth_l3_start_ipassists(struct qeth_card *card)
904+
static void qeth_l3_start_ipassists(struct qeth_card *card)
905905
{
906906
QETH_CARD_TEXT(card, 3, "strtipas");
907907

@@ -911,7 +911,6 @@ static int qeth_l3_start_ipassists(struct qeth_card *card)
911911
qeth_l3_start_ipa_multicast(card); /* go on*/
912912
qeth_l3_start_ipa_ipv6(card); /* go on*/
913913
qeth_l3_start_ipa_broadcast(card); /* go on*/
914-
return 0;
915914
}
916915

917916
static int qeth_l3_iqd_read_initial_mac_cb(struct qeth_card *card,
@@ -1178,9 +1177,6 @@ static void qeth_l3_stop_card(struct qeth_card *card)
11781177
if (card->state == CARD_STATE_SOFTSETUP) {
11791178
qeth_l3_clear_ip_htable(card, 1);
11801179
qeth_clear_ipacmd_list(card);
1181-
card->state = CARD_STATE_HARDSETUP;
1182-
}
1183-
if (card->state == CARD_STATE_HARDSETUP) {
11841180
qeth_drain_output_queues(card);
11851181
card->state = CARD_STATE_DOWN;
11861182
}
@@ -2068,7 +2064,6 @@ static int qeth_l3_set_online(struct qeth_card *card)
20682064
goto out_remove;
20692065
}
20702066

2071-
card->state = CARD_STATE_HARDSETUP;
20722067
qeth_print_status_message(card);
20732068

20742069
/* softsetup */
@@ -2078,11 +2073,8 @@ static int qeth_l3_set_online(struct qeth_card *card)
20782073
if (rc)
20792074
QETH_CARD_TEXT_(card, 2, "2err%04x", rc);
20802075
if (!card->options.sniffer) {
2081-
rc = qeth_l3_start_ipassists(card);
2082-
if (rc) {
2083-
QETH_CARD_TEXT_(card, 2, "3err%d", rc);
2084-
goto out_remove;
2085-
}
2076+
qeth_l3_start_ipassists(card);
2077+
20862078
rc = qeth_l3_setrouting_v4(card);
20872079
if (rc)
20882080
QETH_CARD_TEXT_(card, 2, "4err%04x", rc);

0 commit comments

Comments
 (0)