[nvmewin] Question on SntiTranslateWrite6()

Neal Galbo (ngalbo) ngalbo at micron.com
Tue Oct 2 07:00:55 PDT 2012


FYI,

6-byte SCSI READ/WRITE CDB's have a Big Endian 16-bit LBA.
Shouldn't you be "getting" a U16? (GET_U16_FROM_CDB)

Regards,
Neal Galbo

From: nvmewin-bounces at lists.openfabrics.org [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Luse, Paul E
Sent: Monday, October 01, 2012 11:16 PM
To: Freyensee, James P; nvmewin at lists.openfabrics.org
Subject: Re: [nvmewin] Question on SntiTranslateWrite6()

Yup, there's a few copy n paste errors here.  In SntiTranslateWrite6() we should be using the 24 macro and in SntiTranslateRead6() we should be masking with READ_6_CDB_LBA_MASK for readability (it's the same as the write mask define).  If you'd like some practice submitting a patch you can send one out with this and any other cleanup you might find after my patch in flight is pushed.  I'd offer to throw these in mine but I've already tested with 2 HW platforms and QEMU and don't want to re-test :)

Thanks
Paul

From: nvmewin-bounces at lists.openfabrics.org [mailto:nvmewin-bounces at lists.openfabrics.org] On Behalf Of Freyensee, James P
Sent: Monday, October 01, 2012 7:04 PM
To: nvmewin at lists.openfabrics.org
Subject: [nvmewin] Question on SntiTranslateWrite6()

I have a question in SntiTranslateWrite6().  Should this line:

lba = GET_U32_FROM_CDB(pSrb, WRITE_6_CDB_LBA_OFFSET);

actually be using the following MACRO mask, found in SntiTranslateRead6():

    lba = GET_U24_FROM_CDB(pSrb, READ_6_CDB_LBA_OFFSET);

I'm not totally clear on the different byte shifting and the different offsets being used between the two.  However from the SCSI spec, the LBA bits are in the same spot in CDB[] for Write6 and Read6.  So I would have assumed the byte shifting and offset algorithm and values would be the same.

Thanks,
Jay

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/nvmewin/attachments/20121002/aa8724d2/attachment.html>


More information about the nvmewin mailing list