>From 700bfe79294e9f9e1a5def178af52b13928902a9 Mon Sep 17 00:00:00 2001 From: Sakthivel K <Sakthivel.SaravananKamalRaju@xxxxxxxx> Date: Mon, 4 Feb 2013 12:10:02 +0530 Subject: [PATCH V2 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@xxxxxxxx> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@xxxxxxxx> Ack-by: Jack Wang <jack_wang@xxxxxxxxx> --- 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
>From 700bfe79294e9f9e1a5def178af52b13928902a9 Mon Sep 17 00:00:00 2001 From: Sakthivel K <Sakthivel.SaravananKamalRaju@xxxxxxxx> Date: Mon, 4 Feb 2013 12:10:02 +0530 Subject: [PATCH V2 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@xxxxxxxx> Signed-off-by: Anand Kumar S <AnandKumar.Santhanam@xxxxxxxx> Ack-by: Jack Wang <jack_wang@xxxxxxxxx> --- 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