Re: [PATCH V3 07/15] usb: image: microtek: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
On Fri, Jun 14, 2019 at 03:39:10PM +1000, Finn Thain wrote: > On Fri, 14 Jun 2019, Ming Lei wrote: > > > Use the scatterlist iterators and remove direct indexing of the > > scatterlist array. > > > > This way allows us to pre-allocate one small scatterlist, which can be > > chained with one runti

Re: [PATCH V3 08/15] staging: unisys: visorhba: use sg helper to operate scatterlist

2019-06-13 Thread Greg Kroah-Hartman
On Fri, Jun 14, 2019 at 10:53:09AM +0800, Ming Lei wrote: > Use the scatterlist iterators and remove direct indexing of the > scatterlist array. > > This way allows us to pre-allocate one small scatterlist, which can be > chained with one runtime allocated scatterlist if the pre-allocated one > is

Re: [PATCH V3 07/15] usb: image: microtek: use sg helper to operate scatterlist

2019-06-13 Thread Finn Thain
On Fri, 14 Jun 2019, Ming Lei wrote: > Use the scatterlist iterators and remove direct indexing of the > scatterlist array. > > This way allows us to pre-allocate one small scatterlist, which can be > chained with one runtime allocated scatterlist if the pre-allocated one > isn't enough for the w

Re: [PATCH V3 10/15] scsi: aha152x: use sg helper to operate scatterlist

2019-06-13 Thread Finn Thain
Hi Ming, On Fri, 14 Jun 2019, Ming Lei wrote: > Use the scatterlist iterators and remove direct indexing of the > scatterlist array. > > This way allows us to pre-allocate one small scatterlist, which can be > chained with one runtime allocated scatterlist if the pre-allocated one > isn't enough

Re: [RFC v2 01/11] OPP: Don't overwrite rounded clk rate

2019-06-13 Thread Viresh Kumar
On 13-06-19, 15:24, Viresh Kumar wrote: > I am confused as hell on what we should be doing and what we are doing > right now. And if we should do better. > > Let me explain with an example. > > - The clock provider supports following frequencies: 500, 600, 700, > 800, 900, 1000 MHz. > > - The

[PATCH V3 06/15] scsi: pmcraid: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Signed-off-by: Ming Lei --- drive

[PATCH V3 14/15] scsi: wd33c93: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Signed-off-by: Ming Lei --- drive

[PATCH V3 10/15] scsi: aha152x: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Signed-off-by: Ming Lei --- drive

[PATCH V3 08/15] staging: unisys: visorhba: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Cc: de...@driverdev.osuosl.org Cc:

[PATCH V3 12/15] scsi: pcmcia: nsp_cs: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Signed-off-by: Ming Lei --- drive

[PATCH V3 09/15] s390: zfcp_fc: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Cc: Steffen Maier Cc: Benjamin Blo

[PATCH V3 13/15] scsi: ppa: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Signed-off-by: Ming Lei --- drive

[PATCH V3 15/15] NCR5380: Support chained sg lists

2019-06-13 Thread Ming Lei
From: Finn Thain My understanding is that support for chained scatterlists is to become mandatory for LLDs. Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocate

[PATCH V3 07/15] usb: image: microtek: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Cc: Oliver Neukum Cc: Greg Kroah-H

[PATCH V3 11/15] scsi: imm: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Signed-off-by: Ming Lei --- drive

[PATCH V3 05/15] scsi: ipr: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Signed-off-by: Ming Lei --- drive

[PATCH V3 01/15] scsi: vmw_pscsi: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Reviewed-by: Ewan D. Milne Signed-

[PATCH V3 04/15] scsi: mvumi: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Reviewed-by: Ewan D. Milne Signed-

[PATCH V3 03/15] scsi: lpfc: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Reviewed by: Ewan D. Milne Signed-

[PATCH V3 00/15] use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Hi, Scsi MQ makes a large static allocation for the first scatter gather list chunk for the driver to use. This is a performance headache we'd like to fix by reducing the size of the allocation to a 2 element array. Doing this will break the current guarantee that any driver using SG_ALL doesn't

[PATCH V3 02/15] scsi: advansys: use sg helper to operate scatterlist

2019-06-13 Thread Ming Lei
Use the scatterlist iterators and remove direct indexing of the scatterlist array. This way allows us to pre-allocate one small scatterlist, which can be chained with one runtime allocated scatterlist if the pre-allocated one isn't enough for the whole request. Reviewed-by: Ewan D. Milne Signed-

Re: [PATCH V2 00/15] scsi: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
On Thu, Jun 13, 2019 at 09:42:51AM -0700, James Bottomley wrote: > On Thu, 2019-06-13 at 15:13 +0800, Ming Lei wrote: > > Hi, > > > > Most of drivers use sg helpers to operate sgl, however there is > > still a few drivers which operate sgl directly, this way can't > > work in case of chained sgl.

Re: [PATCH V2 00/15] scsi: use sg helper to operate sgl

2019-06-13 Thread James Bottomley
On Thu, 2019-06-13 at 15:13 +0800, Ming Lei wrote: > Hi, > > Most of drivers use sg helpers to operate sgl, however there is > still a few drivers which operate sgl directly, this way can't > work in case of chained sgl. This isn't a useful explanation of the issue you make it sound like a bug, w

[PATCH V2 00/15] scsi: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
Hi, Most of drivers use sg helpers to operate sgl, however there is still a few drivers which operate sgl directly, this way can't work in case of chained sgl. So convert them to use sg helper. There are two types of scsi SGL uses: 1) operate on scsi_sglist(scmd) directly, then one local variab

[PATCH V2 04/15] scsi: mvumi: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sgl helper to operate sgl. Reviewed-by: Ewan D. Milne Signed-off-by: Ming Lei --- drivers/scsi/mvumi.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index a5410615edac..

[PATCH V2 12/15] scsi: pcmcia: nsp_cs: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Signed-off-by: Ming Lei --- drivers/scsi/pcmcia/nsp_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index a81748e6e8fb..97416e1dcc

[PATCH V2 11/15] scsi: imm: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Signed-off-by: Ming Lei --- drivers/scsi/imm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c index 64ae418d29f3..56d29f157749 100644 --- a/drivers/scsi/imm.c

[PATCH V2 07/15] usb: image: microtek: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Cc: Oliver Neukum Cc: Greg Kroah-Hartman Cc: linux-...@vger.kernel.org Signed-off-by: Ming Lei --- drivers/usb/image/microtek.c | 20 drivers/usb/image/microtek.h | 2 +- 2 files changed, 9 inser

[PATCH V2 14/15] scsi: wd33c93: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Signed-off-by: Ming Lei --- drivers/scsi/wd33c93.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c index 74be04f2357c..ae5935c0a149 100644 --- a/driver

[PATCH V2 06/15] scsi: pmcraid: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Signed-off-by: Ming Lei --- drivers/scsi/pmcraid.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c index e338d7a4f571..922c6e4b7eb3 100644

[PATCH V2 01/15] scsi: vmw_pscsi: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sgl helper to operate sgl. Reviewed-by: Ewan D. Milne Signed-off-by: Ming Lei --- drivers/scsi/vmw_pvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c index ecee4b3f

[PATCH V2 05/15] scsi: ipr: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Signed-off-by: Ming Lei --- drivers/scsi/ipr.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 6d053e220153..383603973937

[PATCH V2 15/15] NCR5380: Support chained sg lists

2019-06-13 Thread Ming Lei
From: Finn Thain My understanding is that support for chained scatterlists is to become mandatory for LLDs. Cc: Michael Schmitz Reviewed-by: Michael Schmitz Signed-off-by: Finn Thain --- drivers/scsi/NCR5380.c | 41 ++--- 1 file changed, 18 insertions(+),

[PATCH V2 02/15] scsi: advansys: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sgl helper to operate sgl. Reviewed-by: Ewan D. Milne Signed-off-by: Ming Lei --- drivers/scsi/advansys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index d37584403c33..

[PATCH V2 10/15] scsi: aha152x: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Signed-off-by: Ming Lei --- drivers/scsi/aha152x.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index 97872838b983..

[PATCH V2 13/15] scsi: ppa: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Signed-off-by: Ming Lei --- drivers/scsi/ppa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c index 35213082e933..a406cc825426 100644 --- a/drivers/scsi/ppa.c

[PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Cc: de...@driverdev.osuosl.org Cc: Greg Kroah-Hartman Signed-off-by: Ming Lei --- drivers/staging/unisys/visorhba/visorhba_main.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/sta

[PATCH V2 09/15] s390: zfcp_fc: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sg helper to operate sgl. Cc: Steffen Maier Cc: Benjamin Block Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux-s...@vger.kernel.org Signed-off-by: Ming Lei --- drivers/s390/scsi/zfcp_fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

[PATCH V2 03/15] scsi: lpfc: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
The current way isn't safe for chained sgl, so use sgl helper to operate sgl. Reviewed by: Ewan D. Milne Signed-off-by: Ming Lei --- drivers/scsi/lpfc/lpfc_nvmet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet

RE: [PATCH v2] scsi: ufs: Avoid runtime suspend possibly being blocked forever

2019-06-13 Thread Avri Altman
> > UFS runtime suspend can be triggered after pm_runtime_enable() > is invoked in ufshcd_pltfrm_init(). However if the first runtime > suspend is triggered before binding ufs_hba structure to ufs > device structure via platform_set_drvdata(), then UFS runtime > suspend will be no longer triggered

Re: [PATCH V2 09/15] s390: zfcp_fc: use sg helper to operate sgl

2019-06-13 Thread Benjamin Block
On Thu, Jun 13, 2019 at 03:13:29PM +0800, Ming Lei wrote: > The current way isn't safe for chained sgl, so use sg helper to > operate sgl. > > Cc: Steffen Maier > Cc: Benjamin Block > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: linux-s...@vger.kernel.org > Signed-off-by: Ming Lei > ---

Re: [PATCH V2 09/15] s390: zfcp_fc: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
On Thu, Jun 13, 2019 at 10:41:35AM +0200, Benjamin Block wrote: > On Thu, Jun 13, 2019 at 03:13:29PM +0800, Ming Lei wrote: > > The current way isn't safe for chained sgl, so use sg helper to > > operate sgl. > > > > Cc: Steffen Maier > > Cc: Benjamin Block > > Cc: Martin Schwidefsky > > Cc: He

Re: [PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread James Bottomley
On Thu, 2019-06-13 at 12:16 +0200, Greg Kroah-Hartman wrote: > On Thu, Jun 13, 2019 at 06:04:11PM +0800, Ming Lei wrote: > > On Thu, Jun 13, 2019 at 11:52:14AM +0200, Greg Kroah-Hartman wrote: > > > On Thu, Jun 13, 2019 at 03:13:28PM +0800, Ming Lei wrote: > > > > The current way isn't safe for cha

Re: [PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread Greg Kroah-Hartman
On Thu, Jun 13, 2019 at 03:13:28PM +0800, Ming Lei wrote: > The current way isn't safe for chained sgl, so use sg helper to > operate sgl. I can not make any sense out of this changelog. What "isn't safe"? What is a "sgl"? Can this be applied "out of order"? confused, greg k-h

Re: [PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread Ming Lei
On Thu, Jun 13, 2019 at 11:52:14AM +0200, Greg Kroah-Hartman wrote: > On Thu, Jun 13, 2019 at 03:13:28PM +0800, Ming Lei wrote: > > The current way isn't safe for chained sgl, so use sg helper to > > operate sgl. > > I can not make any sense out of this changelog. > > What "isn't safe"? What is

Re: [PATCH] scsi: megaraid_sas: Use struct_size() helper

2019-06-13 Thread Sumit Saxena
On Sat, Jun 8, 2019 at 12:10 AM Gustavo A. R. Silva wrote: > > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct MR_PD_CFG

Re: [PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread Greg Kroah-Hartman
On Thu, Jun 13, 2019 at 06:04:11PM +0800, Ming Lei wrote: > On Thu, Jun 13, 2019 at 11:52:14AM +0200, Greg Kroah-Hartman wrote: > > On Thu, Jun 13, 2019 at 03:13:28PM +0800, Ming Lei wrote: > > > The current way isn't safe for chained sgl, so use sg helper to > > > operate sgl. > > > > I can not m

Re: [PATCH V2 08/15] staging: unisys: visorhba: use sg helper to operate sgl

2019-06-13 Thread Dan Carpenter
On Thu, Jun 13, 2019 at 06:04:11PM +0800, Ming Lei wrote: > On Thu, Jun 13, 2019 at 11:52:14AM +0200, Greg Kroah-Hartman wrote: > > On Thu, Jun 13, 2019 at 03:13:28PM +0800, Ming Lei wrote: > > > The current way isn't safe for chained sgl, so use sg helper to > > > operate sgl. > > > > I can not m

Re: [PATCH V2 07/15] usb: image: microtek: use sg helper to operate sgl

2019-06-13 Thread Greg Kroah-Hartman
On Thu, Jun 13, 2019 at 03:13:27PM +0800, Ming Lei wrote: > The current way isn't safe for chained sgl, so use sg helper to > operate sgl. Same changelog comment problem as I mentioned on the other patch, please fix up and resend. thanks, greg k-h