/* Returns 1 if the Timeout bit is clear, and 0 otherwise.  */
static unsigned int parport_ip32_clear_epp_timeout(struct parport *p)
/* Returns 1 if the Timeout bit is clear, and 0 otherwise.  */
static unsigned int parport_ip32_clear_epp_timeout(struct parport *p)
{
	struct parport_ip32_private * const priv = p->physport->private_data;
	unsigned int cleared;
	if (!(parport_ip32_read_status(p) & DSR_TIMEOUT))
		cleared = 1;
	else {
		unsigned int r;
		parport_ip32_read_status(p);
		r = parport_ip32_read_status(p);
		writeb(r | DSR_TIMEOUT, priv->regs.dsr);
		writeb(r & ~DSR_TIMEOUT, priv->regs.dsr);
		r = parport_ip32_read_status(p);
		cleared = !(r & DSR_TIMEOUT);
	}
	pr_trace(p, "(): %s", cleared ? "cleared" : "failed");
	return cleared;
}