Received: by 10.213.65.68 with SMTP id h4csp686287imn; Tue, 20 Mar 2018 12:43:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELtsnr9k+DDpiczoq7dLwqhIX75AsrxAL9EFHJWoWYf65DhcsWDjKYQVtFvPUHdnTUZ2I83A X-Received: by 10.98.152.207 with SMTP id d76mr14471026pfk.130.1521575004849; Tue, 20 Mar 2018 12:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521575004; cv=none; d=google.com; s=arc-20160816; b=qdgOt2uIyoL40ItVCOvN8+2GaD0/ruaog/Pvp/0F2yajR9+4FdsvfaGDO045RUckpU X5ZMZiFtn89EY0i1YdtpIE365NdxJTqFxeu+6dSdwQIf79oPa89gaiLmMO0ygdT1svt4 xvG6FEYf6fbSB18jeODXeupi+o17OlaNCXk10TXyXhUHdZo37I2GYEmKCLVlgGL/d+KC 9DYqcE89F/VDWAQYJXwis4c7zWCKOcVS3W6bRq7deBZzrkpkcDlR/Hop4SH/cWq07F2U C5+jWTSUiLDakwanC2TuefEjT83p6dHaf2mIowc7eA49UvSffqA0+bTP9JO24kDHvwT3 u7Iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=cm/mGsFbF2G/UhzgaYFVEGAbV/eiuPY9DYcvDVww4Ds=; b=oLgI0I2IvFaYrBo9yJMfNTfYu8Q4MvEWsl1boPZ/DvM+haPmCofWam5azKXQonTOBe Vkk1taWllqUOE/At/sDakuL7ScRIkNw+icJn1O9isl1KYLk1eXt/PILxcSGYpFnycsYJ pulrnocmgEObOEVAhLE9Xj5camuT37fEXGK2ckp7hLxBUI1OJcjw7NnmnPOyvivVDpGL 3JjPoRIeA6VyulBrfreyumAzy3xIJD2p8toO1x/pi5N6Gt7YOz0eJWpclelj/qjidQS2 ANDk571OYQmo6ft/9OWSujTrwZ1AUJQUFTyXhSV8zLtjY9d4gKtKufIaDauLbBX8utEq BN9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pmvBH6wb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si2154390plh.450.2018.03.20.12.43.09; Tue, 20 Mar 2018 12:43:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pmvBH6wb; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbeCTTmJ (ORCPT + 99 others); Tue, 20 Mar 2018 15:42:09 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35340 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751396AbeCTTmF (ORCPT ); Tue, 20 Mar 2018 15:42:05 -0400 Received: by mail-wm0-f46.google.com with SMTP id r82so5802258wme.0; Tue, 20 Mar 2018 12:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=cm/mGsFbF2G/UhzgaYFVEGAbV/eiuPY9DYcvDVww4Ds=; b=pmvBH6wblwODL1bZJg6vU65FS7/0/8vEyHiSukoIpJsX9EFGVJy9jJFSZsG4Jnav3t okNTPuMS0wAT9pkiA2Lvj0UJeUmnm3NF2wTH6guPwJyH8t6SUdETKBvSWtmkxSKZV/sb 8FK1Xtc6Yp5j7JNOWIr+NZCtl0YUsblj2dZrk4n6Gj4rzIfyh8/y3Ajm9XZ+81jT4OzP kPpHIbqITOmwQ7bc5B5mKZcBFRKejzATIEchpcyqfBtbxYFpx1Rju+fZ/yLX6v+d3Kdq STJXrt6scf4njZu5ttbwVVtvha8lSQ1r+8uYPAmroSPPA8jUGUm4mX9WOqBOTbbDHUSI IxuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=cm/mGsFbF2G/UhzgaYFVEGAbV/eiuPY9DYcvDVww4Ds=; b=mfrR28aMsEm9TqGM98Jg+/y+dQGUYdyMNTHGReTk28N8+HiCiMz7jfBZNGcr2aIZc3 QwbsC36YHfW/TcQwTowRJwAsz7UxMzo2AHVE5ab9mNTnTCf9W3r08TdqBdkdv7nIrdfH cDO6JvUnI+k4+4R7d4it9aWQjK7hlqZwj/Mb4xKRN622vbyM9sNetR2EnoAAWxer3skg G/jLKkqhI2z0SVGKNbKiYUHfEOanfJe+YTnygZHjLC9Rb/otrtZNxVhlknw1Q6kNfv14 X9NGjA+f82658pXaM2nEAP4m9TsR8W2/LPmQeMMxlR96gDr6T1cBkc64E0w6BxLOcqZ2 d6mA== X-Gm-Message-State: AElRT7F2RJHKtYNYLF70K+Kbs/vn6yF5f+PhNgCY1Ud0LKZ6Pg58q6LU yqqcra6yJwbQwAFOgn+vNuTM7XwW X-Received: by 10.28.193.65 with SMTP id r62mr635678wmf.83.1521574923348; Tue, 20 Mar 2018 12:42:03 -0700 (PDT) Received: from [192.168.1.18] (bfw41.neoplus.adsl.tpnet.pl. [83.28.60.41]) by smtp.gmail.com with ESMTPSA id b8sm2308346wrf.29.2018.03.20.12.42.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 12:42:02 -0700 (PDT) Subject: Re: [PATCH] leds: fix wrong dmi_match on PC Engines APU LEDs To: Hans Ulli Kroll References: <20180305170910.8905-1-ulli.kroll@googlemail.com> Cc: Alan Mizrahi , Richard Purdie , Pavel Machek , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, "platform-driver-x86@vger.kernel.org" From: Jacek Anaszewski X-Enigmail-Draft-Status: N1110 Message-ID: <1fd03089-2e39-1463-31bb-26de1f63c046@gmail.com> Date: Tue, 20 Mar 2018 20:40:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Hans, On 03/18/2018 03:24 PM, Hans Ulli Kroll wrote: > Hi Jacek > > On Sat, 10 Mar 2018, Jacek Anaszewski wrote: > >> Hi Hans, >> >> Thank you for the patch. >> >> On 03/05/2018 06:09 PM, Hans Ulli Kroll wrote: >>> APU has compared to APU2 no DMI_BOARD_NAME. >>> Use DMI_PRODUCT_NAME instead. >> >> Could we have the commit message more expressive? >> >> Is it that now this driver doesn't work for APU board? > > Yes it doesn't work for my APU board. > I've already checked the updated driver in -next > > As you can see here > # grep . /sys/class/dmi/id/* > /sys/class/dmi/id/bios_date:04/05/2014 > /sys/class/dmi/id/bios_vendor:coreboot > /sys/class/dmi/id/bios_version:SageBios_PCEngines_APU-45 > /sys/class/dmi/id/chassis_type:3 > /sys/class/dmi/id/chassis_vendor:PC Engines > /sys/class/dmi/id/modalias:dmi:bvncoreboot:bvrSageBios_PCEngines_APU-45:bd04/05/2014:svnPCEngines:pnAPU:pvr1.0:cvnPCEngines:ct3:cvr: > /sys/class/dmi/id/product_family:None Provided > /sys/class/dmi/id/product_name:APU > /sys/class/dmi/id/product_serial:XXXXXXX > /sys/class/dmi/id/product_version:1.0 > /sys/class/dmi/id/sys_vendor:PC Engines > /sys/class/dmi/id/uevent:MODALIAS=dmi:bvncoreboot:bvrSageBios_PCEngines_APU-45:bd04/05/2014:svnPCEngines:pnAPU:pvr1.0:cvnPCEngines:ct3:cvr: > > there is no board name on APU. > > here is the output from my APU2 board > # grep . /sys/class/dmi/id/* > /sys/class/dmi/id/bios_date:02/28/2017 > /sys/class/dmi/id/bios_vendor:coreboot > /sys/class/dmi/id/bios_version:4.0.7 > /sys/class/dmi/id/board_name:APU2 > /sys/class/dmi/id/board_serial:XXXXXXX > /sys/class/dmi/id/board_vendor:PC Engines > /sys/class/dmi/id/board_version:1.0 > /sys/class/dmi/id/chassis_type:3 > /sys/class/dmi/id/chassis_vendor:PC Engines > /sys/class/dmi/id/modalias:dmi:bvncoreboot:bvr4.0.7:bd02/28/2017:svnPCEngines:pnAPU2:pvr1.0:rvnPCEngines:rnAPU2:rvr1.0:cvnPCEngines:ct3:cvr: > /sys/class/dmi/id/product_name:APU2 > /sys/class/dmi/id/product_serial:XXXXXX > /sys/class/dmi/id/product_version:1.0 > /sys/class/dmi/id/sys_vendor:PC Engines > /sys/class/dmi/id/uevent:MODALIAS=dmi:bvncoreboot:bvr4.0.7:bd02/28/2017:svnPCEngines:pnAPU2:pvr1.0:rvnPCEngines:rnAPU2:rvr1.0:cvnPCEngines:ct3:cvr: > > As you can see here for APU2 the board_name is set. Thanks for this explanation. I modified the commit message accordingly and applied the patch to the for-next branch in the following form: commit 92d7ec1d71e351f11ba503369eb78225510cfcc7 Author: Hans Ulli Kroll Date: Mon Mar 5 18:09:10 2018 +0100 leds: Fix wrong dmi_match on PC Engines APU LEDs BIOS on APU board doesn't expose board_name property, and thus we have to rely on the product_name instead. Signed-off-by: Hans Ulli Kroll Signed-off-by: Jacek Anaszewski Please let me know if you have any comments. Best regards, Jacek Anaszewski >> >> If it fails here, then how it is possible that it succeeds >> in the apu_led_init() ? >> > > in apu_led_init() is a check for product_name for both both boards. > Ans this succeeds > > Thus the fix here >> - if (dmi_match(DMI_BOARD_NAME, "APU")) { >> + if (dmi_match(DMI_PRODUCT_NAME, "APU")) { > > I can rewrite the patch to catch both board_name and product_name for the > APU board, and add a better commit log. > > They are more recent bios updates for this board, but the are specified as > "beta" so I'm afraid of an update. I have no hardware to recover a > "damaged" SPI flash chip.