spin_unlock_irqrestore(&(intf->waiting_msgs_lock), flags); 
spin_unlock_irqrestore(&intf->waiting_msgs_lock, flags); 
void ipmi_smi_msg_received(ipmi_smi_t          intf,			   struct ipmi_smi_msg *msg){	unsigned long flags;	int           rv;	/* Lock the user lock so the user can't go away while we are	   working on it. */	read_lock(&(intf->users_lock));	if ((msg->data_size >= 2)	    && (msg->data[0] == (IPMI_NETFN_APP_REQUEST << 2))	    && (msg->data[1] == IPMI_SEND_MSG_CMD)	    && (msg->user_data == NULL)) {		/* This is the local response to a command send, start                   the timer for these.  The user_data will not be                   NULL if this is a response send, and we will let                   response sends just go through. */		/* Check for errors, if we get certain errors (ones                   that mean basically we can try again later), we                   ignore them and start the timer.  Otherwise we                   report the error immediately. */		if ((msg->rsp_size >= 3) && (msg->rsp[2] != 0)		    && (msg->rsp[2] != IPMI_NODE_BUSY_ERR)		    && (msg->rsp[2] != IPMI_LOST_ARBITRATION_ERR))		{			int chan = msg->rsp[3] & 0xf;			/* Got an error sending the message, handle it. */			spin_lock_irqsave(&intf->counter_lock, flags);			if (chan >= IPMI_MAX_CHANNELS)				; /* This shouldn't happen */			else if ((intf->channels[chan].medium				  == IPMI_CHANNEL_MEDIUM_8023LAN)				 || (intf->channels[chan].medium				     == IPMI_CHANNEL_MEDIUM_ASYNC))				intf->sent_lan_command_errs++;			else				intf->sent_ipmb_command_errs++;			spin_unlock_irqrestore(&intf->counter_lock, flags);			intf_err_seq(intf, msg->msgid, msg->rsp[2]);		} else {			/* The message was sent, start the timer. */			intf_start_seq_timer(intf, msg->msgid);		}		ipmi_free_smi_msg(msg);		goto out_unlock;	}	/* To preserve message order, if the list is not empty, we           tack this message onto the end of the list. */	spin_lock_irqsave(&(intf->waiting_msgs_lock), flags);	if (!list_empty(&(intf->waiting_msgs))) {		list_add_tail(&(msg->link), &(intf->waiting_msgs));		spin_unlock_irqrestore(&(intf->waiting_msgs_lock), flags);		goto out_unlock;	}	spin_unlock_irqrestore(&(intf->waiting_msgs_lock), flags);			rv = handle_new_recv_msg(intf, msg);	if (rv > 0) {		/* Could not handle the message now, just add it to a                   list to handle later. */		spin_lock_irqsave(&(intf->waiting_msgs_lock), flags);		list_add_tail(&(msg->link), &(intf->waiting_msgs));		spin_unlock_irqrestore(&(intf->waiting_msgs_lock), flags);	} else if (rv == 0) {		ipmi_free_smi_msg(msg);	} out_unlock:	read_unlock(&(intf->users_lock));}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/393d2cc354d150b8b4bb888a9da7db4c935e12bd/ipmi_msghandler.c/clean/drivers/char/ipmi/ipmi_msghandler.c