Re: [PATCH 0/6] iser new implementation

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

 



On Mon, 31 Jan 2011 17:14:18 -0500
Pete Wyckoff <pw@xxxxxxxx> wrote:

> The XDREADWRITE_10 command is also bidi.  This might be easier
> to hack into the disk target if it is not already there.  See
> the implementation in linux scsi_debug.c if it is helpful.

I've attached a patch to add fake XDREADWRITE_10 support.

You can use my makeshift bsg tool to send a XDREADWRITE_10 command:

http://git.kernel.org/?p=linux/kernel/git/tomo/sgv4-tools.git;a=summary

vine:/home/fujita# ./sgv4-tools/sgv4_xdwriteread /sys/class/bsg/2\:0\:0\:1
driver:0, transport:0, device:0, din_resid: 0, dout_resid: 0


diff --git a/usr/sbc.c b/usr/sbc.c
index d73306b..6f59dc1 100644
--- a/usr/sbc.c
+++ b/usr/sbc.c
@@ -268,6 +268,11 @@ sense:
 	return SAM_STAT_CHECK_CONDITION;
 }
 
+static int sbc_xdwriteread(int host_no, struct scsi_cmd *cmd)
+{
+	return SAM_STAT_GOOD;
+}
+
 static int sbc_lu_init(struct scsi_lu *lu)
 {
 	uint64_t size;
@@ -403,7 +408,7 @@ static struct device_type_template sbc_template = {
 		{spc_illegal_op,},
 		{spc_illegal_op,},
 		{spc_illegal_op,},
-		{spc_illegal_op,},
+		{sbc_xdwriteread,},
 		{spc_illegal_op,},
 		{sbc_mode_select, NULL, PR_WE_FA|PR_EA_FA|PR_WE_FN|PR_EA_FN},
 		{spc_illegal_op,},
diff --git a/usr/scsi.h b/usr/scsi.h
index f4d8c11..b4724f0 100644
--- a/usr/scsi.h
+++ b/usr/scsi.h
@@ -63,6 +63,7 @@
 #define READ_TOC              0x43
 #define LOG_SELECT            0x4c
 #define LOG_SENSE             0x4d
+#define XDWRITEREAD_10        0x53
 #define MODE_SELECT_10        0x55
 #define RESERVE_10            0x56
 #define RELEASE_10            0x57
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux