From: Bart Van Assche Date: Wed, 9 Dec 2009 18:52:19 +0000 (+0100) Subject: [SCSI] libsrp: fix bug in ADDITIONAL CDB LENGTH interpretation X-Git-Tag: v2.6.34-rc1~284^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78d85019ba8c13e1094cad0ea9bb4f61caad8320;p=pandora-kernel.git [SCSI] libsrp: fix bug in ADDITIONAL CDB LENGTH interpretation Fix a bug in the interpretation of the ADDITIONAL CDB LENGTH (add_cdb_len) field of SRP_CMD requests. According to the SRP specification, the layout of this single-byte field is as follows: * Bits 0 and 1 are reserved. * Bits 2 to 7 represent the ADDITIONAL CDB LENGTH field, symbolically represented as n. * Still according to the SRP specification, the ADDITIONAL CDB section takes 4*n bytes. Currently libsrp is only used by the ibmvscsi driver. Since the ibmvscsi driver doesn't support large CDB's, this bug hasn't caused any problems yet. [jejb: use & ~3 to mask the bits] Signed-off-by: Bart Van Assche Acked-by: FUJITA Tomonori Signed-off-by: James Bottomley --- Reading git-diff-tree failed