From 121a7dcc9c6df6461437ad60c0be6c06dd19afec Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Wed, 2 May 2007 03:12:30 +0900 Subject: [PATCH] add bogus XDWRITEREAD_10 support Signed-off-by: FUJITA Tomonori --- usr/sbc.c | 30 +++++++++++++++++++++++++++++- 1 files changed, 29 insertions(+), 1 deletions(-) diff --git a/usr/sbc.c b/usr/sbc.c index a22d3b0..a75cd17 100644 --- a/usr/sbc.c +++ b/usr/sbc.c @@ -41,6 +41,13 @@ #include "spc.h" #define BLK_SHIFT 9 +static int sbc_xdwrite(int host_no, struct scsi_cmd *cmd) +{ + cmd->len = __be16_to_cpu(*(uint16_t *)&cmd->scb[7]) << BLK_SHIFT; + eprintf("xdwrite %u\n", cmd->len); + return SAM_STAT_GOOD; +} + static int sbc_rw(int host_no, struct scsi_cmd *cmd) { int ret; @@ -417,7 +424,28 @@ struct device_type_template sbc_template {spc_illegal_op,}, {spc_illegal_op,}, - [0x40 ... 0x7f] = {spc_illegal_op,}, + [0x40 ... 0x4f] = {spc_illegal_op,}, + + /* 0x50 */ + {sbc_xdwrite,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + {spc_illegal_op,}, + + [0x60 ... 0x7f] = {spc_illegal_op,}, /* 0x80 */ {spc_illegal_op,}, -- 1.4.3.2