mpt3sas: Free memory pools before retrying to allocate with different value.
authorSuganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
Thu, 18 Feb 2016 08:39:45 +0000 (14:09 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
Deallocate resources before reallocating of the same in retry_allocation
path of _base_allocate_memory_pools()

Signed-off-by: Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mpt3sas/mpt3sas_base.c

index afdb13acd3a2b7b5f04fc27221640bb17508b8f7..5bbbbf26d2f9408dc854dece1e222013a61fb497 100644 (file)
@@ -3414,6 +3414,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc,  int sleep_flag)
                        goto out;
                retry_sz = 64;
                ioc->hba_queue_depth -= retry_sz;
+               _base_release_memory_pools(ioc);
                goto retry_allocation;
        }