Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp407076rdb; Thu, 15 Feb 2024 04:07:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVPWmae/Ykb80VtKb+iEw+mmMN89TORNXJq+0hFI0JOefXug5c6r6TiaQzjlAcVoWjxDYSWA5JmX19LIMWjv8ssBDB0fDmml1Z84QpFZg== X-Google-Smtp-Source: AGHT+IHC/D4UNySyvGhOMwWn70y8SUQMF3aURsiDgozoEm0ikT2rTdKDRN8l9ogwe/dxMkxIn0p/ X-Received: by 2002:a05:6358:7686:b0:17b:c8d:f3a0 with SMTP id e6-20020a056358768600b0017b0c8df3a0mr1466805rwg.9.1707998868700; Thu, 15 Feb 2024 04:07:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707998868; cv=pass; d=google.com; s=arc-20160816; b=KUU3vNx8YgHQ1xLsAh+dRw2HG4na6iw4Z30Si7ye+iU3wQ88dr0sh69L4Wa0+6J/TU rqmMvpw3lnQtt96z/sJ7VJA3AdB08ZHusjhtNoduH6o91N0zNYq4wIRwQvpNHeIurhvM 7vkZFH/sFuITFI3IWxW2O2C51dpiQ2kWFcfXwohxZwHjYnm21CeT/Ouw1wsfe3ljecR9 WnSMZbBAoq4YdS6ad1vPuuTpgQz2QFiK74oxcmg4fKcKmaBgFxlOZ90KdqYuyyMjlj1z lpYx+Nix11ZOG7mn0z/KKtWP0DVVLscbqaRa8Iyd3RNqSJ190ZEfKlVEJ56cLxcPiyH7 neEQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=cDEdSB2/9G7cVHoczeCQ+23h4ELW7WOM32Jsl5ykyPc=; fh=QsKxvl1jK2KN2AJuY8tFLYUhYn5pX0sihN282xb7qdg=; b=Q9buz+X46ImBaoZxobofNxxI5/MTHkVyPoI3N9X7QqsEHVTCTk6wniFTnjxOvgBw72 TMIJFbr8xQPAgMLp8XuxJhKy/MNZlpK9i6RyuGLC9X0IWlOsWd61jQ+LtzaxScwnvKrD 4xHEVkB45Lqooqd+mStxbf4PiItbx3c9e3if54QH9x7UCeXOsvBjulFHrJbYOjyBpQXQ hHO2pP01iKo+sCThqc6e7HVwZwanM3g4/xRujXWMlir/2Ex9rBvhiZr+yzL/agG4+5WS 0WgMzgDqzJG99d2kBRgD6bS+WB85cCIEhVvyTizBeu8rux5fV1SbYoYeLvyUL1pH0dlu RUBQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=btaXsw6O; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-66727-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k19-20020a6568d3000000b005d8bb95ce76si989193pgt.285.2024.02.15.04.07.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 04:07:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66727-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=btaXsw6O; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-66727-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66727-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E6B2FB2CFF2 for ; Thu, 15 Feb 2024 11:05:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F49B12C54E; Thu, 15 Feb 2024 11:01:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="btaXsw6O" Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC3C584FC2 for ; Thu, 15 Feb 2024 11:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707994883; cv=none; b=XYupwS3AiVMvSzr7s1qx2xCd8MpVaMmkdsyxq3+v91WdMQhUDZy6aW1QpckyoUMqAPa1mFpAiQGyLBBcJ6xz4epMjOEmrzUVxSJ8OauEHvEl+yNhfJ+M4g+XMLm+lGomv3MZbidiXSqgjWb+SOof4devGKQu/BVFvhMAKTBWNyI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707994883; c=relaxed/simple; bh=cDEdSB2/9G7cVHoczeCQ+23h4ELW7WOM32Jsl5ykyPc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=EAAedqvF6YsvIXgqH8cE+fB1CvXLMQ7rKzFO+z2Fjqd/U/NHf6tQOfnWv2lw0E2oNSfwaYXZmCNbp8eehu7fR3OZUxIkuEWP3DwHFV73kkMxBbDLznFoVo1m4beCceD+Bi7t6xs9eHObCR1GdMEzrv7A3oAFyBLEhjXIK/V3yC4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=btaXsw6O; arc=none smtp.client-ip=209.85.128.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-6078350e130so7077347b3.0 for ; Thu, 15 Feb 2024 03:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707994881; x=1708599681; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=cDEdSB2/9G7cVHoczeCQ+23h4ELW7WOM32Jsl5ykyPc=; b=btaXsw6Oe09ggCHy/MUxBwc1WNHWtMoZZ2GODqsXLoXkAhF8pvhhxIrXJX3Byuoen8 L0qplGKTq0Z2azuFrVxvHIPBObbCaDm6Oou98oSa6BlRbHBfBmMcIyjfi2URhLNp0Fd3 nYObbvOog+jTXPMiBY3d2w34dWobiHTHm7zpbp4j9GDK0KfihHALJNL9eNFYcZRn+1xU HbWusz2ne5o+6F6Nh/Gdax+IUzHyI5LUOVyt4sHGaLwtAwOEABVyeTnHXCidZKz5aUAM Aa12LFfYQSEtQ0/cBbNcveznkSz4jnmoMX75p/upl0Wj/UarLzBa1EVMFb+O/avlPnxI SgZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707994881; x=1708599681; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cDEdSB2/9G7cVHoczeCQ+23h4ELW7WOM32Jsl5ykyPc=; b=wl8CMhfEg1Nh/claN+WGOHWaCsWLweS+8b2CXFja7p1l5p+czmntBIJZpT//U42rME /eQ7uTij/8TWmRvwYnYUZiYGvn6Rmb7scRi+kkRnL0WfsodOTzToz9Cj81C4kLFPJS7G DfLxVCK3HComadW0J16D9O8X7Q4UWf3qpGpWIW9hUU8hvroUV+aExE3Xr1i2O+8JcuYG SI27b70k5J+CK8VKF2QCry2+8toXKqvRcYlDN9JR4nvnu/J8CIbkRCbQbyzIXgpRw5f/ +dk4jz4rVS2hr210y7kURL89xlV2XjgnVot3O842yNN/FFt/tp5aBrnn6fX7zVTn1Yku ANYw== X-Forwarded-Encrypted: i=1; AJvYcCU088JirTPZo4HsLE+9DJHuGMw2dL59YfP5COef9j/5vmGsBh6F8NEJikkI8MiTE2HNzImm6dZ5/lUJzjzjZUpqFENLFkWT9fnN3YED X-Gm-Message-State: AOJu0Yx48d2i9HWkfMhhmSBX3OyYGySewCRqZLRXoqAUjdhq04aRjGVP 3jrjieFyIPugExGHdwKbdKV1rcSrvIdHHy0seYocdNmiiLDafSSPjpCdAmoTDPsC03oHrl/KJUT gDQ+uBzzb5xxo/gGEGVq3ooW0g/T986uC5Di0MQ== X-Received: by 2002:a0d:d947:0:b0:604:9cad:8c23 with SMTP id b68-20020a0dd947000000b006049cad8c23mr1308248ywe.11.1707994880752; Thu, 15 Feb 2024 03:01:20 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240213051716.6596-1-sh043.lee@samsung.com> <000001da5faa$d34e1600$79ea4200$@samsung.com> In-Reply-To: <000001da5faa$d34e1600$79ea4200$@samsung.com> From: Ulf Hansson Date: Thu, 15 Feb 2024 12:00:44 +0100 Message-ID: Subject: Re: [PATCH] mmc: sd: Add a variable to check a faulty device To: =?UTF-8?B?7J207Iq57Z2s?= Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, avri.altman@wdc.com, grant.jung@samsung.com, jt77.jang@samsung.com, dh0421.hwang@samsung.com, junwoo80.lee@samsung.com, jangsub.yi@samsung.com, cw9316.lee@samsung.com, sh8267.baek@samsung.com, wkon.kim@samsung.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 15 Feb 2024 at 02:03, =EC=9D=B4=EC=8A=B9=ED=9D=AC wrote: > > > -----Original Message----- > > From: Ulf Hansson > > Sent: Wednesday, February 14, 2024 8:27 PM > > To: Seunghui Lee > > Cc: linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org; > > gregkh@linuxfoundation.org; avri.altman@wdc.com; grant.jung@samsung.com= ; > > jt77.jang@samsung.com; dh0421.hwang@samsung.com; junwoo80.lee@samsung.c= om; > > jangsub.yi@samsung.com; cw9316.lee@samsung.com; sh8267.baek@samsung.com= ; > > wkon.kim@samsung.com > > Subject: Re: [PATCH] mmc: sd: Add a variable to check a faulty device > > > > On Tue, 13 Feb 2024 at 06:13, Seunghui Lee wrot= e: > > > > > > In mobile devices, suspend/resume situations are frequent. > > > In the case of a defective SD card in which initialization fails, > > > unnecessary initialization time is consumed for each resume. > > > A field is needed to check that SD card initialization has failed on > > > the host. It could be used to remove unnecessary initialization. > > > > It's not clear to me, under what circumstance you want to optimize for. > > > > Is the SD card ever getting properly initialized during boot? > > > > Kind regards > > Uffe > > > We receive a lot of reports about SD card issues in the market. > There was no problem with the first time at the time of use, and there ar= e many cases where people recognize that it is not recognized later on. In = most cases, this is a problem with the SD card itself. Right. Thanks for clarifying. A follow up question from me is then, do you know more exactly *why* the SD cards encounter problems? In the past people have told me that powering on/off an SD card during system suspend/resume, too frequently, could damage the card. For non-removable cards, the card stays powered-off even after a system resume, but instead gets powered-on (and re-initialized) when there is a new request for it. In other words, if the problem is related to too frequent powering on/off the card, my advice would be to test with having the card set non-removable (the DT property for this is "non-removable"), to see if that can help. If that solves the problem, we can work towards another common solution instead. > > SD card users cannot determine whether or not an SD card is a problem, so= they should be guided in this regard. > It is necessary to distinguish whether the SD card is inserted but unreco= gnized or the SD card itself is not inserted, and if there is a field that = can check for initialization failure, it will facilitate guidance, so we co= nsidered the patch. > > The variable's usage is expected to be used through the sysfs node in the= vendor module. As Greg said, please provide the complete code. Although, I want to stress already at this point, I don't see a solution with sysfs being the correct thing to do here. The kernel should be able to manage this problem itself. [...] Kind regards Uffe