RE: [PATCH v1 0/3] scsi: ufs: Re-factor ufshcd_get_pwr_dev_param

2019-02-25 Thread Avri Altman
Hi, > Hello, > > This series re-factors ufshcd_get_pwr_dev_param in vendors' drivers. This > function is for vendors to decide finally agreed attributes for power mode > change if vendors define > their host capability in struct ufs_dev_params. Because it is using by both > ufs-qcom and ufs-hisi

RE: [PATCH v1 0/3] scsi: ufs: Re-factor ufshcd_get_pwr_dev_param

2019-02-25 Thread Stanley Chu
Hi Avri, Thanks so much for consideration. Then I will combine this series to "scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips" and upload a completed version later. On Mon, 2019-02-25 at 08:54 +, Avri Altman wrote: > Hi, > > > Hello, > > > > This series re-factors ufshcd_get_pw

[PATCH v2 0/6] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips

2019-02-25 Thread stanley.chu
From: Stanley Chu Hello, This patch series adds UFS M-PHY and UFS host driver support in MediaTek chipsets. In the meantime, re-factors ufshcd_get_pwr_dev_param in vendors' drivers. This function is for vendors to decide finally agreed attributes for power mode change if vendors define their

[PATCH v2 2/6] scsi: ufs-qcom: Re-factor ufshcd_get_pwr_dev_param

2019-02-25 Thread stanley.chu
From: Stanley Chu ufshcd_get_pwr_dev_param function and ufs_dev_params struct are re-factored to ufs common driver thus change the way this driver used. Signed-off-by: Stanley Chu --- drivers/scsi/ufs/ufs-qcom.c | 106 ++-- 1 file changed, 4 insertions(+), 102 d

[PATCH v2 6/6] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips

2019-02-25 Thread stanley.chu
From: Stanley Chu This patch adds UFS support for Mediatek SoC chips. Signed-off-by: Stanley Chu --- drivers/scsi/ufs/Kconfig| 14 ++ drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-mediatek.c | 377 drivers/scsi/ufs/ufs-mediatek.h | 61

[PATCH v2 3/6] scsi: ufs-hisi: Re-factor ufshcd_get_pwr_dev_param

2019-02-25 Thread stanley.chu
From: Stanley Chu ufshcd_get_pwr_dev_param function and ufs_dev_params struct are re-factored to ufs common driver thus change the way this driver used. Signed-off-by: Stanley Chu --- drivers/scsi/ufs/ufs-hisi.c | 109 ++-- 1 file changed, 4 insertions(+), 105 d

[PATCH v2] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips

2019-02-25 Thread stanley.chu
Hello, This patch series adds UFS M-PHY and UFS host driver support in MediaTek chipsets. In the meantime, re-factors ufshcd_get_pwr_dev_param in vendors' drivers. This function is for vendors to decide finally agreed attributes for power mode change if vendors define their host capability in

[PATCH v2 4/6] dt-bindings: scsi: ufs: Add document for ufs-mediatek

2019-02-25 Thread stanley.chu
From: Stanley Chu Add UFS and UFS PHY node document for Mediatek SoC chips. Signed-off-by: Stanley Chu --- .../devicetree/bindings/ufs/ufs-mediatek.txt | 75 +++ 1 file changed, 75 insertions(+) create mode 100644 Documentation/devicetree/bindings/ufs/ufs-mediatek.txt diff -

[PATCH v2 5/6] phy: mediatek: Add UFS M-PHY driver

2019-02-25 Thread stanley.chu
From: Stanley Chu Add UFS M-PHY driver on Mediatek chipsets. Signed-off-by: Stanley Chu --- drivers/phy/mediatek/Kconfig| 29 ++-- drivers/phy/mediatek/Makefile | 2 + drivers/phy/mediatek/phy-mtk-ufs-12nm.c | 151 +++ drivers/phy/mediatek/phy-mtk-ufs-1

[PATCH v2 1/6] scsi: ufs: Introduce ufshcd_get_pwr_dev_param

2019-02-25 Thread stanley.chu
From: Stanley Chu ufshcd_get_pwr_dev_param is for vendors to decide finally agreed attributes for power mode change if vendors define their host capability in struct ufs_dev_params. This api is using by both ufs-qcom and ufs-hisi now. Simply re-factor it and then every vendors can reuse it. Sig

RE: [PATCH v2 1/6] scsi: ufs: Introduce ufshcd_get_pwr_dev_param

2019-02-25 Thread Avri Altman
> > From: Stanley Chu > > ufshcd_get_pwr_dev_param is for vendors to decide finally > agreed attributes for power mode change if vendors define > their host capability in struct ufs_dev_params. > > This api is using by both ufs-qcom and ufs-hisi now. Simply > re-factor it and then every vendors

RE: [PATCH v2 2/6] scsi: ufs-qcom: Re-factor ufshcd_get_pwr_dev_param

2019-02-25 Thread Avri Altman
> > ufshcd_get_pwr_dev_param function and ufs_dev_params struct > are re-factored to ufs common driver thus change the way this > driver used. > > Signed-off-by: Stanley Chu Reviewed-by: Avri Altman

RE: [PATCH v2 3/6] scsi: ufs-hisi: Re-factor ufshcd_get_pwr_dev_param

2019-02-25 Thread Avri Altman
> > From: Stanley Chu > > ufshcd_get_pwr_dev_param function and ufs_dev_params struct > are re-factored to ufs common driver thus change the way this > driver used. > > Signed-off-by: Stanley Chu Reviewed-by: Avri Altman

RE: [PATCH v2 6/6] scsi: ufs-mediatek: Add UFS support for Mediatek SoC chips

2019-02-25 Thread Avri Altman
> This patch adds UFS support for Mediatek SoC chips. > > Signed-off-by: Stanley Chu Reviewed-by: Avri Altman

Re: [RESEND] [PATCH] Hold back_lock when calling iscsi_complete_task

2019-02-25 Thread Johannes Thumshirn
On 22/02/2019 17:29, Lee Duncan wrote: > From: Lee Duncan > > If there is an error queueing an iscsi command in > iscsi_queuecommand(), for example if the transport fails > to take the command in sessuin->tt->xmit_task(), then > the error path can call iscsi_complete_task() without > first aquiri

Re: [PATCH v2 5/6] phy: mediatek: Add UFS M-PHY driver

2019-02-25 Thread Chunfeng Yun
Hi Stanley, On Mon, 2019-02-25 at 17:24 +0800, stanley@mediatek.com wrote: > From: Stanley Chu > > Add UFS M-PHY driver on Mediatek chipsets. > > Signed-off-by: Stanley Chu > --- > drivers/phy/mediatek/Kconfig| 29 ++-- > drivers/phy/mediatek/Makefile | 2 + > dri

[PATCH v5 0/3] UFS on APQ8098/MSM8998

2019-02-25 Thread Marc Gonzalez
Hello, This series adds support for the UFS host controller on APQ8098/MSM8998-based boards. This should be the final rev ;-) Differences between v4 and v5: - Drop patches that have already been accepted or spun off Differences between v3 and v4: - Rebase on top of -next - Pick up Douglas Ande

[PATCH v5 1/3] dt-bindings: ufs: Add msm8998 compatible string

2019-02-25 Thread Marc Gonzalez
Add "qcom,msm8998-ufshc" compatible string. Signed-off-by: Marc Gonzalez --- Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.

[PATCH v5 2/3] arm64: dts: qcom: msm8998: Allow UFSHC driver to set-load

2019-02-25 Thread Marc Gonzalez
The UFS host controller driver needs to set the load on 3 power rails (l20, l26, s4) but the operation fails silently unless we specify the regulator-allow-set-load property in the corresponding DT nodes. Reviewed-by: Jeffrey Hugo Signed-off-by: Marc Gonzalez --- arch/arm64/boot/dts/qcom/msm899

[PATCH v5 3/3] arm64: dts: qcom: msm8998: Add UFS nodes

2019-02-25 Thread Marc Gonzalez
Add host controller and PHY DT nodes. Signed-off-by: Marc Gonzalez --- arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 19 +++ arch/arm64/boot/dts/qcom/msm8998.dtsi | 65 +++ 2 files changed, 84 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi b/arch

Re: [LSF/MM TOPIC] Handling of managed IRQs when hotplugging CPUs

2019-02-25 Thread Hannes Reinecke
On 2/19/19 3:19 AM, Ming Lei wrote: On Tue, Feb 5, 2019 at 11:30 PM Hannes Reinecke wrote: Hi all, this came up during discussion on the mailing list (cf thread "Question on handling managed IRQs when hotplugging CPUs"). The problem is that with managed IRQs and block-mq I/O will be routed to

Re: [PATCH] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-25 Thread Hannes Reinecke
On 2/19/19 1:02 PM, Sreekanth Reddy wrote: Use driver's scsiio lookup table to track outstanding IOs at driver level, Have done following changes in this patch, * Allocated & initialized scsi_lookup table of type (struct scsiio_tracker) and of depth host's can_queue at driver load time and

Re: [RESEND] [PATCH] Hold back_lock when calling iscsi_complete_task

2019-02-25 Thread Lee Duncan
On 2/25/19 2:02 AM, Johannes Thumshirn wrote: > On 22/02/2019 17:29, Lee Duncan wrote: >> From: Lee Duncan >> >> If there is an error queueing an iscsi command in >> iscsi_queuecommand(), for example if the transport fails >> to take the command in sessuin->tt->xmit_task(), then >> the error path

[PATCH v2] scsi:libiscsi: Hold back_lock when calling iscsi_complete_task

2019-02-25 Thread Lee Duncan
From: Lee Duncan If there is an error queueing an iscsi command in iscsi_queuecommand(), for example if the transport fails to take the command in sessuin->tt->xmit_task(), then the error path can call iscsi_complete_task() without first aquiring the back_lock as required. This can lead to things

Re: WARNING: CPU: 2 PID: 11303 at drivers/scsi/scsi_lib.c:2600 scsi_device_resume+0x4f/0x58

2019-02-25 Thread Bart Van Assche
On Fri, 2019-02-22 at 17:37 +0100, Przemek Socha wrote: > [ ... ] > git bisect good 7cedffec8e759480f7f7a9be9cd0d7ebf0aafff2 > # first bad commit: [986d413b7c156e69198dfc80fb74aa18d0ddef44] blk-mq: Enable > support for runtime power management Hi Przemek, This is weird. Neither scsi_device_quies

Re: [PATCH v1] mpt3sas: Use driver scsi lookup to track outstanding IOs

2019-02-25 Thread Hannes Reinecke
On 2/21/19 1:11 PM, Sreekanth Reddy wrote: During expander reset handling, the driver invokes kernel function scsi_host_find_tag() to obtain outstanding requests associated with the scsi host managed by the driver. Kernel’s block layer may return stale entry for one or more outstanding requests i

Re: WARNING: CPU: 2 PID: 11303 at drivers/scsi/scsi_lib.c:2600 scsi_device_resume+0x4f/0x58

2019-02-25 Thread Przemek Socha
Dnia poniedziałek, 25 lutego 2019 19:37:37 CET piszesz: > On Fri, 2019-02-22 at 17:37 +0100, Przemek Socha wrote: > > [ ... ] > > git bisect good 7cedffec8e759480f7f7a9be9cd0d7ebf0aafff2 > > # first bad commit: [986d413b7c156e69198dfc80fb74aa18d0ddef44] blk-mq: > > Enable support for runtime power

Re: [PATCHv2 0/8] scsi: fixup dma_set_mask_and_coherent() calls

2019-02-25 Thread Ewan Milne
The recent patchset to use dma_set_mask_and_coherent() introduced a regression where a call to set a 64-bit DMA mask was followed by a call to set a 32-bit DMA mask, leading to I/O errors and data corruption. Patchset is based on a suggestions from Ewan Milne. Hannes Reinecke (8): lpfc: fix c

Re: [PATCH 1/8] lpfc: fix calls to dma_set_mask_and_coherent()

2019-02-25 Thread Ewan Milne
The change to use dma_set_mask_and_coherent() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. This resulted in NVMe/FC connections failing due to corrupted data buffers, and various other SCSI/FCP I/O errors. Fixes: f30e1bfd615

Re: [PATCH 2/8] 3w-9xxx: fix calls to dma_set_mask_and_coherent()

2019-02-25 Thread Ewan Milne
The change to use dma_set_mask_and_coherent() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. Fixes: b000bced5739 ("scsi: 3w-9xxx: fully convert to the generic DMA API") Cc: Signed-off-by: Hannes Reinecke --- drivers/scsi/3w-

Re: [PATCH 3/8] 3w-sas: fix calls to dma_set_mask_and_coherent()

2019-02-25 Thread Ewan Milne
The change to use dma_set_mask_and_coherent() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. Fixes: b1fa122930c4 ("scsi: 3w-sas: fully convert to the generic DMA API") Cc: Signed-off-by: Hannes Reinecke --- drivers/scsi/3w-s

Re: [PATCH 4/8] 3w-sas: fix calls to dma_set_mask_and_coherent()

2019-02-25 Thread Ewan Milne
The change to use dma_set_mask_and_coherent() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. Fixes: 3a21986f1a59 ("scsi: aic94xx: fully convert to the generic DMA API") Cc: Signed-off-by: Hannes Reinecke --- drivers/scsi/aic

Re: [PATCH 5/8] bfa: fix calls to dma_set_mask_and_coherent()

2019-02-25 Thread Ewan Milne
The change to use dma_set_mask_and_coherent() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. This resulted in FC connections failing due to corrupted data buffers, and various other SCSI/FCP I/O errors. Fixes: a69b080025ea ("s

Re: [PATCH 6/8] csiostor: fix calls to dma_set_mask_and_coherent()

2019-02-25 Thread Ewan Milne
The change to use dma_set_mask_and_coherent() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. Fixes: c22b332d811b ("scsi: csiostor: switch to generic DMA API") Cc: Signed-off-by: Hannes Reinecke --- drivers/scsi/csiostor/csio

Re: [PATCH 7/8] hisi_sas: fix calls to dma_set_mask_and_coherent()

2019-02-25 Thread Ewan Milne
The change to use dma_set_mask_and_coherent() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. This resulted in FC connections failing due to corrupted data buffers, and various other SCSI/FCP I/O errors. Fixes: e4db40e7a1a2 ("s

Re: [PATCH 8/8] hptiop: fix calls to dma_set_mask()

2019-02-25 Thread Ewan Milne
The change to use dma_set_mask() incorrectly made a second call with the 32 bit DMA mask value when the call with the 64 bit DMA mask value succeeded. Fixes: 453cd3700ca3 ("scsi: hptiop: use dma_set_mask") Cc: Suggested-by: Ewan D. Milne Signed-off-by: Hannes Reinecke --- drivers/scsi/hptiop.c

Re: [PATCHv2 0/8] scsi: fixup dma_set_mask_and_coherent() calls

2019-02-25 Thread Martin K. Petersen
Hannes, > The recent patchset to use dma_set_mask_and_coherent() introduced a > regression where a call to set a 64-bit DMA mask was followed by a > call to set a 32-bit DMA mask, leading to I/O errors and data > corruption. Applied to 5.0/scsi-fixes with the subject and commit message tweaks s