From: Raghava Aditya Renukunta <raghavaaditya.renuku...@pmcs.com>

while driver removal is in progress or PCI shutdown is invoked, driver
kills AIF aacraid thread, but IOCTL requests from the management tools
re-start AIF thread leading to IOP_RESET.

Fixed by setting adapter_shutdown flag when PCI shutdown is invoked.

Changes in V2:
Set adapter_shutdown flag before shutdown command is sent to \
controller

Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renuku...@pmcs.com>
---
 drivers/scsi/aacraid/comminit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index 0e954e3..fe08854 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -212,8 +212,9 @@ int aac_send_shutdown(struct aac_dev * dev)
                return -ENOMEM;
        aac_fib_init(fibctx);
 
-       cmd = (struct aac_close *) fib_data(fibctx);
+       dev->adapter_shutdown = 1;
 
+       cmd = (struct aac_close *) fib_data(fibctx);
        cmd->command = cpu_to_le32(VM_CloseAll);
        cmd->cid = cpu_to_le32(0xfffffffe);
 
@@ -229,7 +230,6 @@ int aac_send_shutdown(struct aac_dev * dev)
        /* FIB should be freed only after getting the response from the F/W */
        if (status != -ERESTARTSYS)
                aac_fib_free(fibctx);
-       dev->adapter_shutdown = 1;
        if ((dev->pdev->device == PMC_DEVICE_S7 ||
             dev->pdev->device == PMC_DEVICE_S8 ||
             dev->pdev->device == PMC_DEVICE_S9) &&
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to