Received: by 10.223.185.111 with SMTP id b44csp678848wrg; Fri, 9 Mar 2018 11:35:49 -0800 (PST) X-Google-Smtp-Source: AG47ELtJdVw/HIBEcc4cbhdi7XgHnDh0LdnZzBjdC1/0JqDaJXra20Mvw7zj9Q3eTqZk7g19ugME X-Received: by 10.99.163.1 with SMTP id s1mr25707546pge.47.1520624149688; Fri, 09 Mar 2018 11:35:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520624149; cv=none; d=google.com; s=arc-20160816; b=k0bAQyVNRkgkcqrIuAhxegnxTuecuJnmS8n36rSmrkoX3gBl90BkV23n86KIvwfCk8 2ZirFXW3dbKAN3yUP7mQQpb9KiYJe+lFHYrq3lvqzAPu7dST5cEIIJ94DDzlwTxQ1FUi QTbH5JFBBcVGagUD7xi/UWUmDsO4k5UFrAb9hoxp5AREmO67hdiCjAFQ6LF3hxCWKB1w O6GrAHsOxKtNTjnXRFg5Qf/Siwe/9anz4HSNzlixnWAzQcihrOfAXOM2RqheWzD/Vvdh z9139fz2et5pk1fspmNJz84U4tbNr8pVakC0J6cnGkFzlp/koDPfLjmX7czUBGW2Ezl4 TE6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=5cTt88lsVjvPEk/Ge1HU6rKYX1tN2jXx5t2FMDZlh5I=; b=vpiq2e9b90iqSPsVeMqOg8VLnTLH81NspboIXgUebB9y8S6+cs0eP9NbRB5M8nMbJB UtKFUKFn/ZcJjCr5wGwBccaJTYhvsAskFrU+c7ZfB10AYmdyqS8sWjuY3HivncjHdASt +FPkR//xtliyJO0/hqB7/8XsS/NcrkxoHrga06QSIEgKMYpC0F7+NJSsFXRvB1bFLpKB KV0X/xfISXc8EOL3dWdc9hoqy0SmAM0d67Ygym5qST5VsonvUAvi7CnN6J8XdlBB7OO5 XSHC4LCicslJV78TDaoikcTWtdjWAY+ID6D3cEx43fYH+eTjiy+uvXTn49T/qrV5aAvJ Dc+w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y22-v6si1307841pll.418.2018.03.09.11.35.34; Fri, 09 Mar 2018 11:35:49 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932482AbeCITe3 (ORCPT + 99 others); Fri, 9 Mar 2018 14:34:29 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:54822 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932343AbeCITe2 (ORCPT ); Fri, 9 Mar 2018 14:34:28 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C3D1EED9; Fri, 9 Mar 2018 19:34:27 +0000 (UTC) Date: Fri, 9 Mar 2018 11:34:29 -0800 From: Greg KH To: Ioana Ciornei Cc: laurentiu.tudor@nxp.com, linux-kernel@vger.kernel.org, stuyoder@gmail.com, ruxandra.radulescu@nxp.com, arnd@arndb.de, upstream-release@linux.freescale.net Subject: Re: [PATCH 2/3] bus: fsl-mc: add root dprc rescan attribute Message-ID: <20180309193429.GB20133@kroah.com> References: <0705c56d5b4c4cf0b4d9bacbd160982f12c7f953.1520440367.git.ioana.ciornei@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0705c56d5b4c4cf0b4d9bacbd160982f12c7f953.1520440367.git.ioana.ciornei@nxp.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 07, 2018 at 10:51:36AM -0600, Ioana Ciornei wrote: > Introduce the rescan attribute as a device attribute to > synchronize the fsl-mc bus objects and the MC firmware. > > To rescan the root dprc only, e.g. > echo 1 > /sys/bus/fsl-mc/devices/dprc.1/rescan > > Signed-off-by: Ioana Ciornei > --- > drivers/bus/fsl-mc/dprc-driver.c | 4 ++-- > drivers/bus/fsl-mc/fsl-mc-bus.c | 28 ++++++++++++++++++++++++++++ > drivers/bus/fsl-mc/fsl-mc-private.h | 3 +++ > 3 files changed, 33 insertions(+), 2 deletions(-) > > diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c > index 52c7e15..be80e3a 100644 > --- a/drivers/bus/fsl-mc/dprc-driver.c > +++ b/drivers/bus/fsl-mc/dprc-driver.c > @@ -214,8 +214,8 @@ static void dprc_add_new_devices(struct fsl_mc_device *mc_bus_dev, > * populated before they can get allocation requests from probe callbacks > * of the device drivers for the non-allocatable devices. > */ > -static int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev, > - unsigned int *total_irq_count) > +int dprc_scan_objects(struct fsl_mc_device *mc_bus_dev, > + unsigned int *total_irq_count) > { > int num_child_objects; > int dprc_get_obj_failures; > diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c > index 240b99d..763cbeb 100644 > --- a/drivers/bus/fsl-mc/fsl-mc-bus.c > +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c > @@ -137,8 +137,36 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, > } > static DEVICE_ATTR_RO(modalias); > > +static ssize_t rescan_store(struct device *dev, > + struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + struct fsl_mc_device *root_mc_dev; > + struct fsl_mc_bus *root_mc_bus; > + unsigned long val; > + > + if (!fsl_mc_is_root_dprc(dev)) > + return -EINVAL; > + > + root_mc_dev = to_fsl_mc_device(dev); > + root_mc_bus = to_fsl_mc_bus(root_mc_dev); > + > + if (kstrtoul(buf, 0, &val) < 0) > + return -EINVAL; > + > + if (val) { > + mutex_lock(&root_mc_bus->scan_mutex); > + dprc_scan_objects(root_mc_dev, NULL); > + mutex_unlock(&root_mc_bus->scan_mutex); > + } > + > + return count; > +} > +static DEVICE_ATTR_WO(rescan); You did not add the correct new documentation in Documentation/ABI/ for the new sysfs attributes you are creating. Please do so as part of this patch series. thanks, greg k-h