struct qeth_card *card = gdev->dev.driver_data; int rc = 0; enum qeth_card_states recover_flag;  BUG_ON(!card); QETH_DBF_TEXT(setup ,2, "setonlin"); QETH_DBF_HEX(setup, 2, &card, sizeof(void *));  qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)){ PRINT_WARN("set_online of card %s interrupted by user!\n", CARD_BUS_ID(card)); return -ERESTARTSYS; }  recover_flag = card->state; if ((rc = ccw_device_set_online(CARD_RDEV(card))) || (rc = ccw_device_set_online(CARD_WDEV(card))) || (rc = ccw_device_set_online(CARD_DDEV(card)))){ QETH_DBF_TEXT_(setup, 2, "1err%d", rc); return -EIO; }  if (card->options.layer2) qeth_make_parameters_consistent(card);  if ((rc = qeth_hardsetup_card(card))){ QETH_DBF_TEXT_(setup, 2, "2err%d", rc); goto out_remove; } card->state = CARD_STATE_HARDSETUP;  if (!(rc = qeth_query_ipassists(card,QETH_PROT_IPV4))) rc = qeth_get_unique_id(card);  if (rc && card->options.layer2 == 0) { QETH_DBF_TEXT_(setup, 2, "3err%d", rc); goto out_remove; } qeth_print_status_message(card); if ((rc = qeth_register_netdev(card))){ QETH_DBF_TEXT_(setup, 2, "4err%d", rc); goto out_remove; } if ((rc = qeth_softsetup_card(card))){ QETH_DBF_TEXT_(setup, 2, "5err%d", rc); goto out_remove; } card->state = CARD_STATE_SOFTSETUP;  if ((rc = qeth_init_qdio_queues(card))){ QETH_DBF_TEXT_(setup, 2, "6err%d", rc); goto out_remove; } /*maybe it was set offline without ifconfig down * we can also use this state for recovery purposes*/ qeth_set_allowed_threads(card, 0xffffffff, 0); if (recover_flag == CARD_STATE_RECOVER) qeth_start_again(card); qeth_notify_processes(); return 0; out_remove: card->use_hard_stop = 1; qeth_stop_card(card); ccw_device_set_offline(CARD_DDEV(card)); ccw_device_set_offline(CARD_WDEV(card)); ccw_device_set_offline(CARD_RDEV(card)); if (recover_flag == CARD_STATE_RECOVER) card->state = CARD_STATE_RECOVER; else card->state = CARD_STATE_DOWN; return -ENODEV; 
return __qeth_set_online(gdev, 0); 
qeth_set_online(struct ccwgroup_device *gdev){	struct qeth_card *card = gdev->dev.driver_data;	int rc = 0;	enum qeth_card_states recover_flag;	BUG_ON(!card);	QETH_DBF_TEXT(setup ,2, "setonlin");	QETH_DBF_HEX(setup, 2, &card, sizeof(void *));	qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);	if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)){		PRINT_WARN("set_online of card %s interrupted by user!\n",			   CARD_BUS_ID(card));		return -ERESTARTSYS;	}	recover_flag = card->state;	if ((rc = ccw_device_set_online(CARD_RDEV(card))) ||	    (rc = ccw_device_set_online(CARD_WDEV(card))) ||	    (rc = ccw_device_set_online(CARD_DDEV(card)))){		QETH_DBF_TEXT_(setup, 2, "1err%d", rc);		return -EIO;	}	if (card->options.layer2)		qeth_make_parameters_consistent(card);	if ((rc = qeth_hardsetup_card(card))){		QETH_DBF_TEXT_(setup, 2, "2err%d", rc);		goto out_remove;	}	card->state = CARD_STATE_HARDSETUP;	if (!(rc = qeth_query_ipassists(card,QETH_PROT_IPV4)))		rc = qeth_get_unique_id(card);	if (rc && card->options.layer2 == 0) {		QETH_DBF_TEXT_(setup, 2, "3err%d", rc);		goto out_remove;	}	qeth_print_status_message(card);	if ((rc = qeth_register_netdev(card))){		QETH_DBF_TEXT_(setup, 2, "4err%d", rc);		goto out_remove;	}	if ((rc = qeth_softsetup_card(card))){		QETH_DBF_TEXT_(setup, 2, "5err%d", rc);		goto out_remove;	}	card->state = CARD_STATE_SOFTSETUP;	if ((rc = qeth_init_qdio_queues(card))){		QETH_DBF_TEXT_(setup, 2, "6err%d", rc);		goto out_remove;	}/*maybe it was set offline without ifconfig down * we can also use this state for recovery purposes*/	qeth_set_allowed_threads(card, 0xffffffff, 0);	if (recover_flag == CARD_STATE_RECOVER)		qeth_start_again(card);	qeth_notify_processes();	return 0;out_remove:	card->use_hard_stop = 1;	qeth_stop_card(card);	ccw_device_set_offline(CARD_DDEV(card));	ccw_device_set_offline(CARD_WDEV(card));	ccw_device_set_offline(CARD_RDEV(card));	if (recover_flag == CARD_STATE_RECOVER)		card->state = CARD_STATE_RECOVER;	else		card->state = CARD_STATE_DOWN;	return -ENODEV;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/05e08a2a297371564020f76d1bf8b3a931d5e1ed/qeth_main.c/buggy/drivers/s390/net/qeth_main.c