All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target: Handle GET_EVENT_STATUS_NOTIFICATION passthrough
@ 2012-04-30 15:35 ` Stefan Hajnoczi
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-04-30 15:35 UTC (permalink / raw)
  To: target-devel
  Cc: Nicholas A. Bellinger, linux-scsi, linux-kernel, Stefan Hajnoczi

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>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] target: Handle GET_EVENT_STATUS_NOTIFICATION passthrough
@ 2012-04-30 15:35 ` Stefan Hajnoczi
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2012-04-30 15:35 UTC (permalink / raw)
  To: target-devel
  Cc: Nicholas A. Bellinger, linux-scsi, linux-kernel, Stefan Hajnoczi

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>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] target: Handle GET_EVENT_STATUS_NOTIFICATION passthrough
  2012-04-30 15:35 ` Stefan Hajnoczi
  (?)
@ 2012-05-04  1:24 ` Nicholas A. Bellinger
  -1 siblings, 0 replies; 3+ messages in thread
From: Nicholas A. Bellinger @ 2012-05-04  1:24 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: target-devel, linux-scsi, linux-kernel

On Mon, 2012-04-30 at 16:35 +0100, Stefan Hajnoczi wrote:
> 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>
> ---
>  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",

Applied to lio-core, and will get this added into for-next for 3.5-rc1

Thanks Cong + Stefan!

--nab


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-04  1:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-30 15:35 [PATCH] target: Handle GET_EVENT_STATUS_NOTIFICATION passthrough Stefan Hajnoczi
2012-04-30 15:35 ` Stefan Hajnoczi
2012-05-04  1:24 ` Nicholas A. Bellinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.