]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: target: perform t10_wwn ID initialisation in target_alloc_device()
authorDavid Disseldorp <ddiss@suse.de>
Wed, 5 Dec 2018 12:18:38 +0000 (13:18 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 8 Dec 2018 02:54:33 +0000 (21:54 -0500)
commit9ced76f804265f537f67d0b32534eaecd6ae87f5
tree4e90eb51a61c20ba599ac9063cf4a73028956607
parentfb9df0bd07f4939b4cb2d2e683c242ea8d118f16
scsi: target: perform t10_wwn ID initialisation in target_alloc_device()

Initialise the t10_wwn vendor, model and revision defaults when a device is
allocated instead of when it's enabled. This ensures that custom vendor or
model strings set prior to enablement are not later overwritten with
default values.

The TRANSPORT_FLAG_PASSTHROUGH conditional can be dropped for the following
reasons:

 - target_core_pscsi overwrites the defaults in the
   pscsi_configure_device() callback.
   + the contents is then only used for ConfigFS via
     $pscsi_dev/statistics/scsi_lu/vend, etc.

 - target_core_user doesn't touch the defaults, nor are they used for
   anything outside of ConfigFS.

Signed-off-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/target/target_core_device.c