Commit 1b899eb4 authored by Asai Thambi SP's avatar Asai Thambi SP Committed by Greg Kroah-Hartman

mtip32xx: Fix broken service thread handling

commit cfc05bd3 upstream.

Service thread does not detect the need for taskfile error hanlding. Fixed the
flag condition to process taskfile error.
Signed-off-by: default avatarSelvan Mani <smani@micron.com>
Signed-off-by: default avatarAsai Thambi S P <asamymuthupa@micron.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ef87aef5
...@@ -2924,9 +2924,7 @@ static int mtip_service_thread(void *data) ...@@ -2924,9 +2924,7 @@ static int mtip_service_thread(void *data)
* is in progress nor error handling is active * is in progress nor error handling is active
*/ */
wait_event_interruptible(port->svc_wait, (port->flags) && wait_event_interruptible(port->svc_wait, (port->flags) &&
!(port->flags & MTIP_PF_PAUSE_IO)); (port->flags & MTIP_PF_SVC_THD_WORK));
set_bit(MTIP_PF_SVC_THD_ACTIVE_BIT, &port->flags);
if (kthread_should_stop() || if (kthread_should_stop() ||
test_bit(MTIP_PF_SVC_THD_STOP_BIT, &port->flags)) test_bit(MTIP_PF_SVC_THD_STOP_BIT, &port->flags))
...@@ -2936,6 +2934,8 @@ static int mtip_service_thread(void *data) ...@@ -2936,6 +2934,8 @@ static int mtip_service_thread(void *data)
&dd->dd_flag))) &dd->dd_flag)))
goto st_out; goto st_out;
set_bit(MTIP_PF_SVC_THD_ACTIVE_BIT, &port->flags);
restart_eh: restart_eh:
/* Demux bits: start with error handling */ /* Demux bits: start with error handling */
if (test_bit(MTIP_PF_EH_ACTIVE_BIT, &port->flags)) { if (test_bit(MTIP_PF_EH_ACTIVE_BIT, &port->flags)) {
......
...@@ -144,6 +144,11 @@ enum { ...@@ -144,6 +144,11 @@ enum {
MTIP_PF_REBUILD_BIT = 6, MTIP_PF_REBUILD_BIT = 6,
MTIP_PF_SVC_THD_STOP_BIT = 8, MTIP_PF_SVC_THD_STOP_BIT = 8,
MTIP_PF_SVC_THD_WORK = ((1 << MTIP_PF_EH_ACTIVE_BIT) |
(1 << MTIP_PF_ISSUE_CMDS_BIT) |
(1 << MTIP_PF_REBUILD_BIT) |
(1 << MTIP_PF_SVC_THD_STOP_BIT)),
/* below are bit numbers in 'dd_flag' defined in driver_data */ /* below are bit numbers in 'dd_flag' defined in driver_data */
MTIP_DDF_SEC_LOCK_BIT = 0, MTIP_DDF_SEC_LOCK_BIT = 0,
MTIP_DDF_REMOVE_PENDING_BIT = 1, MTIP_DDF_REMOVE_PENDING_BIT = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment