send_from_recv_msg(intf, ent->recv_msg, NULL, j, ent->seqid); 
ipmi_timeout_handler(long timeout_period){	ipmi_smi_t           intf;	struct list_head     timeouts;	struct ipmi_recv_msg *msg, *msg2;	struct ipmi_smi_msg  *smi_msg, *smi_msg2;	unsigned long        flags;	int                  i, j;	INIT_LIST_HEAD(&timeouts);	spin_lock(&interfaces_lock);	for (i=0; i<MAX_IPMI_INTERFACES; i++) {		intf = ipmi_interfaces[i];		if (intf == NULL)			continue;		read_lock(&(intf->users_lock));		/* See if any waiting messages need to be processed. */		spin_lock_irqsave(&(intf->waiting_msgs_lock), flags);		list_for_each_entry_safe(smi_msg, smi_msg2, &(intf->waiting_msgs), link) {			if (! handle_new_recv_msg(intf, smi_msg)) {				list_del(&smi_msg->link);				ipmi_free_smi_msg(smi_msg);			} else {				/* To preserve message order, quit if we				   can't handle a message. */				break;			}		}		spin_unlock_irqrestore(&(intf->waiting_msgs_lock), flags);		/* Go through the seq table and find any messages that		   have timed out, putting them in the timeouts		   list. */		spin_lock_irqsave(&(intf->seq_lock), flags);		for (j=0; j<IPMI_IPMB_NUM_SEQ; j++) {			struct seq_table *ent = &(intf->seq_table[j]);			if (!ent->inuse)				continue;			ent->timeout -= timeout_period;			if (ent->timeout > 0)				continue;			if (ent->retries_left == 0) {				/* The message has used all its retries. */				ent->inuse = 0;				msg = ent->recv_msg;				list_add_tail(&(msg->link), &timeouts);				spin_lock(&intf->counter_lock);				if (ent->broadcast)					intf->timed_out_ipmb_broadcasts++;				else if (ent->recv_msg->addr.addr_type					 == IPMI_LAN_ADDR_TYPE)					intf->timed_out_lan_commands++;				else					intf->timed_out_ipmb_commands++;				spin_unlock(&intf->counter_lock);			} else {				/* More retries, send again. */				/* Start with the max timer, set to normal				   timer after the message is sent. */				ent->timeout = MAX_MSG_TIMEOUT;				ent->retries_left--;				send_from_recv_msg(intf, ent->recv_msg, NULL,						   j, ent->seqid);				spin_lock(&intf->counter_lock);				if (ent->recv_msg->addr.addr_type				    == IPMI_LAN_ADDR_TYPE)					intf->retransmitted_lan_commands++;				else					intf->retransmitted_ipmb_commands++;				spin_unlock(&intf->counter_lock);			}		}		spin_unlock_irqrestore(&(intf->seq_lock), flags);		list_for_each_entry_safe(msg, msg2, &timeouts, link) {			handle_msg_timeout(msg);		}		read_unlock(&(intf->users_lock));	}	spin_unlock(&interfaces_lock);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/882fe011a92fa4fc31ca6cc95b279f7e4e52935c/ipmi_msghandler.c/buggy/drivers/char/ipmi/ipmi_msghandler.c