/* RETURNS: Return value from __ata_scsi_queuecmd() if @cmd can be queued, 0 otherwise.  */
int ata_sas_queuecmd(struct scsi_cmnd *cmd, void(*done)(struct scsi_cmnd *), struct ata_port *ap)
/* RETURNS: Return value from __ata_scsi_queuecmd() if @cmd can be queued, 0 otherwise.  */
int ata_sas_queuecmd(struct scsi_cmnd *cmd, void(*done)(struct scsi_cmnd *), struct ata_port *ap)
{
	int rc = 0;
	ata_scsi_dump_cdb(ap, cmd);
	if (likely(ata_dev_enabled(ap->link.device)))
		rc = __ata_scsi_queuecmd(cmd, done, ap->link.device);
	else {
		cmd->result = (DID_BAD_TARGET << 16);
		done(cmd);
	}
	return rc;
}