Re: [PATCH 3/5] qla1280: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Bart Van Assche
On 10/18/18 9:47 PM, Bart Van Assche wrote: On 10/18/18 6:03 AM, Christoph Hellwig wrote: @@ -1790,8 +1783,8 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha)   mb[4] = cnt;   mb[3] = ha->request_dma & 0x;   mb[2] = (ha->request_dma >> 16) & 0x; -   

Re: [PATCH 3/5] qla1280: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Bart Van Assche
On 10/18/18 6:03 AM, Christoph Hellwig wrote: @@ -1790,8 +1783,8 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha) mb[4] = cnt; mb[3] = ha->request_dma & 0x; mb[2] = (ha->request_dma >> 16) & 0x; - mb[7] =

Re: [PATCH 5/5] qla2xxx: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Bart Van Assche
On 10/18/18 6:03 AM, Christoph Hellwig wrote: This also moves the optimization for builds with 32-bit dma_addr_t to the compiler (where it belongs) instead of opencoding it based on incorrect assumptions. Signed-off-by: Christoph Hellwig --- drivers/scsi/qla2xxx/qla_target.c | 8

Re: [PATCH 0/7] qla2xxx patches for kernel v4.20

2018-10-18 Thread Madhani, Himanshu
Hello Bart, > On Oct 18, 2018, at 3:45 PM, Bart Van Assche wrote: > > External Email > > Hi Martin, > > This is a series with mostly trivial patches for the qla2xxx driver. These > patches address warnings reported by gcc and by the smatch and sparse static > analyzers. Please consider these

Re: [PATCH v3 0/5] qla2xxx: Add FC-NVMe Target support

2018-10-18 Thread Madhani, Himanshu
Hello All, > On Sep 28, 2018, at 3:46 PM, Himanshu Madhani > wrote: > > Hi Martin, > > This series adds support for FC-NVMe Target. > > Patch #1 adds infrastructure to support FC-NVMeT Link Service processing. > Patch #2 adds addes new qla_nvmet.[ch] files for FC-NVMe Target support. >

[PATCH] scsi: myrs: fix build failure on 32 bit

2018-10-18 Thread James Bottomley
For 32 bit versions we have to be careful about divisions of 64 bit quantities so use do_div() instead of a direct division. This fixes a warning about _uldivmod being undefined in certain configurations Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller") Reported-by: kbuild test robot

Re: [scsi:misc 194/233] ERROR: "__aeabi_uldivmod" [drivers/scsi/myrs.ko] undefined!

2018-10-18 Thread James Bottomley
On Thu, 2018-10-18 at 10:28 -0700, James Bottomley wrote: > On Fri, 2018-10-19 at 01:18 +0800, kbuild test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.g > > it > > misc > > head: 4d5b4ac1eae471bcd0fa381ab4099cc33e94e15d > > commit:

[PATCH 5/7] qla2xxx: Remove a set-but-not-used variable

2018-10-18 Thread Bart Van Assche
This patch does not change any functionality. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index

[PATCH 6/7] qla2xxx: Make sure that qlafx00_ioctl_iosb_entry() initializes 'res'

2018-10-18 Thread Bart Van Assche
Only one of the two code paths in qlafx00_ioctl_iosb_entry() initializes the variable 'res'. Make sure that 'res' is initialized before sp->done(sp, res) is called. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_mr.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 4/7] qla2xxx: Make qla2x00_sysfs_write_nvram() easier to analyze

2018-10-18 Thread Bart Van Assche
Modify the unlock statement such that it becomes easier for static analyzers to analyze it. This patch does not change any functionality. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 7/7] qla2xxx: Remove two arguments from qlafx00_error_entry()

2018-10-18 Thread Bart Van Assche
Move a debug statement from qlafx00_error_entry() into its caller. Remove one unused argument from that function. This patch does not change the behavior of the qla2xxx driver. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_mr.c | 13 + 1 file

[PATCH 1/7] qla2xxx: Modify fall-through annotations

2018-10-18 Thread Bart Van Assche
This patch avoids that the compiler complains about missing fall-through annotations when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH 3/7] qla2xxx: Declare local functions 'static'

2018-10-18 Thread Bart Van Assche
This patch avoids that the compiler complains about missing declarations when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c

[PATCH 2/7] qla2xxx: Improve several kernel-doc headers

2018-10-18 Thread Bart Van Assche
This patch avoids that complaints about kernel-doc headers are reported when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_iocb.c | 4 ++-- drivers/scsi/qla2xxx/qla_isr.c| 6 +++--- drivers/scsi/qla2xxx/qla_mbx.c| 6 +++---

[PATCH 0/7] qla2xxx patches for kernel v4.20

2018-10-18 Thread Bart Van Assche
Hi Martin, This is a series with mostly trivial patches for the qla2xxx driver. These patches address warnings reported by gcc and by the smatch and sparse static analyzers. Please consider these patches for kernel v4.20. Thanks, Bart. Bart Van Assche (7): qla2xxx: Modify fall-through

Re: [PATCH 1/4] gdth: refactor ioc_general

2018-10-18 Thread Finn Thain
On Thu, 18 Oct 2018, Christoph Hellwig wrote: > + > +static int ioc_general(void __user *arg, char *cmnd) > +{ > + gdth_ioctl_general gen; > + gdth_ha_str *ha; > + char *buf = NULL; > + u64 paddr; > + int rval; > + > + if (copy_from_user(, arg, sizeof(gdth_ioctl_general)))

Re: [PATCH 4/4] gdth: use generic DMA API

2018-10-18 Thread Finn Thain
On Thu, 18 Oct 2018, Christoph Hellwig wrote: > Switch from the legacy PCI DMA API to the generic DMA API. Also switch > to dma_map_single from pci_map_page in one case where this makes the code > simpler. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/gdth.c | 111

Re: [PATCH 2/4] gdth: reuse dma coherent allocation in gdth_show_info

2018-10-18 Thread Finn Thain
On Thu, 18 Oct 2018, Christoph Hellwig wrote: > gdth_show_info currently allocs and frees a dma buffer four times, > which isn't very efficient. Reuse a single allocation instead. > > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/gdth_proc.c | 18 +- > 1 file changed, 5

Re: [PATCH RESEND] scsi: qla2xxx: I/Os timing out on surprise removal of

2018-10-18 Thread Madhani, Himanshu
Martin, Bill, > On Oct 17, 2018, at 5:51 PM, Martin K. Petersen > wrote: > > External Email > > Himanshu, > >> When doing a surprise removal of an adapter, some in flight I/Os can get >> stuck and take a while to complete (they actually timeout and are >> retried). We are not handling an

Re: SCSI qla2xxx: tcm_qla2xxx target server code regession

2018-10-18 Thread Laurence Oberman
On Wed, 2018-10-17 at 16:42 -0400, Laurence Oberman wrote: > On Mon, 2018-10-15 at 08:51 -0400, Laurence Oberman wrote: > > On Sat, 2018-10-13 at 10:42 -0400, Laurence Oberman wrote: > > > On Fri, 2018-10-12 at 17:51 -0700, Bart Van Assche wrote: > > > > On 10/12/18 1:36 PM, Laurence Oberman

Re: dma related cleanups for wd719x

2018-10-18 Thread Ondrej Zary
On Thursday 18 October 2018 15:01:14 Christoph Hellwig wrote: > Hi Ondrej, > > can you look over this series, which cleans up a few dma-related > bits in the wd719x driver? > Looks nice but does not work. The first patch works, but the 2nd one causes hang on modprobe: [ 408.350359] wd719x

Re: [scsi:misc 194/233] ERROR: "__aeabi_uldivmod" [drivers/scsi/myrs.ko] undefined!

2018-10-18 Thread James Bottomley
On Fri, 2018-10-19 at 01:18 +0800, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git > misc > head: 4d5b4ac1eae471bcd0fa381ab4099cc33e94e15d > commit: 77266186397c6c782a3f670d32808a9671806ec5 [194/233] scsi: > myrs: Add Mylex RAID controller (SCSI

Re: [PATCH v2 3/7] drivers/base: Probe devices concurrently if requested by the driver

2018-10-18 Thread Alexander Duyck
On 10/18/2018 10:15 AM, Greg KH wrote: On Thu, Oct 18, 2018 at 09:51:03AM -0700, Alexander Duyck wrote: On 10/18/2018 9:46 AM, Bart Van Assche wrote: On Thu, 2018-10-18 at 08:25 -0700, Alexander Duyck wrote: On 10/17/2018 5:54 PM, Dan Williams wrote: On Wed, Oct 17, 2018 at 4:41 PM Bart

[scsi:misc 194/233] ERROR: "__aeabi_uldivmod" [drivers/scsi/myrs.ko] undefined!

2018-10-18 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc head: 4d5b4ac1eae471bcd0fa381ab4099cc33e94e15d commit: 77266186397c6c782a3f670d32808a9671806ec5 [194/233] scsi: myrs: Add Mylex RAID controller (SCSI interface) config: arm-allmodconfig (attached as .config) compiler:

Re: [PATCH v2 3/7] drivers/base: Probe devices concurrently if requested by the driver

2018-10-18 Thread Greg KH
On Thu, Oct 18, 2018 at 09:51:03AM -0700, Alexander Duyck wrote: > On 10/18/2018 9:46 AM, Bart Van Assche wrote: > > On Thu, 2018-10-18 at 08:25 -0700, Alexander Duyck wrote: > > > On 10/17/2018 5:54 PM, Dan Williams wrote: > > > > On Wed, Oct 17, 2018 at 4:41 PM Bart Van Assche > > > > wrote: >

Re: [PATCH v2 3/7] drivers/base: Probe devices concurrently if requested by the driver

2018-10-18 Thread Alexander Duyck
On 10/18/2018 9:46 AM, Bart Van Assche wrote: On Thu, 2018-10-18 at 08:25 -0700, Alexander Duyck wrote: On 10/17/2018 5:54 PM, Dan Williams wrote: On Wed, Oct 17, 2018 at 4:41 PM Bart Van Assche wrote: Instead of probing devices sequentially in the PROBE_PREFER_ASYNCHRONOUS mode, scan

Re: [PATCH v2 1/7] drivers/base: Fix a race condition in the device probing code

2018-10-18 Thread Bart Van Assche
On Thu, 2018-10-18 at 07:10 +0200, Greg Kroah-Hartman wrote: > > diff --git a/drivers/base/dd.c b/drivers/base/dd.c > > index edfc9f0b1180..b4212154a94b 100644 > > --- a/drivers/base/dd.c > > +++ b/drivers/base/dd.c > > @@ -645,6 +645,14 @@ int driver_probe_device(struct device_driver *drv, > >

Re: [PATCH v2 3/7] drivers/base: Probe devices concurrently if requested by the driver

2018-10-18 Thread Bart Van Assche
On Thu, 2018-10-18 at 08:25 -0700, Alexander Duyck wrote: > On 10/17/2018 5:54 PM, Dan Williams wrote: > > On Wed, Oct 17, 2018 at 4:41 PM Bart Van Assche wrote: > > > > > > Instead of probing devices sequentially in the PROBE_PREFER_ASYNCHRONOUS > > > mode, scan devices concurrently. This helps

[scsi:misc 194/233] ERROR: "__udivdi3" [drivers/scsi/myrs.ko] undefined!

2018-10-18 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc head: 4d5b4ac1eae471bcd0fa381ab4099cc33e94e15d commit: 77266186397c6c782a3f670d32808a9671806ec5 [194/233] scsi: myrs: Add Mylex RAID controller (SCSI interface) config: i386-allmodconfig (attached as .config) compiler:

Re: [PATCH v2 2/7] drivers/base: Verify struct device locking requirements at runtime

2018-10-18 Thread Bart Van Assche
On Thu, 2018-10-18 at 07:11 +0200, Greg Kroah-Hartman wrote: > On Wed, Oct 17, 2018 at 04:40:01PM -0700, Bart Van Assche wrote: > > Make sure that a complaint appears in the kernel log if the driver core > > locking assumptions are violated. > > > > Cc: Lee Duncan > > Cc: Hannes Reinecke > >

Re: [PATCH v2 3/7] drivers/base: Probe devices concurrently if requested by the driver

2018-10-18 Thread Alexander Duyck
On 10/17/2018 5:54 PM, Dan Williams wrote: On Wed, Oct 17, 2018 at 4:41 PM Bart Van Assche wrote: Instead of probing devices sequentially in the PROBE_PREFER_ASYNCHRONOUS mode, scan devices concurrently. This helps when the wall clock time for a single probe is significantly above the CPU

Re: [PATCH 05/12] hisi_sas: use dma_set_mask_and_coherent

2018-10-18 Thread John Garry
On 18/10/2018 14:10, Christoph Hellwig wrote: The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 + 1 file changed,

use dma_set_mask and dma_set_mask_and_coherent

2018-10-18 Thread Christoph Hellwig
Various SCSI drivers that otherwise use the generic DMA API still use pci_set_dma_mask, so switch them over to dma_set_mask and dma_set_mask_and_coherent.

[PATCH 03/12] dpt_i2o: use dma_set_mask

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Also move the dma_get_required_mask check before actually setting the dma mask, so that we don't end up with inconsistent settings in corner cases. Signed-off-by: Christoph Hellwig ---

[PATCH 12/12] sym53c8xx: use dma_set_mask

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/sym53c8xx_2/sym_glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c

[PATCH 01/12] arcmsr: use dma_set_mask

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/arcmsr/arcmsr_hba.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/arcmsr/arcmsr_hba.c

[PATCH 02/12] bfa: use dma_set_mask_and_coherent

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API helper and also ensure we set the coherent mask as well in the resume path. Signed-off-by: Christoph Hellwig --- drivers/scsi/bfa/bfad.c | 18 +++---

[PATCH 11/12] stex: use dma_set_mask_and_coherent

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/stex.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git

[PATCH 10/12] mvumi: use dma_set_mask

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/mvumi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 2458974d1af6..3d2d026d1ccf

[PATCH 05/12] hisi_sas: use dma_set_mask_and_coherent

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git

[PATCH 08/12] iscsi: use dma_set_mask_and_coherent

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/isci/init.c | 19 --- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git

[PATCH 06/12] hptiop: use dma_set_mask

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/hptiop.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c index

[PATCH 04/12] esas2r: use dma_set_mask_and_coherent

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Also move the dma_get_required_mask check before actually setting the dma mask, so that we don't end up with inconsistent settings in corner cases. Signed-off-by: Christoph Hellwig ---

[PATCH 09/12] lpfc: use dma_set_mask_and_coherent

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Switch it over to the better generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/lpfc/lpfc_init.c | 34 ++ 1 file changed, 10 insertions(+), 24 deletions(-)

[PATCH 07/12] initio: use dma_set_mask

2018-10-18 Thread Christoph Hellwig
The driver currently uses pci_set_dma_mask despite otherwise using the generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/initio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 7a91cf3ff173..0a8d786c84ed

[PATCH 3/4] gdth: remove gdth_{alloc,free}_ioctl

2018-10-18 Thread Christoph Hellwig
Out of the three callers once insists on the scratch buffer, and the others are fine with a new allocation. Switch those two to juse use pci_alloc_consistent directly, and open code the scratch buffer allocation in the remaining one. This avoids a case where we might be doing a memory allocation

[PATCH 4/4] gdth: use generic DMA API

2018-10-18 Thread Christoph Hellwig
Switch from the legacy PCI DMA API to the generic DMA API. Also switch to dma_map_single from pci_map_page in one case where this makes the code simpler. Signed-off-by: Christoph Hellwig --- drivers/scsi/gdth.c | 111 +++ drivers/scsi/gdth_proc.c | 4

[PATCH 1/4] gdth: refactor ioc_general

2018-10-18 Thread Christoph Hellwig
This function is a huge mess with duplicated error handling. Split out a few useful helpers and use goto labels to untangle the error handling and no-data ioctl handling. Signed-off-by: Christoph Hellwig --- drivers/scsi/gdth.c | 247 +++- 1 file

dma related cleanups for gdth

2018-10-18 Thread Christoph Hellwig
Cleans up various oddities found during a code audit.

[PATCH 2/4] gdth: reuse dma coherent allocation in gdth_show_info

2018-10-18 Thread Christoph Hellwig
gdth_show_info currently allocs and frees a dma buffer four times, which isn't very efficient. Reuse a single allocation instead. Signed-off-by: Christoph Hellwig --- drivers/scsi/gdth_proc.c | 18 +- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git

dma related cleanups for pmcraid

2018-10-18 Thread Christoph Hellwig
Cleans up various oddities found during a code audit.

[PATCH 3/3] pmcraid: use generic DMA API

2018-10-18 Thread Christoph Hellwig
Switch from the legacy PCI DMA API to the generic DMA API. Signed-off-by: Christoph Hellwig --- drivers/scsi/pmcraid.c | 79 +++--- 1 file changed, 36 insertions(+), 43 deletions(-) diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index

[PATCH 1/3] pmcraid: simplify pmcraid_cancel_all a bit

2018-10-18 Thread Christoph Hellwig
No need for a local cmd_done variable, and pass boolean values as bool type instead of u32. Signed-off-by: Christoph Hellwig --- drivers/scsi/pmcraid.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index

[PATCH 2/3] pmcraid: don't allocate a dma coherent buffer for sense data

2018-10-18 Thread Christoph Hellwig
We can just dma map the sense buffer passed with the scsi command, and that gets us out of the nasty business of doing dma coherent allocations from irq context. Signed-off-by: Christoph Hellwig --- drivers/scsi/pmcraid.c | 24 1 file changed, 8 insertions(+), 16

[PATCH 5/5] qla2xxx: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Christoph Hellwig
This also moves the optimization for builds with 32-bit dma_addr_t to the compiler (where it belongs) instead of opencoding it based on incorrect assumptions. Signed-off-by: Christoph Hellwig --- drivers/scsi/qla2xxx/qla_target.c | 8 drivers/scsi/qla2xxx/qla_target.h | 8 2

[PATCH 4/5] qla1280: properly handle 64-bit DMA

2018-10-18 Thread Christoph Hellwig
CONFIG_HIGHMEM is not in fact an indicator for > 32-bit dma addressing Given that the driver is a bit weird and wants a compile time selection switch to checking CONFIG_ARCH_DMA_ADDR_T_64BIT instead. Signed-off-by: Christoph Hellwig --- drivers/scsi/qla1280.c | 5 + 1 file changed, 1

fix up a few drivers for 64-bit dma addresses

2018-10-18 Thread Christoph Hellwig
Some drivers make very odd decisions on when to use support for 64-bit addressing. Fix this up a bit.

[PATCH 2/5] ips: properly handle 64-bit DMA

2018-10-18 Thread Christoph Hellwig
CONFIG_HIGHMEM64 is only one (and these days unusual) way to indicate that > 32-bit dma address are possible. Replace it with a check of the dma_addr_t size. Signed-off-by: Christoph Hellwig --- drivers/scsi/ips.c | 2 +- drivers/scsi/ips.h | 6 -- 2 files changed, 1 insertion(+), 7

[PATCH 1/5] ips: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/scsi/ips.c | 6 +++--- drivers/scsi/ips.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index ee8a1ecd58fd..679321e96a86 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@

[PATCH 3/5] qla1280: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Christoph Hellwig
This also moves the optimization for builds with 32-bit dma_addr_t to the compiler (where it belongs) instead of opencoding it. Signed-off-by: Christoph Hellwig --- drivers/scsi/qla1280.c | 47 ++ 1 file changed, 20 insertions(+), 27 deletions(-) diff

[PATCH 2/3] wd719x: use per-command private data

2018-10-18 Thread Christoph Hellwig
Add the SCB onto the scsi command allocation and use dma streaming mappings for it only when in use. This avoid possibly calling dma_alloc_coherent under a lock or even in irq context, while also making the code simpler. Signed-off-by: Christoph Hellwig --- drivers/scsi/wd719x.c | 95

[PATCH 3/3] wd719x: always use generic DMA API

2018-10-18 Thread Christoph Hellwig
The wd719x driver currently uses a mix of the legacy PCI DMA and the generic DMA APIs. Switch it over to the generic DMA API entirely. Signed-off-by: Christoph Hellwig --- drivers/scsi/wd719x.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git

[PATCH 1/3] wd719x: there should be no active SCBs on removal

2018-10-18 Thread Christoph Hellwig
So warn on that case instead of trying to free them, which would be fatal in case we actuall had active ones. Signed-off-by: Christoph Hellwig --- drivers/scsi/wd719x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/wd719x.c b/drivers/scsi/wd719x.c index

dma related cleanups for wd719x

2018-10-18 Thread Christoph Hellwig
Hi Ondrej, can you look over this series, which cleans up a few dma-related bits in the wd719x driver?

Re: [PATCH -next] scsi: hisi_sas: Fix missing unlock on error in hisi_sas_phy_read32()

2018-10-18 Thread John Garry
On 18/10/2018 04:58, Wei Yongjun wrote: Add the missing unlock before return from function hisi_sas_phy_read32() in the error handling case. Fixes: 784b46b7cba0 ("scsi: hisi_sas: Use block layer tag instead for IPTT") Signed-off-by: Wei Yongjun --- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 4