public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] [Linux/SCSI] Add support for SPC-4 CDBs referenced in Persisent Reservations Allowed/Confict Table
@ 2009-01-22  8:23 Nicholas A. Bellinger
  2009-01-25 21:06 ` James Bottomley
  0 siblings, 1 reply; 3+ messages in thread
From: Nicholas A. Bellinger @ 2009-01-22  8:23 UTC (permalink / raw)
  To: Linux-iSCSI.org Target Dev
  Cc: LKML, linux-scsi, James Bottomley, Matthew Wilcox,
	Martin K. Petersen

>From c177bb7ba55227d809d85aca3a9d4281e554f718 Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@linux-iscsi.org>
Date: Wed, 21 Jan 2009 22:13:00 -0800
Subject: [PATCH 1/4] [Linux/SCSI] Add support for SPC-4 CDBs referenced in Persisent Reservations Allowed/Confict Table

This path adds support for a handful of SPC-4 CDBs, and fills out the MI_* and MO_* prefixed
service action codes for MAINTENANCE_IN and MAINTENANCE_OUT operations.

This information is from spc4r17 and Table D.4 for MI_ and MO_ prefixed defs.

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
---
 include/scsi/scsi.h |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index a109165..93af6ce 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -104,30 +104,52 @@
 #define PERSISTENT_RESERVE_IN 0x5e
 #define PERSISTENT_RESERVE_OUT 0x5f
 #define VARIABLE_LENGTH_CMD   0x7f
+#define RECEIVE_CREDENTIAL    0x7f // spc4r17 section 6.9 Table 204
 #define REPORT_LUNS           0xa0
+#define SECURITY_PROTOCOL_IN  0xa2
 #define MAINTENANCE_IN        0xa3
 #define MAINTENANCE_OUT       0xa4
 #define MOVE_MEDIUM           0xa5
 #define EXCHANGE_MEDIUM       0xa6
 #define READ_12               0xa8
 #define WRITE_12              0xaa
+#define READ_MEDIA_SERIAL_NUMBER 0xab
 #define WRITE_VERIFY_12       0xae
 #define SEARCH_HIGH_12        0xb0
 #define SEARCH_EQUAL_12       0xb1
 #define SEARCH_LOW_12         0xb2
+#define SECURITY_PROTOCOL_OUT 0xb5
 #define READ_ELEMENT_STATUS   0xb8
 #define SEND_VOLUME_TAG       0xb6
 #define WRITE_LONG_2          0xea
+#define EXTENDED_COPY         0x83
+#define RECEIVE_COPY_RESULTS  0x84
+#define ACCESS_CONTROL_IN     0x86
+#define ACCESS_CONTROL_OUT    0x87
 #define READ_16               0x88
 #define WRITE_16              0x8a
+#define READ_ATTRIBUTE        0x8c
+#define WRITE_ATTRIBUTE	      0x8d
 #define VERIFY_16	      0x8f
 #define SERVICE_ACTION_IN     0x9e
 /* values for service action in */
 #define	SAI_READ_CAPACITY_16  0x10
 /* values for maintenance in */
+#define MI_REPORT_IDENTIFYING_INFORMATION 0x05
 #define MI_REPORT_TARGET_PGS  0x0a
+#define MI_REPORT_ALIASES     0x0b
+#define MI_REPORT_SUPPORTED_OPERATION_CODES 0x0c
+#define MI_REPORT_SUPPORTED_TASK_MANAGEMENT_FUNCTIONS 0x0d
+#define MI_REPORT_PRIORITY   0x0e
+#define MI_REPORT_TIMESTAMP  0x0f
+#define MI_MANAGEMENT_PROTOCOL_IN 0x10
 /* values for maintenance out */
+#define MO_SET_IDENTIFYING_INFORMATION 0x06
 #define MO_SET_TARGET_PGS     0x0a
+#define MO_CHANGE_ALIASES     0x0b
+#define MO_SET_PRIORITY       0x0e
+#define MO_SET_TIMESTAMP      0x0f
+#define MO_MANAGEMENT_PROTOCOL_OUT 0x10
 
 /* Values for T10/04-262r7 */
 #define	ATA_16		      0x85	/* 16-byte pass-thru */
-- 
1.5.4.1




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

* Re: [PATCH 1/4] [Linux/SCSI] Add support for SPC-4 CDBs referenced in Persisent Reservations Allowed/Confict Table
  2009-01-22  8:23 [PATCH 1/4] [Linux/SCSI] Add support for SPC-4 CDBs referenced in Persisent Reservations Allowed/Confict Table Nicholas A. Bellinger
@ 2009-01-25 21:06 ` James Bottomley
  2009-01-26  9:13   ` Nicholas A. Bellinger
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2009-01-25 21:06 UTC (permalink / raw)
  To: Nicholas A. Bellinger
  Cc: Linux-iSCSI.org Target Dev, LKML, linux-scsi, Matthew Wilcox,
	Martin K. Petersen

On Thu, 2009-01-22 at 00:23 -0800, Nicholas A. Bellinger wrote:
> >From c177bb7ba55227d809d85aca3a9d4281e554f718 Mon Sep 17 00:00:00 2001
> From: Nicholas Bellinger <nab@linux-iscsi.org>
> Date: Wed, 21 Jan 2009 22:13:00 -0800
> Subject: [PATCH 1/4] [Linux/SCSI] Add support for SPC-4 CDBs referenced in Persisent Reservations Allowed/Confict Table
> 
> This path adds support for a handful of SPC-4 CDBs, and fills out the MI_* and MO_* prefixed
> service action codes for MAINTENANCE_IN and MAINTENANCE_OUT operations.
> 
> This information is from spc4r17 and Table D.4 for MI_ and MO_ prefixed defs.
> 
> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>

These additions look reasonable, there are just a few semantic problems:

>  include/scsi/scsi.h |   22 ++++++++++++++++++++++
>  1 files changed, 22 insertions(+), 0 deletions(-)
> 
> diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
> index a109165..93af6ce 100644
> --- a/include/scsi/scsi.h
> +++ b/include/scsi/scsi.h
> @@ -104,30 +104,52 @@
>  #define PERSISTENT_RESERVE_IN 0x5e
>  #define PERSISTENT_RESERVE_OUT 0x5f
>  #define VARIABLE_LENGTH_CMD   0x7f
> +#define RECEIVE_CREDENTIAL    0x7f // spc4r17 section 6.9 Table 204

Actually 0x7f isn't receive credentials, that's VARIABLE_LENGTH_CMD
(definition above) with a Service Action of 0x1800 ... it needs to be
done something like READ CAPACITY(16) is

>  #define REPORT_LUNS           0xa0
> +#define SECURITY_PROTOCOL_IN  0xa2
>  #define MAINTENANCE_IN        0xa3
>  #define MAINTENANCE_OUT       0xa4
>  #define MOVE_MEDIUM           0xa5
>  #define EXCHANGE_MEDIUM       0xa6
>  #define READ_12               0xa8
>  #define WRITE_12              0xaa
> +#define READ_MEDIA_SERIAL_NUMBER 0xab
>  #define WRITE_VERIFY_12       0xae
>  #define SEARCH_HIGH_12        0xb0
>  #define SEARCH_EQUAL_12       0xb1
>  #define SEARCH_LOW_12         0xb2
> +#define SECURITY_PROTOCOL_OUT 0xb5
>  #define READ_ELEMENT_STATUS   0xb8
>  #define SEND_VOLUME_TAG       0xb6
>  #define WRITE_LONG_2          0xea
> +#define EXTENDED_COPY         0x83
> +#define RECEIVE_COPY_RESULTS  0x84
> +#define ACCESS_CONTROL_IN     0x86
> +#define ACCESS_CONTROL_OUT    0x87
>  #define READ_16               0x88
>  #define WRITE_16              0x8a
> +#define READ_ATTRIBUTE        0x8c
> +#define WRITE_ATTRIBUTE	      0x8d
>  #define VERIFY_16	      0x8f
>  #define SERVICE_ACTION_IN     0x9e
>  /* values for service action in */
>  #define	SAI_READ_CAPACITY_16  0x10

Here ^^^^^

James



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

* Re: [PATCH 1/4] [Linux/SCSI] Add support for SPC-4 CDBs referenced in Persisent Reservations Allowed/Confict Table
  2009-01-25 21:06 ` James Bottomley
@ 2009-01-26  9:13   ` Nicholas A. Bellinger
  0 siblings, 0 replies; 3+ messages in thread
From: Nicholas A. Bellinger @ 2009-01-26  9:13 UTC (permalink / raw)
  To: James Bottomley
  Cc: Linux-iSCSI.org Target Dev, LKML, linux-scsi, Matthew Wilcox,
	Martin K. Petersen

On Sun, 2009-01-25 at 15:06 -0600, James Bottomley wrote:
> On Thu, 2009-01-22 at 00:23 -0800, Nicholas A. Bellinger wrote:
> > >From c177bb7ba55227d809d85aca3a9d4281e554f718 Mon Sep 17 00:00:00 2001
> > From: Nicholas Bellinger <nab@linux-iscsi.org>
> > Date: Wed, 21 Jan 2009 22:13:00 -0800
> > Subject: [PATCH 1/4] [Linux/SCSI] Add support for SPC-4 CDBs referenced in Persisent Reservations Allowed/Confict Table
> > 
> > This path adds support for a handful of SPC-4 CDBs, and fills out the MI_* and MO_* prefixed
> > service action codes for MAINTENANCE_IN and MAINTENANCE_OUT operations.
> > 
> > This information is from spc4r17 and Table D.4 for MI_ and MO_ prefixed defs.
> > 
> > Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
> 
> These additions look reasonable, there are just a few semantic problems:
> 
> >  include/scsi/scsi.h |   22 ++++++++++++++++++++++
> >  1 files changed, 22 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
> > index a109165..93af6ce 100644
> > --- a/include/scsi/scsi.h
> > +++ b/include/scsi/scsi.h
> > @@ -104,30 +104,52 @@
> >  #define PERSISTENT_RESERVE_IN 0x5e
> >  #define PERSISTENT_RESERVE_OUT 0x5f
> >  #define VARIABLE_LENGTH_CMD   0x7f
> > +#define RECEIVE_CREDENTIAL    0x7f // spc4r17 section 6.9 Table 204
> 
> Actually 0x7f isn't receive credentials, that's VARIABLE_LENGTH_CMD
> (definition above) with a Service Action of 0x1800 ... it needs to be
> done something like READ CAPACITY(16) is
> 

Ugh, this is what I thought..  I will fix and repost with complete
SAI_* defines..

Many thanks for your most valuable of time,

--nab

> >  #define REPORT_LUNS           0xa0
> > +#define SECURITY_PROTOCOL_IN  0xa2
> >  #define MAINTENANCE_IN        0xa3
> >  #define MAINTENANCE_OUT       0xa4
> >  #define MOVE_MEDIUM           0xa5
> >  #define EXCHANGE_MEDIUM       0xa6
> >  #define READ_12               0xa8
> >  #define WRITE_12              0xaa
> > +#define READ_MEDIA_SERIAL_NUMBER 0xab
> >  #define WRITE_VERIFY_12       0xae
> >  #define SEARCH_HIGH_12        0xb0
> >  #define SEARCH_EQUAL_12       0xb1
> >  #define SEARCH_LOW_12         0xb2
> > +#define SECURITY_PROTOCOL_OUT 0xb5
> >  #define READ_ELEMENT_STATUS   0xb8
> >  #define SEND_VOLUME_TAG       0xb6
> >  #define WRITE_LONG_2          0xea
> > +#define EXTENDED_COPY         0x83
> > +#define RECEIVE_COPY_RESULTS  0x84
> > +#define ACCESS_CONTROL_IN     0x86
> > +#define ACCESS_CONTROL_OUT    0x87
> >  #define READ_16               0x88
> >  #define WRITE_16              0x8a
> > +#define READ_ATTRIBUTE        0x8c
> > +#define WRITE_ATTRIBUTE	      0x8d
> >  #define VERIFY_16	      0x8f
> >  #define SERVICE_ACTION_IN     0x9e
> >  /* values for service action in */
> >  #define	SAI_READ_CAPACITY_16  0x10
> 
> Here ^^^^^
> 
> James
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


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

end of thread, other threads:[~2009-01-26  9:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22  8:23 [PATCH 1/4] [Linux/SCSI] Add support for SPC-4 CDBs referenced in Persisent Reservations Allowed/Confict Table Nicholas A. Bellinger
2009-01-25 21:06 ` James Bottomley
2009-01-26  9:13   ` Nicholas A. Bellinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox