All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>
To: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org,
	James Bottomley <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Manoj N. Kumar" <manoj@linux.vnet.ibm.com>,
	Brian King <brking@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, Ian Munsie <imunsie@au1.ibm.com>,
	Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
	Frederic Barrat <fbarrat@linux.vnet.ibm.com>,
	Christophe Lombard <clombard@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/6] cxlflash: Remove the device cleanly in the system shutdown path
Date: Wed, 7 Sep 2016 18:46:35 -0500	[thread overview]
Message-ID: <64F2AAD6-ADF0-4940-A4F1-7541177639EC@linux.vnet.ibm.com> (raw)
In-Reply-To: <1472848756-64998-1-git-send-email-ukrishn@linux.vnet.ibm.com>

> On Sep 2, 2016, at 3:39 PM, Uma Krishnan <ukrishn@linux.vnet.ibm.com> wrote:
> 
> Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash
> cards") was recently introduced to notify the AFU when a system is going
> down. Due to the position of the cxlflash driver in the device stack,
> cxlflash devices are _always_ removed during a reboot/shutdown. This can
> lead to a crash if the cxlflash shutdown hook is invoked _after_ the
> shutdown hook for the owning virtual PHB. Furthermore, the current
> implementation of shutdown/remove hooks for cxlflash are not tolerant to
> being invoked when the device is not enabled. This can also lead to a
> crash in situations where the remove hook is invoked after the device has
> been removed via the vPHBs shutdown hook. An example of this scenario
> would be an EEH reset failure while a reboot/shutdown is in progress.
> 
> To solve both problems, the shutdown hook for cxlflash is updated to
> simply remove the device. This path already includes the AFU notification
> and thus this solution will continue to perform the original intent. At
> the same time, the remove hook is updated to protect against being
> called when the device is not enabled.
> 
> Fixes: 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash
> cards")
> Signed-off-by: Uma Krishna <ukrishn@linux.vnet.ibm.com>

Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>


WARNING: multiple messages have this Message-ID (diff)
From: "Matthew R. Ochs" <mrochs@linux.vnet.ibm.com>
To: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Cc: linux-scsi@vger.kernel.org,
	James Bottomley <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	"Manoj N. Kumar" <manoj@linux.vnet.ibm.com>,
	Brian King <brking@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, Ian Munsie <imunsie@au1.ibm.com>,
	Andrew Donnellan <andrew.donnellan@au1.ibm.com>,
	Frederic Barrat <fbarrat@linux.vnet.ibm.com>,
	Christophe Lombard <clombard@linux.vnet.ibm.com>
Subject: Re: [PATCH 2/6] cxlflash: Remove the device cleanly in the system shutdown path
Date: Wed, 7 Sep 2016 18:46:35 -0500	[thread overview]
Message-ID: <64F2AAD6-ADF0-4940-A4F1-7541177639EC@linux.vnet.ibm.com> (raw)
In-Reply-To: <1472848756-64998-1-git-send-email-ukrishn@linux.vnet.ibm.com>

> On Sep 2, 2016, at 3:39 PM, Uma Krishnan <ukrishn@linux.vnet.ibm.com> =
wrote:
>=20
> Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash
> cards") was recently introduced to notify the AFU when a system is =
going
> down. Due to the position of the cxlflash driver in the device stack,
> cxlflash devices are _always_ removed during a reboot/shutdown. This =
can
> lead to a crash if the cxlflash shutdown hook is invoked _after_ the
> shutdown hook for the owning virtual PHB. Furthermore, the current
> implementation of shutdown/remove hooks for cxlflash are not tolerant =
to
> being invoked when the device is not enabled. This can also lead to a
> crash in situations where the remove hook is invoked after the device =
has
> been removed via the vPHBs shutdown hook. An example of this scenario
> would be an EEH reset failure while a reboot/shutdown is in progress.
>=20
> To solve both problems, the shutdown hook for cxlflash is updated to
> simply remove the device. This path already includes the AFU =
notification
> and thus this solution will continue to perform the original intent. =
At
> the same time, the remove hook is updated to protect against being
> called when the device is not enabled.
>=20
> Fixes: 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash
> cards")
> Signed-off-by: Uma Krishna <ukrishn@linux.vnet.ibm.com>

Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>

  parent reply	other threads:[~2016-09-07 23:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02 20:36 [PATCH 0/6] cxlflash: Miscellaneous fixes Uma Krishnan
2016-09-02 20:36 ` Uma Krishnan
2016-09-02 20:38 ` [PATCH 1/6] cxlflash: Scan host only after the port is ready for I/O Uma Krishnan
2016-09-07 23:46   ` Matthew R. Ochs
2016-09-07 23:46     ` Matthew R. Ochs
2016-09-02 20:39 ` [PATCH 2/6] cxlflash: Remove the device cleanly in the system shutdown path Uma Krishnan
2016-09-05  7:12   ` Andrew Donnellan
2016-09-06 20:06     ` Uma Krishnan
2016-09-07 23:46   ` Matthew R. Ochs [this message]
2016-09-07 23:46     ` Matthew R. Ochs
2016-09-02 20:39 ` [PATCH 3/6] cxlflash: Fix to avoid EEH and host reset collisions Uma Krishnan
2016-09-09 22:13   ` Uma Krishnan
2016-09-14 16:48   ` Martin K. Petersen
2016-09-02 20:40 ` [PATCH 4/6] cxlflash: Improve EEH recovery time Uma Krishnan
2016-09-09 22:14   ` Uma Krishnan
2016-09-02 20:40 ` [PATCH 5/6] cxlflash: Refactor WWPN setup Uma Krishnan
2016-09-09 22:14   ` Uma Krishnan
2016-09-02 20:40 ` [PATCH 6/6] cxlflash: Fix context reference tracking on detach Uma Krishnan
2016-09-09 22:14   ` Uma Krishnan
2016-09-09 11:35 ` [PATCH 0/6] cxlflash: Miscellaneous fixes Martin K. Petersen

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=64F2AAD6-ADF0-4940-A4F1-7541177639EC@linux.vnet.ibm.com \
    --to=mrochs@linux.vnet.ibm.com \
    --cc=andrew.donnellan@au1.ibm.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=clombard@linux.vnet.ibm.com \
    --cc=fbarrat@linux.vnet.ibm.com \
    --cc=imunsie@au1.ibm.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=manoj@linux.vnet.ibm.com \
    --cc=martin.petersen@oracle.com \
    --cc=ukrishn@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.