@@ -60,6 +60,7 @@ static struct scsi_host_template aic94xx_sht = {
.compat_ioctl = sas_ioctl,
#endif
.track_queue_depth = 1,
+ .reserved_queuecommand = sas_queuecommand_internal,
};
static int asd_map_memio(struct asd_ha_struct *asd_ha)
@@ -1760,6 +1760,7 @@ static struct scsi_host_template sht_v1_hw = {
#endif
.shost_groups = host_v1_hw_groups,
.host_reset = hisi_sas_host_reset,
+ .reserved_queuecommand = sas_queuecommand_internal,
};
static const struct hisi_sas_hw hisi_sas_v1_hw = {
@@ -3578,6 +3578,7 @@ static struct scsi_host_template sht_v2_hw = {
.host_reset = hisi_sas_host_reset,
.map_queues = map_queues_v2_hw,
.host_tagset = 1,
+ .reserved_queuecommand = sas_queuecommand_internal,
};
static const struct hisi_sas_hw hisi_sas_v2_hw = {
@@ -3245,6 +3245,7 @@ static struct scsi_host_template sht_v3_hw = {
.tag_alloc_policy = BLK_TAG_ALLOC_RR,
.host_reset = hisi_sas_host_reset,
.host_tagset = 1,
+ .reserved_queuecommand = sas_queuecommand_internal,
};
static const struct hisi_sas_hw hisi_sas_v3_hw = {
@@ -177,6 +177,7 @@ static struct scsi_host_template isci_sht = {
#endif
.shost_groups = isci_host_groups,
.track_queue_depth = 1,
+ .reserved_queuecommand = sas_queuecommand_internal,
};
static struct sas_domain_function_template isci_transport_ops = {
@@ -158,6 +158,19 @@ static struct sas_task *sas_create_task(struct scsi_cmnd *cmd,
return task;
}
+int sas_queuecommand_internal(struct Scsi_Host *shost, struct scsi_cmnd *cmnd)
+{
+ struct sas_ha_struct *ha = SHOST_TO_SAS_HA(shost);
+ struct sas_internal *i = to_sas_internal(ha->core.shost->transportt);
+ struct request *rq = blk_mq_rq_from_pdu(cmnd);
+ struct sas_task *task = rq->end_io_data;
+
+ ASSIGN_SAS_TASK(cmnd, task);
+
+ return i->dft->lldd_execute_task(task, GFP_KERNEL);
+}
+EXPORT_SYMBOL_GPL(sas_queuecommand_internal);
+
int sas_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd)
{
struct sas_internal *i = to_sas_internal(host->transportt);
@@ -54,6 +54,7 @@ static struct scsi_host_template mvs_sht = {
#endif
.shost_groups = mvst_host_groups,
.track_queue_depth = 1,
+ .reserved_queuecommand = sas_queuecommand_internal,
};
static struct sas_domain_function_template mvs_transport_ops = {
@@ -123,6 +123,7 @@ static struct scsi_host_template pm8001_sht = {
.track_queue_depth = 1,
.cmd_per_lun = 32,
.map_queues = pm8001_map_queues,
+ .reserved_queuecommand = sas_queuecommand_internal,
};
/*
@@ -739,6 +739,7 @@ int sas_discover_sata(struct domain_device *);
int sas_discover_end_dev(struct domain_device *);
void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *);
+int sas_queuecommand_internal(struct Scsi_Host *shost, struct scsi_cmnd *cmnd);
void sas_init_dev(struct domain_device *);