From patchwork Thu Oct 31 00:35:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Martin X-Patchwork-Id: 21294 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id F320420354 for ; Thu, 31 Oct 2013 00:35:51 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id ld13sf4432739vcb.4 for ; Wed, 30 Oct 2013 17:35:51 -0700 (PDT) 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:cc:date:subject :thread-topic:thread-index:message-id:references:in-reply-to :accept-language:acceptlanguage:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-language :content-type:content-transfer-encoding; bh=abuEXiJuJJwfPQRP6DNWxjuKb0gfwiIokGQoOc7YZa0=; b=Nky0YPP++KPBsERyN5Zl+HXQt0Mu6loB2pONllV+59xtduryshYqpMrhjzQuVNJftV hfGbb+yrRhXrUxvXcRgn6T/vJ1KP7YaXPrNPrNNmItkYEoq6UGHCZhKy9U/yYafZyLu1 Vu3XA2oIQwgUT0BzRiwil3wjU46/uhNAyM6K3BhC8j0VjXxtSOahbBvTp27z760et9wp OIwE10JlzJddujUkq0XD4GIubLWIZB6iP4O8cYp5pPJ3iMcSfdLfjirka7oKUJbrsUV/ LK4J3wAwJk4ZKzQYqKXLgQnbMHZNRWIARJ03/1NKbOKCQVJVXULxncdZYDgrTe5TOiZe AoEA== X-Gm-Message-State: ALoCoQkyrjMl1XISLV5gTkE0Ke+x8O8Zz3MRbWWvD9Au/XhIhmQNHBC+8Y4XVGZBWlQJJPclyVxh X-Received: by 10.236.32.74 with SMTP id n50mr443329yha.13.1383179751548; Wed, 30 Oct 2013 17:35:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.130.233 with SMTP id oh9ls750365qeb.62.gmail; Wed, 30 Oct 2013 17:35:51 -0700 (PDT) X-Received: by 10.58.178.239 with SMTP id db15mr173793vec.9.1383179751455; Wed, 30 Oct 2013 17:35:51 -0700 (PDT) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id a15si160858vew.83.2013.10.30.17.35.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Oct 2013 17:35:51 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id g10so1438458vbg.30 for ; Wed, 30 Oct 2013 17:35:51 -0700 (PDT) X-Received: by 10.52.248.197 with SMTP id yo5mr175540vdc.0.1383179751338; Wed, 30 Oct 2013 17:35:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp320610vcz; Wed, 30 Oct 2013 17:35:50 -0700 (PDT) X-Received: by 10.49.29.70 with SMTP id i6mr437107qeh.89.1383179750058; Wed, 30 Oct 2013 17:35:50 -0700 (PDT) Received: from service88.mimecast.com (service88.mimecast.com. [195.130.217.12]) by mx.google.com with ESMTP id 7si613029qaw.29.2013.10.30.17.35.49 for ; Wed, 30 Oct 2013 17:35:50 -0700 (PDT) Received-SPF: pass (google.com: domain of olivier.martin@arm.com designates 195.130.217.12 as permitted sender) client-ip=195.130.217.12; Received: from emea-cam-gw1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) (Using TLS) by service88.mimecast.com; Thu, 31 Oct 2013 00:35:47 +0000 Received: from george.Emea.Arm.com ([fe80::6ccb:73b1:f5c3:796]) by emea-cam-gw1.Emea.Arm.com ([::1]) with mapi; Thu, 31 Oct 2013 00:35:45 +0000 From: Olivier Martin To: "edk2-devel@lists.sourceforge.net" , "Reece R. Pollack" CC: "patches@linaro.org" Date: Thu, 31 Oct 2013 00:35:45 +0000 Subject: RE: [edk2] [PATCH 02/10] MdeModulePkg//ArpDxe: Retrieved SnpMode only after configuring Snp Thread-Topic: [edk2] [PATCH 02/10] MdeModulePkg//ArpDxe: Retrieved SnpMode only after configuring Snp Thread-Index: AQHOw5etCKITpRPPp0yOIO+9OusXPZnrmeIwgCJ4snU= Message-ID: <0877601216922E4B83A7129715B5DA2B9A5717850F@GEORGE.Emea.Arm.com> References: <1381174801-17221-1-git-send-email-reece.pollack@linaro.org> <1381174801-17221-3-git-send-email-reece.pollack@linaro.org>, In-Reply-To: Accept-Language: en-US, en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-GB MIME-Version: 1.0 X-MC-Unique: 113103100354700502 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: olivier.martin@arm.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Content-Language: en-GB Hi Fu, as you said according to the UEFI spec "all the fields in Snp.Mode structure must be discovered during driver initialization". I sent an email to USWG and the Network subteam to ask for clarification about this statement a few months ago. And no one has replied so far. So my guess is everyone is confused by the statement of the UEFI spec! My next step is to send an ECR to clarify the statement in the UEFI spec and make 'Snp->Initialize()' responsability to initialize the structure... If USWG prefer the driver binding start function be responsible for the initialization then I would like to see this clarification in the UEFI spec. Thanks, Olivier diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c old mode 100644 new mode 100755 index 81ddd62..5cf717f --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c @@ -103,22 +103,6 @@ ArpCreateService ( } // - // Get the underlayer Snp mode data. - // - Status = ArpService->Mnp->GetModeData (ArpService->Mnp, NULL, &ArpService->SnpMode); - if ((Status != EFI_NOT_STARTED) && EFI_ERROR (Status)) { - goto ERROR_EXIT; - } - - if (ArpService->SnpMode.IfType != NET_IFTYPE_ETHERNET) { - // - // Only support the ethernet. - // - Status = EFI_UNSUPPORTED; - goto ERROR_EXIT; - } - - // // Set the Mnp config parameters. // ArpService->MnpConfigData.ReceivedQueueTimeoutValue = 0; @@ -141,6 +125,23 @@ ArpCreateService (