summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGuEe-GUI <[email protected]>2025-12-15 15:40:17 +0800
committerR b b666 <[email protected]>2025-12-16 11:39:41 +0800
commite83a6e9baa12cb6230c9bb58938a989bb758bbb8 (patch)
tree347805392abf33f194b8990c82c86304bc360b1d /components
parent491321140966e7acf8f9dd98a4536b4cc232b9f8 (diff)
[dm][scsi] Add parallel_io option for SCSI host
Some SCSI supported parallel_io = RT_TRUE, like UFS. Signed-off-by: GuEe-GUI <[email protected]>
Diffstat (limited to 'components')
-rw-r--r--components/drivers/include/drivers/scsi.h1
-rw-r--r--components/drivers/scsi/scsi_cdrom.c2
-rw-r--r--components/drivers/scsi/scsi_sd.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/components/drivers/include/drivers/scsi.h b/components/drivers/include/drivers/scsi.h
index 7b6baaf54e..9870f308bc 100644
--- a/components/drivers/include/drivers/scsi.h
+++ b/components/drivers/include/drivers/scsi.h
@@ -372,6 +372,7 @@ struct rt_scsi_host
rt_size_t max_id;
rt_size_t max_lun;
+ rt_bool_t parallel_io;
rt_list_t lun_nodes;
};
diff --git a/components/drivers/scsi/scsi_cdrom.c b/components/drivers/scsi/scsi_cdrom.c
index 93608d1e37..5549580b62 100644
--- a/components/drivers/scsi/scsi_cdrom.c
+++ b/components/drivers/scsi/scsi_cdrom.c
@@ -91,7 +91,7 @@ rt_err_t scsi_cdrom_probe(struct rt_scsi_device *sdev)
scdrom->sdev = sdev;
scdrom->parent.ida = &scsi_cdrom_ida;
scdrom->parent.read_only = RT_TRUE;
- scdrom->parent.parallel_io = RT_FALSE;
+ scdrom->parent.parallel_io = sdev->host->parallel_io;
scdrom->parent.ops = &scsi_cdrom_ops;
scdrom->parent.max_partitions = RT_BLK_PARTITION_NONE;
diff --git a/components/drivers/scsi/scsi_sd.c b/components/drivers/scsi/scsi_sd.c
index cc509a7215..4a3c501f3c 100644
--- a/components/drivers/scsi/scsi_sd.c
+++ b/components/drivers/scsi/scsi_sd.c
@@ -205,7 +205,7 @@ rt_err_t scsi_sd_probe(struct rt_scsi_device *sdev)
sdev->priv = ssd;
ssd->sdev = sdev;
ssd->parent.ida = &scsi_sd_ida;
- ssd->parent.parallel_io = RT_FALSE;
+ ssd->parent.parallel_io = sdev->host->parallel_io;
ssd->parent.ops = &scsi_sd_ops;
ssd->parent.max_partitions = RT_BLK_PARTITION_MAX;