/* RETURNS: ATA_DEFER_* if deferring is needed, 0 otherwise.  */
int ata_std_qc_defer(struct ata_queued_cmd *qc)
/* RETURNS: ATA_DEFER_* if deferring is needed, 0 otherwise.  */
int ata_std_qc_defer(struct ata_queued_cmd *qc)
{
	struct ata_link *link = qc->dev->link;
	if (qc->tf.protocol == ATA_PROT_NCQ) {
		if (!ata_tag_valid(link->active_tag))
			return 0;
	} else {
		if (!ata_tag_valid(link->active_tag) && !link->sactive)
			return 0;
	}
	return ATA_DEFER_LINK;
}