printk(KERN_ERR "%s: IOP reset timeout.\n", c->name); 
osm_err("%s: IOP reset timeout.\n", c->name); 
static int i2o_iop_reset(struct i2o_controller *c){	volatile u8 *status = c->status.virt;	struct i2o_message __iomem *msg;	u32 m;	unsigned long timeout;	i2o_status_block *sb = c->status_block.virt;	int rc = 0;	osm_debug("%s: Resetting controller\n", c->name);	m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_MESSAGE_GET);	if (m == I2O_QUEUE_EMPTY)		return -ETIMEDOUT;	memset(c->status_block.virt, 0, 8);	/* Quiesce all IOPs first */	i2o_iop_quiesce_all();	writel(EIGHT_WORD_MSG_SIZE | SGL_OFFSET_0, &msg->u.head[0]);	writel(I2O_CMD_ADAPTER_RESET << 24 | HOST_TID << 12 | ADAPTER_TID,	       &msg->u.head[1]);	writel(i2o_exec_driver.context, &msg->u.s.icntxt);	writel(0, &msg->u.s.tcntxt);	//FIXME: use reasonable transaction context	writel(0, &msg->body[0]);	writel(0, &msg->body[1]);	writel(i2o_dma_low(c->status.phys), &msg->body[2]);	writel(i2o_dma_high(c->status.phys), &msg->body[3]);	i2o_msg_post(c, m);	/* Wait for a reply */	timeout = jiffies + I2O_TIMEOUT_RESET * HZ;	while (!*status) {		if (time_after(jiffies, timeout))			break;		set_current_state(TASK_UNINTERRUPTIBLE);		schedule_timeout(1);	}	switch (*status) {	case I2O_CMD_REJECTED:		osm_warn("%s: IOP reset rejected\n", c->name);		rc = -EPERM;		break;	case I2O_CMD_IN_PROGRESS:		/*		 * Once the reset is sent, the IOP goes into the INIT state		 * which is indeterminate. We need to wait until the IOP has		 * rebooted before we can let the system talk to it. We read		 * the inbound Free_List until a message is available. If we		 * can't read one in the given ammount of time, we assume the		 * IOP could not reboot properly.		 */		pr_debug("%s: Reset in progress, waiting for reboot...\n",			 c->name);		m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_RESET);		while (m == I2O_QUEUE_EMPTY) {			if (time_after(jiffies, timeout)) {				printk(KERN_ERR "%s: IOP reset timeout.\n",				       c->name);				rc = -ETIMEDOUT;				goto exit;			}			set_current_state(TASK_UNINTERRUPTIBLE);			schedule_timeout(1);			m = i2o_msg_get_wait(c, &msg, I2O_TIMEOUT_RESET);		}		i2o_msg_nop(c, m);		/* from here all quiesce commands are safe */		c->no_quiesce = 0;		/* verify if controller is in state RESET */		i2o_status_get(c);		if (!c->promise && (sb->iop_state != ADAPTER_STATE_RESET))			osm_warn("%s: reset completed, but adapter not in RESET"				 " state.\n", c->name);		else			osm_debug("%s: reset completed.\n", c->name);		break;	default:		osm_err("%s: IOP reset timeout.\n", c->name);		rc = -ETIMEDOUT;		break;	}      exit:	/* Enable all IOPs */	i2o_iop_enable_all();	return rc;};
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f33213ecf49c98da4e85121b592c3bea8057c2e6/iop.c/buggy/drivers/message/i2o/iop.c