Re: [PATCH v6 1/6] scsi: ufs: Add "wb_on" sysfs node to control WB on/off

2021-01-18 Thread Adrian Hunter
On 18/01/21 10:10 pm, Bean Huo wrote: > From: Bean Huo > > Currently UFS WriteBooster driver uses clock scaling up/down to set > WB on/off, for the platform which doesn't support UFSHCD_CAP_CLK_SCALING, > WB will be always on. Provide a sysfs attribute to enable/disable WB > during runtime.

Re: [PATCH v2 1/2] scsi: ufs: Fix a possible NULL pointer issue

2021-01-15 Thread Adrian Hunter
On 2/01/21 3:10 pm, Can Guo wrote: > On 2021-01-02 20:29, Can Guo wrote: >> On 2021-01-02 00:05, Bart Van Assche wrote: >>> On 12/31/20 9:44 PM, Can Guo wrote: During system resume/suspend, hba could be NULL. In this case, do not touch eh_sem. Fixes: 88a92d6ae4fe ("scsi: ufs:

Re: [PATCH v4 2/2] scsi: ufs: Protect PM ops and err_handler from user access through sysfs

2021-01-13 Thread Adrian Hunter
On 13/01/21 3:57 pm, Can Guo wrote: > User layer may access sysfs nodes when system PM ops or error handling > is running, which can cause various problems. Rename eh_sem to host_sem > and use it to protect PM ops and error handling from user layer intervene. > > Acked-by: Avri Altman >

Re: [PATCH] mmc: sdhci-brcmstb: Fix mmc timeout errors on S5 suspend

2021-01-12 Thread Adrian Hunter
down. > > Fixes: e7b5d63a82fe ("mmc: sdhci-brcmstb: Add shutdown callback") > Signed-off-by: Al Cooper Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci-brcmstb.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/mmc/host/sdh

Re: [PATCH -next] scsi: docs: ABI: sysfs-driver-ufs: rectify table formatting

2021-01-11 Thread Adrian Hunter
gt; > ./Documentation/ABI/testing/sysfs-driver-ufs:{915,956}: > WARNING: Malformed table. Text in column margin in table line 15. > > Rectify table formatting for DeepSleep power mode. > > Signed-off-by: Lukas Bulwahn Acked-by: Adrian Hunter Thank you! > --- > Adria

[PATCH] perf intel-pt: Fix 'CPU too large' error

2021-01-07 Thread Adrian Hunter
ter: # ./perf script --itrace=e # Fixes: 8c7274691f0d ("perf machine: Replace MAX_NR_CPUS with perf_env::nr_cpus_online") Fixes: 7df4e36a4785 ("perf session: Replace MAX_NR_CPUS with perf_env::nr_cpus_online") Cc: sta...@vger.kernel.org Signed-off-by: Adrian Hunter --- to

[PATCH V4] scsi: ufs-debugfs: Add error counters

2021-01-06 Thread Adrian Hunter
, so move ufshcd-core to the top of the Makefile. Signed-off-by: Adrian Hunter Reviewed-by: Avri Altman Reviewed-by: Bean Huo --- Changes in V4: Added Reviewed-by: Bean Huo Changes in V3: Fixed link order to ensure correct initcall ordering when modules are built

Re: [PATCH] mmc: sdhci-of-dwcmshc: fix rpmb access

2021-01-05 Thread Adrian Hunter
o prepare for future v4 enabling > for dwcmshc, because from the 4.10 spec, the ARGUMENT2 register is > redefined as 32bit block count which doesn't support stuff bits of > CMD23 argument. > > Fixes: a44f7cb93732 ("mmc: core: use mrq->sbc when sending CMD23 for RPMB") &

Re: [PATCH] mmc: sdhci-msm: Fix possible NULL pointer exception

2021-01-05 Thread Adrian Hunter
On 22/12/20 10:48 am, Md Sadre Alam wrote: > of_device_get_match_data returns NULL when no match. > So add the NULL pointer check to avoid dereference. > > Signed-off-by: Md Sadre Alam > --- > drivers/mmc/host/sdhci-msm.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git

Re: [PATCH v6 4/6] mmc: sdhci-of-aspeed: Add KUnit tests for phase calculations

2021-01-05 Thread Adrian Hunter
On 18/12/20 5:53 am, Andrew Jeffery wrote: > Converting degrees of phase to logic delays is irritating to test on > hardware, so lets exercise the function using KUnit. > > Signed-off-by: Andrew Jeffery > --- > drivers/mmc/host/Kconfig| 14 > drivers/mmc/host/Makefile

Re: [PATCH] mmc: sdhci-sprd: Fix some resource leaks in the remove function

2021-01-05 Thread Adrian Hunter
on, and is more consistent with other drivers. > > Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host > controller") > Signed-off-by: Christophe JAILLET Acked-by: Adrian Hunter > --- > Other adjustment may be needed. > I'm not sure at all of the 0 passed

Re: [PATCH RFC v4 1/1] scsi: ufs: Fix ufs power down/on specs violation

2021-01-04 Thread Adrian Hunter
On 5/01/21 9:28 am, Can Guo wrote: > On 2021-01-05 15:16, Adrian Hunter wrote: >> On 4/01/21 8:55 pm, Bjorn Andersson wrote: >>> On Mon 04 Jan 03:15 CST 2021, Adrian Hunter wrote: >>> >>>> On 22/12/20 3:49 pm, Ziqi Chen wrote: >>>>> As per spec

Re: [PATCH RFC v4 1/1] scsi: ufs: Fix ufs power down/on specs violation

2021-01-04 Thread Adrian Hunter
On 4/01/21 8:55 pm, Bjorn Andersson wrote: > On Mon 04 Jan 03:15 CST 2021, Adrian Hunter wrote: > >> On 22/12/20 3:49 pm, Ziqi Chen wrote: >>> As per specs, e.g, JESD220E chapter 7.2, while powering >>> off/on the ufs device, RST_N signal and REF_CLK signal &g

[PATCH V2] docs: ABI: sysfs-driver-ufs: Add DeepSleep power mode

2021-01-04 Thread Adrian Hunter
Update sysfs documentation for addition of DeepSleep power mode. Fixes: fe1d4c2ebcae ("scsi: ufs: Add DeepSleep feature") Signed-off-by: Adrian Hunter --- Changes in V2: Amended commit messages and added Fixes tag, since DeepSleep is now in v5.11-rc1 Documen

Re: [PATCH RFC v4 1/1] scsi: ufs: Fix ufs power down/on specs violation

2021-01-04 Thread Adrian Hunter
On 22/12/20 3:49 pm, Ziqi Chen wrote: > As per specs, e.g, JESD220E chapter 7.2, while powering > off/on the ufs device, RST_N signal and REF_CLK signal > should be between VSS(Ground) and VCCQ/VCCQ2. > > To flexibly control device reset line, refactor the function >

Re: [PATCH V3] scsi: ufs-debugfs: Add error counters

2020-12-18 Thread Adrian Hunter
On 18/12/20 5:17 pm, Bean Huo wrote: > On Fri, 2020-12-18 at 14:20 +0200, Adrian Hunter wrote: >> People testing have a need to know how many errors might be occurring >> over time. Add error counters and expose them via debugfs. >> >> A module initcall is used to crea

[PATCH V3] scsi: ufs-debugfs: Add error counters

2020-12-18 Thread Adrian Hunter
, so move ufshcd-core to the top of the Makefile. Signed-off-by: Adrian Hunter Reviewed-by: Avri Altman --- Changes in V3: Fixed link order to ensure correct initcall ordering when modules are built-in. Amended commit message accordingly. Changes in V2: Add

Re: [PATCH V2] scsi: ufs-debugfs: Add error counters

2020-12-18 Thread Adrian Hunter
On 18/12/20 12:57 am, Bean Huo wrote: > On Thu, 2020-12-17 at 11:49 +0200, Adrian Hunter wrote: >>> >>> The purpose of patch is acceptable, but I don't know why you choose >>> using ufshcd_core_* here. >> >> Do you mean you would like a differen

Re: [PATCH V2] scsi: ufs-debugfs: Add error counters

2020-12-17 Thread Adrian Hunter
On 16/12/20 10:16 pm, Bean Huo wrote: > On Wed, 2020-12-16 at 20:51 +0200, Adrian Hunter wrote: >> ufshcd_variant_hba_exit(hba); >> ufshcd_setup_vreg(hba, false); >> ufshcd_suspend_clkscaling(hba); >> @@ -9436,6 +9441,2

[PATCH V2] scsi: ufs-debugfs: Add error counters

2020-12-16 Thread Adrian Hunter
People testing have a need to know how many errors might be occurring over time. Add error counters and expose them via debugfs. Signed-off-by: Adrian Hunter --- Changes in V2: Add missing '#include "ufs-debugfs.h"' in ufs-debugfs.c Reported-by: kernel test robot

[PATCH] scsi: ufs-debugfs: Add error counters

2020-12-16 Thread Adrian Hunter
People testing have a need to know how many errors might be occurring over time. Add error counters and expose them via debugfs. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-debugfs.c | 55 ++ drivers/scsi/ufs/ufs

Re: [PATCH v5 2/2] mmc: sdhci-msm: Actually set the actual clock

2020-12-15 Thread Adrian Hunter
tual_clock" > field shouldn't include the multiplier that sdhci-msm needs > internally. > > Suggested-by: Adrian Hunter > Signed-off-by: Douglas Anderson > Reviewed-by: Bjorn Andersson Acked-by: Adrian Hunter > --- > > Changes in v5: > - Remove unused clock p

Re: [PATCH v5 1/2] mmc: sdhci-msm: Warn about overclocking SD/MMC

2020-12-15 Thread Adrian Hunter
a problem and that should be an indication to > fix the clock driver. > > [1] > http://lore.kernel.org/r/20201210102234.1.I096779f219625148900fc984dd0084ed1ba87c7f@changeid > > Suggested-by: Stephen Boyd > Signed-off-by: Douglas Anderson > Reviewed-by: Ste

Re: [PATCH] mmc: sdhci-xenon: fix 1.8v regulator stabilization

2020-12-15 Thread Adrian Hunter
1 ("mmc: sdhci-xenon: Add Marvell Xenon SDHC core > functionality") > Signed-off-by: Alex Leibovich > Signed-off-by: Marcin Wojtas > Cc: sta...@vger.kernel.org Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci-xenon.c | 7 ++- > 1 file changed, 6 insertions(

Re: [PATCH v2] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-12-10 Thread Adrian Hunter
([kernel.kallsyms]) > swapper 0 [000] 1397040.402508: 5333 > uncore_imc/data_reads/: > swapper 0 [000] 1397040.402508: 1008 > uncore_imc/data_writes/: > > Signed-off-by: Jin Yao Acked-by: Adrian Hunter > --- > v

Re: [PATCH v3] mmc: sdhci-msm: Warn about overclocking SD/MMC

2020-12-10 Thread Adrian Hunter
On 10/12/20 11:27 pm, Douglas Anderson wrote: > As talked about in commit 5e4b7e82d497 ("clk: qcom: gcc-sdm845: Use > floor ops for sdcc clks"), most clocks handled by the Qualcomm clock > drivers are rounded _up_ by default instead of down. We should make > sure SD/MMC clocks are always rounded

Re: [RFC PATCH v3.1 00/27] Add support UHS-II for GL9755

2020-12-08 Thread Adrian Hunter
On 8/12/20 9:58 am, AKASHI Takahiro wrote: > Adrian, > > On Thu, Dec 03, 2020 at 11:55:23AM +0200, Adrian Hunter wrote: >> On 1/12/20 5:09 am, AKASHI Takahiro wrote: >>> Adrian, >>> >>> Thank you for your review comments. >>> >>> O

Re: [RFC PATCH v3.1 21/27] mmc: sdhci-uhs2: add irq() and others

2020-12-08 Thread Adrian Hunter
On 8/12/20 9:37 am, AKASHI Takahiro wrote: > On Tue, Dec 01, 2020 at 06:46:39PM +0200, Adrian Hunter wrote: >> On 6/11/20 4:27 am, AKASHI Takahiro wrote: >>> This is a UHS-II version of sdhci's request() operation. >>> It handles UHS-II related command interrupts and

[PATCH 3/4] scsi: ufs-pci: Fix recovery from hibernate exit errors for Intel controllers

2020-12-07 Thread Adrian Hunter
Intel controllers can end up in an unrecoverable state after a hibernate exit error unless a full reset and restore is done before anything else. Force that to happen. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufshcd-pci.c | 17 + 1 file changed, 17 insertions(+) diff

[PATCH 4/4] scsi: ufs-pci: Enable UFSHCD_CAP_RPM_AUTOSUSPEND for Intel controllers

2020-12-07 Thread Adrian Hunter
Enable runtime PM auto-suspend by default for Intel host controllers. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufshcd-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c index 888d8c9ca3a5..fadd566025b8 100644

[PATCH 2/4] scsi: ufs-pci: Ensure UFS device is in PowerDown mode for suspend-to-disk ->poweroff()

2020-12-07 Thread Adrian Hunter
The expectation for suspend-to-disk is that devices will be powered-off, so the UFS device should be put in PowerDown mode. If spm_lvl is not 5, then that will not happen. Change the pm callbacks to force spm_lvl 5 for suspend-to-disk poweroff. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs

[PATCH 0/4] scsi: ufs-pci: Fixes for Intel controllers

2020-12-07 Thread Adrian Hunter
Hi Here are some small fixes / amendments. Adrian Hunter (4): scsi: ufs-pci: Fix restore from S4 for Intel controllers scsi: ufs-pci: Ensure UFS device is in PowerDown mode for suspend-to-disk ->poweroff() scsi: ufs-pci: Fix recovery from hibernate exit errors for In

[PATCH 1/4] scsi: ufs-pci: Fix restore from S4 for Intel controllers

2020-12-07 Thread Adrian Hunter
n 5, restore the base address registers. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufshcd-pci.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd-pci.c b/drivers/scsi/ufs/ufshcd-pci.c index df3a564c3e33..360c25f1f061 100644 --- a/drivers/scsi/

Re: [RFC PATCH v3.1 00/27] Add support UHS-II for GL9755

2020-12-03 Thread Adrian Hunter
On 1/12/20 5:09 am, AKASHI Takahiro wrote: > Adrian, > > Thank you for your review comments. > > On Thu, Nov 26, 2020 at 10:18:55AM +0200, Adrian Hunter wrote: >> On 25/11/20 9:41 am, AKASHI Takahiro wrote: >>> Gentle ping; >>> >>> On Fri, Nov 06,

Re: [RFC PATCH v3.1 00/27] Add support UHS-II for GL9755

2020-12-03 Thread Adrian Hunter
On 1/12/20 5:09 am, AKASHI Takahiro wrote: > Adrian, > > Thank you for your review comments. > > On Thu, Nov 26, 2020 at 10:18:55AM +0200, Adrian Hunter wrote: >> On 25/11/20 9:41 am, AKASHI Takahiro wrote: >>> Gentle ping; >>> >>> On Fri, Nov 06,

Re: [RFC PATCH v3.1 16/27] mmc: sdhci-uhs2: add set_ios()

2020-12-03 Thread Adrian Hunter
On 30/11/20 9:51 am, AKASHI Takahiro wrote: > On Thu, Nov 26, 2020 at 10:17:11AM +0200, Adrian Hunter wrote: >> On 6/11/20 4:27 am, AKASHI Takahiro wrote: >>> This is a sdhci version of mmc's set_ios operation. >>> It covers both UHS-I and UHS-II. >>> >>&

Re: [RFC PATCH v3.1 22/27] mmc: sdhci-uhs2: add add_host() and others to set up the driver

2020-12-03 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > This is a UHS-II version of sdhci's add_host/remove_host operation. > Any sdhci drivers which are capable of handling UHS-II cards must > call those functions instead of the corresponding sdhci's. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI

Re: [PATCH v2 0/4] sdhci-xenon ACPI support

2020-12-02 Thread Adrian Hunter
t; drivers/mmc/host/sdhci-xenon-phy.c | 40 --- > drivers/mmc/host/sdhci-xenon.c | 120 +--- > 3 files changed, 110 insertions(+), 62 deletions(-) > Not withstanding Ulf's comments: Acked-by: Adrian Hunter

Re: [RFC PATCH v3.1 21/27] mmc: sdhci-uhs2: add irq() and others

2020-12-01 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > This is a UHS-II version of sdhci's request() operation. > It handles UHS-II related command interrupts and errors. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.c | 247

Re: [RFC PATCH v3.1 20/27] mmc: sdhci-uhs2: add request() and others

2020-12-01 Thread Adrian Hunter
On 1/12/20 4:40 am, AKASHI Takahiro wrote: > On Thu, Nov 26, 2020 at 10:18:44AM +0200, Adrian Hunter wrote: >> On 6/11/20 4:27 am, AKASHI Takahiro wrote: >>> This is a sdhci version of mmc's request operation. >>> It covers both UHS-I and UHS-II. >>> >>&

Re: [RFC PATCH v3.1 13/27] mmc: sdhci-uhs2: add set_power() to support vdd2

2020-11-29 Thread Adrian Hunter
On 30/11/20 9:15 am, AKASHI Takahiro wrote: > On Thu, Nov 26, 2020 at 10:16:27AM +0200, Adrian Hunter wrote: >> On 6/11/20 4:27 am, AKASHI Takahiro wrote: >>> This is a UHS-II version of sdhci's set_power operation. >>> VDD2, as well as VDD, is handled here. >&g

Re: [RFC PATCH v3.1 12/27] mmc: sdhci-uhs2: add reset function

2020-11-29 Thread Adrian Hunter
On 30/11/20 8:20 am, AKASHI Takahiro wrote: > On Thu, Nov 26, 2020 at 10:16:11AM +0200, Adrian Hunter wrote: >> On 6/11/20 4:27 am, AKASHI Takahiro wrote: >>> Sdhci_uhs2_reset() does a UHS-II specific reset operation. >>> >>> Signed-off-by: Ben Chuang

Re: [PATCH] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-11-26 Thread Adrian Hunter
On 26/11/20 9:06 am, Jin, Yao wrote: > Hi Adrian, > > On 11/26/2020 2:51 PM, Adrian Hunter wrote: >> On 26/11/20 5:24 am, Jin Yao wrote: >>> When unpacking the event which is from dynamic pmu, the array >>> output[OUTPUT_TYPE_MAX] may be overrun. For example,

Re: [RFC PATCH v3.1 00/27] Add support UHS-II for GL9755

2020-11-26 Thread Adrian Hunter
On 25/11/20 9:41 am, AKASHI Takahiro wrote: > Gentle ping; > > On Fri, Nov 06, 2020 at 11:26:59AM +0900, AKASHI Takahiro wrote: >> This is an interim snapshot of our next version, v4, for enabling >> UHS-II on MMC/SD. >> >> It is focused on 'sdhci' side to address Adrian's comments regarding >>

Re: [RFC PATCH v3.1 19/27] mmc: sdhci-uhs2: add set_reg() to initialise the interface

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > This is a sdhci version of mmc's uhs2_set_reg operation. > UHS-II interface (related registers) will be initialised here. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.c | 103

Re: [RFC PATCH v3.1 20/27] mmc: sdhci-uhs2: add request() and others

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > This is a sdhci version of mmc's request operation. > It covers both UHS-I and UHS-II. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.c | 529 ++ >

Re: [RFC PATCH v3.1 18/27] mmc: sdhci-uhs2: add clock operations

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > This is a sdhci version of mmc's uhs2_[enable|disable]_clk operations. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.c | 41 +++ > 1 file changed, 41 insertions(+)

Re: [RFC PATCH v3.1 16/27] mmc: sdhci-uhs2: add set_ios()

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > This is a sdhci version of mmc's set_ios operation. > It covers both UHS-I and UHS-II. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.c | 100 ++ >

Re: [RFC PATCH v3.1 17/27] mmc: sdhci-uhs2: add detect_init() to detect the interface

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > Sdhci_uhs2_do_detect_init() is a sdhci version of mmc's uhs2_detect_init > operation. After detected, the host's UHS-II capabilities will be set up > here and interrupts will also be enabled. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI

Re: [RFC PATCH v3.1 14/27] mmc: sdhci-uhs2: skip signal_voltage_switch()

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > For UHS2, the signal voltage is supplied by vdd2 which is already 1.8v, > so no voltage switch required. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.c | 26 ++ > 1 file

Re: [RFC PATCH v3.1 13/27] mmc: sdhci-uhs2: add set_power() to support vdd2

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > This is a UHS-II version of sdhci's set_power operation. > VDD2, as well as VDD, is handled here. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.c | 80 +++ >

Re: [RFC PATCH v3.1 12/27] mmc: sdhci-uhs2: add reset function

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > Sdhci_uhs2_reset() does a UHS-II specific reset operation. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.c | 49 +++ > drivers/mmc/host/sdhci-uhs2.h | 1 + >

Re: [RFC PATCH v3.1 09/27] mmc: sdhci: add UHS-II related definitions in headers

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > Add UHS-II related definitions in shdci.h and sdhci-uhs2.h. > > Signed-off-by: Ben Chuang > Signed-off-by: AKASHI Takahiro > --- > drivers/mmc/host/sdhci-uhs2.h | 210 ++ > drivers/mmc/host/sdhci.h | 73

Re: [RFC PATCH v3.1 08/27] mmc: sdhci: add a kernel configuration for enabling UHS-II support

2020-11-26 Thread Adrian Hunter
On 6/11/20 4:27 am, AKASHI Takahiro wrote: > This kernel configuration, CONFIG_MMC_SDHCI_UHS2, will be used > in the following commits to indicate UHS-II specific code in sdhci > controllers. This patch needs to be combined with a patch that actually uses the config. > > Signed-off-by: Ben

Re: [PATCH] perf script: Fix overrun issue for dynamically-allocated pmu type number

2020-11-25 Thread Adrian Hunter
On 26/11/20 5:24 am, Jin Yao wrote: > When unpacking the event which is from dynamic pmu, the array > output[OUTPUT_TYPE_MAX] may be overrun. For example, type number of > SKL uncore_imc is 10, but OUTPUT_TYPE_MAX is 7 now (OUTPUT_TYPE_MAX = > PERF_TYPE_MAX + 1). > > /* In builtin-script.c */ >

Re: [PATCH] mmc: sdhci: Use more concise device_property_read_u64

2020-11-25 Thread Adrian Hunter
On 25/11/20 5:36 am, Jeremy Linton wrote: > Since we only need a single u64 the _array form is > unnecessarily. Use device_property_read_u64 instead. > > Signed-off-by: Jeremy Linton Thank you :-) Acked-by: Adrian Hunter > --- > drivers/mmc/host/sdhci.c | 8 &g

Re: [PATCH] mmc: sdhci: Update firmware interface API

2020-11-24 Thread Adrian Hunter
On 24/11/20 4:25 pm, Ulf Hansson wrote: > On Sat, 21 Nov 2020 at 00:39, Jeremy Linton wrote: >> >> The device_* calls were added a few years ago to abstract >> DT/ACPI/fwnode firmware interfaces. Lets convert the two >> sdhci caps fields to use the generic calls rather than the OF >> specific

Re: [RFC PATCH] perf session: Fixup timestamp for ordered events

2020-11-18 Thread Adrian Hunter
On 18/11/20 1:43 pm, Leo Yan wrote: > Hi Adrian, > > On Wed, Nov 18, 2020 at 01:15:32PM +0200, Adrian Hunter wrote: >> On 18/11/20 12:55 pm, Leo Yan wrote: >>> Perf tool relies on MMAP/MMAP2 events to prepare DSO maps, it allocates >>> DSO maps for MMAP/MMAP2

Re: [RFC PATCH] perf session: Fixup timestamp for ordered events

2020-11-18 Thread Adrian Hunter
On 18/11/20 12:55 pm, Leo Yan wrote: > Perf tool relies on MMAP/MMAP2 events to prepare DSO maps, it allocates > DSO maps for MMAP/MMAP2 events which is used for parsing symbol. Thus, > during the recording, perf tool implictly expects the MMAP/MMAP2 events > should arrive before AUX event, No

Re: [PATCH] mmc: xenon: enable ACPI support in the driver

2020-11-15 Thread Adrian Hunter
On 14/11/20 11:08 am, Marcin Wojtas wrote: > This patch introduces an alternative way of obtaining resources - via > ACPI tables provided by firmware. In addition to the of_* -> device_* > API replacement, sdhci_xenon_acpi_match table was introduced. > Also, the entire supply clocks configuration

Re: [PATCH] mmc: block: Prevent new req entering queue while freeing up the queue

2020-11-04 Thread Adrian Hunter
On 3/11/20 5:25 pm, Ulf Hansson wrote: > On Wed, 28 Oct 2020 at 12:20, Veerabhadrarao Badiganti > wrote: >> >> The commit bbdc74dc19e0 ("mmc: block: Prevent new req entering queue >> after its cleanup") has introduced this change but it got moved after >> del_gendisk() with commit 57678e5a3d51

Re: [PATCH V4 1/2] scsi: ufs: Add DeepSleep feature

2020-11-04 Thread Adrian Hunter
On 4/11/20 12:57 pm, Bean Huo wrote: > On Tue, 2020-11-03 at 16:14 +0200, Adrian Hunter wrote: >> DeepSleep is a UFS v3.1 feature that achieves the lowest power >> consumption >> of the device, apart from power off. >> >> In DeepSleep mode, no commands are a

Re: [PATCH V4 1/2] scsi: ufs: Add DeepSleep feature

2020-11-04 Thread Adrian Hunter
On 4/11/20 10:29 am, Can Guo wrote: > Hi Adrian, > > On 2020-11-03 22:14, Adrian Hunter wrote: >> DeepSleep is a UFS v3.1 feature that achieves the lowest power consumption >> of the device, apart from power off. >> >> In DeepSleep mode, no commands are a

[PATCH V4 2/2] scsi: ufs: Allow an error return value from ->device_reset()

2020-11-03 Thread Adrian Hunter
ration should return -EOPNOTSUPP. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufs-mediatek.c | 4 +++- drivers/scsi/ufs/ufs-qcom.c | 6 -- drivers/scsi/ufs/ufshcd.h | 11 +++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/ufs/ufs-mediat

[PATCH V4 0/2] scsi: ufs: Add DeepSleep feature

2020-11-03 Thread Adrian Hunter
IMMED setting and consequently drop patch 2. Adrian Hunter (2): scsi: ufs: Add DeepSleep feature scsi: ufs: Allow an error return value from ->device_reset() Documentation/ABI/testing/sysfs-driver-ufs | 34 +++--- drivers/scsi/ufs/ufs-mediatek.c| 4 ++-

[PATCH V4 1/2] scsi: ufs: Add DeepSleep feature

2020-11-03 Thread Adrian Hunter
0x310 support DeepSleep. Signed-off-by: Adrian Hunter --- Documentation/ABI/testing/sysfs-driver-ufs | 34 +++ drivers/scsi/ufs/ufs-sysfs.c | 7 drivers/scsi/ufs/ufs.h | 1 + drivers/scsi/ufs/ufshcd.c

Re: [PATCH v2] mmc: sdhci-acpi: AMDI0040: Allow changing HS200/HS400 driver strength

2020-10-27 Thread Adrian Hunter
line after "return preset_driver_strength;" Acked-by: Adrian Hunter > > --- > > Changes in v2: > By Victor Ding > - Rebased the patch by using FIELD_GET for preset value bit masks. > - (No functional changes). > > The original patch was developed b

Re: [PATCH] mmc: sdhci-of-esdhc: set timeout to max before tuning

2020-10-16 Thread Adrian Hunter
he end this will lead to an unsuccessful tuning > procedure and to the above error. > > To workaround this, set the timeout to the maximum value (which is the > best we can do) and the SDHCI core will take care of the proper timeout > handling. > > Signed-off-by: Michael Wall

Re: [PATCH v2] mmc: sdhci: Use Auto CMD Auto Select only when v4_mode is true

2020-10-15 Thread Adrian Hunter
ct. > > Fixes: 427b6514d095 ("mmc: sdhci: Add Auto CMD Auto Select support") > Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter > --- > Since v1: > - add the performance degradation on sdhci-of-dwcmshc explanation in > commit msg > - add a comment in

Re: [PATCH v4 4/4] mmc: sdhci-of-arasan: Enable UHS-1 support for Keem Bay SOC

2020-10-08 Thread Adrian Hunter
register using firmware driver calling >> system-level platform management layer (SMC) to set the register. >> 2) By controlling the GPIO expander value to drive either 1.8V or 3.3V >> for power mux input. >> >> Signed-off-by: Muhammad Husaini Zulkifl

Re: [PATCH V2] scsi: ufs: Add DeepSleep feature

2020-10-06 Thread Adrian Hunter
ks for looking at this. Yes, I missed that. Fixed in V3. > > Thanks, > Bean > > > On Mon, 2020-10-05 at 16:04 +0300, Adrian Hunter wrote: >> DeepSleep is a UFS v3.1 feature that achieves the lowest power >> consumption >> of the device, apart from power off.

[PATCH V3] scsi: ufs: Add DeepSleep feature

2020-10-06 Thread Adrian Hunter
0x310 support DeepSleep. Signed-off-by: Adrian Hunter --- Changes in V3: Updated sysfs doc for rpm_lvl and spm_lvl Changes in V2: Fix SSU command IMMED setting and consequently drop patch 2. Documentation/ABI/testing/sysfs-driver-ufs | 34 +++ drivers/scsi/u

[PATCH V2] scsi: ufs: Add DeepSleep feature

2020-10-05 Thread Adrian Hunter
0x310 support DeepSleep. Signed-off-by: Adrian Hunter --- Changes in V2: Fix SSU command IMMED setting and consequently drop patch 2. drivers/scsi/ufs/ufs-sysfs.c | 7 +++ drivers/scsi/ufs/ufs.h | 1 + drivers/scsi/ufs/ufshcd.c| 39 ++-- d

Re: [PATCH 1/2] scsi: ufs: Add DeepSleep feature

2020-10-05 Thread Adrian Hunter
On 5/10/20 12:51 pm, Avri Altman wrote: >> >> >> On 5/10/20 11:02 am, Avri Altman wrote: >>> HI, >>> Drivers that wish to support DeepSleep need to set a new capability flag UFSHCD_CAP_DEEPSLEEP and provide a hardware reset via the existing ->device_reset() callback. >>> I would

Re: [PATCH 1/2] scsi: ufs: Add DeepSleep feature

2020-10-05 Thread Adrian Hunter
On 5/10/20 11:02 am, Avri Altman wrote: > HI, > >> Drivers that wish to support DeepSleep need to set a new capability flag >> UFSHCD_CAP_DEEPSLEEP and provide a hardware reset via the existing >> ->device_reset() callback. > I would expect that this capability controls sending SSU 4, but it

[PATCH 0/2] scsi: ufs: Add DeepSleep feature

2020-10-02 Thread Adrian Hunter
Hi Here is a patch to add DeepSleep, and a patch to workaround an issue hit when testing. Adrian Hunter (2): scsi: ufs: Add DeepSleep feature scsi: ufs: Workaround UFS devices that object to DeepSleep IMMED drivers/scsi/ufs/ufs-sysfs.c | 7 drivers/scsi/ufs/ufs.h | 1

[PATCH 2/2] scsi: ufs: Workaround UFS devices that object to DeepSleep IMMED

2020-10-02 Thread Adrian Hunter
The UFS specification says to set the IMMED (immediate) flag for the Start/Stop Unit command when entering DeepSleep. However some UFS devices object to that. Workaround that by retrying without IMMED. Whichever possibility works, the result is recorded for the next time. Signed-off-by: Adrian

[PATCH 1/2] scsi: ufs: Add DeepSleep feature

2020-10-02 Thread Adrian Hunter
0x310 support DeepSleep. The UFS specification says to set the IMMED (immediate) flag for the Start/Stop Unit command when entering DeepSleep. However some UFS devices object to that, which is addressed in a subsequent patch. Signed-off-by: Adrian Hunter --- drivers/scsi/ufs/ufs-sysfs.

Re: [PATCH v3] mmc: core: don't set limits.discard_granularity as 0

2020-10-01 Thread Adrian Hunter
On 1/10/20 12:27 pm, Vicente Bergas wrote: > On Thu, Oct 1, 2020 at 11:07 AM Adrian Hunter wrote: >> >> On 1/10/20 11:38 am, Vicente Bergas wrote: >>> On Thu, Oct 1, 2020 at 9:18 AM Coly Li wrote: >>>> >>>> In mmc_queue_setup_discard() the mmc driv

Re: [PATCH v3] mmc: core: don't set limits.discard_granularity as 0

2020-10-01 Thread Adrian Hunter
rd_granularity in >> __blkdev_issue_discard()"). >> Reported-by: Vicente Bergas > > Hi Coly, Adrian, > would you like me to reply with a tested-by? > before testing it: what are the chances of losing data? Very low I would hope, but that is no reason not to have backups

Re: [PATCH v2] mmc: core: don't set limits.discard_granularity as 0

2020-10-01 Thread Adrian Hunter
ularity in __blkdev_issue_discard()"), therefore add > a "Fixes:" tag for the commit to make sure people won't miss this patch > after applying the change of __blkdev_issue_discard(). > > Fixes: b35fd7422c2f ("block: check queue's limits.discard_granularity in >

Re: [PATCH] mmc: core: don't set limits.discard_granularity as 0

2020-10-01 Thread Adrian Hunter
On 1/10/20 9:29 am, Coly Li wrote: > On 2020/10/1 14:14, Adrian Hunter wrote: >> On 1/10/20 7:36 am, Coly Li wrote: >>> On 2020/10/1 01:23, Adrian Hunter wrote: >>>> On 30/09/20 7:08 pm, Coly Li wrote: >>>>> In mmc_queue_setup_discard() the mmc driver q

Re: [PATCH] mmc: core: don't set limits.discard_granularity as 0

2020-10-01 Thread Adrian Hunter
On 1/10/20 7:36 am, Coly Li wrote: > On 2020/10/1 01:23, Adrian Hunter wrote: >> On 30/09/20 7:08 pm, Coly Li wrote: >>> In mmc_queue_setup_discard() the mmc driver queue's discard_granularity >>> might be set as 0 (when card->pref_erase > max_discard) while

Re: [PATCH] mmc: core: don't set limits.discard_granularity as 0

2020-09-30 Thread Adrian Hunter
and one-sector granularities are the same. */ granularity = max(q->limits.discard_granularity >> 9, 1U); > Reported-by: Vicente Bergas > Signed-off-by: Coly Li > Cc: Adrian Hunter > Cc: Ulf Hansson > --- > drivers/mmc/core/queue.c | 2 +- > 1 file

Re: [PATCH 2/2] mmc: sdhci-acpi: AMDI0040: Allow changing HS200/HS400 driver strength

2020-09-30 Thread Adrian Hunter
g the SDR104 preset is a no-op for these platforms. > Newer platforms will have properly set presets. So this change will > support both new and old platforms. > > Signed-off-by: Raul E Rangel Acked-by: Adrian Hunter > --- > > drivers/mmc/host/sdhci-acpi.c | 39 ++

Re: [PATCH 1/2] mmc: sdhci-acpi: AMDI0040: Set SDHCI_QUIRK2_PRESET_VALUE_BROKEN

2020-09-30 Thread Adrian Hunter
so we end up with driver > strengths that can cause I/O problems. > > Fixes: 34597a3f60b1 ("mmc: sdhci-acpi: Add support for ACPI HID of AMD > Controller with HS400") > Signed-off-by: Raul E Rangel Acked-by: Adrian Hunter > --- > I decided to abandon adding the

Re: [PATCH v2] mmc: sdhci: Don't enable presets while tuning

2020-09-25 Thread Adrian Hunter
On 18/09/20 8:57 pm, Raul Rangel wrote: > On Tue, Sep 1, 2020 at 4:54 AM Adrian Hunter wrote: >> >> On 24/08/20 9:21 pm, Raul E Rangel wrote: >>> SDHCI presets are not currently used for eMMC HS/HS200/HS400, but are >>> used for DDR52. The HS400 retuning sequence

Re: [RFC PATCH V3 12/21] mmc: sdhci: UHS-II support, add hooks for additional operations

2020-09-25 Thread Adrian Hunter
On 24/09/20 12:35 pm, AKASHI Takahiro wrote: > Adrian, > > This is, hopefully, my last reply to your comments on this patch#12. > > Regarding _request() and _send_command() (and more), > > On Fri, Aug 21, 2020 at 05:08:32PM +0300, Adrian Hunter wrote: >> On 10/07/2

Re: [PATCH 7/7] perf inject: Remove stale build-id processing

2020-09-23 Thread Adrian Hunter
e hit? So, unless -b is used, anything you don't hit you lose i.e. a buildid in the HEADER_BUILD_ID feature section of the input file, will not be written to the output file. > > Cc: Adrian Hunter > Signed-off-by: Namhyung Kim > --- > tools/perf/builtin-inject.c | 12 -

Re: [RFC PATCH V3 12/21] mmc: sdhci: UHS-II support, add hooks for additional operations

2020-09-16 Thread Adrian Hunter
On 17/09/20 5:31 am, AKASHI Takahiro wrote: > Adrian, > > On Wed, Sep 16, 2020 at 01:00:35PM +0300, Adrian Hunter wrote: >> On 16/09/20 11:05 am, AKASHI Takahiro wrote: >>> Adrian, >>> >>> Your comments are scattered over various functions, and so &g

Re: [RFC PATCH V3 12/21] mmc: sdhci: UHS-II support, add hooks for additional operations

2020-09-16 Thread Adrian Hunter
On 16/09/20 11:05 am, AKASHI Takahiro wrote: > Adrian, > > Your comments are scattered over various functions, and so > I would like to address them in separate replies. > > First, I'd like to discuss sdhci_[add|remove]_host(). > > On Fri, Aug 21, 2020 at 05:08:32PM +0

Re: [RFC PATCH V3 09/21] mmc: sdhci: add UHS-II related definitions in headers

2020-09-16 Thread Adrian Hunter
On 15/09/20 9:47 am, AKASHI Takahiro wrote: > Adrian, > > On Fri, Aug 21, 2020 at 05:04:16PM +0300, Adrian Hunter wrote: >> On 10/07/20 2:10 pm, Ben Chuang wrote: >>> From: AKASHI Takahiro >>> >>> Add UHS-II related definitions in shdci.h and sdhci

Re: [RFC PATCH V3 15/21] mmc: sdhci: UHS-II support, modify set_power() to handle vdd2

2020-09-16 Thread Adrian Hunter
On 15/09/20 9:24 am, AKASHI Takahiro wrote: > Adrain, > > On Mon, Sep 14, 2020 at 09:36:02AM +0300, Adrian Hunter wrote: >> On 14/09/20 8:45 am, AKASHI Takahiro wrote: >>> Adrian, >>> >>> On Fri, Aug 21, 2020 at 05:11:18PM +0300, Adrian Hunter wrote:

Re: [PATCH 02/26] perf: Introduce mmap3 version of mmap event

2020-09-14 Thread Adrian Hunter
On 14/09/20 11:07 pm, Jiri Olsa wrote: > On Mon, Sep 14, 2020 at 10:08:01AM -0700, Ian Rogers wrote: > > SNIP > >>> >>> Using one of the MISC bits to resolve the union. Might actually bring >>> benefit to everyone. Us normal people get to have a smaller MMAP record, >>> while the buildid folks

Re: [PATCH 02/26] perf: Introduce mmap3 version of mmap event

2020-09-14 Thread Adrian Hunter
On 15/09/20 1:00 am, Arnaldo Carvalho de Melo wrote: > Em Mon, Sep 14, 2020 at 09:39:07PM +0200, Jiri Olsa escreveu: >> On Mon, Sep 14, 2020 at 12:28:41PM -0300, Arnaldo Carvalho de Melo wrote: >>> Em Mon, Sep 14, 2020 at 02:38:27PM +0900, Namhyung Kim escreveu: On Mon, Sep 14, 2020 at 6:03

Re: [RFC PATCH V3 13/21] mmc: sdhci: UHS-II support, skip signal_voltage_switch()

2020-09-14 Thread Adrian Hunter
On 14/09/20 9:40 am, AKASHI Takahiro wrote: > Adrian, > > On Fri, Aug 21, 2020 at 05:09:01PM +0300, Adrian Hunter wrote: >> On 10/07/20 2:11 pm, Ben Chuang wrote: >>> From: AKASHI Takahiro >>> >>> sdhci_start_signal_voltage_switch() should be called

Re: [RFC PATCH V3 15/21] mmc: sdhci: UHS-II support, modify set_power() to handle vdd2

2020-09-14 Thread Adrian Hunter
On 14/09/20 8:45 am, AKASHI Takahiro wrote: > Adrian, > > On Fri, Aug 21, 2020 at 05:11:18PM +0300, Adrian Hunter wrote: >> On 10/07/20 2:11 pm, Ben Chuang wrote: >>> From: AKASHI Takahiro >>> >>> VDD2 is used for powering UHS-II interface.

Re: [PATCH v3 3/4] perf record: Don't clear event's period if set by a term

2020-09-14 Thread Adrian Hunter
uration > terms aren't present. > > Fixes: 5f34278867b7 ("perf evlist: Move leader-sampling configuration") > Signed-off-by: Ian Rogers Acked-by: Adrian Hunter > --- > tools/perf/util/record.c | 34 ++ > 1 file changed, 26 insertions(+)

Re: [PATCH] ftrace: Fix missing synchronize_rcu() removing trampoline from kallsyms

2020-09-11 Thread Adrian Hunter
On 11/09/20 2:41 pm, pet...@infradead.org wrote: > On Tue, Sep 01, 2020 at 12:16:17PM +0300, Adrian Hunter wrote: >> Add synchronize_rcu() after list_del_rcu() in >> ftrace_remove_trampoline_from_kallsyms() to protect readers of >> ftrace_ops_trampoline_list (in ftrace_g

Re: [PATCH V2] scsi: ufs-pci: Add LTR support for Intel controllers

2020-09-11 Thread Adrian Hunter
On 9/09/20 5:06 pm, Adrian Hunter wrote: > On 2/09/20 12:27 pm, Adrian Hunter wrote: >> On 2/09/20 5:12 am, Martin K. Petersen wrote: >>> >>> Adrian, >>> >>>> Intel host controllers support the setting of latency tolerance. >>>> Accordin

<    1   2   3   4   5   6   7   8   9   10   >