[PATCH 2/5] [Target_Core_Mod]: Add REQUEST_SENSE usage subsystem plugins

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From bdb21365a760de67332536ff5d70f3bd3527bbf3 Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
Date: Mon, 23 Mar 2009 22:24:54 -0700
Subject: [PATCH 2/5] [Target_Core_Mod]: Add REQUEST_SENSE usage subsystem plugins

This patch adds supports for the calling of transport_generic_emulate_request_sense()
in IBLOCK, FILEIO and RAMDISK_* subsystem plugins.

Signed-off-by: Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx>
---
 drivers/lio-core/target_core_file.c   |    6 ++++++
 drivers/lio-core/target_core_iblock.c |    6 ++++++
 drivers/lio-core/target_core_rd.c     |    6 ++++++
 3 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/lio-core/target_core_file.c b/drivers/lio-core/target_core_file.c
index b641244..6d42d16 100644
--- a/drivers/lio-core/target_core_file.c
+++ b/drivers/lio-core/target_core_file.c
@@ -493,6 +493,12 @@ static int fd_emulate_scsi_cdb(se_task_t *task)
 		if (ret < 0)
 			return ret;
 		break;
+	case REQUEST_SENSE:
+		ret = transport_generic_emulate_request_sense(cmd,
+				T_TASK(cmd)->t_task_cdb);
+		if (ret < 0)
+			return ret;
+		break;
 	case ALLOW_MEDIUM_REMOVAL:
 	case ERASE:
 	case REZERO_UNIT:
diff --git a/drivers/lio-core/target_core_iblock.c b/drivers/lio-core/target_core_iblock.c
index abd39bc..8b93dbc 100644
--- a/drivers/lio-core/target_core_iblock.c
+++ b/drivers/lio-core/target_core_iblock.c
@@ -510,6 +510,12 @@ static int iblock_emulate_scsi_cdb(se_task_t *task)
 		if (ret < 0)
 			return ret;
 		break;
+	case REQUEST_SENSE:
+		ret = transport_generic_emulate_request_sense(cmd,
+				T_TASK(cmd)->t_task_cdb);
+		if (ret < 0)
+			return ret;
+		break;
 	case ALLOW_MEDIUM_REMOVAL:
 	case ERASE:
 	case REZERO_UNIT:
diff --git a/drivers/lio-core/target_core_rd.c b/drivers/lio-core/target_core_rd.c
index de61067..e65e723 100644
--- a/drivers/lio-core/target_core_rd.c
+++ b/drivers/lio-core/target_core_rd.c
@@ -501,6 +501,12 @@ static int rd_emulate_scsi_cdb(se_task_t *task)
 		if (ret < 0)
 			return ret;
 		break;
+	case REQUEST_SENSE:
+		ret = transport_generic_emulate_request_sense(cmd,
+				T_TASK(cmd)->t_task_cdb);
+		if (ret < 0)
+			return ret;
+		break;
 	case ALLOW_MEDIUM_REMOVAL:
 	case ERASE:
 	case REZERO_UNIT:
-- 
1.5.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux