Some simple value negotiation responses are optional, in particular DataPDUInOrder and DataSequenceInOrder. If we send "Yes", then the response from the target is optional, and the Linux target implementation does not return a response.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Roy Franz roy.franz@linaro.org --- MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c index cb1f79b..b8427ab 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c @@ -1290,9 +1290,11 @@ IScsiCheckOpParams (
// // DataPDUInOrder, result function is OR. + // The response is optional if we sent "Yes". + // The AsciiStrCmp is not done if we sent "Yes", so it is OK for Value to be NULL // Value = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_DATA_PDU_IN_ORDER); - if (Value == NULL) { + if (!Session->DataPDUInOrder && Value == NULL) { goto ON_ERROR; }
@@ -1300,9 +1302,11 @@ IScsiCheckOpParams (
// // DataSequenceInorder, result function is OR. + // The response is optional if we sent "Yes". + // The AsciiStrCmp is not done if we sent "Yes", so it is OK for Value to be NULL // Value = IScsiGetValueByKeyFromList (KeyValueList, ISCSI_KEY_DATA_SEQUENCE_IN_ORDER); - if (Value == NULL) { + if (!Session->DataSequenceInOrder && Value == NULL) { goto ON_ERROR; }