[nvmewin] Question on SntiTranslateWrite6()

Freyensee, James P james.p.freyensee at intel.com
Tue Oct 2 09:50:33 PDT 2012


I can fix it and send a patch such that SntiTranslateWrite6() and SntiTranslateRead6() use the same bit-shift algorithm w/appropriate mask names, but I'm not in much of a position to test these specific changes out.  I could probably get this done on Friday assuming your patch is pushed before then. I think I remember how to do the patch process because I did one months ago.

Let me know if this is okay.

Thanks,
Jay

From: Luse, Paul E
Sent: Monday, October 01, 2012 8:16 PM
To: Freyensee, James P; nvmewin at lists.openfabrics.org
Subject: RE: 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> [mailto:nvmewin-bounces at lists.openfabrics.org]<mailto:[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<mailto: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/47a409cc/attachment.html>


More information about the nvmewin mailing list