Skip to content

Commit

Permalink
mtip32xx: fix for driver hang after a command timeout
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Asai Thambi S P authored and Jens Axboe committed Jan 11, 2013
1 parent b6c46cf commit 47cd4b3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/block/mtip32xx/mtip32xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,12 +626,13 @@ static void mtip_timeout_function(unsigned long int data)
}
}

if (cmdto_cnt && !test_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags)) {
if (cmdto_cnt) {
print_tags(port->dd, "timed out", tagaccum, cmdto_cnt);

mtip_restart_port(port);
if (!test_bit(MTIP_PF_IC_ACTIVE_BIT, &port->flags)) {
mtip_restart_port(port);
wake_up_interruptible(&port->svc_wait);
}
clear_bit(MTIP_PF_EH_ACTIVE_BIT, &port->flags);
wake_up_interruptible(&port->svc_wait);
}

if (port->ic_pause_timer) {
Expand Down

0 comments on commit 47cd4b3

Please sign in to comment.