[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1335800113-28075-1-git-send-email-stefanha@linux.vnet.ibm.com>
Date: Mon, 30 Apr 2012 16:35:13 +0100
From: Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com>
To: <target-devel@...r.kernel.org>
Cc: "Nicholas A. Bellinger" <nab@...ux-iscsi.org>,
linux-scsi@...r.kernel.org, <linux-kernel@...r.kernel.org>,
Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com>
Subject: [PATCH] target: Handle GET_EVENT_STATUS_NOTIFICATION passthrough
The SCSI MMC GET_EVENT_STATUS_NOTIFICATION command can be used to find
out about media change, among other things. This patch adds it to the
command sequencer so that PSCSI CD-ROM passthrough works with modern
Linux guests that issue this command.
Tested-by: Cong Meng <mengcong@...ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@...ux.vnet.ibm.com>
---
drivers/target/target_core_transport.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index a953ca0..5b83fd2 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -3146,6 +3146,10 @@ static int transport_generic_cmd_sequencer(
cmd->sam_task_attr = MSG_HEAD_TAG;
cmd->se_cmd_flags |= SCF_SCSI_CONTROL_SG_IO_CDB;
break;
+ case GET_EVENT_STATUS_NOTIFICATION:
+ size = (cdb[7] << 8) | cdb[8];
+ cmd->se_cmd_flags |= SCF_SCSI_CONTROL_SG_IO_CDB;
+ break;
default:
pr_warn("TARGET_CORE[%s]: Unsupported SCSI Opcode"
" 0x%02x, sending CHECK_CONDITION.\n",
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists