diff options
author | Dmitry Bogdanov | 2022-09-12 15:54:57 +0300 |
---|---|---|
committer | Martin K. Petersen | 2022-09-15 21:40:58 -0400 |
commit | 5bdd4a8e5cb96236a2aa9ad38df73381b4161404 (patch) | |
tree | 018ed9d739e88393e06abd65965a37a6c8e78a68 /drivers/target | |
parent | efca52749564601de2045eb71dbe756b7bade4e8 (diff) |
scsi: target: core: Set MULTIP bit for se_device with multiple ports
SAM-5 4.8.3 (SCSI target device with multiple SCSI ports structure)
obligates to set MULTIP bit when there's multiple SCSI target ports:
Each device server shall indicate the presence of multiple SCSI
target ports by setting the MULTIP bit to one in its standard
INQUIRY data (see SPC-4).
Set MULTIP bit automatically to indicate the presence of multiple SCSI
target ports within standard inquiry response data if there are
multiple target ports in all target port groups of the se_device.
Link: https://lore.kernel.org/r/20220912125457.22573-2-d.bogdanov@yadro.com
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Co-developed-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/target_core_spc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c index c14441c89bed..7cca3b15472b 100644 --- a/drivers/target/target_core_spc.c +++ b/drivers/target/target_core_spc.c @@ -115,6 +115,12 @@ spc_emulate_inquiry_std(struct se_cmd *cmd, unsigned char *buf) buf[5] |= 0x1; } + /* + * Set MULTIP bit to indicate presence of multiple SCSI target ports + */ + if (dev->export_count > 1) + buf[6] |= 0x10; + buf[7] = 0x2; /* CmdQue=1 */ /* |