* [PATCH V3 01/12] pm80xx: fix for memory region free
@ 2013-03-20 17:20 Anand
2013-04-10 19:15 ` James Bottomley
2013-04-10 20:13 ` James Bottomley
0 siblings, 2 replies; 5+ messages in thread
From: Anand @ 2013-03-20 17:20 UTC (permalink / raw)
To: linux-scsi
Cc: Harry.Yang, rich.Bono, sakthivel.sk, Sangeetha.Gnanasekaran,
xjtuwjp, Vishwanath.Maram
[-- Attachment #1: Type: text/plain, Size: 1281 bytes --]
>From 700bfe79294e9f9e1a5def178af52b13928902a9 Mon Sep 17 00:00:00 2001
From: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
Date: Mon, 4 Feb 2013 12:10:02 +0530
Subject: [PATCH V3 01/12] pm80xx: fix for memory region free
All memory regions are allocated based on variables total_len
and alignment but free was based on element_size.
Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com>
Ack-by: Jack Wang <jack_wang@usish.com>
---
drivers/scsi/pm8001/pm8001_init.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 4c9fe73..3d5e522 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -140,7 +140,8 @@ static void pm8001_free(struct pm8001_hba_info *pm8001_ha)
for (i = 0; i < USI_MAX_MEMCNT; i++) {
if (pm8001_ha->memoryMap.region[i].virt_ptr != NULL) {
pci_free_consistent(pm8001_ha->pdev,
- pm8001_ha->memoryMap.region[i].element_size,
+ (pm8001_ha->memoryMap.region[i].total_len +
+ pm8001_ha->memoryMap.region[i].alignment),
pm8001_ha->memoryMap.region[i].virt_ptr,
pm8001_ha->memoryMap.region[i].phys_addr);
}
--
1.7.1
[-- Attachment #2: 0001-pm80xx-fix-for-memory-region-free.patch --]
[-- Type: text/plain, Size: 1281 bytes --]
>From 700bfe79294e9f9e1a5def178af52b13928902a9 Mon Sep 17 00:00:00 2001
From: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
Date: Mon, 4 Feb 2013 12:10:02 +0530
Subject: [PATCH V3 01/12] pm80xx: fix for memory region free
All memory regions are allocated based on variables total_len
and alignment but free was based on element_size.
Signed-off-by: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@pmcs.com>
Ack-by: Jack Wang <jack_wang@usish.com>
---
drivers/scsi/pm8001/pm8001_init.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index 4c9fe73..3d5e522 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -140,7 +140,8 @@ static void pm8001_free(struct pm8001_hba_info *pm8001_ha)
for (i = 0; i < USI_MAX_MEMCNT; i++) {
if (pm8001_ha->memoryMap.region[i].virt_ptr != NULL) {
pci_free_consistent(pm8001_ha->pdev,
- pm8001_ha->memoryMap.region[i].element_size,
+ (pm8001_ha->memoryMap.region[i].total_len +
+ pm8001_ha->memoryMap.region[i].alignment),
pm8001_ha->memoryMap.region[i].virt_ptr,
pm8001_ha->memoryMap.region[i].phys_addr);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V3 01/12] pm80xx: fix for memory region free
2013-03-20 17:20 [PATCH V3 01/12] pm80xx: fix for memory region free Anand
@ 2013-04-10 19:15 ` James Bottomley
2013-04-10 20:13 ` James Bottomley
1 sibling, 0 replies; 5+ messages in thread
From: James Bottomley @ 2013-04-10 19:15 UTC (permalink / raw)
To: Anand
Cc: linux-scsi, Harry.Yang, rich.Bono, sakthivel.sk,
Sangeetha.Gnanasekaran, xjtuwjp, Vishwanath.Maram
On Wed, 2013-03-20 at 10:20 -0700, Anand wrote:
> >From 700bfe79294e9f9e1a5def178af52b13928902a9 Mon Sep 17 00:00:00 2001
> From: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
> Date: Mon, 4 Feb 2013 12:10:02 +0530
> Subject: [PATCH V3 01/12] pm80xx: fix for memory region free
This one is already upstream:
commit bfb4809f7fff2f2db3d0de41ea4f49fd3f2f0aa4
Author: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
Date: Mon Feb 4 12:10:02 2013 +0530
[SCSI] pm80xx: fix for memory region free
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V3 01/12] pm80xx: fix for memory region free
2013-03-20 17:20 [PATCH V3 01/12] pm80xx: fix for memory region free Anand
2013-04-10 19:15 ` James Bottomley
@ 2013-04-10 20:13 ` James Bottomley
2013-04-11 6:35 ` Anand Kumar Santhanam
[not found] ` <E5DEE6F468524847995699AD11E808850123607E@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
1 sibling, 2 replies; 5+ messages in thread
From: James Bottomley @ 2013-04-10 20:13 UTC (permalink / raw)
To: Anand
Cc: linux-scsi, Harry.Yang, rich.Bono, sakthivel.sk,
Sangeetha.Gnanasekaran, xjtuwjp, Vishwanath.Maram
On Wed, 2013-03-20 at 10:20 -0700, Anand wrote:
> >From 700bfe79294e9f9e1a5def178af52b13928902a9 Mon Sep 17 00:00:00 2001
> From: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
> Date: Mon, 4 Feb 2013 12:10:02 +0530
> Subject: [PATCH V3 01/12] pm80xx: fix for memory region free
>
> All memory regions are allocated based on variables total_len
> and alignment but free was based on element_size.
This patch doesn't compile. It's giving
ERROR: "pm8001_80xx_dispatch" [drivers/scsi/pm8001/pm8001.ko] undefined!
make[1]: *** [__modpost] Error 1
This is because of this hunk:
> @@ -44,8 +44,16 @@
>
> static struct scsi_transport_template *pm8001_stt;
>
> +/**
> + * chip info structure to identify chip key functionality as
> + * encryption available/not, no of ports, hw specific function ref
> + */
> static const struct pm8001_chip_info pm8001_chips[] = {
> - [chip_8001] = { 8, &pm8001_8001_dispatch,},
> + [chip_8001] = {0, 8, &pm8001_8001_dispatch,},
> + [chip_8008] = {0, 8, &pm8001_80xx_dispatch,},
> + [chip_8009] = {1, 8, &pm8001_80xx_dispatch,},
> + [chip_8018] = {0, 16, &pm8001_80xx_dispatch,},
> + [chip_8019] = {1, 16, &pm8001_80xx_dispatch,},
But the structure isn't defined until patch 06/12. This patch series
has to be bisectable and buildable. That means each individual patch
must apply, compile and run in sequence. Please fix this.
Thanks,
James
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH V3 01/12] pm80xx: fix for memory region free
2013-04-10 20:13 ` James Bottomley
@ 2013-04-11 6:35 ` Anand Kumar Santhanam
[not found] ` <E5DEE6F468524847995699AD11E808850123607E@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
1 sibling, 0 replies; 5+ messages in thread
From: Anand Kumar Santhanam @ 2013-04-11 6:35 UTC (permalink / raw)
To: James Bottomley
Cc: linux-scsi, Harry Yang, Rich Bono, sakthivel.sk,
Sangeetha Gnanasekaran, xjtuwjp, Vishwanath Maram
Hi James,
Thanks for the feedback.
We have resubmitted all the patches starting from 1st patch in this V3
patchset. The first patch (given below) does not contain
pm8001_80xx_dispatch reference.
Maybe you have already applied patch 1 and 2 from earlier patchset and
trying to apply patch 1 from this V3 patchset?
diff --git a/drivers/scsi/pm8001/pm8001_init.c
b/drivers/scsi/pm8001/pm8001_init.c
index 4c9fe73..3d5e522 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -140,7 +140,8 @@ static void pm8001_free(struct pm8001_hba_info
*pm8001_ha)
for (i = 0; i < USI_MAX_MEMCNT; i++) {
if (pm8001_ha->memoryMap.region[i].virt_ptr != NULL) {
pci_free_consistent(pm8001_ha->pdev,
-
pm8001_ha->memoryMap.region[i].element_size,
+
(pm8001_ha->memoryMap.region[i].total_len +
+
pm8001_ha->memoryMap.region[i].alignment),
pm8001_ha->memoryMap.region[i].virt_ptr,
pm8001_ha->memoryMap.region[i].phys_addr);
}
--
1.7.1
We have applied the patches one by one and compiled each one of them in
sequence to check for any errors as you had suggested and we did not
encounter
compilation errors after applying each patch.
Regards
Anand
-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
Sent: Thursday, April 11, 2013 1:43 AM
To: Anand Kumar Santhanam
Cc: linux-scsi@vger.kernel.org; Harry Yang; Rich Bono;
sakthivel.sk@hcl.com; Sangeetha Gnanasekaran; xjtuwjp@gmail.com;
Vishwanath Maram
Subject: Re: [PATCH V3 01/12] pm80xx: fix for memory region free
On Wed, 2013-03-20 at 10:20 -0700, Anand wrote:
> >From 700bfe79294e9f9e1a5def178af52b13928902a9 Mon Sep 17 00:00:00
> >2001
> From: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
> Date: Mon, 4 Feb 2013 12:10:02 +0530
> Subject: [PATCH V3 01/12] pm80xx: fix for memory region free
>
> All memory regions are allocated based on variables total_len and
> alignment but free was based on element_size.
This patch doesn't compile. It's giving
ERROR: "pm8001_80xx_dispatch" [drivers/scsi/pm8001/pm8001.ko] undefined!
make[1]: *** [__modpost] Error 1
This is because of this hunk:
> @@ -44,8 +44,16 @@
>
> static struct scsi_transport_template *pm8001_stt;
>
> +/**
> + * chip info structure to identify chip key functionality as
> + * encryption available/not, no of ports, hw specific function ref
> +*/
> static const struct pm8001_chip_info pm8001_chips[] = {
> - [chip_8001] = { 8, &pm8001_8001_dispatch,},
> + [chip_8001] = {0, 8, &pm8001_8001_dispatch,},
> + [chip_8008] = {0, 8, &pm8001_80xx_dispatch,},
> + [chip_8009] = {1, 8, &pm8001_80xx_dispatch,},
> + [chip_8018] = {0, 16, &pm8001_80xx_dispatch,},
> + [chip_8019] = {1, 16, &pm8001_80xx_dispatch,},
But the structure isn't defined until patch 06/12. This patch series
has to be bisectable and buildable. That means each individual patch
must apply, compile and run in sequence. Please fix this.
Thanks,
James
^ permalink raw reply related [flat|nested] 5+ messages in thread
* RE: [PATCH V3 01/12] pm80xx: fix for memory region free
[not found] ` <E5DEE6F468524847995699AD11E808850123607E@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
@ 2013-04-12 2:40 ` Anand Kumar Santhanam
0 siblings, 0 replies; 5+ messages in thread
From: Anand Kumar Santhanam @ 2013-04-12 2:40 UTC (permalink / raw)
To: James Bottomley
Cc: linux-scsi, Harry Yang, Rich Bono, sakthivel.sk,
Sangeetha Gnanasekaran, xjtuwjp, Vishwanath Maram
Hi James,
Are you still seeing compilation issue? Do we need to rework on this
patchset? Pls let us know.
Regards
Anand
-----Original Message-----
From: Anand Kumar Santhanam
Sent: Thursday, April 11, 2013 12:05 PM
To: 'James Bottomley'
Cc: 'linux-scsi@vger.kernel.org'; Harry Yang; Rich Bono;
'sakthivel.sk@hcl.com'; Sangeetha Gnanasekaran; 'xjtuwjp@gmail.com';
Vishwanath Maram
Subject: RE: [PATCH V3 01/12] pm80xx: fix for memory region free
Hi James,
Thanks for the feedback.
We have resubmitted all the patches starting from 1st patch in this V3
patchset. The first patch (given below) does not contain
pm8001_80xx_dispatch reference.
Maybe you have already applied patch 1 and 2 from earlier patchset and
trying to apply patch 1 from this V3 patchset?
diff --git a/drivers/scsi/pm8001/pm8001_init.c
b/drivers/scsi/pm8001/pm8001_init.c
index 4c9fe73..3d5e522 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -140,7 +140,8 @@ static void pm8001_free(struct pm8001_hba_info
*pm8001_ha)
for (i = 0; i < USI_MAX_MEMCNT; i++) {
if (pm8001_ha->memoryMap.region[i].virt_ptr != NULL) {
pci_free_consistent(pm8001_ha->pdev,
-
pm8001_ha->memoryMap.region[i].element_size,
+
(pm8001_ha->memoryMap.region[i].total_len +
+
+ pm8001_ha->memoryMap.region[i].alignment),
pm8001_ha->memoryMap.region[i].virt_ptr,
pm8001_ha->memoryMap.region[i].phys_addr);
}
--
1.7.1
We have applied the patches one by one and compiled each one of them in
sequence to check for any errors as you had suggested and we did not
encounter compilation errors after applying each patch.
Regards
Anand
-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
Sent: Thursday, April 11, 2013 1:43 AM
To: Anand Kumar Santhanam
Cc: linux-scsi@vger.kernel.org; Harry Yang; Rich Bono;
sakthivel.sk@hcl.com; Sangeetha Gnanasekaran; xjtuwjp@gmail.com;
Vishwanath Maram
Subject: Re: [PATCH V3 01/12] pm80xx: fix for memory region free
On Wed, 2013-03-20 at 10:20 -0700, Anand wrote:
> >From 700bfe79294e9f9e1a5def178af52b13928902a9 Mon Sep 17 00:00:00
> >2001
> From: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
> Date: Mon, 4 Feb 2013 12:10:02 +0530
> Subject: [PATCH V3 01/12] pm80xx: fix for memory region free
>
> All memory regions are allocated based on variables total_len and
> alignment but free was based on element_size.
This patch doesn't compile. It's giving
ERROR: "pm8001_80xx_dispatch" [drivers/scsi/pm8001/pm8001.ko] undefined!
make[1]: *** [__modpost] Error 1
This is because of this hunk:
> @@ -44,8 +44,16 @@
>
> static struct scsi_transport_template *pm8001_stt;
>
> +/**
> + * chip info structure to identify chip key functionality as
> + * encryption available/not, no of ports, hw specific function ref */
> static const struct pm8001_chip_info pm8001_chips[] = {
> - [chip_8001] = { 8, &pm8001_8001_dispatch,},
> + [chip_8001] = {0, 8, &pm8001_8001_dispatch,},
> + [chip_8008] = {0, 8, &pm8001_80xx_dispatch,},
> + [chip_8009] = {1, 8, &pm8001_80xx_dispatch,},
> + [chip_8018] = {0, 16, &pm8001_80xx_dispatch,},
> + [chip_8019] = {1, 16, &pm8001_80xx_dispatch,},
But the structure isn't defined until patch 06/12. This patch series
has to be bisectable and buildable. That means each individual patch
must apply, compile and run in sequence. Please fix this.
Thanks,
James
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-12 2:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 17:20 [PATCH V3 01/12] pm80xx: fix for memory region free Anand
2013-04-10 19:15 ` James Bottomley
2013-04-10 20:13 ` James Bottomley
2013-04-11 6:35 ` Anand Kumar Santhanam
[not found] ` <E5DEE6F468524847995699AD11E808850123607E@BBY1EXM11.pmc_nt.nt.pmc-sierra.bc.ca>
2013-04-12 2:40 ` Anand Kumar Santhanam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox