From: Darren Hart <dvhart@infradead.org>
To: Vadim Pasternak <vadimp@mellanox.com>
Cc: andy.shevchenko@gmail.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, jiri@resnulli.us,
michaelsh@mellanox.com, ivecera@redhat.com
Subject: Re: [PATCH v1 3/7] platform/mellanox: mlxreg-hotplug: add extra cycle for hotplug work queue
Date: Fri, 13 Apr 2018 09:47:10 -0700 [thread overview]
Message-ID: <20180413164710.GE27560@fury> (raw)
In-Reply-To: <1522144927-56512-4-git-send-email-vadimp@mellanox.com>
On Tue, Mar 27, 2018 at 10:02:03AM +0000, Vadim Pasternak wrote:
> It adds missed logic for signal acknowledge, by adding an extra run for
> work queue in case a signal is received, but no specific signal assertion
> is detected. Such case theoretically can happen for example in case
> several units are removed or inserted at the same time. In this situation
> acknowledge for some signal can be missed at signal top aggreagation
> status level.
Why can they be missed? What does "signal top aggregation status level"
mean? I'm asking to confirm that we are fixing this at the right place,
and not just applying a suboptimal bandaid by running the workqueue
more.
...
>
> Fixes: 1f976f6978bf ("platform/x86: Move Mellanox platform hotplug driver to platform/mellanox")
You didn't mention above how this commit caused this - how did moving
the driver create this problem? Does this need to go to stable? I'm
assuming not as you've called it theoretical - not something you've
observed in practice?
...
> static int mlxreg_hotplug_device_create(struct mlxreg_hotplug_priv_data *priv,
> @@ -410,6 +413,18 @@ static void mlxreg_hotplug_work_handler(struct work_struct *work)
> aggr_asserted = priv->aggr_cache ^ regval;
> priv->aggr_cache = regval;
>
> + /*
> + * Handler is invoked, but no assertion is detected at top aggregation
> + * status level. Set aggr_asserted to mask value to allow handler extra
> + * run over all relevant signals to recover any missed signal.
> + */
> + if (priv->not_asserted == MLXREG_HOTPLUG_NOT_ASSERT) {
> + priv->not_asserted = 0;
> + aggr_asserted = pdata->mask;
> + }
> + if (!aggr_asserted)
We seem to check aggr_asserted in several places in this routine now.
Looks like something we could simplify. If you check it here, can you
drop the check lower in the routine? Can you remove it from the for loop
if conditional entirely? Please consider how to simplify.
--
Darren Hart
VMware Open Source Technology Center
next prev parent reply other threads:[~2018-04-13 16:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 10:02 [PATCH v1 0/7] platform/x86: Mellanox add fixes and new features Vadim Pasternak
2018-03-27 10:02 ` [PATCH v1 1/7] platform_data/mlxreg: Document fixes for hotplug device Vadim Pasternak
2018-04-13 16:23 ` Darren Hart
2018-03-27 10:02 ` [PATCH v1 2/7] platform/mellanox: mlxreg-hotplug: Document fixes for hotplug private data Vadim Pasternak
2018-04-13 16:27 ` Darren Hart
2018-03-27 10:02 ` [PATCH v1 3/7] platform/mellanox: mlxreg-hotplug: add extra cycle for hotplug work queue Vadim Pasternak
2018-04-13 16:47 ` Darren Hart [this message]
2018-04-13 19:39 ` Vadim Pasternak
2018-03-27 10:02 ` [PATCH v1 4/7] platform: mellanox: add new ODM system types to mlx-platform Vadim Pasternak
2018-04-13 16:54 ` Darren Hart
2018-04-13 19:53 ` Vadim Pasternak
2018-03-27 10:02 ` [PATCH v1 5/7] platform/x86: mlx-platform: Add LED platform driver activation Vadim Pasternak
2018-03-27 10:02 ` [PATCH v1 6/7] platform/mellanox: Introduce support for Mellanox register access driver Vadim Pasternak
2018-03-27 10:02 ` [PATCH v1 7/7] platform/x86: mlx-platform: Add mlxreg-io platform driver activation Vadim Pasternak
2018-04-13 16:17 ` [PATCH v1 0/7] platform/x86: Mellanox add fixes and new features Darren Hart
2018-05-11 15:28 ` Darren Hart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180413164710.GE27560@fury \
--to=dvhart@infradead.org \
--cc=andy.shevchenko@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=michaelsh@mellanox.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vadimp@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox