Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp412136rdb; Thu, 15 Feb 2024 04:17:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU0yDqJ0HRaFa0LH3od/RaNlY1kktJHxlLdZp4HtjUNcwfeNQS007fC9oW1VkdWHbQCzHee5r96eAdxsQRDczp5Aao0/i/VoPf0oh1fKw== X-Google-Smtp-Source: AGHT+IGY3eI9uFNuCBYWUKua3gsp23mP2f5BRHA2WCXcIdVq+bYLlgFjxf2Zi76MBH/pMxLWLqjm X-Received: by 2002:a92:c745:0:b0:363:d816:937b with SMTP id y5-20020a92c745000000b00363d816937bmr1432247ilp.3.1707999424198; Thu, 15 Feb 2024 04:17:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707999424; cv=pass; d=google.com; s=arc-20160816; b=voxtreAoUHFATiH6tQBHLc4WmxvESwdIVgQTONCpmRZuxZ5aDnGWFjQmhnelXyudK2 XMsseivJu0wu324GRpBheez+4+J0mM4BEH7H5f7eGxItwKfp0IH2oKvRc281I+ode7Eq v69lMAaHwgOzepfYCmeqUcyrk9u+O1esSEomy3rxxRRXtYdD4Zlgb+xL1ElaMAgXJHJh /sl0YkUgUZbOPnHwPdjHNn5C7H7k801kBX03SpDVKr/WwS+6x+wROS17hLs7DlygqPIY za5zdDYEFCXdpp6h6NkVZjusukequ6Rke24Mj0zUSq/bqvZvj1LJV+mSuWAkpO+JIpgD qRXA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vwl94qItoqVrqz7mmFbsbkMYQRFBSTl8SKdRwgO17i4=; fh=26uPRp0p70Zj7fuWA9YF+zAA5bPsoOjS0fd6rYrDwak=; b=KFuuKwc1NfOZxseqgW6vL9rus3xByrQ4wtsjPjotQ7eOdkUr9Bsv88OYdoQetA1Ch9 i1iEv1mG/7qD1cHRHRGEKs+IytUg3SX9MGWxUbaOzq3KvW+6I3tLLJ3VsYa14gPULwBk mKcJ8kOQHWOy6cJTn6AwT9m/S6nLDui85Xva4QCWUVHmb9k3muSvwOPHEv7zPKDc8qor nRnDXYO8h8KLLHJtuONm4FV7PhGOfDmXd+qR5dLoW+B95VfwJY7CY98MsxqGq7rYoInq h6+5HJCUBl4Rknw9LMH6kAQXh52B8C12bQAZh1/6EqWIMv9GWTFdJM768BsZskDHyrPf z6eQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LaozV3M4; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-66819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id by30-20020a056a02059e00b005dc8702f0aesi1072094pgb.291.2024.02.15.04.17.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 04:17:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LaozV3M4; arc=pass (i=1 dkim=pass dkdomain=linuxfoundation.org); spf=pass (google.com: domain of linux-kernel+bounces-66819-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66819-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.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 3EB99B372D2 for ; Thu, 15 Feb 2024 11:39:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22E5112AADB; Thu, 15 Feb 2024 11:38:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LaozV3M4" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3136453369; Thu, 15 Feb 2024 11:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707997096; cv=none; b=lRLm8QMQS8UBL+fDq0J43bwX6/l1zL1/SgHWK76LeNPg6pJelY3s9j46TExm57H3zNzQs5eMvRsN1D97px8iown0ICmi2NCAR9JKhJ/S5OMDo3HGSF0Kfvj/uZGfcyhpL6yZbLqBfMW39gmF8P47BoliHNAtLmnm1KZ6OoDCnj0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707997096; c=relaxed/simple; bh=GHH9ntFOqYLSat0txojsoaErPiI8laz9hfdGKYUor94=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ovNk9vsPNQucqC1fHKJy6MqR9rIvAwqol9vgq9eygO/RHC9ifNSDWWOohHQxalLxJdTzEy2//fOOasMhJNAjCU5xCFyFuVClr7N3xrVRFdEGGsJ/q/mdviy2zOHbt3nFNLmBIVAXWyAfejbfn0pSH0z1WCQzRXaAFDcESM7Wuzo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LaozV3M4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E029FC433F1; Thu, 15 Feb 2024 11:38:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1707997095; bh=GHH9ntFOqYLSat0txojsoaErPiI8laz9hfdGKYUor94=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LaozV3M4YiMgodRpBYvswUKFz6DkpGvwSHgf4E5Fubt5d2kQB+UhNqZOi9w/kYwi6 n1nauzXdaiHepF4M0LgzfIxns9OZNYLb6DkaNCG47b9VykIZ0zSEOm5+ZNMbodeza6 PxLU5KX4vzvF6NVjX3jvj9vmJ+v9IrDCSWrRjsus= Date: Thu, 15 Feb 2024 12:38:12 +0100 From: 'Greg KH' To: =?utf-8?B?7J207Iq57Z2s?= Cc: 'Ulf Hansson' , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.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 Subject: Re: [PATCH] mmc: sd: Add a variable to check a faulty device Message-ID: <2024021531-speech-lifting-89f6@gregkh> References: <20240213051716.6596-1-sh043.lee@samsung.com> <000001da5faa$d34e1600$79ea4200$@samsung.com> <2024021528-fretted-sustainer-2ebc@gregkh> <000001da6000$527c8650$f77592f0$@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <000001da6000$527c8650$f77592f0$@samsung.com> On Thu, Feb 15, 2024 at 08:15:45PM +0900, 이승희 wrote: > > -----Original Message----- > > From: Greg KH > > Sent: Thursday, February 15, 2024 5:07 PM > > To: 이승희 > > Cc: 'Ulf Hansson' ; linux-mmc@vger.kernel.org; > > linux-kernel@vger.kernel.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 > > Subject: Re: [PATCH] mmc: sd: Add a variable to check a faulty device Does this really belong in the body of the email? You might want a nicer email client :) > > > The variable's usage is expected to be used through the sysfs node in > > the vendor module. > > > > What "vendor module"? You need to include all of the needed code here > > please. > > > > thanks, > > > > greg k-h > > This only purpose of this variable is to identify a faulty card on host side. > > In the past, we can identify that the card is inserted or not with reading get_cd() function. > But now, most mobile devices use hybrid type of SD card tray. > If the tray is inserted, the return value of get_cd is the same whatever the SD card is inserted or not. > It can help us diagonose the status of a SD card as well. > > Here is the example of usage. > > static ssize_t status_show(struct device *dev, > struct device_attribute *attr, char *buf) > { > struct mmc_host *host = dev_get_drvdata(dev); > struct mmc_card *card = host->card; > char *status = NULL; > > if (card) > status = mmc_card_readonly(card) ? "PERMWP" : "NORMAL"; > else > status = host->init_failed ? "INITFAIL" : "NOCARD"; > > return sysfs_emit(buf, "%s\n", status); > } What will userspace do with this information? And why isn't this part of the patch you submitted? > As for the sysfs node, it should keep the path of node with or without the SD card. > That's why I mention the vendor module. What vendor module? What do you mean by vendor module? You know we can't add code to the kernel that is only used by code that is NOT in our kernel tree. You don't want us to take stuff like that, so why is it being proposed here? confused, greg k-h