diff options
author | Asai Thambi SP <asamymuthupa@micron.com> | 2016-02-25 00:16:00 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-03-03 11:08:43 -0500 |
commit | cfc05bd31384c4898bf2437a4de5557f3cf9803a (patch) | |
tree | b83d6c29a6af0ff6ba4aee7d35aa5ff68aa29d19 /drivers/block | |
parent | ff482f7f6a1750a5ba9bb57a4560716df82338a6 (diff) |
mtip32xx: Fix broken service thread handling
Service thread does not detect the need for taskfile error hanlding. Fixed the
flag condition to process taskfile error.
Signed-off-by: Selvan Mani <smani@micron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 6 | ||||
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.h | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index 9b180dbbd03c..dc445b4fc00f 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
@@ -2917,9 +2917,7 @@ static int mtip_service_thread(void *data) | |||
2917 | * is in progress nor error handling is active | 2917 | * is in progress nor error handling is active |
2918 | */ | 2918 | */ |
2919 | wait_event_interruptible(port->svc_wait, (port->flags) && | 2919 | wait_event_interruptible(port->svc_wait, (port->flags) && |
2920 | !(port->flags & MTIP_PF_PAUSE_IO)); | 2920 | (port->flags & MTIP_PF_SVC_THD_WORK)); |
2921 | |||
2922 | set_bit(MTIP_PF_SVC_THD_ACTIVE_BIT, &port->flags); | ||
2923 | 2921 | ||
2924 | if (kthread_should_stop() || | 2922 | if (kthread_should_stop() || |
2925 | test_bit(MTIP_PF_SVC_THD_STOP_BIT, &port->flags)) | 2923 | test_bit(MTIP_PF_SVC_THD_STOP_BIT, &port->flags)) |
@@ -2929,6 +2927,8 @@ static int mtip_service_thread(void *data) | |||
2929 | &dd->dd_flag))) | 2927 | &dd->dd_flag))) |
2930 | goto st_out; | 2928 | goto st_out; |
2931 | 2929 | ||
2930 | set_bit(MTIP_PF_SVC_THD_ACTIVE_BIT, &port->flags); | ||
2931 | |||
2932 | restart_eh: | 2932 | restart_eh: |
2933 | /* Demux bits: start with error handling */ | 2933 | /* Demux bits: start with error handling */ |
2934 | if (test_bit(MTIP_PF_EH_ACTIVE_BIT, &port->flags)) { | 2934 | if (test_bit(MTIP_PF_EH_ACTIVE_BIT, &port->flags)) { |
diff --git a/drivers/block/mtip32xx/mtip32xx.h b/drivers/block/mtip32xx/mtip32xx.h index 3274784008eb..8635239c521f 100644 --- a/drivers/block/mtip32xx/mtip32xx.h +++ b/drivers/block/mtip32xx/mtip32xx.h | |||
@@ -144,6 +144,11 @@ enum { | |||
144 | MTIP_PF_REBUILD_BIT = 6, | 144 | MTIP_PF_REBUILD_BIT = 6, |
145 | MTIP_PF_SVC_THD_STOP_BIT = 8, | 145 | MTIP_PF_SVC_THD_STOP_BIT = 8, |
146 | 146 | ||
147 | MTIP_PF_SVC_THD_WORK = ((1 << MTIP_PF_EH_ACTIVE_BIT) | | ||
148 | (1 << MTIP_PF_ISSUE_CMDS_BIT) | | ||
149 | (1 << MTIP_PF_REBUILD_BIT) | | ||
150 | (1 << MTIP_PF_SVC_THD_STOP_BIT)), | ||
151 | |||
147 | /* below are bit numbers in 'dd_flag' defined in driver_data */ | 152 | /* below are bit numbers in 'dd_flag' defined in driver_data */ |
148 | MTIP_DDF_SEC_LOCK_BIT = 0, | 153 | MTIP_DDF_SEC_LOCK_BIT = 0, |
149 | MTIP_DDF_REMOVE_PENDING_BIT = 1, | 154 | MTIP_DDF_REMOVE_PENDING_BIT = 1, |