linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mpt3sas driver fix and updated MAINTAINERS list:
@ 2016-02-17 11:25 Chaitra P B
  2016-02-17 11:25 ` [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools() Chaitra P B
  2016-02-17 11:25 ` [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS Chaitra P B
  0 siblings, 2 replies; 9+ messages in thread
From: Chaitra P B @ 2016-02-17 11:25 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

Here is the change list:
Posting 2 patches for mpt3sas driver fix and updated MAINTAINERS list.
 * Deallocates resources before reallocating of the same in retry_allocation
   path of _base_allocate_memory_pools().
 * Updated MAINTAINERS list for MPT FUSION DRIVERS.

Chaitra P B (2):
  mpt3sas: Deallocate resources before trying reallocation of the
  same in _base_allocate_memory_pools().
  Modified Maintainers list for MPT FUSION DRIVERS.

 MAINTAINERS                         | 7 +++----
 drivers/scsi/mpt3sas/mpt3sas_base.c | 7 +++++--
 2 files changed, 8 insertions(+), 6 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools()
  2016-02-17 11:25 [PATCH 0/2] mpt3sas driver fix and updated MAINTAINERS list: Chaitra P B
@ 2016-02-17 11:25 ` Chaitra P B
  2016-02-17 11:36   ` Johannes Thumshirn
  2016-02-17 23:53   ` Martin K. Petersen
  2016-02-17 11:25 ` [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS Chaitra P B
  1 sibling, 2 replies; 9+ messages in thread
From: Chaitra P B @ 2016-02-17 11:25 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

Deallocates resources before reallocating of the same in retry_allocation
path of _base_allocate_memory_pools()

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index f59495b..60c2e86 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -3124,8 +3124,10 @@ _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc)
 		free_pages((ulong)ioc->scsi_lookup, ioc->scsi_lookup_pages);
 		ioc->scsi_lookup = NULL;
 	}
-	kfree(ioc->hpr_lookup);
-	kfree(ioc->internal_lookup);
+	if (ioc->hpr_lookup)
+		kfree(ioc->hpr_lookup);
+	if (ioc->internal_lookup)
+		kfree(ioc->internal_lookup);
 	if (ioc->chain_lookup) {
 		for (i = 0; i < ioc->chain_depth; i++) {
 			if (ioc->chain_lookup[i].chain_buffer)
@@ -3360,6 +3362,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc,  int sleep_flag)
 			goto out;
 		retry_sz += 64;
 		ioc->hba_queue_depth = max_request_credit - retry_sz;
+		_base_release_memory_pools(ioc);
 		goto retry_allocation;
 	}
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS.
  2016-02-17 11:25 [PATCH 0/2] mpt3sas driver fix and updated MAINTAINERS list: Chaitra P B
  2016-02-17 11:25 ` [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools() Chaitra P B
@ 2016-02-17 11:25 ` Chaitra P B
  2016-02-17 11:36   ` Johannes Thumshirn
  2016-02-17 11:53   ` Joe Perches
  1 sibling, 2 replies; 9+ messages in thread
From: Chaitra P B @ 2016-02-17 11:25 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
---
 MAINTAINERS | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 28eb61b..1922b16 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6659,10 +6659,9 @@ S:	Maintained
 F:	arch/arm/mach-lpc32xx/
 
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
-M:	Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
-M:	Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>
-M:	Sreekanth Reddy <sreekanth.reddy@avagotech.com>
-M:	Abhijit Mahajan <abhijit.mahajan@avagotech.com>
+M:	Sathya Prakash <sathya.prakash@broadcom.com>
+M:	Chaitra P B <chaitra.basappa@broadcom.com>
+M:	Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
 L:	MPT-FusionLinux.pdl@avagotech.com
 L:	linux-scsi@vger.kernel.org
 W:	http://www.lsilogic.com/support
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools()
  2016-02-17 11:25 ` [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools() Chaitra P B
@ 2016-02-17 11:36   ` Johannes Thumshirn
  2016-02-17 16:40     ` Tomas Henzl
  2016-02-17 23:53   ` Martin K. Petersen
  1 sibling, 1 reply; 9+ messages in thread
From: Johannes Thumshirn @ 2016-02-17 11:36 UTC (permalink / raw)
  To: Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

On Wed, Feb 17, 2016 at 04:55:25PM +0530, Chaitra P B wrote:
> Deallocates resources before reallocating of the same in retry_allocation
> path of _base_allocate_memory_pools()
> 
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
> ---
>  drivers/scsi/mpt3sas/mpt3sas_base.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
> index f59495b..60c2e86 100644
> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
> @@ -3124,8 +3124,10 @@ _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc)
>  		free_pages((ulong)ioc->scsi_lookup, ioc->scsi_lookup_pages);
>  		ioc->scsi_lookup = NULL;
>  	}
> -	kfree(ioc->hpr_lookup);
> -	kfree(ioc->internal_lookup);
> +	if (ioc->hpr_lookup)
> +		kfree(ioc->hpr_lookup);
> +	if (ioc->internal_lookup)
> +		kfree(ioc->internal_lookup);

kfree() can handle NULL pointers as arguments, so checking isn't needed. In
fact there are coccinelle scripts to check for it (make coccicheck) and it'll
spawn patches from people "fixing" it. So please get rid of the checks.

Otherwise

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

>  	if (ioc->chain_lookup) {
>  		for (i = 0; i < ioc->chain_depth; i++) {
>  			if (ioc->chain_lookup[i].chain_buffer)
> @@ -3360,6 +3362,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc,  int sleep_flag)
>  			goto out;
>  		retry_sz += 64;
>  		ioc->hba_queue_depth = max_request_credit - retry_sz;
> +		_base_release_memory_pools(ioc);
>  		goto retry_allocation;
>  	}
>  
> -- 
> 1.8.3.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS.
  2016-02-17 11:25 ` [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS Chaitra P B
@ 2016-02-17 11:36   ` Johannes Thumshirn
  2016-02-17 11:53   ` Joe Perches
  1 sibling, 0 replies; 9+ messages in thread
From: Johannes Thumshirn @ 2016-02-17 11:36 UTC (permalink / raw)
  To: Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

On Wed, Feb 17, 2016 at 04:55:26PM +0530, Chaitra P B wrote:
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
> ---
>  MAINTAINERS | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 28eb61b..1922b16 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -6659,10 +6659,9 @@ S:	Maintained
>  F:	arch/arm/mach-lpc32xx/
>  
>  LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
> -M:	Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
> -M:	Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>
> -M:	Sreekanth Reddy <sreekanth.reddy@avagotech.com>
> -M:	Abhijit Mahajan <abhijit.mahajan@avagotech.com>
> +M:	Sathya Prakash <sathya.prakash@broadcom.com>
> +M:	Chaitra P B <chaitra.basappa@broadcom.com>
> +M:	Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>
>  L:	MPT-FusionLinux.pdl@avagotech.com
>  L:	linux-scsi@vger.kernel.org
>  W:	http://www.lsilogic.com/support
> -- 
> 1.8.3.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS.
  2016-02-17 11:25 ` [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS Chaitra P B
  2016-02-17 11:36   ` Johannes Thumshirn
@ 2016-02-17 11:53   ` Joe Perches
  2016-02-17 23:56     ` Martin K. Petersen
  1 sibling, 1 reply; 9+ messages in thread
From: Joe Perches @ 2016-02-17 11:53 UTC (permalink / raw)
  To: Chaitra P B, JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	sreekanth.reddy

On Wed, 2016-02-17 at 16:55 +0530, Chaitra P B wrote:
> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
> Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>

Is this supposed to be a signed-off-by line?

A couple questions below.

> diff --git a/MAINTAINERS b/MAINTAINERS
[]
> @@ -6659,10 +6659,9 @@ S:	Maintained
>  F:	arch/arm/mach-lpc32xx/
>  
>  LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
> -M:	Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>
> -M:	Praveen Krishnamoorthy 
> -M:	Sreekanth Reddy <sreekanth.reddy@avagotech.com>
> -M:	Abhijit Mahajan <abhijit.mahajan@avagotech.com>
> +M:	Sathya Prakash <sathya.prakash@broadcom.com>
> +M:	Chaitra P B <chaitra.basappa@broadcom.com>
> +M:	Suganath Prabu Subramani 
>  L:	MPT-FusionLinux.pdl@avagotech.com

Should this L: entry be changed?

>  L:	linux-scsi@vger.kernel.org
>  W:	http://www.lsilogic.com/support

This W: link seems broken/dead.
Should this be updated too?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools()
  2016-02-17 11:36   ` Johannes Thumshirn
@ 2016-02-17 16:40     ` Tomas Henzl
  0 siblings, 0 replies; 9+ messages in thread
From: Tomas Henzl @ 2016-02-17 16:40 UTC (permalink / raw)
  To: Johannes Thumshirn, Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

On 17.2.2016 12:36, Johannes Thumshirn wrote:
> On Wed, Feb 17, 2016 at 04:55:25PM +0530, Chaitra P B wrote:
>> Deallocates resources before reallocating of the same in retry_allocation
>> path of _base_allocate_memory_pools()
>>
>> Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
>> Suganath prabu Subramani <suganath-prabu.subramani@avagotech.com>
>> ---
>>  drivers/scsi/mpt3sas/mpt3sas_base.c | 7 +++++--
>>  1 file changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> index f59495b..60c2e86 100644
>> --- a/drivers/scsi/mpt3sas/mpt3sas_base.c
>> +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
>> @@ -3124,8 +3124,10 @@ _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc)
>>  		free_pages((ulong)ioc->scsi_lookup, ioc->scsi_lookup_pages);
>>  		ioc->scsi_lookup = NULL;
>>  	}
>> -	kfree(ioc->hpr_lookup);
>> -	kfree(ioc->internal_lookup);
>> +	if (ioc->hpr_lookup)
>> +		kfree(ioc->hpr_lookup);
>> +	if (ioc->internal_lookup)
>> +		kfree(ioc->internal_lookup);
> kfree() can handle NULL pointers as arguments, so checking isn't needed. In
> fact there are coccinelle scripts to check for it (make coccicheck) and it'll
> spawn patches from people "fixing" it. So please get rid of the checks.
>
> Otherwise
>
> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
>
>>  	if (ioc->chain_lookup) {
>>  		for (i = 0; i < ioc->chain_depth; i++) {
>>  			if (ioc->chain_lookup[i].chain_buffer)
>> @@ -3360,6 +3362,7 @@ _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc,  int sleep_flag)
>>  			goto out;
>>  		retry_sz += 64;
>>  		ioc->hba_queue_depth = max_request_credit - retry_sz;
>> +		_base_release_memory_pools(ioc);
>>  		goto retry_allocation;

Thanks for posting

Reviewed-by: Tomas Henzl <thenzl@redhat.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools()
  2016-02-17 11:25 ` [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools() Chaitra P B
  2016-02-17 11:36   ` Johannes Thumshirn
@ 2016-02-17 23:53   ` Martin K. Petersen
  1 sibling, 0 replies; 9+ messages in thread
From: Martin K. Petersen @ 2016-02-17 23:53 UTC (permalink / raw)
  To: Chaitra P B
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

>>>>> "Chaitra" == Chaitra P B <chaitra.basappa@broadcom.com> writes:

Chaitra> Deallocates resources before reallocating of the same in
Chaitra> retry_allocation path of _base_allocate_memory_pools()

Johannes' comments about kfree() aside, this patch does not apply to
4.6/scsi-queue which has the driver update from Suganath. Please rebase
and resubmit.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS.
  2016-02-17 11:53   ` Joe Perches
@ 2016-02-17 23:56     ` Martin K. Petersen
  0 siblings, 0 replies; 9+ messages in thread
From: Martin K. Petersen @ 2016-02-17 23:56 UTC (permalink / raw)
  To: Joe Perches
  Cc: Chaitra P B, JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, suganath-prabu.subramani, sreekanth.reddy

>>>>> "Joe" == Joe Perches <joe@perches.com> writes:

>> L: MPT-FusionLinux.pdl@avagotech.com

Joe> Should this L: entry be changed?

>> L: linux-scsi@vger.kernel.org
>> W: http://www.lsilogic.com/support

Joe> This W: link seems broken/dead.  Should this be updated too?

Chaitra: Please address Joe's comments and resubmit.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-02-17 23:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 11:25 [PATCH 0/2] mpt3sas driver fix and updated MAINTAINERS list: Chaitra P B
2016-02-17 11:25 ` [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools() Chaitra P B
2016-02-17 11:36   ` Johannes Thumshirn
2016-02-17 16:40     ` Tomas Henzl
2016-02-17 23:53   ` Martin K. Petersen
2016-02-17 11:25 ` [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS Chaitra P B
2016-02-17 11:36   ` Johannes Thumshirn
2016-02-17 11:53   ` Joe Perches
2016-02-17 23:56     ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).