target: Set peripheral device type consistently in INQUIRY response
commit089461dda1770c10fea0b988ff74519a9be81d7e
authorRoland Dreier <roland@purestorage.com>
Tue, 14 Feb 2012 00:18:15 +0000 (13 16:18 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 25 Feb 2012 22:37:49 +0000 (25 14:37 -0800)
tree4e1a644fe2a32ae3ffa22c52673060e617b2e692
parentd95b82461c56a6ff8ff248b101049a69ebb20278
target: Set peripheral device type consistently in INQUIRY response

Current code sets the peripheral device type to 0x3f == "not present
unknown" for virtual LUN 0 for standard INQUIRY commands, but leaves it
as 0 == "connected direct access block" for VPD INQUIRY commands.  This
is just because the check for LUN 0 only happens in some code paths.

Make our peripheral device type consistent by moving the LUN 0 check
into the common emulate_inquiry() code.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_cdb.c