All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Two qla2xxx fixes
@ 2019-11-06  4:42 Bart Van Assche
  2019-11-06  4:42 ` [PATCH 1/2] qla2xxx: Remove an include directive Bart Van Assche
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bart Van Assche @ 2019-11-06  4:42 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley; +Cc: linux-scsi, Bart Van Assche

Hi Martin,

Please consider the two patches in this series for kernel version v5.5.

Thanks,

Bart.

Bart Van Assche (2):
  qla2xxx: Remove an include directive
  qla2xxx: Fix a dma_pool_free() call

 drivers/scsi/qla2xxx/qla_init.c | 1 -
 drivers/scsi/qla2xxx/qla_os.c   | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.23.0


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

* [PATCH 1/2] qla2xxx: Remove an include directive
  2019-11-06  4:42 [PATCH 0/2] Two qla2xxx fixes Bart Van Assche
@ 2019-11-06  4:42 ` Bart Van Assche
  2019-11-06 21:53   ` Martin Wilck
  2019-11-06  4:42 ` [PATCH 2/2] qla2xxx: Fix a dma_pool_free() call Bart Van Assche
  2019-11-09  2:22 ` [PATCH 0/2] Two qla2xxx fixes Martin K. Petersen
  2 siblings, 1 reply; 7+ messages in thread
From: Bart Van Assche @ 2019-11-06  4:42 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Bart Van Assche, Himanshu Madhani

Since the code in qla_init.c is initiator code, remove the SCSI target
core include directive.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qla2xxx/qla_init.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 7cb7545de962..c1004d47514c 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -17,7 +17,6 @@
 #include <asm/prom.h>
 #endif
 
-#include <target/target_core_base.h>
 #include "qla_target.h"
 
 /*
-- 
2.23.0


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

* [PATCH 2/2] qla2xxx: Fix a dma_pool_free() call
  2019-11-06  4:42 [PATCH 0/2] Two qla2xxx fixes Bart Van Assche
  2019-11-06  4:42 ` [PATCH 1/2] qla2xxx: Remove an include directive Bart Van Assche
@ 2019-11-06  4:42 ` Bart Van Assche
  2019-11-06 21:52   ` Martin Wilck
  2019-11-09  2:22 ` [PATCH 0/2] Two qla2xxx fixes Martin K. Petersen
  2 siblings, 1 reply; 7+ messages in thread
From: Bart Van Assche @ 2019-11-06  4:42 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Bart Van Assche, Michael Hernandez, Himanshu Madhani

This patch fixes the following kernel warning:

DMA-API: qla2xxx 0000:00:0a.0: device driver frees DMA memory with different size [device address=0x00000000c7b60000] [map size=4088 bytes] [unmap size=512 bytes]
WARNING: CPU: 3 PID: 1122 at kernel/dma/debug.c:1021 check_unmap+0x4d0/0xbd0
CPU: 3 PID: 1122 Comm: rmmod Tainted: G           O      5.4.0-rc1-dbg+ #1
RIP: 0010:check_unmap+0x4d0/0xbd0
Call Trace:
 debug_dma_free_coherent+0x123/0x173
 dma_free_attrs+0x76/0xe0
 qla2x00_mem_free+0x329/0xc40 [qla2xxx_scst]
 qla2x00_free_device+0x170/0x1c0 [qla2xxx_scst]
 qla2x00_remove_one+0x4f0/0x6d0 [qla2xxx_scst]
 pci_device_remove+0xd5/0x1f0
 device_release_driver_internal+0x159/0x280
 driver_detach+0x8b/0xf2
 bus_remove_driver+0x9a/0x15a
 driver_unregister+0x51/0x70
 pci_unregister_driver+0x2d/0x130
 qla2x00_module_exit+0x1c/0xbc [qla2xxx_scst]
 __x64_sys_delete_module+0x22a/0x300
 do_syscall_64+0x6f/0x2e0
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Cc: Michael Hernandez <mhernandez@marvell.com>
Cc: Himanshu Madhani <hmadhani@marvell.com>
Fixes: 3f006ac342c0 ("scsi: qla2xxx: Secure flash update support for ISP28XX") # v5.2-rc1~130^2~270.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qla2xxx/qla_os.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 16f9b6ed574a..05fba5c2c926 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -4676,7 +4676,8 @@ qla2x00_mem_free(struct qla_hw_data *ha)
 	ha->sfp_data = NULL;
 
 	if (ha->flt)
-		dma_free_coherent(&ha->pdev->dev, SFP_DEV_SIZE,
+		dma_free_coherent(&ha->pdev->dev,
+		    sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE,
 		    ha->flt, ha->flt_dma);
 	ha->flt = NULL;
 	ha->flt_dma = 0;
-- 
2.23.0


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

* Re: [PATCH 2/2] qla2xxx: Fix a dma_pool_free() call
  2019-11-06  4:42 ` [PATCH 2/2] qla2xxx: Fix a dma_pool_free() call Bart Van Assche
@ 2019-11-06 21:52   ` Martin Wilck
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Wilck @ 2019-11-06 21:52 UTC (permalink / raw)
  To: Bart Van Assche, Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Michael Hernandez, Himanshu Madhani

On Tue, 2019-11-05 at 20:42 -0800, Bart Van Assche wrote:
> This patch fixes the following kernel warning:
> 
> DMA-API: qla2xxx 0000:00:0a.0: device driver frees DMA memory with
> different size [device address=0x00000000c7b60000] [map size=4088
> bytes] [unmap size=512 bytes]
> WARNING: CPU: 3 PID: 1122 at kernel/dma/debug.c:1021
> check_unmap+0x4d0/0xbd0
> CPU: 3 PID: 1122 Comm: rmmod Tainted: G           O      5.4.0-rc1-
> dbg+ #1
> RIP: 0010:check_unmap+0x4d0/0xbd0
> Call Trace:
>  debug_dma_free_coherent+0x123/0x173
>  dma_free_attrs+0x76/0xe0
>  qla2x00_mem_free+0x329/0xc40 [qla2xxx_scst]
>  qla2x00_free_device+0x170/0x1c0 [qla2xxx_scst]
>  qla2x00_remove_one+0x4f0/0x6d0 [qla2xxx_scst]
>  pci_device_remove+0xd5/0x1f0
>  device_release_driver_internal+0x159/0x280
>  driver_detach+0x8b/0xf2
>  bus_remove_driver+0x9a/0x15a
>  driver_unregister+0x51/0x70
>  pci_unregister_driver+0x2d/0x130
>  qla2x00_module_exit+0x1c/0xbc [qla2xxx_scst]
>  __x64_sys_delete_module+0x22a/0x300
>  do_syscall_64+0x6f/0x2e0
>  entry_SYSCALL_64_after_hwframe+0x49/0xbe
> 
> Cc: Michael Hernandez <mhernandez@marvell.com>
> Cc: Himanshu Madhani <hmadhani@marvell.com>
> Fixes: 3f006ac342c0 ("scsi: qla2xxx: Secure flash update support for
> ISP28XX") # v5.2-rc1~130^2~270.
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/scsi/qla2xxx/qla_os.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c
> b/drivers/scsi/qla2xxx/qla_os.c
> index 16f9b6ed574a..05fba5c2c926 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -4676,7 +4676,8 @@ qla2x00_mem_free(struct qla_hw_data *ha)
>  	ha->sfp_data = NULL;
>  
>  	if (ha->flt)
> -		dma_free_coherent(&ha->pdev->dev, SFP_DEV_SIZE,
> +		dma_free_coherent(&ha->pdev->dev,
> +		    sizeof(struct qla_flt_header) + FLT_REGIONS_SIZE,
>  		    ha->flt, ha->flt_dma);
>  	ha->flt = NULL;
>  	ha->flt_dma = 0;

Reviewed-by: Martin Wilck <mwilck@suse.com>



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

* Re: [PATCH 1/2] qla2xxx: Remove an include directive
  2019-11-06  4:42 ` [PATCH 1/2] qla2xxx: Remove an include directive Bart Van Assche
@ 2019-11-06 21:53   ` Martin Wilck
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Wilck @ 2019-11-06 21:53 UTC (permalink / raw)
  To: Bart Van Assche, Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, Himanshu Madhani

On Tue, 2019-11-05 at 20:42 -0800, Bart Van Assche wrote:
> Since the code in qla_init.c is initiator code, remove the SCSI
> target
> core include directive.
> 
> Cc: Himanshu Madhani <hmadhani@marvell.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  drivers/scsi/qla2xxx/qla_init.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_init.c
> b/drivers/scsi/qla2xxx/qla_init.c
> index 7cb7545de962..c1004d47514c 100644
> --- a/drivers/scsi/qla2xxx/qla_init.c
> +++ b/drivers/scsi/qla2xxx/qla_init.c
> @@ -17,7 +17,6 @@
>  #include <asm/prom.h>
>  #endif
>  
> -#include <target/target_core_base.h>
>  #include "qla_target.h"
>  
>  /*

Reviewed-by: Martin Wilck <mwilck@suse.com>



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

* Re: [PATCH 0/2] Two qla2xxx fixes
  2019-11-06  4:42 [PATCH 0/2] Two qla2xxx fixes Bart Van Assche
  2019-11-06  4:42 ` [PATCH 1/2] qla2xxx: Remove an include directive Bart Van Assche
  2019-11-06  4:42 ` [PATCH 2/2] qla2xxx: Fix a dma_pool_free() call Bart Van Assche
@ 2019-11-09  2:22 ` Martin K. Petersen
  2 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2019-11-09  2:22 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: Martin K . Petersen, James E . J . Bottomley, linux-scsi


Bart,

> Please consider the two patches in this series for kernel version
> v5.5.

Applied to 5.5/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* [PATCH 1/2] qla2xxx: Remove an include directive
  2019-11-07  5:21 [PATCH 0/3] Three lpfc fixes Bart Van Assche
@ 2019-11-07  5:21 ` Bart Van Assche
  0 siblings, 0 replies; 7+ messages in thread
From: Bart Van Assche @ 2019-11-07  5:21 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley
  Cc: James Smart, linux-scsi, Bart Van Assche, Himanshu Madhani

Since the code in qla_init.c is initiator code, remove the SCSI target
core include directive.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qla2xxx/qla_init.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 7cb7545de962..c1004d47514c 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -17,7 +17,6 @@
 #include <asm/prom.h>
 #endif
 
-#include <target/target_core_base.h>
 #include "qla_target.h"
 
 /*
-- 
2.23.0


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

end of thread, other threads:[~2019-11-09  2:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  4:42 [PATCH 0/2] Two qla2xxx fixes Bart Van Assche
2019-11-06  4:42 ` [PATCH 1/2] qla2xxx: Remove an include directive Bart Van Assche
2019-11-06 21:53   ` Martin Wilck
2019-11-06  4:42 ` [PATCH 2/2] qla2xxx: Fix a dma_pool_free() call Bart Van Assche
2019-11-06 21:52   ` Martin Wilck
2019-11-09  2:22 ` [PATCH 0/2] Two qla2xxx fixes Martin K. Petersen
2019-11-07  5:21 [PATCH 0/3] Three lpfc fixes Bart Van Assche
2019-11-07  5:21 ` [PATCH 1/2] qla2xxx: Remove an include directive Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.