Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp258901pxb; Wed, 8 Sep 2021 23:43:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv7CXSYhf6vND5ptHoNN++PcQd/UTENOfd6rNCoBnpQN9IU1Q8zTCtOoPzfnDGI+RUef6+ X-Received: by 2002:a02:cc59:: with SMTP id i25mr1465420jaq.125.1631169797170; Wed, 08 Sep 2021 23:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631169797; cv=none; d=google.com; s=arc-20160816; b=E/ZuBu9I2YMUZ/MbZ6J6IcYsL8urBYvo2WR+s/XxLipT4D4CE8vhSD22OOLK7t4Rct UKkTI3CfbrDDJ87gi8Hv0PRCLd1QaOkFuJPayhXljAg612vOrYnki2y4Qsby9f8sY6dM TLU1NvQzmxi0+FsuZ7TP23pbzYwkqo8GAM1ADUbCYXuoQi0qk+cnjz6N0OPYirYSdQ+7 K5SCFnIf5ugBe1Y+uw9Z1hZwc3BR7C8dPGIQpowyJbFMo0DZuNissHyKYGE+nxs7FVez Ew/rM/7C3W/CCJD6rYsoigob8yDO904pTeFFPyKkoIy5jquG2D0Riv/jH0E2i6U/if7w 3gsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:wdcironportexception :ironport-sdr:ironport-sdr:dkim-signature; bh=DABCf8c4z+myarKI0OaMGvCo1vfktedIsK2K6Ptmpm4=; b=dPWM3VC0y3YCNUuNvXilreL1SlSprkMpLk0pE7Q4/GGIAYKB77JIWNfknV6ER4LKkN rBoGkD+IUJK8TY2BI+yvsCrtGaCsC1wEirKvalOeBY+ch7Wqk+PXlJdUg5WZ1KWy9JJx i6se1+AqDgmlGbL1vULQh8VhAurFGGmTLBvurHBZaWGiMCSX90UamLpeYDc9z/Q1ix6s 75iWrwDHh/H2ZnboCRGqRlPyysdk4H/nVrPsPspSYn0rHlyJUiCo8YxrrutUNPVAKU3U MSknE/skzek9vtrjrggDqy3MGmx/phJSHTMSnBjeZcpXQykZO2BzXVlddF7R6kyWbn5l xjLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=V8zngHYF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m62si740227ioa.15.2021.09.08.23.43.05; Wed, 08 Sep 2021 23:43:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=V8zngHYF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352555AbhIIGgT (ORCPT + 99 others); Thu, 9 Sep 2021 02:36:19 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:25535 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352517AbhIIGgS (ORCPT ); Thu, 9 Sep 2021 02:36:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1631169309; x=1662705309; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=6Szz45xnYb/E2zF+G7svDhiYLqm5PULqroK9cBEAk4g=; b=V8zngHYF2emnnKckI2QY42sHltcacMuwxTKyl01koi9Snjma6JtDuFTT /OMpvFXwXEIebU6OlRnBIBBPWv3hQ+YJSnvjgiIa9Bll8IDEAPmcW+Hiu g5HQVkDPkpiRRDK1HabSFCvtiLvbPDx1dfEFR19Vjn0Iif8SatyRnIHsG 9Slte4l94tciglFbWakNi/EpL8P2tC+d5Vw19CBPLTRPZYCsY4eqHuZ01 M/+xktysHfGOrfBTLLRhdrP9idOmdi3PAe/5O+U+/s6B077YZPpOTWGwJ bMHQbu4BpAzQhkNQsCDBr1DvhOkh7BMTTUVRgd/R6/NbGA14PbuzH8w21 w==; X-IronPort-AV: E=Sophos;i="5.85,279,1624291200"; d="scan'208";a="179551093" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 09 Sep 2021 14:35:07 +0800 IronPort-SDR: 4U6oN3BLV1OfBLZaIQheGHFHkv15ilcjViaZeSqrrFQo7TiihfQt/Z4tRUszSx5GIAIcor9ZEF Zl8mziT6v2jr6+pIL4drUscUeF2Yl7HQYKyxgBxfQL5l2oE90etRxZKzqbDQ6WxJQ+0v9CHVc+ Tk2n3WO9nIC3KuJA/fd6UCRDF/dkkw9ekMU4DP4AiDJj5evpOdjfQbqkZOWlYicNqR9s7j1U0v c38k8GuTKQOygbsoWCsDSF00bzFBNz7OI77QzZiaIKjT2nVoFfGKVLVRliw4XANfqYvyI2Jh2G b8WVvgyDAc7Bd+qf5JKTPOf9 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2021 23:11:43 -0700 IronPort-SDR: TxjQRD4kOHIMHWI+jbQmptf1qaZZilWCwiv54Waw2WZ+5hH6CFDl4j4PWQtzVAKnu60temN9Rb Vk3ShzcvXAzqwcL3oD+ME2xkXxrxATU3W+cLO1Y5g0twoddaPZn2/RJ7Rv9TlYtPaBr3kn4+kR 2uZBwRc5Wq2fYUiERJKvgVAFQu8OFRCHMBQ14gsjA+SYTa3X5WjZWvaDx4uI4jh+1qNYh/rcLg DjhZN9AXx7KS+ED7k7t+TIJkn9/t+yBCXw73xuCt0E5mJdRSWKec6ZykG+3Viesyd2rhzOYBG6 k0o= WDCIronportException: Internal Received: from bxygm33.sdcorp.global.sandisk.com (HELO BXYGM33.ad.shared) ([10.0.231.247]) by uls-op-cesaip02.wdc.com with ESMTP; 08 Sep 2021 23:35:04 -0700 From: Avri Altman To: "James E . J . Bottomley" , "Martin K . Petersen" Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Bart Van Assche , Adrian Hunter , Bean Huo , Guenter Roeck , Avri Altman Subject: [PATCH v2 0/2] Add temperature notification support Date: Thu, 9 Sep 2021 09:34:42 +0300 Message-Id: <20210909063444.22407-1-avri.altman@wdc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v1 -> v2: - Add a hw monitor device if both the platform & the device support it - Remove the sysfs patch: no need to duplicate /sys/class/hwmon UFS3.0 allows using the ufs device as a temperature sensor. The purpose of this optional feature is to provide notification to the host of the UFS device case temperature. It allows reading of a rough estimate (+-10 degrees centigrade) of the current case temperature, and setting a lower and upper temperature bounds, in which the device will trigger an applicable exception event. A previous attempt [1] tried a comprehensive approach. Still, it was unsuccessful. Here is a more modest approach that introduces just the bare minimum to support temperature notification. Thanks, Avri [1] https://lore.kernel.org/lkml/1582450522-13256-1-git-send-email-avi.shchislowski@wdc.com/ Avri Altman (2): scsi: ufs: Probe for temperature notification support scsi: ufs: Add temperature notification exception handling drivers/scsi/ufs/Kconfig | 10 ++ drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/ufs-hwmon.c | 180 +++++++++++++++++++++++++++++++++++ drivers/scsi/ufs/ufs.h | 8 ++ drivers/scsi/ufs/ufshcd.c | 46 +++++++++ drivers/scsi/ufs/ufshcd.h | 18 ++++ 6 files changed, 263 insertions(+) create mode 100644 drivers/scsi/ufs/ufs-hwmon.c -- 2.17.1