From owner-svn-src-all@freebsd.org Mon Oct 14 16:31:41 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE98FFFDD9; Mon, 14 Oct 2019 16:31:41 +0000 (UTC) (envelope-from br@bsdpad.com) Received: from sc1.bsdpad.com (sc1.bsdpad.com [163.172.212.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46sPG40cgNz4Y5x; Mon, 14 Oct 2019 16:31:39 +0000 (UTC) (envelope-from br@bsdpad.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bsdpad.com; s=20190317; h=Subject:To:From; bh=PnzxJBXcNYZyKLNT0ICLx+7wpgLU7E5iapjJsD+uMJs=; b=Jh0yNKEjjN9OlhzcXcbjLO/leW hcVp4Xu2adKyw5l134A+sQVL2jWYAT/vL6jJ9X3pq+GFy/u9PZJDAMLglQ2qCz8eIQF/1jkIy8Yhc M7g+g9tNNDPM0KkE3WxdenrRRm3X3BLtB+z02QGCvjVTskzIWLO2b/wVKRWw14uG0UmHBe7YrFNL+ 8uPSdqd9uP4gZGP+hKYG2fAcHgQgzRVJydT2kJZqJLDkaMz+VOes3himzhIkhQmQTPL8lrCojYagJ q5dMdkuRuoNEP25lf0cs14HhAyA0h2EqDoXj/whRCNP9xGQsaYUDLwk+EoFcAoBcOp/YJqdpEe6ue Be3nCMiw==; Received: from localhost ([127.0.0.1] helo=bsdpad.com) by sc1.bsdpad.com with smtp (Exim 4.91 (FreeBSD)) (envelope-from ) id 1iK3CJ-000805-3U; Mon, 14 Oct 2019 17:27:51 +0100 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Mon, 14 Oct 2019 17:27:51 +0100 (BST) Date: Mon, 14 Oct 2019 17:27:51 +0100 From: Ruslan Bukin To: Emmanuel Vadot Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r353493 - head/sys/dev/mmc/host Message-ID: <20191014162751.GA30496@bsdpad.com> References: <201910141553.x9EFr0Zb010167@repo.freebsd.org> <20191014181051.bd8c7a3dbb7b07a636d81ed9@bidouilliste.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191014181051.bd8c7a3dbb7b07a636d81ed9@bidouilliste.com> User-Agent: Mutt/1.11.2 (2019-01-07) X-Rspamd-Queue-Id: 46sPG40cgNz4Y5x X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdpad.com header.s=20190317 header.b=Jh0yNKEj; dmarc=none; spf=pass (mx1.freebsd.org: domain of br@bsdpad.com designates 163.172.212.18 as permitted sender) smtp.mailfrom=br@bsdpad.com X-Spamd-Result: default: False [-5.02 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[bsdpad.com:s=20190317]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+mx]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdpad.com:+]; IP_SCORE(-2.82)[ip: (-9.45), ipnet: 163.172.208.0/20(-4.74), asn: 12876(0.12), country: FR(-0.00)]; FORGED_SENDER(0.30)[br@freebsd.org,br@bsdpad.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:12876, ipnet:163.172.208.0/20, country:FR]; FROM_NEQ_ENVFROM(0.00)[br@freebsd.org,br@bsdpad.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2019 16:31:41 -0000 On Mon, Oct 14, 2019 at 06:10:51PM +0200, Emmanuel Vadot wrote: > > On Mon, 14 Oct 2019 15:53:00 +0000 (UTC) > Ruslan Bukin wrote: > > > Author: br > > Date: Mon Oct 14 15:52:59 2019 > > New Revision: 353493 > > URL: https://svnweb.freebsd.org/changeset/base/353493 > > > > Log: > > Fix the driver attachment in cases when the external resource devices > > (resets, regulators, clocks) are not available. > > > > Rely on a system initialization done by a bootloader in that cases. > > > > This fixes operation on Terasic DE10-Pro (an Intel Stratix 10 > > development kit). > > > > Sponsored by: DARPA, AFRL > > > > Modified: > > head/sys/dev/mmc/host/dwmmc.c > > > > Modified: head/sys/dev/mmc/host/dwmmc.c > > ============================================================================== > > --- head/sys/dev/mmc/host/dwmmc.c Mon Oct 14 15:33:53 2019 (r353492) > > +++ head/sys/dev/mmc/host/dwmmc.c Mon Oct 14 15:52:59 2019 (r353493) > > @@ -1,5 +1,5 @@ > > /*- > > - * Copyright (c) 2014 Ruslan Bukin > > + * Copyright (c) 2014-2019 Ruslan Bukin > > * All rights reserved. > > * > > * This software was developed by SRI International and the University of > > @@ -457,26 +457,20 @@ parse_fdt(struct dwmmc_softc *sc) > > > > /* IP block reset is optional */ > > error = hwreset_get_by_ofw_name(sc->dev, 0, "reset", &sc->hwreset); > > - if (error != 0 && error != ENOENT) { > > + if (error != 0 && error != ENOENT) > > device_printf(sc->dev, "Cannot get reset\n"); > > - goto fail; > > - } > > This is not correct, on a system without reset/clock/regulator support > you will get ENODEV as the phandle is present but no device is > associated with it. This is the case that you want to test. Currently > this hide all errors. The change means that the driver will be attached regardless of the return value from ext resources. Why it is not correct? It does not hide all errors, the printf will be called and a user will be warned. Ruslan