DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset called pid:%ld target:" " %x lun: %x\n", cmd->pid, cmd->device->id, cmd->device->lun)); 
DBG(DBG_ABNORM, scmd_printk(KERN_WARNING, cmd, "eata_pio_reset called pid:%ld\n", cmd->pid)); 
static int eata_pio_host_reset(struct scsi_cmnd *cmd){	uint x, limit = 0;	unsigned char success = 0;	struct scsi_cmnd *sp;	struct Scsi_Host *host = cmd->device->host;	DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset called pid:%ld target:" " %x lun: %x\n", cmd->pid, cmd->device->id, cmd->device->lun));	spin_lock_irq(host->host_lock);	if (HD(cmd)->state == RESET) {		printk(KERN_WARNING "eata_pio_reset: exit, already in reset.\n");		spin_unlock_irq(host->host_lock);		return FAILED;	}	/* force all slots to be free */	for (x = 0; x < cmd->device->host->can_queue; x++) {		if (HD(cmd)->ccb[x].status == FREE)			continue;		sp = HD(cmd)->ccb[x].cmd;		HD(cmd)->ccb[x].status = RESET;		printk(KERN_WARNING "eata_pio_reset: slot %d in reset, pid %ld.\n", x, sp->pid);		if (sp == NULL)			panic("eata_pio_reset: slot %d, sp==NULL.\n", x);	}	/* hard reset the HBA  */	outb(EATA_CMD_RESET, (uint) cmd->device->host->base + HA_WCOMMAND);	DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: board reset done.\n"));	HD(cmd)->state = RESET;	spin_unlock_irq(host->host_lock);	msleep(3000);	spin_lock_irq(host->host_lock);	DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: interrupts disabled, " "loops %d.\n", limit));	for (x = 0; x < cmd->device->host->can_queue; x++) {		/* Skip slots already set free by interrupt */		if (HD(cmd)->ccb[x].status != RESET)			continue;		sp = HD(cmd)->ccb[x].cmd;		sp->result = DID_RESET << 16;		/* This mailbox is terminated */		printk(KERN_WARNING "eata_pio_reset: reset ccb %d.\n", x);		HD(cmd)->ccb[x].status = FREE;		sp->scsi_done(sp);	}	HD(cmd)->state = 0;	spin_unlock_irq(host->host_lock);	if (success) {		/* hmmm... */		DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: exit, success.\n"));		return SUCCESS;	} else {		DBG(DBG_ABNORM, printk(KERN_WARNING "eata_pio_reset: exit, wakeup.\n"));		return FAILED;	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/017560fca496f72ed9dd734ffde63ce39dfe0411/eata_pio.c/clean/drivers/scsi/eata_pio.c