rem: write16(device->addr, CmdTxDemand | device->cmd);
add: write16(device->addr + ChipCmd, CmdTxDemand | read16(device->addr + ChipCmd));
context: int32 hook_interrupt(void *_device){	viarhine_private *device    = (viarhine_private*)_device;	int32             handled   = B_UNHANDLED_INTERRUPT;	int16             worklimit = 20;	uint16            reg;	uint32            i, j;	int               wakeup_reader = 0;	int               wakeup_writer = 0;	do	{		reg = read16(device->addr + IntrStatus);			// Acknowledge All of the Current Interrupt Sources ASAP.		write16(device->addr + IntrStatus, reg & 0xffff);		if (reg == 0)			break;		if (reg & IntrRxDone)		{			wakeup_reader++;			write16(device->addr, CmdRxDemand | device->cmd);			handled = B_HANDLED_INTERRUPT;			continue;		}		if (reg & IntrTxDone)		{			wakeup_writer++;			handled = B_HANDLED_INTERRUPT;			continue;		}		if (reg & (IntrRxErr | IntrRxDropped | IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf))		{			write16(device->addr, CmdRxDemand | device->cmd);			handled = B_HANDLED_INTERRUPT;			continue;		}		if (reg & IntrTxAbort)		{			/* Just restart Tx. */			write16(device->addr, CmdTxDemand | device->cmd);			handled = B_HANDLED_INTERRUPT;			continue;		}		if (reg & IntrTxUnderrun)		{			if (device->tx_thresh < 0xE0)				write8(device->addr + TxConfig, device->tx_thresh += 0x20);			write16(device->addr, CmdTxDemand | device->cmd);			handled = B_HANDLED_INTERRUPT;			continue;		}/*		if (reg & IntrTxDone)		{			if (device->tx > 0)				device->tx--;			if (device->tx > 0)				write16(device->addr, CmdTxDemand | device->cmd);		}*/		if (--worklimit < 0)			break;	} while (true);	if (wakeup_reader)	{		for (i = 0, j = 0; i < RX_BUFFERS; i++)		{			if (!(device->rx_desc[i].rx_status & DescOwn))			{				j++;			}		}				device->cur_rx = j;		input_unwait(device, 1);	}	if (wakeup_writer)	{		output_unwait(device, 1);	}	return handled;}