linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Jaehoon Chung <jh80.chung@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Christian Hewitt <christianshewitt@gmail.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: [PATCH 5.14 021/125] mmc: dw_mmc: exynos: fix the finding clock sample value
Date: Mon,  1 Nov 2021 10:16:34 +0100	[thread overview]
Message-ID: <20211101082537.420454365@linuxfoundation.org> (raw)
In-Reply-To: <20211101082533.618411490@linuxfoundation.org>

From: Jaehoon Chung <jh80.chung@samsung.com>

commit 697542bceae51f7620af333b065dd09d213629fb upstream.

Even though there are candiates value if can't find best value, it's
returned -EIO. It's not proper behavior.
If there is not best value, use a first candiate value to work eMMC.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Christian Hewitt <christianshewitt@gmail.com>
Cc: stable@vger.kernel.org
Fixes: c537a1c5ff63 ("mmc: dw_mmc: exynos: add variable delay tuning sequence")
Link: https://lore.kernel.org/r/20211022082106.1557-1-jh80.chung@samsung.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/mmc/host/dw_mmc-exynos.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -464,6 +464,18 @@ static s8 dw_mci_exynos_get_best_clksmpl
 		}
 	}
 
+	/*
+	 * If there is no cadiates value, then it needs to return -EIO.
+	 * If there are candiates values and don't find bset clk sample value,
+	 * then use a first candiates clock sample value.
+	 */
+	for (i = 0; i < iter; i++) {
+		__c = ror8(candiates, i);
+		if ((__c & 0x1) == 0x1) {
+			loc = i;
+			goto out;
+		}
+	}
 out:
 	return loc;
 }
@@ -494,6 +506,8 @@ static int dw_mci_exynos_execute_tuning(
 		priv->tuned_sample = found;
 	} else {
 		ret = -EIO;
+		dev_warn(&mmc->class_dev,
+			"There is no candiates value about clksmpl!\n");
 	}
 
 	return ret;



  parent reply	other threads:[~2021-11-01  9:42 UTC|newest]

Thread overview: 130+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01  9:16 [PATCH 5.14 000/125] 5.14.16-rc1 review Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 001/125] ARM: 9132/1: Fix __get_user_check failure with ARM KASAN images Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 002/125] ARM: 9133/1: mm: proc-macros: ensure *_tlb_fns are 4B aligned Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 003/125] ARM: 9134/1: remove duplicate memcpy() definition Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 004/125] ARM: 9138/1: fix link warning with XIP + frame-pointer Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 005/125] ARM: 9139/1: kprobes: fix arch_init_kprobes() prototype Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 006/125] ARM: 9141/1: only warn about XIP address when not compile testing Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 007/125] ARM: 9148/1: handle CONFIG_CPU_ENDIAN_BE32 in arch/arm/kernel/head.S Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 008/125] usbnet: sanity check for maxpacket Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 009/125] usbnet: fix error return code in usbnet_probe() Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 010/125] Revert "pinctrl: bcm: ns: support updated DT binding as syscon subnode" Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 011/125] pinctrl: amd: disable and mask interrupts on probe Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 012/125] ata: sata_mv: Fix the error handling of mv_chip_id() Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 013/125] tipc: fix size validations for the MSG_CRYPTO type Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 014/125] nfc: port100: fix using -ERRNO as command type mask Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 015/125] Revert "net: mdiobus: Fix memory leak in __mdiobus_register" Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 016/125] net/tls: Fix flipped sign in tls_err_abort() calls Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 017/125] mmc: vub300: fix control-message timeouts Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 018/125] mmc: cqhci: clear HALT state after CQE enable Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 019/125] mmc: mediatek: Move cqhci init behind ungate clock Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 020/125] mmc: tmio: reenable card irqs after the reset callback Greg Kroah-Hartman
2021-11-01  9:16 ` Greg Kroah-Hartman [this message]
2021-11-01  9:16 ` [PATCH 5.14 022/125] mmc: sdhci: Map more voltage level to SDHCI_POWER_330 Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 023/125] mmc: sdhci-pci: Read card detect from ACPI for Intel Merrifield Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 024/125] mmc: sdhci-esdhc-imx: clear the buffer_read_ready to reset standard tuning circuit Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 025/125] block: Fix partition check for host-aware zoned block devices Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 026/125] ocfs2: fix race between searching chunks and release journal_head from buffer_head Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 027/125] nvme-tcp: fix H2CData PDU send accounting (again) Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 028/125] ftrace/nds32: Update the proto for ftrace_trace_function to match ftrace_stub Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 029/125] cfg80211: scan: fix RCU in cfg80211_add_nontrans_list() Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 030/125] cfg80211: fix management registrations locking Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 031/125] net: lan78xx: fix division by zero in send path Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 032/125] drm/amd/display: Require immediate flip support for DCN3.1 planes Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 033/125] mm: hwpoison: remove the unnecessary THP check Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 034/125] mm: filemap: check if THP has hwpoisoned subpage for PMD page fault Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 035/125] mm, thp: bail out early in collapse_file for writeback page Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 036/125] mm: khugepaged: skip huge page collapse for special files Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 037/125] arm64: dts: imx8mm-kontron: Fix polarity of reg_rst_eth2 Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 038/125] arm64: dts: imx8mm-kontron: Fix CAN SPI clock frequency Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 039/125] arm64: dts: imx8mm-kontron: Fix connection type for VSC8531 RGMII PHY Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 040/125] arm64: dts: imx8mm-kontron: Set lower limit of VDD_SNVS to 800 mV Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 041/125] arm64: dts: imx8mm-kontron: Make sure SOC and DRAM supply voltages are correct Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 042/125] mac80211: mesh: fix HE operation element length check Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 043/125] drm/ttm: fix memleak in ttm_transfered_destroy Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 044/125] drm/i915: Convert unconditional clflush to drm_clflush_virt_range() Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 045/125] drm/i915: Catch yet another unconditioal clflush Greg Kroah-Hartman
2021-11-01  9:16 ` [PATCH 5.14 046/125] drm/i915/dp: Skip the HW readout of DPCD on disabled encoders Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 047/125] drm/amdgpu: Fix even more out of bound writes from debugfs Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 048/125] drm/amdgpu: fix out of bounds write Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 049/125] drm/amdgpu: support B0&B1 external revision id for yellow carp Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 050/125] drm/amd/display: Limit display scaling to up to true 4k for DCN 3.1 Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 051/125] drm/amd/display: Fix prefetch bandwidth calculation for DCN3.1 Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 052/125] drm/amd/display: increase Z9 latency to workaround underflow in Z9 Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 053/125] drm/amd/display: Increase watermark latencies for DCN3.1 Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 054/125] drm/amd/display: Moved dccg init to after bios golden init Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 055/125] drm/amd/display: Fallback to clocks which meet requested voltage on DCN31 Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 056/125] drm/amd/display: Fix deadlock when falling back to v2 from v3 Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 057/125] Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout" Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 058/125] cgroup: Fix memory leak caused by missing cgroup_bpf_offline Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 059/125] riscv, bpf: Fix potential NULL dereference Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 060/125] tcp_bpf: Fix one concurrency problem in the tcp_bpf_send_verdict function Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 061/125] bpf: Fix potential race in tail call compatibility check Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 062/125] bpf: Fix error usage of map_fd and fdget() in generic_map_update_batch() Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 063/125] IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 064/125] IB/hfi1: Fix abba locking issue with sc_disable() Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 065/125] nvmet-tcp: fix data digest pointer calculation Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 066/125] nvme-tcp: " Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 067/125] nvme-tcp: fix possible req->offset corruption Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 068/125] octeontx2-af: Display all enabled PF VF rsrc_alloc entries Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 069/125] octeontx2-af: Fix possible null pointer dereference Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 070/125] ice: Respond to a NETDEV_UNREGISTER event for LAG Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 071/125] RDMA/mlx5: Set user priority for DCT Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 072/125] ice: check whether PTP is initialized in ice_ptp_release() Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 073/125] arm64: dts: allwinner: h5: NanoPI Neo 2: Fix ethernet node Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 074/125] reset: brcmstb-rescal: fix incorrect polarity of status bit Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 075/125] regmap: Fix possible double-free in regcache_rbtree_exit() Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 076/125] net: batman-adv: fix error handling Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 077/125] net-sysfs: initialize uid and gid before calling net_ns_get_ownership Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 078/125] cfg80211: correct bridge/4addr mode check Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 079/125] net: Prevent infinite while loop in skb_tx_hash() Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 080/125] RDMA/mlx5: Initialize the ODP xarray when creating an ODP MR Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 081/125] RDMA/sa_query: Use strscpy_pad instead of memcpy to copy a string Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 082/125] gpio: xgs-iproc: fix parsing of ngpios property Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 083/125] nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 084/125] mlxsw: pci: Recycle received packet upon allocation failure Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 085/125] net: ethernet: microchip: lan743x: Fix driver crash when lan743x_pm_resume fails Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 086/125] net: ethernet: microchip: lan743x: Fix dma allocation failure by using dma_set_mask_and_coherent Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 087/125] net: nxp: lpc_eth.c: avoid hang when bringing interface down Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 088/125] net: hns3: fix pause config problem after autoneg disabled Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 089/125] net: hns3: fix data endian problem of some functions of debugfs Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 090/125] net: ethernet: microchip: lan743x: Fix skb allocation failure Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 091/125] net/tls: Fix flipped sign in async_wait.err assignment Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 092/125] phy: phy_ethtool_ksettings_get: Lock the phy for consistency Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 093/125] phy: phy_ethtool_ksettings_set: Move after phy_start_aneg Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 094/125] phy: phy_start_aneg: Add an unlocked version Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 095/125] phy: phy_ethtool_ksettings_set: Lock the PHY while changing settings Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 096/125] RDMA/irdma: Process extended CQ entries correctly Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 097/125] RDMA/irdma: Set VLAN in UD work completion correctly Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 098/125] RDMA/irdma: Do not hold qos mutex twice on QP resume Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 099/125] sctp: use init_tag from inithdr for ABORT chunk Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 100/125] sctp: fix the processing for INIT chunk Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 101/125] sctp: fix the processing for INIT_ACK chunk Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 102/125] sctp: fix the processing for COOKIE_ECHO chunk Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 103/125] sctp: add vtag check in sctp_sf_violation Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 104/125] sctp: add vtag check in sctp_sf_do_8_5_1_E_sa Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 105/125] sctp: add vtag check in sctp_sf_ootb Greg Kroah-Hartman
2021-11-01  9:17 ` [PATCH 5.14 106/125] bpf: Use kvmalloc for map values in syscall Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 107/125] watchdog: sbsa: only use 32-bit accessors Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 108/125] bpf: Move BPF_MAP_TYPE for INODE_STORAGE and TASK_STORAGE outside of CONFIG_NET Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 109/125] net: hns3: add more string spaces for dumping packets number of queue info in debugfs Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 110/125] net: hns3: expand buffer len for some debugfs command Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 111/125] virtio-ring: fix DMA metadata flags Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 112/125] octeontx2-af: Check whether ipolicers exists Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 113/125] KVM: s390: clear kicked_mask before sleeping again Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 114/125] KVM: s390: preserve deliverable_mask in __airqs_kick_single_vcpu Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 115/125] scsi: ufs: ufs-exynos: Correct timeout value setting registers Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 116/125] perf script: Fix PERF_SAMPLE_WEIGHT_STRUCT support Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 117/125] scsi: ibmvfc: Fix up duplicate response detection Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 118/125] riscv: fix misalgned trap vector base address Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 119/125] riscv: Do not re-populate shadow memory with kasan_populate_early_shadow Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 120/125] riscv: Fix asan-stack clang build Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 121/125] perf script: Check session->header.env.arch before using it Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 122/125] KVM: x86/xen: Fix kvm_xen_has_interrupt() sleeping in kvm_vcpu_block() Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 123/125] KVM: x86: switch pvclock_gtod_sync_lock to a raw spinlock Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 124/125] KVM: SEV-ES: fix another issue with string I/O VMGEXITs Greg Kroah-Hartman
2021-11-01  9:18 ` [PATCH 5.14 125/125] KVM: x86: Take srcu lock in post_kvm_run_save() Greg Kroah-Hartman
2021-11-01 14:42 ` [PATCH 5.14 000/125] 5.14.16-rc1 review Fox Chen
2021-11-01 21:20 ` Shuah Khan
2021-11-01 23:38 ` Guenter Roeck
2021-11-02  7:19 ` Naresh Kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211101082537.420454365@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=christianshewitt@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=stable@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).