* Patch "mtip32xx: Avoid issuing standby immediate cmd during FTL rebuild" has been added to the 4.5-stable tree
@ 2016-04-10 0:41 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-04-10 0:41 UTC (permalink / raw)
To: asamymuthupa, axboe, gregkh, smani, vgunasekaran; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
mtip32xx: Avoid issuing standby immediate cmd during FTL rebuild
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mtip32xx-avoid-issuing-standby-immediate-cmd-during-ftl-rebuild.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From d8a18d2d8f5de55666c6011ed175939d22c8e3d8 Mon Sep 17 00:00:00 2001
From: Asai Thambi SP <asamymuthupa@micron.com>
Date: Wed, 24 Feb 2016 21:17:32 -0800
Subject: mtip32xx: Avoid issuing standby immediate cmd during FTL rebuild
From: Asai Thambi SP <asamymuthupa@micron.com>
commit d8a18d2d8f5de55666c6011ed175939d22c8e3d8 upstream.
Prevent standby immediate command from being issued in remove,
suspend and shutdown paths, while drive is in FTL rebuild process.
Signed-off-by: Selvan Mani <smani@micron.com>
Signed-off-by: Vignesh Gunasekaran <vgunasekaran@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/block/mtip32xx/mtip32xx.c | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3263,20 +3263,25 @@ out1:
return rv;
}
-static void mtip_standby_drive(struct driver_data *dd)
+static int mtip_standby_drive(struct driver_data *dd)
{
- if (dd->sr)
- return;
+ int rv = 0;
+ if (dd->sr || !dd->port)
+ return -ENODEV;
/*
* Send standby immediate (E0h) to the drive so that it
* saves its state.
*/
if (!test_bit(MTIP_PF_REBUILD_BIT, &dd->port->flags) &&
- !test_bit(MTIP_DDF_SEC_LOCK_BIT, &dd->dd_flag))
- if (mtip_standby_immediate(dd->port))
+ !test_bit(MTIP_DDF_REBUILD_FAILED_BIT, &dd->dd_flag) &&
+ !test_bit(MTIP_DDF_SEC_LOCK_BIT, &dd->dd_flag)) {
+ rv = mtip_standby_immediate(dd->port);
+ if (rv)
dev_warn(&dd->pdev->dev,
"STANDBY IMMEDIATE failed\n");
+ }
+ return rv;
}
/*
@@ -3334,8 +3339,7 @@ static int mtip_hw_shutdown(struct drive
* Send standby immediate (E0h) to the drive so that it
* saves its state.
*/
- if (!dd->sr && dd->port)
- mtip_standby_immediate(dd->port);
+ mtip_standby_drive(dd);
return 0;
}
@@ -3358,7 +3362,7 @@ static int mtip_hw_suspend(struct driver
* Send standby immediate (E0h) to the drive
* so that it saves its state.
*/
- if (mtip_standby_immediate(dd->port) != 0) {
+ if (mtip_standby_drive(dd) != 0) {
dev_err(&dd->pdev->dev,
"Failed standby-immediate command\n");
return -EFAULT;
Patches currently in stable-queue which might be from asamymuthupa@micron.com are
queue-4.5/mtip32xx-print-exact-time-when-an-internal-command-is-interrupted.patch
queue-4.5/mtip32xx-implement-timeout-handler.patch
queue-4.5/mtip32xx-cleanup-queued-requests-after-surprise-removal.patch
queue-4.5/mtip32xx-avoid-issuing-standby-immediate-cmd-during-ftl-rebuild.patch
queue-4.5/mtip32xx-handle-safe-removal-during-io.patch
queue-4.5/mtip32xx-remove-unwanted-code-from-taskfile-error-handler.patch
queue-4.5/mtip32xx-handle-ftl-rebuild-failure-state-during-device-initialization.patch
queue-4.5/mtip32xx-fix-for-rmmod-crash-when-drive-is-in-ftl-rebuild.patch
queue-4.5/mtip32xx-fix-broken-service-thread-handling.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-04-10 0:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-10 0:41 Patch "mtip32xx: Avoid issuing standby immediate cmd during FTL rebuild" has been added to the 4.5-stable tree gregkh
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.