/* Return Value: returns SUCCESS if ABORT TASK has good completion otherwise FAILED  */
static int pmcraid_abort_complete(struct pmcraid_cmd *cancel_cmd)
/* Return Value: returns SUCCESS if ABORT TASK has good completion otherwise FAILED  */
static int pmcraid_abort_complete(struct pmcraid_cmd *cancel_cmd)
{
	struct pmcraid_resource_entry *res;
	u32 ioasc;
	wait_for_completion(&cancel_cmd->wait_for_completion);
	res = cancel_cmd->u.res;
	cancel_cmd->u.res = NULL;
	ioasc = le32_to_cpu(cancel_cmd->ioa_cb->ioasa.ioasc);
	if (ioasc == PMCRAID_IOASC_UA_BUS_WAS_RESET ||
	    ioasc == PMCRAID_IOASC_NR_SYNC_REQUIRED) {
		if (ioasc == PMCRAID_IOASC_NR_SYNC_REQUIRED)
			res->sync_reqd = 1;
		ioasc = 0;
	}
	pmcraid_return_cmd(cancel_cmd);
	return PMCRAID_IOASC_SENSE_KEY(ioasc) ? FAILED : SUCCESS;
}