set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(1); 
schedule_timeout_interruptible(1); 
int send_and_receive(int card,		unsigned int procid, 		unsigned char type,		unsigned char class, 		unsigned char code,		unsigned char link,	 	unsigned char data_len, 		unsigned char *data, 		RspMessage *mesgdata,		int timeout) {	int retval;	int tries;	if (!IS_VALID_CARD(card)) {		pr_debug("Invalid param: %d is not a valid card id\n", card);		return -EINVAL;	}	sc_adapter[card]->want_async_messages = 1;	retval = sendmessage(card, procid, type, class, code, link, 			data_len, (unsigned int *) data);  	if (retval) {		pr_debug("%s: SendMessage failed in SAR\n",			sc_adapter[card]->devicename);		sc_adapter[card]->want_async_messages = 0;		return -EIO;	}	tries = 0;	/* wait for the response */	while (tries < timeout) {		set_current_state(TASK_INTERRUPTIBLE);		schedule_timeout(1);				pr_debug("SAR waiting..\n");		/*		 * See if we got our message back		 */		if ((sc_adapter[card]->async_msg.type == type) &&		    (sc_adapter[card]->async_msg.class == class) &&		    (sc_adapter[card]->async_msg.code == code) &&		    (sc_adapter[card]->async_msg.phy_link_no == link)) {			/*			 * Got it!			 */			pr_debug("%s: Got ASYNC message\n",				sc_adapter[card]->devicename);			memcpy(mesgdata, &(sc_adapter[card]->async_msg),				sizeof(RspMessage));			sc_adapter[card]->want_async_messages = 0;			return 0;		}   		tries++;	}	pr_debug("%s: SAR message timeout\n", sc_adapter[card]->devicename);	sc_adapter[card]->want_async_messages = 0;	return -ETIME;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/24763c48a3c9cdf0a138038b51a7fca65859cd78/message.c/buggy/drivers/isdn/sc/message.c