lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1646226227-32429-6-git-send-email-quic_c_sbhanu@quicinc.com>
Date:   Wed,  2 Mar 2022 18:33:45 +0530
From:   Shaik Sajida Bhanu <quic_c_sbhanu@...cinc.com>
To:     adrian.hunter@...el.com, quic_riteshh@...cinc.com,
        asutoshd@...cinc.com, ulf.hansson@...aro.org, agross@...nel.org,
        bjorn.andersson@...aro.org, linux-mmc@...r.kernel.org,
        linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     quic_vbadigan@...cinc.com, quic_rampraka@...cinc.com,
        quic_pragalla@...cinc.com, quic_sartgarg@...cinc.com,
        quic_nitirawa@...cinc.com, quic_sayalil@...cinc.com,
        Shaik Sajida Bhanu <quic_c_sbhanu@...cinc.com>,
        Liangliang Lu <quic_luliang@...cinc.com>,
        "Bao D . Nguyen" <quic_nguyenb@...cinc.com>
Subject: [PATCH V4 5/7] mmc: core: Set error state for mmc driver

If any errors observed in eMMC and SD card set error state.

User can read error state value and confirm any errors observed or not,
error state set means error obeserved and vice versa.

Signed-off-by: Liangliang Lu <quic_luliang@...cinc.com>
Signed-off-by: Sayali Lokhande <quic_sayalil@...cinc.com>
Signed-off-by: Bao D. Nguyen <quic_nguyenb@...cinc.com>
Signed-off-by: Ram Prakash Gupta <quic_rampraka@...cinc.com>
Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@...cinc.com>
---
 include/linux/mmc/host.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 3b7f1e5..28baa07 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -518,6 +518,7 @@ struct mmc_host {
 	/* Host Software Queue support */
 	bool			hsq_enabled;
 	u32                     err_stats[MMC_ERR_MAX];
+	bool			err_state;
 
 	unsigned long		private[] ____cacheline_aligned;
 };
@@ -653,6 +654,11 @@ static inline enum dma_data_direction mmc_get_dma_dir(struct mmc_data *data)
 	return data->flags & MMC_DATA_WRITE ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
 }
 
+static inline void mmc_debugfs_err_stats_enable(struct mmc_host *host)
+{
+	host->err_state = true;
+}
+
 static inline void mmc_debugfs_err_stats_inc(struct mmc_host *host,
 		enum mmc_err_stat stat) {
 	host->err_stats[stat] += 1;
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ