sreekanth.reddy | 19 Jul 2012 05:43

[RESEND] [PATCH] [SCSI] mptfusion: Fix for issue - The device is removed in blocked state

Fix for issue - The device is removed in blocked state.

The device is set to blocked state when I/Os running and the cable is pulled.
Also if the device missing delay timer is started. When the device missing
delay timer expires, the device is removed but the device state is not set to
unblocked state. This will cause problems  if there are commands in block
queue.

To fix this issue, added code to unblock the device before removing it.

Signed-off-by: Sreekanth Reddy <sreekanth.reddy <at> lsi.com>
Cc: <stable <at> kernel.org>
---

diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 551262e..4d02d5d 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
 <at>  <at>  -1088,7 +1088,13  <at>  <at>  mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
 static void
 mptsas_block_io_sdev(struct scsi_device *sdev, void *data)
 {
-	scsi_device_set_state(sdev, SDEV_BLOCK);
+	scsi_internal_device_block(sdev);
+}
+
+static void
+mptsas_ublock_io_sdev(struct scsi_device *sdev, void *data)
+{
+	scsi_internal_device_unblock(sdev);
(Continue reading)


Gmane