ux" from sdm845 ufs phy clock list structure.
Changes since v1:
- Incorporated review comments from Vivek and Manu.
- Update the commit title of patch 2.
Can Guo (5):
phy: Update PHY power control sequence
phy: General struct and field cleanup
phy: Add QMP phy based UFS phy support fo
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 172 +++-
drivers/phy/qualcomm/phy-qcom-qmp.h | 15
2 files changed, 186 insertions(+), 1 deletion(-)
diff --git a
Y
disabled. This change adds condition checks to phy power on calls which
happen before phy initialization.
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufs-qcom.c | 4 +++-
drivers/scsi/ufs/ufs-qcom.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufs-qcom.c
Move MSM8996 specific PHY vreg list struct name to a genernal one as it is
used by all PHYs. Add a specific field to handle dual lane situation.
Signed-off-by: Can Guo
Reviewed-by: Evan Green
Reviewed-by: Manu Gautam
Reviewed-by: Vivek Gautam
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 25
All PHYs should be powered on before register configuration starts. And
only PCIe PHYs need an extra power control before deasserts reset state.
Signed-off-by: Can Guo
Reviewed-by: Manu Gautam
Reviewed-by: Vivek Gautam
Reviewed-by: Evan Green
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 19
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
Reviewed-by: Rob Herring
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
b
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 130 +---
drivers/phy/qualcomm/phy-qcom-qmp.h | 8 +++
2 files changed, 127 insertions(+), 11 deletions(-)
diff --git a
comments from Vivek and Rob.
- Remove "ref_aux" from sdm845 ufs phy clock list structure.
Changes since v1:
- Incorporated review comments from Vivek and Manu.
- Update the commit title of patch 2.
Can Guo (2):
phy: Add QMP phy based UFS phy support for sdm845
dt-bindings: phy-qcom-qm
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
b/Documentation/devicetree
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
Reviewed-by: Vivek Gautam
Reviewed-by: Rob Herring
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
Reviewed-by: Vivek Gautam
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 130 +---
drivers/phy/qualcomm/phy-qcom-qmp.h | 8 +++
2 files changed, 127 insertions(+), 11
comments from Vivek and Rob.
Changes since v2:
- Incorporated review comments from Vivek and Rob.
- Remove "ref_aux" from sdm845 ufs phy clock list structure.
Changes since v1:
- Incorporated review comments from Vivek and Manu.
- Update the commit title of patch 2.
Can Guo (2):
phy: A
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 120 +++-
drivers/phy/qualcomm/phy-qcom-qmp.h | 8 +++
2 files changed, 126 insertions(+), 2 deletions(-)
diff --git a
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 120 +++-
drivers/phy/qualcomm/phy-qcom-qmp.h | 8 +++
2 files changed, 126 insertions(+), 2 deletions(-)
diff --git a
This patch series adds support for UFS QMP PHY on SDM845 and updates the
compitable string for it.
Can Guo (2):
phy: Add QMP phy based UFS phy support for sdm845
dt-bindings: phy-qcom-qmp: Update UFS phy compitable string for sdm845
.../devicetree/bindings/phy/qcom-qmp-phy.txt | 3
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
b/Documentation/devicetree
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 122 +++-
drivers/phy/qualcomm/phy-qcom-qmp.h | 8 +++
2 files changed, 127 insertions(+), 3 deletions(-)
diff --git a
comments from Vivek and Manu.
- Update the commit title of patch 2.
Can Guo (2):
phy: Add QMP phy based UFS phy support for sdm845
dt-bindings: phy-qcom-qmp: Add UFS phy compitable string for sdm845
.../devicetree/bindings/phy/qcom-qmp-phy.txt | 3 +-
drivers/phy/qualcomm/phy-qcom-qmp.c
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
b/Documentation/devicetree
Move MSM8996 specific PHY vreg list struct name to a genernal one as it is
used by all PHYs. Add a specific field to handle dual lane situation.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 25 ++---
1 file changed, 14 insertions(+), 11 deletions(-)
diff
ommit title of patch 2.
Can Guo (4):
phy: Update PHY power control sequence
phy: General struct and field cleanup
phy: Add QMP phy based UFS phy support for sdm845
dt-bindings: phy-qcom-qmp: Add UFS phy compatible string for sdm845
.../devicetree/bindings/phy/qcom-qmp-phy.txt |
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
Reviewed-by: Rob Herring
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
b
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 173 +++-
drivers/phy/qualcomm/phy-qcom-qmp.h | 15
2 files changed, 187 insertions(+), 1 deletion(-)
diff --git a
All PHYs should be powered on before register configuration starts. And
only PCIe PHYs need an extra power control before deasserts reset state.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git
when enable/disable lane clocks just
for symmetry.
Signed-off-by: Venkat Gopalakrishnan
Signed-off-by: Subhash Jadavani
Signed-off-by: Can Guo
---
Changes since v1:
- Incorporated review comments from Doug.
- Update the commit title and commit message.
drivers/scsi/ufs/ufs-qcom.c
All PHYs should be powered on before register configuration starts. And
only PCIe PHYs need an extra power control before deasserts reset state.
Signed-off-by: Can Guo
Reviewed-by: Manu Gautam
Reviewed-by: Vivek Gautam
Reviewed-by: Evan Green
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 19
ate the commit title of patch 2.
Can Guo (5):
phy: Update PHY power control sequence
phy: General struct and field cleanup
phy: Add QMP phy based UFS phy support for sdm845
scsi: ufs: Power on phy after it is initialized
dt-bindings: phy-qcom-qmp: Add UFS phy compatible string for sdm84
Move MSM8996 specific PHY vreg list struct name to a genernal one as it is
used by all PHYs. Add a specific field to handle dual lane situation.
Signed-off-by: Can Guo
Reviewed-by: Evan Green
Reviewed-by: Manu Gautam
Reviewed-by: Vivek Gautam
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 25
From: Dov Levenglick
Enables core reset support. Add full initialization of the PHY and the
controller before initializing UFS PHY and during link recovery.
Signed-off-by: Dov Levenglick
Signed-off-by: Amit Nischal
Signed-off-by: Subhash Jadavani
Signed-off-by: Can Guo
---
drivers/scsi/ufs
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
Reviewed-by: Rob Herring
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
b
Y
disabled. This change adds condition checks to phy power on calls which
happen before phy initialization.
Signed-off-by: Can Guo
Reviewed-by: Evan Green
Reviewed-by: Vivek Gautam
---
drivers/scsi/ufs/ufs-qcom.c | 4 +++-
drivers/scsi/ufs/ufs-qcom.h | 1 +
2 files changed, 4 insertions(+),
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
Reviewed-by: Evan Green
Reviewed-by: Vivek Gautam
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 172 +++-
drivers/phy/qualcomm/phy-qcom-qmp.h | 15
2 files changed
k and Manu.
- Update the commit title of patch 2.
Can Guo (3):
phy: Power on PHY before start Serdes configuration
phy: Add QMP phy based UFS phy support for sdm845
dt-bindings: phy-qcom-qmp: Add UFS phy compatible string for sdm845
.../devicetree/bindings/phy/qcom-qmp-phy.txt |
PHYs should be powered on before register configuration starts.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c
b/drivers/phy/qualcomm/phy-qcom-qmp.c
index 97ef942..9bfdba1 100644
--- a
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 203 +---
drivers/phy/qualcomm/phy-qcom-qmp.h | 15 +++
2 files changed, 206 insertions(+), 12 deletions(-)
diff --git a
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
b/Documentation/devicetree
uot; from sdm845 ufs phy clock list structure.
Changes since v1:
- Incorporated review comments from Vivek and Manu.
- Update the commit title of patch 2.
Can Guo (3):
phy: Update PHY power control sequence
phy: Add QMP phy based UFS phy support for sdm845
dt-bindings: phy-qcom-qmp: Add UFS p
All PHYs should be powered on before register configuration starts. And
only PCIe PHYs need an extra power control before deasserts reset state.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/phy
Add UFS PHY support to make SDM845 UFS work with common PHY framework.
Signed-off-by: Can Guo
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 200 +---
drivers/phy/qualcomm/phy-qcom-qmp.h | 15 +++
2 files changed, 203 insertions(+), 12 deletions(-)
diff --git a
Update the compatible string for UFS QMP PHY on SDM845.
Signed-off-by: Can Guo
Reviewed-by: Rob Herring
---
Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/phy/qcom-qmp-phy.txt
b
From: Nitin Rawat
Disable interrupt in reset path to flush pending IRQ handler in order to
avoid possible NoC issues.
Signed-off-by: Nitin Rawat
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufs-qcom.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/drivers/scsi/ufs/ufs-qcom.c
multiple times during error recovery.
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufshcd.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 80620c8..013eb73 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b
Runtime and system suspend/resume can only come after hba probe invokes
platform_set_drvdata(pdev, hba), meaning hba cannot be NULL in these PM
callbacks, so remove the checks of !hba.
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufshcd.c | 21 -
1 file changed, 21 deletions
ed to fix it before move on - all the UFS3.1 HPB parts which I
tested
over the last few weeks are screwed due to this... I don't care
where/how
you want to get it fixed in next version.
In my case, which may not be a valid fix, I simply hack the code as
below
and it works for me.
- put_unaligned_be64(ppn, &cdb[6]);
+ memcpy(&cdb[6], &ppn, sizeof(u64));
Thanks,
Can Guo.
thanks,
Bean
On 2021-01-29 11:22, Bart Van Assche wrote:
On 1/27/21 8:16 PM, Can Guo wrote:
ufshcd_tmc_handler() calls blk_mq_tagset_busy_iter(fn =
ufshcd_compl_tm()),
but since blk_mq_tagset_busy_iter() only iterates over all reserved
tags
and requests which are not in IDLE state, ufshcd_compl_tm() never
On 2021-01-29 11:15, Bart Van Assche wrote:
On 1/27/21 8:16 PM, Can Guo wrote:
In __ufshcd_issue_tm_cmd(), it is not right to use hba->nutrs +
req->tag as
the Task Tag in one TMR UPIU. Directly use req->tag as the Task Tag.
Why is the current code wrong and why is this patch the p
On 2021-01-29 11:20, Bart Van Assche wrote:
On 1/27/21 8:16 PM, Can Guo wrote:
ufshcd_compl_tm() looks for all 0 bits in the
REG_UTP_TASK_REQ_DOOR_BELL
and call complete() for each req who has the req->end_io_data set.
There
can be a race condition btw tmc send/compl, because the
On 2021-01-29 14:06, Can Guo wrote:
On 2021-01-29 11:20, Bart Van Assche wrote:
On 1/27/21 8:16 PM, Can Guo wrote:
ufshcd_compl_tm() looks for all 0 bits in the
REG_UTP_TASK_REQ_DOOR_BELL
and call complete() for each req who has the req->end_io_data set.
There
can be a race condition btw
SCSI command.
In the HPB version 1.0, the maximum read I/O size that can be converted
to
HPB read is 4KB.
The dirty map of the active sub-region prevents an incorrect HPB read
that
has stale physical page number which is updated by previous write I/O.
Reviewed-by: Can Guo
Reviewed-by: Bart Van
On 2021-02-01 10:39, Bart Van Assche wrote:
On 1/28/21 9:57 PM, Can Guo wrote:
On 2021-01-29 11:15, Bart Van Assche wrote:
On 1/27/21 8:16 PM, Can Guo wrote:
In __ufshcd_issue_tm_cmd(), it is not right to use hba->nutrs +
req->tag as
the Task Tag in one TMR UPIU. Directly use req->t
t(). -EWOULDBLOCK means there is no available tags for
this
request. -EBUSY means failed on blk_queue_enter(). To overcome
starvation
of map request, we can try N times in heavy traffic situation (maybe
N=3?).
LGTM. You make the call.
Regards,
Can Guo.
Thanks,
Daejun
Hi Stanley,
On 2020-07-29 18:26, Stanley Chu wrote:
Hi Can,
On Wed, 2020-07-29 at 16:43 +0800, Can Guo wrote:
Hi Stanley,
On 2020-07-29 10:40, Stanley Chu wrote:
> In ufshcd_suspend(), after clk-gating is suspended and link is set
> as Hibern8 state, ufshcd_hold() is still possibly i
Hi Asutosh,
On 2020-07-29 02:06, Asutosh Das (asd) wrote:
On 7/27/2020 10:00 PM, Can Guo wrote:
Sometime dumps in IRQ handler are heavy enough to cause system
stability
issues, move them to error handler.
Signed-off-by: Can Guo
---
drivers/scsi/ufs/ufshcd.c | 31
_set_bit(SCMD_STATE_COMPLETE, &scmd->state))
return BLK_EH_RESET_TIMER;
if (scsi_abort_command(scmd) != SUCCESS) {
set_host_byte(scmd, DID_TIME_OUT);
scsi_eh_scmd_add(scmd);
}
}
}
Thanks,
Can Guo.
Clock gating features can be turned on/off selectively which means its
state information is only important if it is enabled. This change makes
sure that we only look at state of clk-gating if it is enabled.
Signed-off-by: Can Guo
Reviewed-by: Avri Altman
Reviewed-by: Hongwu Su
Reviewed-by
If ufs_qcom_dump_dbg_regs() calls ufs_qcom_testbus_config() from
ufshcd_suspend/resume and/or clk gate/ungate context, pm_runtime_get_sync()
and ufshcd_hold() will cause racing problems. Fix this by removing the
unnecessary calls of pm_runtime_get_sync() and ufshcd_hold().
Signed-off-by: Can Guo
Dumping testbus registers is heavy enough to cause stability issues
sometime, just remove them as of now.
Signed-off-by: Can Guo
Reviewed-by: Hongwu Su
Reviewed-by: Avri Altman
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 7da27ee..96e0999
in case any of them has failed to be resumed due to
hba runtime resume failure. This is to unblock blk_queue_enter in case
there are bios waiting inside it.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 2af081e..d57791c
mark link state as UIC_LINK_BROKEN_STATE and schedule the eh_work.
In this case, error handler needs to do a full reset and restore to recover
the link back to active. Before the link state is recovered to active,
ufshcd_uic_pwr_ctrl simply returns -ENOLINK to avoid more errors.
Signed-off-by: Can G
cleanup to some prints in ufshcd_print_host_regs as similar prints
are already available in ufshcd_print_host_state.
Signed-off-by: Can Guo
Reviewed-by: Avri Altman
Reviewed-by: Hongwu Su
Reviewed-by: Asutosh Das
Reviewed-by: Stanley Chu
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs
Sometime dumps in IRQ handler are heavy enough to cause system stability
issues, move them to error handler and only print basic host regs here.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index d57791c..8265a2a 100644
--- a
s not hurt since error handler can recover hba runtime PM error.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 8265a2a..ee24c1f 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -126,
Dumping testbus registers is heavy enough to cause stability issues
sometime, just remove them as of now.
Signed-off-by: Can Guo
Reviewed-by: Hongwu Su
Reviewed-by: Avri Altman
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 7da27ee..96e0999
Clock gating features can be turned on/off selectively which means its
state information is only important if it is enabled. This change makes
sure that we only look at state of clk-gating if it is enabled.
Signed-off-by: Can Guo
Reviewed-by: Avri Altman
Reviewed-by: Hongwu Su
Reviewed-by
If ufs_qcom_dump_dbg_regs() calls ufs_qcom_testbus_config() from
ufshcd_suspend/resume and/or clk gate/ungate context, pm_runtime_get_sync()
and ufshcd_hold() will cause racing problems. Fix this by removing the
unnecessary calls of pm_runtime_get_sync() and ufshcd_hold().
Signed-off-by: Can Guo
cleanup to some prints in ufshcd_print_host_regs as similar prints
are already available in ufshcd_print_host_state.
Signed-off-by: Can Guo
Reviewed-by: Avri Altman
Reviewed-by: Hongwu Su
Reviewed-by: Asutosh Das
Reviewed-by: Stanley Chu
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs
Sometime dumps in IRQ handler are heavy enough to cause system stability
issues, move them to error handler and only print basic host regs here.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 6bdf2bf..523b771 100644
--- a
in case any of them has failed to be resumed due to
hba runtime resume failure. This is to unblock blk_queue_enter in case
there are bios waiting inside it.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index b3a2310..6bdf2bf
mark link state as UIC_LINK_BROKEN_STATE and schedule the eh_work.
In this case, error handler needs to do a full reset and restore to recover
the link back to active. Before the link state is recovered to active,
ufshcd_uic_pwr_ctrl simply returns -ENOLINK to avoid more errors.
Signed-off-by: Can G
s not hurt since error handler can recover hba runtime PM error.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 523b771..d3c679f 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -126,
Hi Bart,
On 2020-08-01 00:51, Bart Van Assche wrote:
On 2020-07-31 01:00, Can Guo wrote:
AFAIK, sychronization of scsi_done is not a problem here, because scsi
layer
use the atomic state, namely SCMD_STATE_COMPLETE, of a scsi cmd to
prevent
the concurrency of abort and real completion of it
_for_each_sdev(ufshcd_quiesce_sdev);
Any reasons why don't use scsi_target_quiesce() here?
Thanks,
Can Guo.
ret = ufshcd_suspend(hba, UFS_SHUTDOWN_PM);
out:
Hi Bart,
On 2020-08-03 11:12, Bart Van Assche wrote:
On 2020-07-31 16:17, Can Guo wrote:
For scsi_dma_unmap() part, that is true - we should make it serialized
with
any other completion paths. I've found it during my fault injection
test, so
I've made a patch to fix it, but it onl
Hi Stanley,
On 2020-08-03 11:00, Stanley Chu wrote:
Hi Can,
On Sat, 2020-08-01 at 07:17 +0800, Can Guo wrote:
Hi Bart,
On 2020-08-01 00:51, Bart Van Assche wrote:
> On 2020-07-31 01:00, Can Guo wrote:
>> AFAIK, sychronization of scsi_done is not a problem here, because scsi
>&g
Clock gating features can be turned on/off selectively which means its
state information is only important if it is enabled. This change makes
sure that we only look at state of clk-gating if it is enabled.
Signed-off-by: Can Guo
Reviewed-by: Avri Altman
Reviewed-by: Hongwu Su
Reviewed-by
Dumping testbus registers is heavy enough to cause stability issues
sometime, just remove them as of now.
Signed-off-by: Can Guo
Reviewed-by: Hongwu Su
Reviewed-by: Avri Altman
Reviewed-by: Bean Huo
---
drivers/scsi/ufs/ufs-qcom.c | 32
1 file changed, 32
. To fix it, instead of releasing resources "mannually", use
the existing func __ufshcd_transfer_req_compl(). This can also eliminate
racing of scsi_dma_unmap() from the real completion in IRQ handler path.
Signed-off-by: Can Guo
CC: Stanley Chu
---
drivers/scsi/ufs/ufshcd.c | 5 +--
Sometime dumps in IRQ handler are heavy enough to cause system stability
issues, move them to error handler and only print basic host regs here.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
---
drivers/scsi/ufs/ufshcd.c | 23 +++
1 file changed, 15 insertions(+), 8
s not hurt since error handler can recover hba runtime PM error.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
---
drivers/scsi/ufs/ufshcd.c | 84 ---
1 file changed, 50 insertions(+), 34 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/s
If ufs_qcom_dump_dbg_regs() calls ufs_qcom_testbus_config() from
ufshcd_suspend/resume and/or clk gate/ungate context, pm_runtime_get_sync()
and ufshcd_hold() will cause racing problems. Fix this by removing the
unnecessary calls of pm_runtime_get_sync() and ufshcd_hold().
Signed-off-by: Can Guo
mark link state as UIC_LINK_BROKEN_STATE and schedule the eh_work.
In this case, error handler needs to do a full reset and restore to recover
the link back to active. Before the link state is recovered to active,
ufshcd_uic_pwr_ctrl simply returns -ENOLINK to avoid more errors.
Signed-off-by: Can G
in case any of them has failed to be resumed due to
hba runtime resume failure. This is to unblock blk_queue_enter in case
there are bios waiting inside it.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
---
drivers/scsi/ufs/ufshcd.c | 108 ++
1 file
cleanup to some prints in ufshcd_print_host_regs as similar prints
are already available in ufshcd_print_host_state.
Signed-off-by: Can Guo
Reviewed-by: Avri Altman
Reviewed-by: Hongwu Su
Reviewed-by: Asutosh Das
Reviewed-by: Stanley Chu
Reviewed-by: Bean Huo
---
drivers/scsi/ufs/ufshcd.c
r_doorbell_clr(hba, U64_MAX); [2]
Please let me know your ideas, thanks!
Regards,
Can Guo.
ret = ufshcd_suspend(hba, UFS_SHUTDOWN_PM);
out:
Slightly updated my comments
On 2020-08-03 19:50, Can Guo wrote:
Hi Stanley,
On 2020-08-03 18:04, Stanley Chu wrote:
Currently I/O request could be still submitted to UFS device while
UFS is working on shutdown flow. This may lead to racing as below
scenarios and finally system may crash due
_device like below. It is to make sure
no more PM requests sent to scsi devices (since PM requests are only
sent
during PM ops).
shost_for_each_device(sdev, hba->host) {
scsi_autopm_get_device(sdev);
scsi_device_quiesce(sdev);
}
Please let me know which one do y
h. Correct the coding mistake.
"fixes" tag please, for those who don't read the commit message.
Thanks,
Avri
Already added one in the V2 of it.
Thanks,
Can Guo.
Signed-off-by: Can Guo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 2b55c2e..b8441ad
d.o]
Error 1
make[2]: *** [scripts/Makefile.build:497: drivers/scsi/ufs] Error 2
make[1]: *** [scripts/Makefile.build:497: drivers/scsi] Error 2
make: *** [Makefile:1764: drivers] Error 2
Thanks Martin, will fix it in next version.
Can Guo.
cleanup to some prints in ufshcd_print_host_regs as similar prints
are already available in ufshcd_print_host_state.
Signed-off-by: Can Guo
Reviewed-by: Avri Altman
Reviewed-by: Hongwu Su
Reviewed-by: Asutosh Das
Reviewed-by: Stanley Chu
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs
Dumping testbus registers is heavy enough to cause stability issues
sometime, just remove them as of now.
Signed-off-by: Can Guo
Reviewed-by: Hongwu Su
Reviewed-by: Avri Altman
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 823eccf..6b75338
If ufs_qcom_dump_dbg_regs() calls ufs_qcom_testbus_config() from
ufshcd_suspend/resume and/or clk gate/ungate context, pm_runtime_get_sync()
and ufshcd_hold() will cause racing problems. Fix this by removing the
unnecessary calls of pm_runtime_get_sync() and ufshcd_hold().
Signed-off-by: Can Guo
Sometime dumps in IRQ handler are heavy enough to cause system stability
issues, move them to error handler and only print basic host regs here.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 6a10003..a79fbbd 100644
--- a
in case any of them has failed to be resumed due to
hba runtime resume failure. This is to unblock blk_queue_enter in case
there are bios waiting inside it.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 2604016..6a10003
mark link state as UIC_LINK_BROKEN_STATE and schedule the eh_work.
In this case, error handler needs to do a full reset and restore to recover
the link back to active. Before the link state is recovered to active,
ufshcd_uic_pwr_ctrl simply returns -ENOLINK to avoid more errors.
Signed-off-by: Can G
does not hurt since error handler can recover hba runtime PM error.
Signed-off-by: Can Guo
Reviewed-by: Bean Huo
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index a79fbbd..b2947ab 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -126,
. To fix it, instead of releasing resources "mannually", use
the existing func __ufshcd_transfer_req_compl(). This can also eliminate
racing of scsi_dma_unmap() from the real completion in IRQ handler path.
Signed-off-by: Can Guo
CC: Stanley Chu
Reviewed-by: Stanley Chu
diff --git
Clock gating features can be turned on/off selectively which means its
state information is only important if it is enabled. This change makes
sure that we only look at state of clk-gating if it is enabled.
Signed-off-by: Can Guo
Reviewed-by: Avri Altman
Reviewed-by: Hongwu Su
Reviewed-by
tag to the very first patch (changes to
ufshcd.h),
but not the whole series. Please remove those tags accordingly.
Thanks,
Can Guo.
ump host infos/regs like it does in the old code.
If a cmd was completed but without a notifying intr, this is
kind of a problem that we/host should look into, because it's
pasted at least 30 sec since the cmd was sent, so those dumps
are necessary to debug the problem. How ab
nt of this part?
Thanks,
Can Guo.
>}
>
>/* Print Transfer Request of aborted task */
Hi Can
Thanks, do you mean that change to like this:
Author: Bean Huo
Date: Thu Aug 6 11:34:45 2020 +0200
scsi: ufs: no need to send one Abort Task TM in case the task in
was clea
1 - 100 of 539 matches
Mail list logo