Patch "mtip32xx: Handle FTL rebuild failure state during device initialization" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
mtip32xx: Handle FTL rebuild failure state during device initialization
to the 4.4-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-handle-ftl-rebuild-failure-state-during-device-initialization.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
aae4a033868c496adae86fc6f9c3e0c405bbf360Mon Sep 17 00:00:00 2001
From: Asai Thambi SP <[email protected]>
Date: Wed, 24 Feb 2016 21:18:20 -0800
Subject: mtip32xx: Handle FTL rebuild failure state during device initialization
From: Asai Thambi SP <[email protected]>
commit aae4a033868c496adae86fc6f9c3e0c405bbf360 upstream.
Allow device initialization to finish gracefully when it is in FTL rebuild failure state. Also, recover device out of this state after successfully secure erasing it.
--- drivers/block/mtip32xx/mtip32xx.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/block/mtip32xx/mtip32xx.c +6 -5
@@ -699,7 +699,7 @@ static void mtip_handle_tfe(struct drive fail_reason ="thermal shutdown" ; }if (buf[288 ] ==0xBF ) { -set_bit (MTIP_DDF_SEC_LOCK_BIT , &dd->dd_flag); +set_bit (MTIP_DDF_REBUILD_FAILED_BIT , &dd->dd_flag);dev_info (&dd->pdev->dev,"Drive indicates rebuild has failed. Secure erase required.\n" ); fail_all_ncq_cmds =1 ;
@@ -1000,6 +1000,7 @@ static bool mtip_pause_ncq(struct mtip_p (fis->features == 0x27 || fis->features == 0x72 || fis->features == 0x62 || fis->features == 0x26))) {clear_bit (MTIP_DDF_SEC_LOCK_BIT , &port->dd->dd_flag); +clear_bit (MTIP_DDF_REBUILD_FAILED_BIT , &port->dd->dd_flag);/* Com reset after secure erase or lowlevel format */ mtip_restart_port (port);clear_bit (MTIP_PF_SE_ACTIVE_BIT , &port->flags);
@@ -1166,6 +1167,7 @@ static int mtip_exec_internal_command(stif ((rv =wait_for_completion_interruptible_timeout ( &wait,msecs_to_jiffies (timeout))) <=0 ) { +if (rv == -ERESTARTSYS ) {/* interrupted */ dev_err(&dd->pdev->dev, "Internal command [%02X] was interrupted after %u ms\n",
@@ -3091,7 +3093,7 @@ static int mtip_hw_get_identify(struct dif (buf[288 ] ==0xBF ) {dev_info (&dd->pdev->dev,"Drive indicates rebuild has failed.\n" ); -/* TODO */ +set_bit (MTIP_DDF_REBUILD_FAILED_BIT , &dd->dd_flag); } }
@@ -3694,10 +3696,9 @@ static int mtip_submit_request(struct bl rq_data_dir(rq))) {return -ENODATA ; } -if (unlikely (test_bit (MTIP_DDF_SEC_LOCK_BIT , &dd->dd_flag))) +if (unlikely (test_bit (MTIP_DDF_SEC_LOCK_BIT , &dd->dd_flag) || +test_bit (MTIP_DDF_REBUILD_FAILED_BIT , &dd->dd_flag)))return -ENODATA ; -if (test_bit (MTIP_DDF_REBUILD_FAILED_BIT , &dd->dd_flag)) -return -ENXIO ; }if (rq->cmd_flags &REQ_DISCARD ) {
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/mtip32xx-print-exact-time-when-an-internal-command-is-interrupted.patch queue-4.4/mtip32xx-implement-timeout-handler.patch queue-4.4/mtip32xx-cleanup-queued-requests-after-surprise-removal.patch queue-4.4/mtip32xx-avoid-issuing-standby-immediate-cmd-during-ftl-rebuild.patch queue-4.4/mtip32xx-handle-safe-removal-during-io.patch queue-4.4/mtip32xx-remove-unwanted-code-from-taskfile-error-handler.patch queue-4.4/mtip32xx-handle-ftl-rebuild-failure-state-during-device-initialization.patch queue-4.4/mtip32xx-fix-for-rmmod-crash-when-drive-is-in-ftl-rebuild.patch queue-4.4/mtip32xx-fix-broken-service-thread-handling.patch