From: Anand <anandkumar_santhanam@pmc-sierra.com>
To: linux-scsi@vger.kernel.org
Cc: Harry.Yang@pmcs.com, rich.Bono@pmcs.com, sakthivel.sk@hcl.com,
Sangeetha.Gnanasekaran@pmcs.com, xjtuwjp@gmail.com,
Vishwanath.Maram@pmcs.com
Subject: [PATCH V3 01/12] pm80xx: fix for memory region free
Date: Wed, 20 Mar 2013 10:20:57 -0700 [thread overview]
Message-ID: <5149EFF9.6070604@pmc-sierra.com> (raw)
[-- 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
next reply other threads:[~2013-03-20 17:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 17:20 Anand [this message]
2013-04-10 19:15 ` [PATCH V3 01/12] pm80xx: fix for memory region free 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5149EFF9.6070604@pmc-sierra.com \
--to=anandkumar_santhanam@pmc-sierra.com \
--cc=Harry.Yang@pmcs.com \
--cc=Sangeetha.Gnanasekaran@pmcs.com \
--cc=Vishwanath.Maram@pmcs.com \
--cc=linux-scsi@vger.kernel.org \
--cc=rich.Bono@pmcs.com \
--cc=sakthivel.sk@hcl.com \
--cc=xjtuwjp@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox