/* Tell an upper layer that it needs to initiate an abort for a given task. This should only ever be called by an LLDD.  */
void sas_task_abort(struct sas_task *task)
/* Tell an upper layer that it needs to initiate an abort for a given task. This should only ever be called by an LLDD.  */
void sas_task_abort(struct sas_task *task)
{
	struct scsi_cmnd *sc = task->uldd_task;
	if (!sc) {
		if (!del_timer(&task->timer))
			return;
		task->timer.function(task->timer.data);
		return;
	}
	if (dev_is_sata(task->dev)) {
		sas_ata_task_abort(task);
		return;
	}
	blk_abort_request(sc->request);
	scsi_schedule_eh(sc->device->host);
}