ap->hsm_task_state = HSM_ST_IDLE;  
static void ata_qc_timeout(struct ata_queued_cmd *qc){	struct ata_port *ap = qc->ap;	struct ata_host_set *host_set = ap->host_set;	struct ata_device *dev = qc->dev;	u8 host_stat = 0, drv_stat;	unsigned long flags;	DPRINTK("ENTER\n");	/* FIXME: doesn't this conflict with timeout handling? */	if (qc->dev->class == ATA_DEV_ATAPI && qc->scsicmd) {		struct scsi_cmnd *cmd = qc->scsicmd;		if (!(cmd->eh_eflags & SCSI_EH_CANCEL_CMD)) {			/* finish completing original command */			spin_lock_irqsave(&host_set->lock, flags);			__ata_qc_complete(qc);			spin_unlock_irqrestore(&host_set->lock, flags);			atapi_request_sense(ap, dev, cmd);			cmd->result = (CHECK_CONDITION << 1) | (DID_OK << 16);			scsi_finish_command(cmd);			goto out;		}	}	spin_lock_irqsave(&host_set->lock, flags);	/* hack alert!  We cannot use the supplied completion	 * function from inside the ->eh_strategy_handler() thread.	 * libata is the only user of ->eh_strategy_handler() in	 * any kernel, so the default scsi_done() assumes it is	 * not being called from the SCSI EH.	 */	qc->scsidone = scsi_finish_command;	switch (qc->tf.protocol) {	case ATA_PROT_DMA:	case ATA_PROT_ATAPI_DMA:		host_stat = ap->ops->bmdma_status(ap);		/* before we do anything else, clear DMA-Start bit */		ap->ops->bmdma_stop(qc);		/* fall through */	default:		ata_altstatus(ap);		drv_stat = ata_chk_status(ap);		/* ack bmdma irq events */		ap->ops->irq_clear(ap);		printk(KERN_ERR "ata%u: command 0x%x timeout, stat 0x%x host_stat 0x%x\n",		       ap->id, qc->tf.command, drv_stat, host_stat);		/* complete taskfile transaction */		ata_qc_complete(qc, drv_stat);		break;	}	spin_unlock_irqrestore(&host_set->lock, flags);out:	DPRINTK("EXIT\n");}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/312f7da2824c82800ee78d6190f12854456957af/libata-core.c/clean/drivers/scsi/libata-core.c