Skip to contentSkip to conversation

mpt3sas driver fix and updated MAINTAINERS list:

PATCH In review Chaitra P B 5 participants 9 messages Feb 17, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover mpt3sas driver fix and updated MAINTAINERS list:

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(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/2 mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools()

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

Suganath prabu Subramani <[email protected]>

---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +5 -2
index f59495b..60c2e86 100644
@@ -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;
 	}
 
Signature · 1 line
1.8.3.1
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools()

Quoted 14 lines · Chaitra P B

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

Suganath prabu Subramani <[email protected]>

---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +0 -0
index f59495b..60c2e86 100644

drivers/scsi/mpt3sas/mpt3sas_base.c _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc) · line 3130

Quoted 9 lines
drivers/scsi/mpt3sas/mpt3sas_base.c +4 -2
@@ -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

Quoted 18 lines
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -0
 	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;
 	}
 
Signature · 6 lines
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 6 lines
Johannes Thumshirn                                          Storage
[email protected]                                +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
Reviewed-by
#3 lore raw

Re: [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools()

Quoted 32 lines · Johannes Thumshirn
Quoted 14 lines · Chaitra P B

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

Suganath prabu Subramani <[email protected]>

---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/scsi/mpt3sas/mpt3sas_base.c +0 -0
index f59495b..60c2e86 100644

drivers/scsi/mpt3sas/mpt3sas_base.c _base_release_memory_pools(struct MPT3SAS_ADAPTER *ioc) · line 3130

Quoted 9 lines
drivers/scsi/mpt3sas/mpt3sas_base.c +4 -2
@@ -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

Quoted 9 lines

drivers/scsi/mpt3sas/mpt3sas_base.c _base_allocate_memory_pools(struct MPT3SAS_ADAPTER *ioc, int sleep_flag) · line 3366

Quoted 9 lines
drivers/scsi/mpt3sas/mpt3sas_base.c +1 -0
 	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

#4 lore raw

Re: [PATCH 1/2] mpt3sas: Deallocate resources before trying reallocation of the same in _base_allocate_memory_pools()

In reply to Chaitra P B
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Chaitra" == Chaitra P B <[email protected]> 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.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#5 lore raw

PATCH 2/2 Modified Maintainers list for MPT FUSION DRIVERS.

In reply to Chaitra P B

Suganath prabu Subramani <[email protected]>

---
 MAINTAINERS | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
MAINTAINERS +3 -4
index 28eb61b..1922b16 100644
@@ -6659,10 +6659,9 @@ S:	Maintained
 F:	arch/arm/mach-lpc32xx/
 
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
-M:	Nagalakshmi Nandigama <[email protected]>
-M:	Praveen Krishnamoorthy <[email protected]>
-M:	Sreekanth Reddy <[email protected]>
-M:	Abhijit Mahajan <[email protected]>
+M:	Sathya Prakash <[email protected]>
+M:	Chaitra P B <[email protected]>
+M:	Suganath Prabu Subramani <[email protected]>
 L:	[email protected]
 L:	[email protected]
 W:	http://www.lsilogic.com/support
Signature · 1 line
1.8.3.1
Reviewed-by on v1 2/2
#6 lore raw

Re: [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS.

Quoted 31 lines · Chaitra P B

Suganath prabu Subramani <[email protected]>

---
 MAINTAINERS | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
MAINTAINERS +3 -4
index 28eb61b..1922b16 100644
@@ -6659,10 +6659,9 @@ S:	Maintained
 F:	arch/arm/mach-lpc32xx/
 
 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
-M:	Nagalakshmi Nandigama <[email protected]>
-M:	Praveen Krishnamoorthy <[email protected]>
-M:	Sreekanth Reddy <[email protected]>
-M:	Abhijit Mahajan <[email protected]>
+M:	Sathya Prakash <[email protected]>
+M:	Chaitra P B <[email protected]>
+M:	Suganath Prabu Subramani <[email protected]>
 L:	[email protected]
 L:	[email protected]
 W:	http://www.lsilogic.com/support
Signature · 6 lines
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 10 lines
Johannes Thumshirn                                          Storage
[email protected]                                +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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#7 lore raw

Re: [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS.

In reply to Chaitra P B
Quoted 2 lines · Chaitra P B

Suganath prabu Subramani <[email protected]>

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

A couple questions below.

MAINTAINERS

Quoted 1 line
MAINTAINERS +0 -0

[]

Quoted 11 lines
MAINTAINERS +0 -0
@@ -6659,10 +6659,9 @@ S:	Maintained

 F: arch/arm/mach-lpc32xx/

 LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)

MAINTAINERS +3 -4
-M:	Nagalakshmi Nandigama <[email protected]>
-M:	Praveen Krishnamoorthy 
-M:	Sreekanth Reddy <[email protected]>
-M:	Abhijit Mahajan <[email protected]>
+M:	Sathya Prakash <[email protected]>
+M:	Chaitra P B <[email protected]>
+M:	Suganath Prabu Subramani 
Quoted 1 line

 L: [email protected]

Should this L: entry be changed?

Quoted 2 lines

 L: [email protected]
 W: http://www.lsilogic.com/support

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

#8 lore raw

Re: [PATCH 2/2] Modified Maintainers list for MPT FUSION DRIVERS.

Quoted 3 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Joe" == Joe Perches <[email protected]> writes:

L: [email protected]

Joe> Should this L: entry be changed?

Quoted 2 lines
Quoted 2 lines

L: [email protected]
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.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering