[SCSI] mpt2sas: Retrieve the ioc facts prior to putting the controller into READY...
authorKashyap, Desai <kashyap.desai@lsi.com>
Wed, 23 Sep 2009 12:02:06 +0000 (17:32 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 29 Oct 2009 17:03:14 +0000 (13:03 -0400)
The driver needs to retrieve the ioc facts prior to putting the controller
into READY state. The current design is calling ioc facts after putting the
controller into READY state, which means the driver is sending a diag reset
instead of message unit reset becuase the capability information is not yet
available.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Eric Moore <Eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/mpt2sas/mpt2sas_base.c

index c3524bcefd54a740a79bbef43827968a69a68dcd..84087cc2d772f5554c72334221f2d8fed8aad866 100644 (file)
@@ -3545,11 +3545,11 @@ mpt2sas_base_attach(struct MPT2SAS_ADAPTER *ioc)
                return r;
 
        pci_set_drvdata(ioc->pdev, ioc->shost);
-       r = _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET);
+       r = _base_get_ioc_facts(ioc, CAN_SLEEP);
        if (r)
                goto out_free_resources;
 
-       r = _base_get_ioc_facts(ioc, CAN_SLEEP);
+       r = _base_make_ioc_ready(ioc, CAN_SLEEP, SOFT_RESET);
        if (r)
                goto out_free_resources;