From patchwork Sat Jan 24 01:12:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Franz X-Patchwork-Id: 43708 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 07005218DB for ; Sat, 24 Jan 2015 01:12:51 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf227755lbd.3 for ; Fri, 23 Jan 2015 17:12:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:reply-to:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=BJlla5EwtKC+uhI8wIKGq9VtjWPE+u9jcf5IjyvTB3g=; b=M2Q7RsGamrmzni13CDKMNYXXz4RaWPf0Fu92wDXSYgmXrvS8H5MQ9XBRimKd9nh8zo njRSEQ7utzpDp1bP9axG+dHfYEQ8JxG/u24W+DSmk9GrLqkzYcy3UihV+/i4Lu/5WyGS TW7uXUWFjB9HE3oMgN4omB2Ev9QOgaqRR2UNMkGdlvVzOxUXcmDZXNFiHl2EDH9PXcLb yNp1WN4iXzny3x3mDLWh97dQ6ScnshzHntylrzqyYfUcUgfprLQfkqNIzc8xSKr5TICp vKEF9Dg715ZrEwyixHXlTRs+loEmfJUJs3J7tZip0ft2EmY8lhuSbSy9jVU98CEvfkWF CHSw== X-Gm-Message-State: ALoCoQkw1paFgyLbw7KILKj1zUzYCwUTp5YuCRp57PpJURHCm6P6HnjGoQprHaz1ryY+bhnMs0/Y X-Received: by 10.180.82.34 with SMTP id f2mr639945wiy.1.1422061969949; Fri, 23 Jan 2015 17:12:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.40 with SMTP id a8ls313519laf.66.gmail; Fri, 23 Jan 2015 17:12:49 -0800 (PST) X-Received: by 10.112.156.169 with SMTP id wf9mr10188527lbb.85.1422061969625; Fri, 23 Jan 2015 17:12:49 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id w1si2771883laz.95.2015.01.23.17.12.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Jan 2015 17:12:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id gm9so449326lab.0 for ; Fri, 23 Jan 2015 17:12:49 -0800 (PST) X-Received: by 10.152.20.169 with SMTP id o9mr417300lae.50.1422061969537; Fri, 23 Jan 2015 17:12:49 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp83663lbj; Fri, 23 Jan 2015 17:12:48 -0800 (PST) X-Received: by 10.107.134.2 with SMTP id i2mr4859734iod.42.1422061967668; Fri, 23 Jan 2015 17:12:47 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id y3si2212245igl.2.2015.01.23.17.12.46 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 23 Jan 2015 17:12:47 -0800 (PST) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YEpHB-0003Cy-Up; Sat, 24 Jan 2015 01:12:37 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YEpHB-0003Ct-6Y for edk2-devel@lists.sourceforge.net; Sat, 24 Jan 2015 01:12:37 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of linaro.org designates 209.85.220.46 as permitted sender) client-ip=209.85.220.46; envelope-from=roy.franz@linaro.org; helo=mail-pa0-f46.google.com; Received: from mail-pa0-f46.google.com ([209.85.220.46]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1YEpHA-0001m9-Ad for edk2-devel@lists.sourceforge.net; Sat, 24 Jan 2015 01:12:37 +0000 Received: by mail-pa0-f46.google.com with SMTP id lj1so371188pab.5 for ; Fri, 23 Jan 2015 17:12:31 -0800 (PST) X-Received: by 10.70.91.67 with SMTP id cc3mr15817767pdb.76.1422061951218; Fri, 23 Jan 2015 17:12:31 -0800 (PST) Received: from rfranz-i7.local (c-50-173-43-186.hsd1.ca.comcast.net. [50.173.43.186]) by mx.google.com with ESMTPSA id oe5sm1421377pbc.33.2015.01.23.17.12.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 17:12:29 -0800 (PST) From: Roy Franz To: edk2-devel@lists.sourceforge.net, linaro-uefi@lists.linaro.org, feng.tian@intel.com Date: Fri, 23 Jan 2015 17:12:15 -0800 Message-Id: <1422061935-21851-1-git-send-email-roy.franz@linaro.org> X-Mailer: git-send-email 1.9.1 X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1YEpHA-0001m9-Ad Subject: [edk2] [PATCH] Don't require optional ISCSI negotiation responses. X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: roy.franz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 --- 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; }