summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-04-30 16:35:13 +0100
committerNicholas Bellinger <nab@linux-iscsi.org>2012-05-06 15:02:33 -0700
commited0b2144c50b03ed926aa1c582178abb661325e2 (patch)
tree0a96bd9c6f20e936908407a60a2501bee6f541e1
parent381e309a658feadb48c14566b3b26ccb7eec75a0 (diff)
downloadlinux-stable-ed0b2144c50b03ed926aa1c582178abb661325e2.tar.gz
linux-stable-ed0b2144c50b03ed926aa1c582178abb661325e2.tar.bz2
linux-stable-ed0b2144c50b03ed926aa1c582178abb661325e2.zip
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@cn.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r--drivers/target/target_core_transport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 28945d999613..901fb2905aed 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -3143,6 +3143,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",