aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/net')
-rw-r--r--drivers/s390/net/qeth_core_main.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 01fe405da9fd..13ef46b9d388 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1323,13 +1323,14 @@ int qeth_qdio_clear_card(struct qeth_card *card, int use_halt)
1323 QETH_QDIO_CLEANING)) { 1323 QETH_QDIO_CLEANING)) {
1324 case QETH_QDIO_ESTABLISHED: 1324 case QETH_QDIO_ESTABLISHED:
1325 if (card->info.type == QETH_CARD_TYPE_IQD) 1325 if (card->info.type == QETH_CARD_TYPE_IQD)
1326 rc = qdio_cleanup(CARD_DDEV(card), 1326 rc = qdio_shutdown(CARD_DDEV(card),
1327 QDIO_FLAG_CLEANUP_USING_HALT); 1327 QDIO_FLAG_CLEANUP_USING_HALT);
1328 else 1328 else
1329 rc = qdio_cleanup(CARD_DDEV(card), 1329 rc = qdio_shutdown(CARD_DDEV(card),
1330 QDIO_FLAG_CLEANUP_USING_CLEAR); 1330 QDIO_FLAG_CLEANUP_USING_CLEAR);
1331 if (rc) 1331 if (rc)
1332 QETH_DBF_TEXT_(TRACE, 3, "1err%d", rc); 1332 QETH_DBF_TEXT_(TRACE, 3, "1err%d", rc);
1333 qdio_free(CARD_DDEV(card));
1333 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED); 1334 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED);
1334 break; 1335 break;
1335 case QETH_QDIO_CLEANING: 1336 case QETH_QDIO_CLEANING:
@@ -3869,10 +3870,18 @@ static int qeth_qdio_establish(struct qeth_card *card)
3869 3870
3870 if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ALLOCATED, 3871 if (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ALLOCATED,
3871 QETH_QDIO_ESTABLISHED) == QETH_QDIO_ALLOCATED) { 3872 QETH_QDIO_ESTABLISHED) == QETH_QDIO_ALLOCATED) {
3872 rc = qdio_initialize(&init_data); 3873 rc = qdio_allocate(&init_data);
3873 if (rc) 3874 if (rc) {
3875 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED);
3876 goto out;
3877 }
3878 rc = qdio_establish(&init_data);
3879 if (rc) {
3874 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED); 3880 atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED);
3881 qdio_free(CARD_DDEV(card));
3882 }
3875 } 3883 }
3884out:
3876 kfree(out_sbal_ptrs); 3885 kfree(out_sbal_ptrs);
3877 kfree(in_sbal_ptrs); 3886 kfree(in_sbal_ptrs);
3878 kfree(qib_param_field); 3887 kfree(qib_param_field);