Browse Source

mpt3sas: Free memory pools before retrying to allocate with different value.

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>
Suganath prabu Subramani 9 years ago
parent
commit
8ff045c927
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/scsi/mpt3sas/mpt3sas_base.c

+ 1 - 0
drivers/scsi/mpt3sas/mpt3sas_base.c

@@ -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;
 	}