/* The timer routine: Check if adapter still open and working, reopen if not.  */
static void tms380tr_timer_chk(unsigned long data)
/* The timer routine: Check if adapter still open and working, reopen if not.  */
static void tms380tr_timer_chk(unsigned long data)
{
	struct net_device *dev = (struct net_device*)data;
	struct net_local *tp = netdev_priv(dev);
	if(tp->HaltInProgress)
		return;
	tms380tr_chk_outstanding_cmds(dev);
	if(time_before(tp->LastSendTime + SEND_TIMEOUT, jiffies) &&
	   (tp->TplFree != tp->TplBusy))
	{
		tp->LastSendTime = jiffies;
		tms380tr_exec_cmd(dev, OC_CLOSE);
	}
	tp->timer.expires = jiffies + 2*HZ;
	add_timer(&tp->timer);
	if(tp->AdapterOpenFlag || tp->ReOpenInProgress)
		return;
	tp->ReOpenInProgress = 1;
	tms380tr_open_adapter(dev);
	return;
}