Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp437883yba; Wed, 3 Apr 2019 11:39:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcC5TDyfjNoj33d+OcM/DOdVwyEhdepyDtDXb2okGfo4VJKzZmu572bMZrISIbEZrhPZil X-Received: by 2002:a62:6086:: with SMTP id u128mr1039300pfb.148.1554316765778; Wed, 03 Apr 2019 11:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554316765; cv=none; d=google.com; s=arc-20160816; b=rBsoLLeglrY0TBv0XQFmAZakd7BwqvuM9Emm6Z/O2HPXje9acjWa1WebH5nBT5pUjX JxEJvBoIRo0XgB5qgb1Vx8G4LV2k/xm/RWAAPU2iAe3tQbeTT6S1j10fLjLY5AkFJrL1 ojoRCsyoZkKcQHzViwbb0OupTYat9Bvebzk5ng/LvmUMMKTThKfvtdBEYtFO3aK/7rIm RbLyXg9YRSarR4L8SlKChHdSQnPZc5769k33iQXSU11yCs4gOWUfp/UFJ/P8piOMugFG 2ESn92YyMYAuKQE9fHaVxg1lq9UH3LNxKrVO21iFRy6XgfvFp76ZDpIpLJtV5PbZnDND ZPmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Avk9y+6cnaRG7UJtj//6Y5aZD9vP9x5wyqz2pTFKr7c=; b=FUy2kjpEQ+XVgFxbW6Og7KUMlkdqK9ZmZ9+gxl2r+hiA3cMwbOyLNWpIvD6PvbnKGN aty/ArBbNhn3irjNxSEmkApUIM3Dm5fvDpHbU93+5ETnIyVmY/0ZBHBQj+m4bgBIeuQi pQXq0oFUEVuDAHa9zs1r5Mh0NVGw31f7ZVeu7uUf7bLxScxxkwK+5Yqgg/Mt3RLxAKxW /HWG0ADQcMFqB5KmX4ygTmI3dyAyI/z4m35IaxwSoIA9f0S7Mn9ie1Wiyz0cW0jUSx36 oPoTcQv+eMRBgMyWF/+jP4hIyanLOzUu+GYlOT/6UFmzdLp+G0IQEmRaihS5JUr9DLKq 569Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O6c+cCZa; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i14si5787408pgb.0.2019.04.03.11.39.08; Wed, 03 Apr 2019 11:39:25 -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=@kernel.org header.s=default header.b=O6c+cCZa; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726199AbfDCSia (ORCPT + 99 others); Wed, 3 Apr 2019 14:38:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:58124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbfDCSia (ORCPT ); Wed, 3 Apr 2019 14:38:30 -0400 Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 18C4120882; Wed, 3 Apr 2019 18:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554316709; bh=V/u4vrI32zu0XxILJyYxvWxNDQ8t/IJ2AafQS2QfFxQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=O6c+cCZaAgucRnn3uD6jhthX/ZfNTqvxrm+S6Zgz2VJoWzVSkRY8yqhh8GmhRiz8I fT8pki2XRKlZcw/4/wHABX/C5coiJ4DEwj3epGunSTxKdYeAejGShyQunSf8UWGXyu GgCAS5eBPbjG8cjw38lnuArmzbDYJ8nPqLd/9uTY= Received: by mail-ed1-f53.google.com with SMTP id d26so15822990ede.10; Wed, 03 Apr 2019 11:38:29 -0700 (PDT) X-Gm-Message-State: APjAAAVddOvx30VSjLqdst37sb/S3D5DuUbmevsnXHVK+qxLnh3KHn/+ kNUgy29G+aNjDh2SseuQT/609ET520GZojEYyYk= X-Received: by 2002:a17:906:a2c6:: with SMTP id by6mr771856ejb.134.1554316707650; Wed, 03 Apr 2019 11:38:27 -0700 (PDT) MIME-Version: 1.0 References: <1554243943-25507-1-git-send-email-richard.gong@linux.intel.com> <20190403142022.GB5752@archbook> <20190403164742.GC5752@archbook> In-Reply-To: From: Alan Tull Date: Wed, 3 Apr 2019 13:37:51 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv1] fpga: mgr: add FPGA configuration log To: Moritz Fischer Cc: Richard Gong , linux-fpga@vger.kernel.org, linux-kernel , Richard Gong Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 3, 2019 at 1:05 PM Alan Tull wrote: > > On Wed, Apr 3, 2019 at 11:47 AM Moritz Fischer wrote: > > > > Hi Richard, > > > > On Wed, Apr 03, 2019 at 11:43:26AM -0500, Richard Gong wrote: > > > Hi Moritz, > > > > > > > > > On 4/3/19 9:20 AM, Moritz Fischer wrote: > > > > Hi Richard, > > > > > > > > On Tue, Apr 02, 2019 at 05:25:43PM -0500, richard.gong@linux.intel.com wrote: > > > > > From: Richard Gong > > > > > > > > > > Add a log for user to know FPGA configuration is successful > > > > > > > > > > Signed-off-by: Richard Gong > > > > > --- > > > > > drivers/fpga/fpga-mgr.c | 1 + > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c > > > > > index c386681..559e046 100644 > > > > > --- a/drivers/fpga/fpga-mgr.c > > > > > +++ b/drivers/fpga/fpga-mgr.c > > > > > @@ -151,6 +151,7 @@ static int fpga_mgr_write_complete(struct fpga_manager *mgr, > > > > > } > > > > > mgr->state = FPGA_MGR_STATE_OPERATING; > > > > > + dev_info(&mgr->dev, "Successfully programming FPGA\n"); > > > > > > > > That info is available in FPGA manager's sysfs status entry, if at all > > > > I'd make this a dev_dbg(). > > > > > > > > From my end I don't see how we need this really. > > > > > > We got requests from the field and they want to see a log to get know if > > > FPGA configuration is successfully completed. They don't want use any > > > additional command to get status. > > > > > > This log is useful for the user who performs FPGA configuration. > > > > > > I think we need use dev_info, since dev_dbg is not enabled by fault for most > > > build. > > > > Well basically it boils down to: > > > > $ dmesg | grep "Sucessfully" > > > > vs > > > > $ cat /sys/class/fpga.../status > > it's state, not status for most fpga manager drivers. It should > return 'operating' if everything went well. > > It seems like there's a possible scenario where the FPGA starts up > with the FPGA in 'operating' mode and the user messes up early enough > that the state doesn't change. > > > > > Personally not in favor of extra messages, but if we do it we should > > change the message to "Sucessfully programmed FPGA". > > > > I think making it a dbg message is a good trade-off ... dbg vs info... On the one hand, it is a usually a message the developer wants to see so the developer would turn on debug messages. But then again FPGA programming doesn't happen that often and it is a kind of significant event since it is your hardware changing i.e. it won't add a lot messages, but it is sort of an important one if it happens. If the system crashes after a FPGA reprogramming event, it would be good to have this in the log by default. I don't want to argue too powerfully for adding extra messages though. Is this a case where info is worth it since fpga programming is significant? > > > > Moritz