On Thu, Nov 1, 2012 at 6:42 PM, Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx> wrote: > The length (buffer offset) assignment here is off by one and causes > BLOCK DESCRIPTOR to be incorrectly written into the MEDIUM TYPE byte > area for 10 + 6 byte mode parameter headers according to SPC-4. > > Here's an incremental patch that I'm applying into for-next that allows > sg_mode to work again. > > I'll assume this is a untested bug, right..? Unless there is an > initiator that actually gets this wrong somehow..? Sorry, it was my fault when I was cleaning up the patches for review before posting them. The tree that I tested had: length = ten ? 2 : 1; /* MEDIUM TYPE is always 0 for SBC */ ++length; /* DEVICE-SPECIFIC PARAMETER */ and I accidentally deleted those two middle lines about medium type before posting. Your fixup is fine too, although putting a comment about medium type might be worthwhile. - R. -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html