Linux block layer
 help / color / mirror / Atom feed
From: "Derrick, Jonathan" <jonathan.derrick@intel.com>
To: "Rajashekar, Revanth" <revanth.rajashekar@intel.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>
Cc: "sbauer@plzdonthack.me" <sbauer@plzdonthack.me>
Subject: Re: [PATCH] block: sed-opal: Introduce SUM_SET_LIST parameter and append it using 'add_token_u64'
Date: Mon, 18 Nov 2019 16:47:48 +0000	[thread overview]
Message-ID: <0799d4b77fc58ff0be7d403648e25a99a5077bdb.camel@intel.com> (raw)
In-Reply-To: <63cfa17b-28df-ac52-30ac-d5d6bd93a116@kernel.dk>

On Thu, 2019-11-14 at 10:28 -0700, Jens Axboe wrote:
> On 11/14/19 9:14 AM, Rajashekar, Revanth wrote:
> > Hi,
> > 
> > On 11/8/2019 4:09 PM, Revanth Rajashekar wrote:
> > > In function 'activate_lsp', rather than hard-coding the
> > > short atom header(0x83), we need to let the function
> > > 'add_short_atom_header' append the header based on the
> > > parameter being appended.
> > > 
> > > The paramete has been defined in Section 3.1.2.1 of
> > > https://trustedcomputinggroup.org/wp-content/uploads/TCG_Storage-Opal_Feature_Set_Single_User_Mode_v1-00_r1-00-Final.pdf
> > > 
> > > Signed-off-by: Revanth Rajashekar <revanth.rajashekar@intel.com>
> > > ---
> > >   block/opal_proto.h | 4 ++++
> > >   block/sed-opal.c   | 6 +-----
> > >   2 files changed, 5 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/block/opal_proto.h b/block/opal_proto.h
> > > index 736e67c3e7c5..325cbba2465f 100644
> > > --- a/block/opal_proto.h
> > > +++ b/block/opal_proto.h
> > > @@ -205,6 +205,10 @@ enum opal_lockingstate {
> > >   	OPAL_LOCKING_LOCKED = 0x03,
> > >   };
> > >   
> > > +enum opal_parameter {
> > > +	OPAL_SUM_SET_LIST = 0x060000,
> > > +};
> > > +
> > >   /* Packets derived from:
> > >    * TCG_Storage_Architecture_Core_Spec_v2.01_r1.00
> > >    * Secion: 3.2.3 ComPackets, Packets & Subpackets
> > > diff --git a/block/sed-opal.c b/block/sed-opal.c
> > > index b2cacc9ddd11..880cc57a5f6b 100644
> > > --- a/block/sed-opal.c
> > > +++ b/block/sed-opal.c
> > > @@ -1886,7 +1886,6 @@ static int activate_lsp(struct opal_dev *dev, void *data)
> > >   {
> > >   	struct opal_lr_act *opal_act = data;
> > >   	u8 user_lr[OPAL_UID_LENGTH];
> > > -	u8 uint_3 = 0x83;
> > >   	int err, i;
> > >   
> > >   	err = cmd_start(dev, opaluid[OPAL_LOCKINGSP_UID],
> > > @@ -1899,10 +1898,7 @@ static int activate_lsp(struct opal_dev *dev, void *data)
> > >   			return err;
> > >   
> > >   		add_token_u8(&err, dev, OPAL_STARTNAME);
> > > -		add_token_u8(&err, dev, uint_3);
> > > -		add_token_u8(&err, dev, 6);
> > > -		add_token_u8(&err, dev, 0);
> > > -		add_token_u8(&err, dev, 0);
> > > +		add_token_u64(&err, dev, OPAL_SUM_SET_LIST);
> > >   
> > >   		add_token_u8(&err, dev, OPAL_STARTLIST);
> > >   		add_token_bytestring(&err, dev, user_lr, OPAL_UID_LENGTH);
> > 
> > Kind remainder to review this patch and throw your comments if any :)
> 
> I'll be happy to queue it up for 5.5, but Scott/Jonathan should
> review/ack it first.
> 

Looks like it should work the same
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>

  parent reply	other threads:[~2019-11-18 16:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-08 23:09 [PATCH] block: sed-opal: Introduce SUM_SET_LIST parameter and append it using 'add_token_u64' Revanth Rajashekar
2019-11-14 16:14 ` Rajashekar, Revanth
2019-11-14 17:28   ` Jens Axboe
2019-11-14 18:19     ` Rajashekar, Revanth
2019-11-18 16:47     ` Derrick, Jonathan [this message]
2019-11-18 16:49 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0799d4b77fc58ff0be7d403648e25a99a5077bdb.camel@intel.com \
    --to=jonathan.derrick@intel.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=revanth.rajashekar@intel.com \
    --cc=sbauer@plzdonthack.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox