From owner-svn-src-head@FreeBSD.ORG Fri Dec 13 22:11:27 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51348AA1 for ; Fri, 13 Dec 2013 22:11:27 +0000 (UTC) Received: from mail-ea0-f171.google.com (mail-ea0-f171.google.com [209.85.215.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA0E612BD for ; Fri, 13 Dec 2013 22:11:26 +0000 (UTC) Received: by mail-ea0-f171.google.com with SMTP id h10so1123690eak.2 for ; Fri, 13 Dec 2013 14:11:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:in-reply-to:references:mime-version :content-type:content-transfer-encoding:subject:from:date:to:cc :message-id; bh=7fs/zRRESkn1VuT3YP+pcixHx2+VcTXfMjkINF1dBkI=; b=KcSghzD+DqUFsYgAtWiHoWyy00GxXBE9fFx5nOhfWTuz9Eq/hRMcaP55Q6/UdxXq9i h8IMag5WFgBVcjhFnKWqJybYUzotNeviAKtwA1XFGbx423i7WR2sNbVK6tK9fkzfjmDI NC/CnloXyP8p93IQTul4avWavog+bYRBDNKC7XtnBPPxYqCwIQ9OdSuN91Yszq4e7BFW EFN0krKD9VF52lQ3y2J8CoFMOVE0JkU8tDqYU74tT82Li8LcCV0qay/eQFHd9AUZuwCG fxJtTYmFpVJQqWSqS+PFDBya4plmFvoyICC5T6MlYTW7jXCjs+ABhNv3k8dUl8OiFxDe nWgg== X-Gm-Message-State: ALoCoQlSWqOqKP95jm/mQDoNDYh142KxOwZPFBRRI0Rb4NUPRzqE4DGta9we8d4UJaeFj4Y3oltU X-Received: by 10.14.204.135 with SMTP id h7mr5092385eeo.104.1386972679221; Fri, 13 Dec 2013 14:11:19 -0800 (PST) Received: from [46.96.136.173] ([46.96.136.173]) by mx.google.com with ESMTPSA id v1sm11452290eef.9.2013.12.13.14.11.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 13 Dec 2013 14:11:18 -0800 (PST) User-Agent: K-9 Mail for Android In-Reply-To: <20131212190230.GU59496@kib.kiev.ua> References: <201312121449.rBCEnRRQ045690@svn.freebsd.org> <20131212190230.GU59496@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: svn commit: r259261 - head/sys/dev/drm2 From: Aleksandr Rybalko Date: Sat, 14 Dec 2013 00:11:01 +0200 To: Konstantin Belousov , Aleksandr Rybalko Message-ID: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Dec 2013 22:11:27 -0000 Konstantin Belousov написав(ла): >On Thu, Dec 12, 2013 at 02:49:27PM +0000, Aleksandr Rybalko wrote: >> Author: ray >> Date: Thu Dec 12 14:49:26 2013 >> New Revision: 259261 >> URL: http://svnweb.freebsd.org/changeset/base/259261 >> >> Log: >> Do not try to probe/attach if attempt to add fbd child are failed. >> >> Sponsored by: The FreeBSD Foundation >> >> Modified: >> head/sys/dev/drm2/drm_fb_helper.c >> >> Modified: head/sys/dev/drm2/drm_fb_helper.c >> >============================================================================== >> --- head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:37:25 >2013 (r259260) >> +++ head/sys/dev/drm2/drm_fb_helper.c Thu Dec 12 14:49:26 >2013 (r259261) >> @@ -1043,7 +1043,10 @@ int drm_fb_helper_single_fb_probe(struct >> >> kdev = fb_helper->dev->device; >> fbd = device_add_child(kdev, "fbd", device_get_unit(kdev)); >> - ret = device_probe_and_attach(fbd); >> + if (fbd != NULL) >> + ret = device_probe_and_attach(fbd); >> + else >> + ret = ENODEV; >This must be -ENODEV, since linux layer operates on negative values for >error. The error is negated in the drm layer, which would result in >non-existent errno returned to FreeBSD code. It is not actually return code, but only value to show in error message few lines later. ENODEV just value for case no device attached. That error message appear only if kernel configuration include device vt. (planning for syscons too, maybe). > >Also, the #ifdef __FreeBSD braces in the file are not useful, please >remove them. >> #ifdef DEV_VT >> if (ret != 0) >> DRM_ERROR("Failed to attach fbd device: %d\n", ret); Should we with Jean have to remove all #ifdef __FreeBSD and __Linux over whole DRM2 code, to reduce differences with linux code? Thanks! WBW ------ Aleksandr Rybalko