aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsai Thambi S P <asamymuthupa@micron.com>2013-01-11 08:16:04 -0500
committerJens Axboe <axboe@kernel.dk>2013-01-11 08:35:55 -0500
commit47cd4b3c7e80cc8d5ac82930c5af835870b5aba1 (patch)
tree259f9754916aa8f29c969a330eece233ae95592e
parentb6c46cfa312639a5416959258e6a81bea2fdaf8a (diff)
mtip32xx: fix for driver hang after a command timeout
If an I/O command times out when a PIO command is active, MTIP_PF_EH_ACTIVE_BIT is not cleared. This results in I/O hang in the driver. Fix is to clear this bit. Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 9694dd99bbbc..b93282019632 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -626,12 +626,13 @@ static void mtip_timeout_function(unsigned long int data)
626 } 626 }
627 } 627 }
628 628
629 if (cmdto_cnt && !test_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags)) { 629 if (cmdto_cnt) {
630 print_tags(port->dd, "timed out", tagaccum, cmdto_cnt); 630 print_tags(port->dd, "timed out", tagaccum, cmdto_cnt);
631 631 if (!test_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags)) {
632 mtip_restart_port(port); 632 mtip_restart_port(port);
633 wake_up_interruptible(&port->svc_wait);
634 }
633 clear_bit(MTIP_PF_EH_ACTIVE_BIT, &port->flags); 635 clear_bit(MTIP_PF_EH_ACTIVE_BIT, &port->flags);
634 wake_up_interruptible(&port->svc_wait);
635 } 636 }
636 637
637 if (port->ic_pause_timer) { 638 if (port->ic_pause_timer) {