From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web09.6301.1579266423679416928 for ; Fri, 17 Jan 2020 05:07:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=S7gEVYPc; spf=pass (domain: linaro.org, ip: 209.85.128.66, mailfrom: leif.lindholm@linaro.org) Received: by mail-wm1-f66.google.com with SMTP id p17so7581586wmb.0 for ; Fri, 17 Jan 2020 05:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3i1eSMZcspjTfCspYzhw27c8rFLqtb9bB4gMq/otFco=; b=S7gEVYPcxzTTy7FW3/Hpku6ds6pPdUfN1J1fMyt0886vw8j4TviTF8/sPeptQfpXAg RwqLgG22PaVFWwfgJgZyVDIHg2BEGOneFKt9Lv6dD450DG+GrIV42W6we6B9Icc9MKHD y5vkuSXcdyu2f0KVJfc4JCN43vsZoNfvCwW/6qwJvDg8pImaelJf1zrVsHYTkr78mQzA RyTUFVGAcAeYob6UYWk6xsoSr32nlLAuGeWW6U7gwM+oFG/SJevPzS/L2spOc1cFaKFX IBOSdNFhvP/LWvW3Cec/f4cbY8Bm6a8ILJi3jtjZzjTvq69Fx6yrfZxKiM1wWrO8fXpL 9Mjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3i1eSMZcspjTfCspYzhw27c8rFLqtb9bB4gMq/otFco=; b=c4bUQHeHDYKNVjlu0dUclBMv22jHpagrL2LUrdXqMtNevXXp2xfIISPVPIi4RNuyZj 2iWXcH1b9khLMsu8SJsgbg2GPFKp0sLWj93FqU0ZKuOPdedIuh9KTUQikfx/W/tXtXYA voyNOuEri9tBh5/18EmHKktqQ8ko4lrJXZqwgaeA2L+4pWWOOyYj3tldPRK6VviZe5WC nBbzoFbLHjDVdU0bQhXn1rBRTFJbWMduyKD/ZZ5mFTWl1ZLl215PyYXeXoeaDmFONgJH y+SzK731FEr/4vIvX5AOgZBK6qlbPweSp1oCW0Y/IViz0WvHI6SXZOkO8C7HSrVMOQE6 u1XA== X-Gm-Message-State: APjAAAVrpOdUrxpEJJR4tzOK/PpMZr2KhJjqPMKOES/LYmOJUv7xZp/5 pKdesRiL25e6NyGgCGNjYCtv8A== X-Google-Smtp-Source: APXvYqzRM/LhUHUDDW7kaJrJ9OAE7Qs/UDbuQSgE92VjAPRfkCXPobBdfxL01FH8sRAmXMYC/qJGqA== X-Received: by 2002:a05:600c:22c8:: with SMTP id 8mr4570651wmg.178.1579266422106; Fri, 17 Jan 2020 05:07:02 -0800 (PST) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id u1sm4284114wmc.5.2020.01.17.05.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jan 2020 05:07:01 -0800 (PST) Date: Fri, 17 Jan 2020 13:07:00 +0000 From: Leif Lindholm To: Ard Biesheuvel Cc: devel@edk2.groups.io Subject: Re: [PATCH edk2-platforms] Silicon/SynQuacer/NetsecDxe: ignore DMA coherency at binding time Message-ID: <20200117130659.GL20629@bivouac.eciton.net> References: <20200117111651.10740-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20200117111651.10740-1-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 17, 2020 at 12:16:51 +0100, Ard Biesheuvel wrote: > Whether the Netsec driver is built to support coherent or non-coherent > DMA is decided by the DmaLib library class resolution that is provided > by the platform description, and there are various other places where > the platform needs to be consistent with this (ACPI tables, device > tree, platform driver, etc) > > Since the driver has no way to figure out which flavor of DmaLib it was > built against, there is no point in limiting it to one flavor only, and > we can drop the DmaType check at binding time entirely. > > This fixes an issue introduced by commit 88c7874481b856578662b775 > ("Silicon/SynQuacer/PlatformDxe: set NETSEC DMA as coherent"), which > incorrectly stated that the driver does not look at the DmaType flag > in the first place. > > Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm > --- > Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c > index 9820585e0dd5..392d1b474f5e 100644 > --- a/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c > +++ b/Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/DriverBinding.c > @@ -52,8 +52,7 @@ NetsecDriverBindingSupported ( > return Status; > } > > - if (CompareGuid (Dev->Type, &gNetsecNonDiscoverableDeviceGuid) && > - Dev->DmaType == NonDiscoverableDeviceDmaTypeNonCoherent) { > + if (CompareGuid (Dev->Type, &gNetsecNonDiscoverableDeviceGuid)) { > Status = EFI_SUCCESS; > } else { > Status = EFI_UNSUPPORTED; > -- > 2.20.1 >