Commit 3aa3c67b authored by Nicholas Bellinger's avatar Nicholas Bellinger
Browse files

target: Add extra TYPE_DISK + protection checks for INQUIRY SPT



Cc: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 27e6772b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -459,7 +459,11 @@ spc_emulate_evpd_86(struct se_cmd *cmd, unsigned char *buf)
	}

	/* logical unit supports type 1 and type 3 protection */
	if ((dev->transport->get_device_type(dev) == TYPE_DISK) &&
	    (sess->sup_prot_ops & (TARGET_PROT_DIN_PASS | TARGET_PROT_DOUT_PASS)) &&
	    (dev->dev_attrib.pi_prot_type || cmd->se_sess->sess_prot_type)) {
		buf[4] |= (0x3 << 3);
	}

	/* Set HEADSUP, ORDSUP, SIMPSUP */
	buf[5] = 0x07;