diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2011-02-27 01:41:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-27 01:41:36 -0500 |
commit | 70919e23ac35c9c244dfd73f97312894cae7d65f (patch) | |
tree | 019e8dcd19402ec49898d7b00970960d0cbced33 /drivers/s390 | |
parent | 4c93fbb0626080d196fb461c859b24a1feec3270 (diff) |
qeth: remove needless IPA-commands in offline
If a qeth device is set offline, data and control subchannels are
cleared, which means removal of all IP Assist Primitive settings
implicitly. There is no need to delete those settings explicitly.
This patch removes all IP Assist invocations from offline.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 1 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 52 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 45 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 55 |
4 files changed, 33 insertions, 120 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index f47a714538db..c5d763ed406e 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -741,7 +741,6 @@ struct qeth_card { | |||
741 | /* QDIO buffer handling */ | 741 | /* QDIO buffer handling */ |
742 | struct qeth_qdio_info qdio; | 742 | struct qeth_qdio_info qdio; |
743 | struct qeth_perf_stats perf_stats; | 743 | struct qeth_perf_stats perf_stats; |
744 | int use_hard_stop; | ||
745 | int read_or_write_problem; | 744 | int read_or_write_problem; |
746 | struct qeth_osn_info osn_info; | 745 | struct qeth_osn_info osn_info; |
747 | struct qeth_discipline discipline; | 746 | struct qeth_discipline discipline; |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 019ae58ab913..f3d98ac16e9f 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -302,12 +302,15 @@ static void qeth_issue_ipa_msg(struct qeth_ipa_cmd *cmd, int rc, | |||
302 | int com = cmd->hdr.command; | 302 | int com = cmd->hdr.command; |
303 | ipa_name = qeth_get_ipa_cmd_name(com); | 303 | ipa_name = qeth_get_ipa_cmd_name(com); |
304 | if (rc) | 304 | if (rc) |
305 | QETH_DBF_MESSAGE(2, "IPA: %s(x%X) for %s returned x%X \"%s\"\n", | 305 | QETH_DBF_MESSAGE(2, "IPA: %s(x%X) for %s/%s returned " |
306 | ipa_name, com, QETH_CARD_IFNAME(card), | 306 | "x%X \"%s\"\n", |
307 | rc, qeth_get_ipa_msg(rc)); | 307 | ipa_name, com, dev_name(&card->gdev->dev), |
308 | QETH_CARD_IFNAME(card), rc, | ||
309 | qeth_get_ipa_msg(rc)); | ||
308 | else | 310 | else |
309 | QETH_DBF_MESSAGE(5, "IPA: %s(x%X) for %s succeeded\n", | 311 | QETH_DBF_MESSAGE(5, "IPA: %s(x%X) for %s/%s succeeded\n", |
310 | ipa_name, com, QETH_CARD_IFNAME(card)); | 312 | ipa_name, com, dev_name(&card->gdev->dev), |
313 | QETH_CARD_IFNAME(card)); | ||
311 | } | 314 | } |
312 | 315 | ||
313 | static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card, | 316 | static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card, |
@@ -1083,7 +1086,6 @@ static int qeth_setup_card(struct qeth_card *card) | |||
1083 | card->data.state = CH_STATE_DOWN; | 1086 | card->data.state = CH_STATE_DOWN; |
1084 | card->state = CARD_STATE_DOWN; | 1087 | card->state = CARD_STATE_DOWN; |
1085 | card->lan_online = 0; | 1088 | card->lan_online = 0; |
1086 | card->use_hard_stop = 0; | ||
1087 | card->read_or_write_problem = 0; | 1089 | card->read_or_write_problem = 0; |
1088 | card->dev = NULL; | 1090 | card->dev = NULL; |
1089 | spin_lock_init(&card->vlanlock); | 1091 | spin_lock_init(&card->vlanlock); |
@@ -1732,20 +1734,22 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1732 | }; | 1734 | }; |
1733 | } | 1735 | } |
1734 | 1736 | ||
1737 | if (reply->rc == -EIO) | ||
1738 | goto error; | ||
1735 | rc = reply->rc; | 1739 | rc = reply->rc; |
1736 | qeth_put_reply(reply); | 1740 | qeth_put_reply(reply); |
1737 | return rc; | 1741 | return rc; |
1738 | 1742 | ||
1739 | time_err: | 1743 | time_err: |
1744 | reply->rc = -ETIME; | ||
1740 | spin_lock_irqsave(&reply->card->lock, flags); | 1745 | spin_lock_irqsave(&reply->card->lock, flags); |
1741 | list_del_init(&reply->list); | 1746 | list_del_init(&reply->list); |
1742 | spin_unlock_irqrestore(&reply->card->lock, flags); | 1747 | spin_unlock_irqrestore(&reply->card->lock, flags); |
1743 | reply->rc = -ETIME; | ||
1744 | atomic_inc(&reply->received); | 1748 | atomic_inc(&reply->received); |
1749 | error: | ||
1745 | atomic_set(&card->write.irq_pending, 0); | 1750 | atomic_set(&card->write.irq_pending, 0); |
1746 | qeth_release_buffer(iob->channel, iob); | 1751 | qeth_release_buffer(iob->channel, iob); |
1747 | card->write.buf_no = (card->write.buf_no + 1) % QETH_CMD_BUFFER_NO; | 1752 | card->write.buf_no = (card->write.buf_no + 1) % QETH_CMD_BUFFER_NO; |
1748 | wake_up(&reply->wait_q); | ||
1749 | rc = reply->rc; | 1753 | rc = reply->rc; |
1750 | qeth_put_reply(reply); | 1754 | qeth_put_reply(reply); |
1751 | return rc; | 1755 | return rc; |
@@ -2490,45 +2494,19 @@ int qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | |||
2490 | } | 2494 | } |
2491 | EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd); | 2495 | EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd); |
2492 | 2496 | ||
2493 | static int qeth_send_startstoplan(struct qeth_card *card, | ||
2494 | enum qeth_ipa_cmds ipacmd, enum qeth_prot_versions prot) | ||
2495 | { | ||
2496 | int rc; | ||
2497 | struct qeth_cmd_buffer *iob; | ||
2498 | |||
2499 | iob = qeth_get_ipacmd_buffer(card, ipacmd, prot); | ||
2500 | rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); | ||
2501 | |||
2502 | return rc; | ||
2503 | } | ||
2504 | |||
2505 | int qeth_send_startlan(struct qeth_card *card) | 2497 | int qeth_send_startlan(struct qeth_card *card) |
2506 | { | 2498 | { |
2507 | int rc; | 2499 | int rc; |
2500 | struct qeth_cmd_buffer *iob; | ||
2508 | 2501 | ||
2509 | QETH_DBF_TEXT(SETUP, 2, "strtlan"); | 2502 | QETH_DBF_TEXT(SETUP, 2, "strtlan"); |
2510 | 2503 | ||
2511 | rc = qeth_send_startstoplan(card, IPA_CMD_STARTLAN, 0); | 2504 | iob = qeth_get_ipacmd_buffer(card, IPA_CMD_STARTLAN, 0); |
2505 | rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); | ||
2512 | return rc; | 2506 | return rc; |
2513 | } | 2507 | } |
2514 | EXPORT_SYMBOL_GPL(qeth_send_startlan); | 2508 | EXPORT_SYMBOL_GPL(qeth_send_startlan); |
2515 | 2509 | ||
2516 | int qeth_send_stoplan(struct qeth_card *card) | ||
2517 | { | ||
2518 | int rc = 0; | ||
2519 | |||
2520 | /* | ||
2521 | * TODO: according to the IPA format document page 14, | ||
2522 | * TCP/IP (we!) never issue a STOPLAN | ||
2523 | * is this right ?!? | ||
2524 | */ | ||
2525 | QETH_DBF_TEXT(SETUP, 2, "stoplan"); | ||
2526 | |||
2527 | rc = qeth_send_startstoplan(card, IPA_CMD_STOPLAN, 0); | ||
2528 | return rc; | ||
2529 | } | ||
2530 | EXPORT_SYMBOL_GPL(qeth_send_stoplan); | ||
2531 | |||
2532 | int qeth_default_setadapterparms_cb(struct qeth_card *card, | 2510 | int qeth_default_setadapterparms_cb(struct qeth_card *card, |
2533 | struct qeth_reply *reply, unsigned long data) | 2511 | struct qeth_reply *reply, unsigned long data) |
2534 | { | 2512 | { |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index ada0fe782373..6fbaacb21943 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -202,17 +202,19 @@ static void qeth_l2_add_mc(struct qeth_card *card, __u8 *mac, int vmac) | |||
202 | kfree(mc); | 202 | kfree(mc); |
203 | } | 203 | } |
204 | 204 | ||
205 | static void qeth_l2_del_all_mc(struct qeth_card *card) | 205 | static void qeth_l2_del_all_mc(struct qeth_card *card, int del) |
206 | { | 206 | { |
207 | struct qeth_mc_mac *mc, *tmp; | 207 | struct qeth_mc_mac *mc, *tmp; |
208 | 208 | ||
209 | spin_lock_bh(&card->mclock); | 209 | spin_lock_bh(&card->mclock); |
210 | list_for_each_entry_safe(mc, tmp, &card->mc_list, list) { | 210 | list_for_each_entry_safe(mc, tmp, &card->mc_list, list) { |
211 | if (mc->is_vmac) | 211 | if (del) { |
212 | qeth_l2_send_setdelmac(card, mc->mc_addr, | 212 | if (mc->is_vmac) |
213 | qeth_l2_send_setdelmac(card, mc->mc_addr, | ||
213 | IPA_CMD_DELVMAC, NULL); | 214 | IPA_CMD_DELVMAC, NULL); |
214 | else | 215 | else |
215 | qeth_l2_send_delgroupmac(card, mc->mc_addr); | 216 | qeth_l2_send_delgroupmac(card, mc->mc_addr); |
217 | } | ||
216 | list_del(&mc->list); | 218 | list_del(&mc->list); |
217 | kfree(mc); | 219 | kfree(mc); |
218 | } | 220 | } |
@@ -288,18 +290,13 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i, | |||
288 | qeth_l2_send_setdelvlan_cb, NULL); | 290 | qeth_l2_send_setdelvlan_cb, NULL); |
289 | } | 291 | } |
290 | 292 | ||
291 | static void qeth_l2_process_vlans(struct qeth_card *card, int clear) | 293 | static void qeth_l2_process_vlans(struct qeth_card *card) |
292 | { | 294 | { |
293 | struct qeth_vlan_vid *id; | 295 | struct qeth_vlan_vid *id; |
294 | QETH_CARD_TEXT(card, 3, "L2prcvln"); | 296 | QETH_CARD_TEXT(card, 3, "L2prcvln"); |
295 | spin_lock_bh(&card->vlanlock); | 297 | spin_lock_bh(&card->vlanlock); |
296 | list_for_each_entry(id, &card->vid_list, list) { | 298 | list_for_each_entry(id, &card->vid_list, list) { |
297 | if (clear) | 299 | qeth_l2_send_setdelvlan(card, id->vid, IPA_CMD_SETVLAN); |
298 | qeth_l2_send_setdelvlan(card, id->vid, | ||
299 | IPA_CMD_DELVLAN); | ||
300 | else | ||
301 | qeth_l2_send_setdelvlan(card, id->vid, | ||
302 | IPA_CMD_SETVLAN); | ||
303 | } | 300 | } |
304 | spin_unlock_bh(&card->vlanlock); | 301 | spin_unlock_bh(&card->vlanlock); |
305 | } | 302 | } |
@@ -379,19 +376,11 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) | |||
379 | dev_close(card->dev); | 376 | dev_close(card->dev); |
380 | rtnl_unlock(); | 377 | rtnl_unlock(); |
381 | } | 378 | } |
382 | if (!card->use_hard_stop || | 379 | card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; |
383 | recovery_mode) { | ||
384 | __u8 *mac = &card->dev->dev_addr[0]; | ||
385 | rc = qeth_l2_send_delmac(card, mac); | ||
386 | QETH_DBF_TEXT_(SETUP, 2, "Lerr%d", rc); | ||
387 | } | ||
388 | card->state = CARD_STATE_SOFTSETUP; | 380 | card->state = CARD_STATE_SOFTSETUP; |
389 | } | 381 | } |
390 | if (card->state == CARD_STATE_SOFTSETUP) { | 382 | if (card->state == CARD_STATE_SOFTSETUP) { |
391 | qeth_l2_process_vlans(card, 1); | 383 | qeth_l2_del_all_mc(card, 0); |
392 | if (!card->use_hard_stop || | ||
393 | recovery_mode) | ||
394 | qeth_l2_del_all_mc(card); | ||
395 | qeth_clear_ipacmd_list(card); | 384 | qeth_clear_ipacmd_list(card); |
396 | card->state = CARD_STATE_HARDSETUP; | 385 | card->state = CARD_STATE_HARDSETUP; |
397 | } | 386 | } |
@@ -405,7 +394,6 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) | |||
405 | qeth_clear_cmd_buffers(&card->read); | 394 | qeth_clear_cmd_buffers(&card->read); |
406 | qeth_clear_cmd_buffers(&card->write); | 395 | qeth_clear_cmd_buffers(&card->write); |
407 | } | 396 | } |
408 | card->use_hard_stop = 0; | ||
409 | return rc; | 397 | return rc; |
410 | } | 398 | } |
411 | 399 | ||
@@ -705,7 +693,7 @@ static void qeth_l2_set_multicast_list(struct net_device *dev) | |||
705 | if (qeth_threads_running(card, QETH_RECOVER_THREAD) && | 693 | if (qeth_threads_running(card, QETH_RECOVER_THREAD) && |
706 | (card->state != CARD_STATE_UP)) | 694 | (card->state != CARD_STATE_UP)) |
707 | return; | 695 | return; |
708 | qeth_l2_del_all_mc(card); | 696 | qeth_l2_del_all_mc(card, 1); |
709 | spin_lock_bh(&card->mclock); | 697 | spin_lock_bh(&card->mclock); |
710 | netdev_for_each_mc_addr(ha, dev) | 698 | netdev_for_each_mc_addr(ha, dev) |
711 | qeth_l2_add_mc(card, ha->addr, 0); | 699 | qeth_l2_add_mc(card, ha->addr, 0); |
@@ -907,10 +895,8 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev) | |||
907 | qeth_set_allowed_threads(card, 0, 1); | 895 | qeth_set_allowed_threads(card, 0, 1); |
908 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); | 896 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); |
909 | 897 | ||
910 | if (cgdev->state == CCWGROUP_ONLINE) { | 898 | if (cgdev->state == CCWGROUP_ONLINE) |
911 | card->use_hard_stop = 1; | ||
912 | qeth_l2_set_offline(cgdev); | 899 | qeth_l2_set_offline(cgdev); |
913 | } | ||
914 | 900 | ||
915 | if (card->dev) { | 901 | if (card->dev) { |
916 | unregister_netdev(card->dev); | 902 | unregister_netdev(card->dev); |
@@ -1040,7 +1026,7 @@ contin: | |||
1040 | 1026 | ||
1041 | if (card->info.type != QETH_CARD_TYPE_OSN && | 1027 | if (card->info.type != QETH_CARD_TYPE_OSN && |
1042 | card->info.type != QETH_CARD_TYPE_OSM) | 1028 | card->info.type != QETH_CARD_TYPE_OSM) |
1043 | qeth_l2_process_vlans(card, 0); | 1029 | qeth_l2_process_vlans(card); |
1044 | 1030 | ||
1045 | netif_tx_disable(card->dev); | 1031 | netif_tx_disable(card->dev); |
1046 | 1032 | ||
@@ -1076,7 +1062,6 @@ contin: | |||
1076 | return 0; | 1062 | return 0; |
1077 | 1063 | ||
1078 | out_remove: | 1064 | out_remove: |
1079 | card->use_hard_stop = 1; | ||
1080 | qeth_l2_stop_card(card, 0); | 1065 | qeth_l2_stop_card(card, 0); |
1081 | ccw_device_set_offline(CARD_DDEV(card)); | 1066 | ccw_device_set_offline(CARD_DDEV(card)); |
1082 | ccw_device_set_offline(CARD_WDEV(card)); | 1067 | ccw_device_set_offline(CARD_WDEV(card)); |
@@ -1144,7 +1129,6 @@ static int qeth_l2_recover(void *ptr) | |||
1144 | QETH_CARD_TEXT(card, 2, "recover2"); | 1129 | QETH_CARD_TEXT(card, 2, "recover2"); |
1145 | dev_warn(&card->gdev->dev, | 1130 | dev_warn(&card->gdev->dev, |
1146 | "A recovery process has been started for the device\n"); | 1131 | "A recovery process has been started for the device\n"); |
1147 | card->use_hard_stop = 1; | ||
1148 | __qeth_l2_set_offline(card->gdev, 1); | 1132 | __qeth_l2_set_offline(card->gdev, 1); |
1149 | rc = __qeth_l2_set_online(card->gdev, 1); | 1133 | rc = __qeth_l2_set_online(card->gdev, 1); |
1150 | if (!rc) | 1134 | if (!rc) |
@@ -1191,7 +1175,6 @@ static int qeth_l2_pm_suspend(struct ccwgroup_device *gdev) | |||
1191 | if (gdev->state == CCWGROUP_OFFLINE) | 1175 | if (gdev->state == CCWGROUP_OFFLINE) |
1192 | return 0; | 1176 | return 0; |
1193 | if (card->state == CARD_STATE_UP) { | 1177 | if (card->state == CARD_STATE_UP) { |
1194 | card->use_hard_stop = 1; | ||
1195 | __qeth_l2_set_offline(card->gdev, 1); | 1178 | __qeth_l2_set_offline(card->gdev, 1); |
1196 | } else | 1179 | } else |
1197 | __qeth_l2_set_offline(card->gdev, 0); | 1180 | __qeth_l2_set_offline(card->gdev, 0); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index d09b0c44fc3d..6a9cc58321a0 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -510,8 +510,7 @@ static void qeth_l3_set_ip_addr_list(struct qeth_card *card) | |||
510 | kfree(tbd_list); | 510 | kfree(tbd_list); |
511 | } | 511 | } |
512 | 512 | ||
513 | static void qeth_l3_clear_ip_list(struct qeth_card *card, int clean, | 513 | static void qeth_l3_clear_ip_list(struct qeth_card *card, int recover) |
514 | int recover) | ||
515 | { | 514 | { |
516 | struct qeth_ipaddr *addr, *tmp; | 515 | struct qeth_ipaddr *addr, *tmp; |
517 | unsigned long flags; | 516 | unsigned long flags; |
@@ -530,11 +529,6 @@ static void qeth_l3_clear_ip_list(struct qeth_card *card, int clean, | |||
530 | addr = list_entry(card->ip_list.next, | 529 | addr = list_entry(card->ip_list.next, |
531 | struct qeth_ipaddr, entry); | 530 | struct qeth_ipaddr, entry); |
532 | list_del_init(&addr->entry); | 531 | list_del_init(&addr->entry); |
533 | if (clean) { | ||
534 | spin_unlock_irqrestore(&card->ip_lock, flags); | ||
535 | qeth_l3_deregister_addr_entry(card, addr); | ||
536 | spin_lock_irqsave(&card->ip_lock, flags); | ||
537 | } | ||
538 | if (!recover || addr->is_multicast) { | 532 | if (!recover || addr->is_multicast) { |
539 | kfree(addr); | 533 | kfree(addr); |
540 | continue; | 534 | continue; |
@@ -1611,29 +1605,6 @@ static int qeth_l3_start_ipassists(struct qeth_card *card) | |||
1611 | return 0; | 1605 | return 0; |
1612 | } | 1606 | } |
1613 | 1607 | ||
1614 | static int qeth_l3_put_unique_id(struct qeth_card *card) | ||
1615 | { | ||
1616 | |||
1617 | int rc = 0; | ||
1618 | struct qeth_cmd_buffer *iob; | ||
1619 | struct qeth_ipa_cmd *cmd; | ||
1620 | |||
1621 | QETH_CARD_TEXT(card, 2, "puniqeid"); | ||
1622 | |||
1623 | if ((card->info.unique_id & UNIQUE_ID_NOT_BY_CARD) == | ||
1624 | UNIQUE_ID_NOT_BY_CARD) | ||
1625 | return -1; | ||
1626 | iob = qeth_get_ipacmd_buffer(card, IPA_CMD_DESTROY_ADDR, | ||
1627 | QETH_PROT_IPV6); | ||
1628 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | ||
1629 | *((__u16 *) &cmd->data.create_destroy_addr.unique_id[6]) = | ||
1630 | card->info.unique_id; | ||
1631 | memcpy(&cmd->data.create_destroy_addr.unique_id[0], | ||
1632 | card->dev->dev_addr, OSA_ADDR_LEN); | ||
1633 | rc = qeth_send_ipa_cmd(card, iob, NULL, NULL); | ||
1634 | return rc; | ||
1635 | } | ||
1636 | |||
1637 | static int qeth_l3_iqd_read_initial_mac_cb(struct qeth_card *card, | 1608 | static int qeth_l3_iqd_read_initial_mac_cb(struct qeth_card *card, |
1638 | struct qeth_reply *reply, unsigned long data) | 1609 | struct qeth_reply *reply, unsigned long data) |
1639 | { | 1610 | { |
@@ -2324,25 +2295,14 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) | |||
2324 | dev_close(card->dev); | 2295 | dev_close(card->dev); |
2325 | rtnl_unlock(); | 2296 | rtnl_unlock(); |
2326 | } | 2297 | } |
2327 | if (!card->use_hard_stop) { | ||
2328 | rc = qeth_send_stoplan(card); | ||
2329 | if (rc) | ||
2330 | QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc); | ||
2331 | } | ||
2332 | card->state = CARD_STATE_SOFTSETUP; | 2298 | card->state = CARD_STATE_SOFTSETUP; |
2333 | } | 2299 | } |
2334 | if (card->state == CARD_STATE_SOFTSETUP) { | 2300 | if (card->state == CARD_STATE_SOFTSETUP) { |
2335 | qeth_l3_clear_ip_list(card, !card->use_hard_stop, 1); | 2301 | qeth_l3_clear_ip_list(card, 1); |
2336 | qeth_clear_ipacmd_list(card); | 2302 | qeth_clear_ipacmd_list(card); |
2337 | card->state = CARD_STATE_HARDSETUP; | 2303 | card->state = CARD_STATE_HARDSETUP; |
2338 | } | 2304 | } |
2339 | if (card->state == CARD_STATE_HARDSETUP) { | 2305 | if (card->state == CARD_STATE_HARDSETUP) { |
2340 | if (!card->use_hard_stop && | ||
2341 | (card->info.type != QETH_CARD_TYPE_IQD)) { | ||
2342 | rc = qeth_l3_put_unique_id(card); | ||
2343 | if (rc) | ||
2344 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); | ||
2345 | } | ||
2346 | qeth_qdio_clear_card(card, 0); | 2306 | qeth_qdio_clear_card(card, 0); |
2347 | qeth_clear_qdio_buffers(card); | 2307 | qeth_clear_qdio_buffers(card); |
2348 | qeth_clear_working_pool_list(card); | 2308 | qeth_clear_working_pool_list(card); |
@@ -2352,7 +2312,6 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) | |||
2352 | qeth_clear_cmd_buffers(&card->read); | 2312 | qeth_clear_cmd_buffers(&card->read); |
2353 | qeth_clear_cmd_buffers(&card->write); | 2313 | qeth_clear_cmd_buffers(&card->write); |
2354 | } | 2314 | } |
2355 | card->use_hard_stop = 0; | ||
2356 | return rc; | 2315 | return rc; |
2357 | } | 2316 | } |
2358 | 2317 | ||
@@ -3483,17 +3442,15 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev) | |||
3483 | qeth_set_allowed_threads(card, 0, 1); | 3442 | qeth_set_allowed_threads(card, 0, 1); |
3484 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); | 3443 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); |
3485 | 3444 | ||
3486 | if (cgdev->state == CCWGROUP_ONLINE) { | 3445 | if (cgdev->state == CCWGROUP_ONLINE) |
3487 | card->use_hard_stop = 1; | ||
3488 | qeth_l3_set_offline(cgdev); | 3446 | qeth_l3_set_offline(cgdev); |
3489 | } | ||
3490 | 3447 | ||
3491 | if (card->dev) { | 3448 | if (card->dev) { |
3492 | unregister_netdev(card->dev); | 3449 | unregister_netdev(card->dev); |
3493 | card->dev = NULL; | 3450 | card->dev = NULL; |
3494 | } | 3451 | } |
3495 | 3452 | ||
3496 | qeth_l3_clear_ip_list(card, 0, 0); | 3453 | qeth_l3_clear_ip_list(card, 0); |
3497 | qeth_l3_clear_ipato_list(card); | 3454 | qeth_l3_clear_ipato_list(card); |
3498 | return; | 3455 | return; |
3499 | } | 3456 | } |
@@ -3594,7 +3551,6 @@ contin: | |||
3594 | mutex_unlock(&card->discipline_mutex); | 3551 | mutex_unlock(&card->discipline_mutex); |
3595 | return 0; | 3552 | return 0; |
3596 | out_remove: | 3553 | out_remove: |
3597 | card->use_hard_stop = 1; | ||
3598 | qeth_l3_stop_card(card, 0); | 3554 | qeth_l3_stop_card(card, 0); |
3599 | ccw_device_set_offline(CARD_DDEV(card)); | 3555 | ccw_device_set_offline(CARD_DDEV(card)); |
3600 | ccw_device_set_offline(CARD_WDEV(card)); | 3556 | ccw_device_set_offline(CARD_WDEV(card)); |
@@ -3663,7 +3619,6 @@ static int qeth_l3_recover(void *ptr) | |||
3663 | QETH_CARD_TEXT(card, 2, "recover2"); | 3619 | QETH_CARD_TEXT(card, 2, "recover2"); |
3664 | dev_warn(&card->gdev->dev, | 3620 | dev_warn(&card->gdev->dev, |
3665 | "A recovery process has been started for the device\n"); | 3621 | "A recovery process has been started for the device\n"); |
3666 | card->use_hard_stop = 1; | ||
3667 | __qeth_l3_set_offline(card->gdev, 1); | 3622 | __qeth_l3_set_offline(card->gdev, 1); |
3668 | rc = __qeth_l3_set_online(card->gdev, 1); | 3623 | rc = __qeth_l3_set_online(card->gdev, 1); |
3669 | if (!rc) | 3624 | if (!rc) |
@@ -3684,7 +3639,6 @@ static int qeth_l3_recover(void *ptr) | |||
3684 | static void qeth_l3_shutdown(struct ccwgroup_device *gdev) | 3639 | static void qeth_l3_shutdown(struct ccwgroup_device *gdev) |
3685 | { | 3640 | { |
3686 | struct qeth_card *card = dev_get_drvdata(&gdev->dev); | 3641 | struct qeth_card *card = dev_get_drvdata(&gdev->dev); |
3687 | qeth_l3_clear_ip_list(card, 0, 0); | ||
3688 | qeth_qdio_clear_card(card, 0); | 3642 | qeth_qdio_clear_card(card, 0); |
3689 | qeth_clear_qdio_buffers(card); | 3643 | qeth_clear_qdio_buffers(card); |
3690 | } | 3644 | } |
@@ -3700,7 +3654,6 @@ static int qeth_l3_pm_suspend(struct ccwgroup_device *gdev) | |||
3700 | if (gdev->state == CCWGROUP_OFFLINE) | 3654 | if (gdev->state == CCWGROUP_OFFLINE) |
3701 | return 0; | 3655 | return 0; |
3702 | if (card->state == CARD_STATE_UP) { | 3656 | if (card->state == CARD_STATE_UP) { |
3703 | card->use_hard_stop = 1; | ||
3704 | __qeth_l3_set_offline(card->gdev, 1); | 3657 | __qeth_l3_set_offline(card->gdev, 1); |
3705 | } else | 3658 | } else |
3706 | __qeth_l3_set_offline(card->gdev, 0); | 3659 | __qeth_l3_set_offline(card->gdev, 0); |