target: Fix trailing ASCII space usage in INQUIRY vendor+model
authorNicholas Bellinger <nab@linux-iscsi.org>
Wed, 24 Jul 2013 23:15:08 +0000 (16:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Sep 2013 14:06:45 +0000 (07:06 -0700)
commit3278d90c5828197f9e1ffcf4b93b7ef990752614
tree8382cd4724d18855ce4ec2b4114d2e45ebd6561d
parent6e4664525b1db28f8c4e1130957f70a94c19213e
target: Fix trailing ASCII space usage in INQUIRY vendor+model

commit ee60bddba5a5f23e39598195d944aa0eb2d455e5 upstream.

This patch fixes spc_emulate_inquiry_std() to add trailing ASCII
spaces for INQUIRY vendor + model fields following SPC-4 text:

  "ASCII data fields described as being left-aligned shall have any
   unused bytes at the end of the field (i.e., highest offset) and
   the unused bytes shall be filled with ASCII space characters (20h)."

This addresses a problem with Falconstor NSS multipathing.

Reported-by: Tomas Molota <tomas.molota@lightstorm.sk>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/target/target_core_spc.c