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 <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7f92316c53
commit
17d9723e69
|
@ -558,7 +558,6 @@ enum qeth_channel_states {
|
|||
*/
|
||||
enum qeth_card_states {
|
||||
CARD_STATE_DOWN,
|
||||
CARD_STATE_HARDSETUP,
|
||||
CARD_STATE_SOFTSETUP,
|
||||
};
|
||||
|
||||
|
|
|
@ -247,9 +247,6 @@ int qeth_realloc_buffer_pool(struct qeth_card *card, int bufcnt)
|
|||
{
|
||||
QETH_CARD_TEXT(card, 2, "realcbp");
|
||||
|
||||
if (card->state != CARD_STATE_DOWN)
|
||||
return -EPERM;
|
||||
|
||||
/* TODO: steel/add buffers from/to a running card's buffer pool (?) */
|
||||
qeth_clear_working_pool_list(card);
|
||||
qeth_free_buffer_pool(card);
|
||||
|
|
|
@ -24,8 +24,6 @@ static ssize_t qeth_dev_state_show(struct device *dev,
|
|||
switch (card->state) {
|
||||
case CARD_STATE_DOWN:
|
||||
return sprintf(buf, "DOWN\n");
|
||||
case CARD_STATE_HARDSETUP:
|
||||
return sprintf(buf, "HARDSETUP\n");
|
||||
case CARD_STATE_SOFTSETUP:
|
||||
if (card->dev->flags & IFF_UP)
|
||||
return sprintf(buf, "UP (LAN %s)\n",
|
||||
|
|
|
@ -283,9 +283,6 @@ static void qeth_l2_stop_card(struct qeth_card *card)
|
|||
|
||||
if (card->state == CARD_STATE_SOFTSETUP) {
|
||||
qeth_clear_ipacmd_list(card);
|
||||
card->state = CARD_STATE_HARDSETUP;
|
||||
}
|
||||
if (card->state == CARD_STATE_HARDSETUP) {
|
||||
qeth_drain_output_queues(card);
|
||||
card->state = CARD_STATE_DOWN;
|
||||
}
|
||||
|
@ -776,7 +773,6 @@ static int qeth_l2_set_online(struct qeth_card *card)
|
|||
qeth_trace_features(card);
|
||||
qeth_l2_trace_features(card);
|
||||
|
||||
card->state = CARD_STATE_HARDSETUP;
|
||||
qeth_print_status_message(card);
|
||||
|
||||
/* softsetup */
|
||||
|
|
|
@ -901,7 +901,7 @@ out:
|
|||
return rc;
|
||||
}
|
||||
|
||||
static int qeth_l3_start_ipassists(struct qeth_card *card)
|
||||
static void qeth_l3_start_ipassists(struct qeth_card *card)
|
||||
{
|
||||
QETH_CARD_TEXT(card, 3, "strtipas");
|
||||
|
||||
|
@ -911,7 +911,6 @@ static int qeth_l3_start_ipassists(struct qeth_card *card)
|
|||
qeth_l3_start_ipa_multicast(card); /* go on*/
|
||||
qeth_l3_start_ipa_ipv6(card); /* go on*/
|
||||
qeth_l3_start_ipa_broadcast(card); /* go on*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
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)
|
|||
if (card->state == CARD_STATE_SOFTSETUP) {
|
||||
qeth_l3_clear_ip_htable(card, 1);
|
||||
qeth_clear_ipacmd_list(card);
|
||||
card->state = CARD_STATE_HARDSETUP;
|
||||
}
|
||||
if (card->state == CARD_STATE_HARDSETUP) {
|
||||
qeth_drain_output_queues(card);
|
||||
card->state = CARD_STATE_DOWN;
|
||||
}
|
||||
|
@ -2068,7 +2064,6 @@ static int qeth_l3_set_online(struct qeth_card *card)
|
|||
goto out_remove;
|
||||
}
|
||||
|
||||
card->state = CARD_STATE_HARDSETUP;
|
||||
qeth_print_status_message(card);
|
||||
|
||||
/* softsetup */
|
||||
|
@ -2078,11 +2073,8 @@ static int qeth_l3_set_online(struct qeth_card *card)
|
|||
if (rc)
|
||||
QETH_CARD_TEXT_(card, 2, "2err%04x", rc);
|
||||
if (!card->options.sniffer) {
|
||||
rc = qeth_l3_start_ipassists(card);
|
||||
if (rc) {
|
||||
QETH_CARD_TEXT_(card, 2, "3err%d", rc);
|
||||
goto out_remove;
|
||||
}
|
||||
qeth_l3_start_ipassists(card);
|
||||
|
||||
rc = qeth_l3_setrouting_v4(card);
|
||||
if (rc)
|
||||
QETH_CARD_TEXT_(card, 2, "4err%04x", rc);
|
||||
|
|
Loading…
Reference in a new issue