From: Suganath prabu Subramani Date: Thu, 18 Feb 2016 08:39:45 +0000 (+0530) Subject: mpt3sas: Free memory pools before retrying to allocate with different value. X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8ff045c92708a595b7e39d68bdc0bd7edc08a073;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Chaitra P B Reviewed-by: Tomas Henzl Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index afdb13acd3a2..5bbbbf26d2f9 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/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; }