Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp411741yba; Wed, 3 Apr 2019 11:07:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLD4RkK7tuaIS4VdC7T5FNemSPQ1ysosdPp6CZVO0m9Xd9OQa2X2WphR3FlxA2xylCNYIE X-Received: by 2002:aa7:8c86:: with SMTP id p6mr851840pfd.37.1554314837905; Wed, 03 Apr 2019 11:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554314837; cv=none; d=google.com; s=arc-20160816; b=hq2CzoeanMabmxs7qXLwPzEpp+3a6CvERGexY9iSSiCp9MgIHlknWKQcIz6k9zQX/M 5V8pFOMWv7I4dHu6wSV9YnW29TLjYCvCOSonkmFScmGSo0VVw3Ep5pBdOjLTXgv3oM9j rW9G0Ar0yOOkF0t7H2XhPA/s9qm9MZFJ29tzZfiJO5xcz7O2mdViEN+bmyTqPfAaEwqB WLiwqcSEH5T4n97qspt+eGI8V6aoWcfMhvZ17six1VU8W8jEeKsHvCwFSnLJviV2AOQl lsjhByWDV2xD6IT/Anx3uW5D+avLSk5FJrLDYXSkSwMUY4kBqtzt3ZXPtJR78ojaSWf5 uxYg== 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=mfwWHMovu0g8Nh0clRT4WSE4ryAhVf8iFtrHWhytXBI=; b=LcUIO7q/j9ZkWfgxKnXf0Juytg4jFrUN9zP8Ayge3YO88H8Ie6qRojp3B++Y9v63+R 9gJN+45+tGSvqgEPwpCpZ18F1x3QuMxUMj2fo/n3cyYC3t4KGkPHZa0fj5/N67dVvsJa qncGcu0UB2Rv5OSbUWMIb+5AwSsHv5dd7ulJhVFeGFsKTNP9vf/ULhOLjYKWWi8yX533 aNZtJ+VJQxeZXZdXI+jG8gylA2wMHqhSvi8GcYhrKODnU1lQXl844MWGly2nrOlMnw01 wpv2bPHHVmGbrVeXi+e83JNk9Da5ueFkUyYtiLFu8BkCIkjyOYUkL3gkC/X8X2un7Jb8 TLgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iCgbiV9z; 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 s5si14139580plr.307.2019.04.03.11.07.01; Wed, 03 Apr 2019 11:07:17 -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=iCgbiV9z; 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 S1726524AbfDCSGE (ORCPT + 99 others); Wed, 3 Apr 2019 14:06:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:60668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbfDCSGE (ORCPT ); Wed, 3 Apr 2019 14:06:04 -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 0CD68204EC; Wed, 3 Apr 2019 18:06:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554314763; bh=wmTHRlA1FDuWPhkE7qB7k8OSMIkejqOEp4johXdaXyk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=iCgbiV9zLknNhqc67xIePSUyRnF0OnR/Xn7AdcG3X3fZKV5k+13PBpqNS1No0vnv+ Rsg1V2CBnC8ZnWUO9uQidCSBMcGA9bTMV9+mPwGEcpgdzIIRJ+3HOVyGs9yngEDGsj 9hA0O8TCELTuLLUte+U24XtzpGaIIMKNS/ApFRuw= Received: by mail-ed1-f53.google.com with SMTP id p20so15752235eds.6; Wed, 03 Apr 2019 11:06:02 -0700 (PDT) X-Gm-Message-State: APjAAAU2iTxJyPZx3uzhPmnH79Df4MBMKuPBCJB8tYYOtCaohD8StDvo 8Z1HtAAhARfQqNolgt8bkT427qq/rMRnbzwv278= X-Received: by 2002:a50:a515:: with SMTP id y21mr644682edb.135.1554314761632; Wed, 03 Apr 2019 11:06:01 -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: <20190403164742.GC5752@archbook> From: Alan Tull Date: Wed, 3 Apr 2019 13:05:25 -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 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 ... > > Moritz