Received: by 10.213.65.68 with SMTP id h4csp336968imn; Tue, 20 Mar 2018 04:58:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELuK6lOp8A+pXLRxoeENB0mrFkYQZSDDnWI6GPbJyUBuVGU5CFAT3K+ak9kDg0Ana+v8Dlr8 X-Received: by 10.99.123.19 with SMTP id w19mr11499727pgc.405.1521547104897; Tue, 20 Mar 2018 04:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521547104; cv=none; d=google.com; s=arc-20160816; b=tyFESHFNPd192cUeIDsYJq5HA6if07hWVKk/Y5XG3Mw0e91+OFVPQ2HDFDIMFXDdgj gWAVa4KvPVhtGxI5BU/eZOlIIncgrIPUKNQOFySS9NkvWAr8wbyrUjIt0F7ZpFVf6YdL fgrX+ndCNqyMewDoz2MBnR6u0iPPtPGp0lEdbHZ39lNmH3zeTSkm5Zxa9fe4m6pPe5i7 kPJjq2T2U27y29uoqBbH5uuIIuvchu7HFgLBkiCVJGtwyUq3SLYNLUkxvRm6DzSl9ev0 3kmmIZA2Q8YF1gv2BVyfVROCu9b8+dDD3bqVvwZNDxWVGmwjHm5q54NafNLF9lMXzreL Wa7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:wdcipoutbound :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature:arc-authentication-results; bh=hmIJM0t6O0vGjq3ku+B8v2m2mOF4N0iYQnsPJOlUuOw=; b=eadpNep2VHx/itPHnEXghu/AIJ0JMchpla1TMx62NwKdJFXTB3CzF9780v+Nwr6WB6 GdRIT9BcXG4uxrTDp4FBcRqMZi0S3PISeYm9PigawGbkku09HQXEjdbtu6OhY4xMGkbD g4rA27eJuBxSXMNF1GyNXKZsmGdXHRztTbOyFlJGJ1r2IPxv8YFs9cvAQoNF4DAi9Amo KaVlHn/kuwqZY1YEixy6bl6K908mIT4Y7rX97Fg5NQZHLPqzYtoPmLFdrkW8eqMSIfeW mMuLAnQ+j10C9cECCia+w6a2FxoxcEXRcsJoSO5dic/8eX4CtDWhMS29hbtvRVeoHTJ8 annw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=En+MA9iE; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=e4l2LNWI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13-v6si1380612plp.664.2018.03.20.04.58.10; Tue, 20 Mar 2018 04:58:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=En+MA9iE; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector1-wdc-com header.b=e4l2LNWI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752887AbeCTL4Z (ORCPT + 99 others); Tue, 20 Mar 2018 07:56:25 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:49022 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751913AbeCTL4U (ORCPT ); Tue, 20 Mar 2018 07:56:20 -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=1521546980; x=1553082980; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=mavbDSoVP7JQMHvWhwm4TEYWGeMdwtfvT1IEYIEXLtQ=; b=En+MA9iERUFKf9FTMlKFhtmmc2mH2+irDgyTwi0JdNi5BKEb2EEittB+ Nydn1AukNjR6WMepEGwFpifAIKUNuk7+DhEZuZR3nSW5fVXRel7GjgW7J +lQttg6T4g3igdulI/3GvRllayIx3T2R1lBzZrxuiJxXlS91lGjkmFzWC V2mYkhg86z63NGpMqoCv2VrmXplVdEaPFqt13cHOBAwz8upnuAI2iER/P STeq3SfVphufDccXev1h6rfMfuYJ+5s9NvomhAwgZT9Zm/ruGO2dhBeuy AJ4LriLU+igx6J0Ejck3OqBZTLC/OyiLU+Kzu3oYL7Kr6Utnyqwqh6T1T w==; X-IronPort-AV: E=Sophos;i="5.48,335,1517846400"; d="scan'208";a="74644443" Received: from mail-by2nam03lp0056.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.56]) by ob1.hgst.iphmx.com with ESMTP; 20 Mar 2018 19:56:20 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hmIJM0t6O0vGjq3ku+B8v2m2mOF4N0iYQnsPJOlUuOw=; b=e4l2LNWIAOlONNzyz/CM/4cMGzhvqO4Z+1vN3kVyCMD+V4GhyoiyWtkmhHgT1MfIuurxFrxr/lvPggkXMOWXXBUErrYMpSQxi00Ftmne91HcKoOI+nMXxzuD/YUZvdAtsIKBm1cbkZUZLZP6vk7G/Eam11TNX7R1RhN6fxAzN1A= Received: from MWHPR04MB1137.namprd04.prod.outlook.com (10.173.51.151) by MWHPR04MB0881.namprd04.prod.outlook.com (10.174.174.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.588.14; Tue, 20 Mar 2018 11:56:15 +0000 Received: from MWHPR04MB1137.namprd04.prod.outlook.com ([fe80::1c41:512e:796b:69e4]) by MWHPR04MB1137.namprd04.prod.outlook.com ([fe80::1c41:512e:796b:69e4%17]) with mapi id 15.20.0588.017; Tue, 20 Mar 2018 11:56:15 +0000 From: Stanislav Nijnikov To: Adrian Hunter , Vinayak Holikatti , "Martin K. Petersen" , "James E.J. Bottomley" CC: Jaegeuk Kim , Bart Van Assche , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Szymon Mielczarek , Alim Akhtar , Alex Lemberg , Vivek Gautam Subject: RE: [PATCH V2 1/1] scsi: ufs: Add support for Auto-Hibernate Idle Timer Thread-Topic: [PATCH V2 1/1] scsi: ufs: Add support for Auto-Hibernate Idle Timer Thread-Index: AQHTv1ien8Q4vfnkhUuoRwGpeXdfpqPZAI+Q Date: Tue, 20 Mar 2018 11:56:15 +0000 Message-ID: References: <1521446478-12656-1-git-send-email-adrian.hunter@intel.com> <1521446478-12656-2-git-send-email-adrian.hunter@intel.com> In-Reply-To: <1521446478-12656-2-git-send-email-adrian.hunter@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Stanislav.Nijnikov@wdc.com; x-originating-ip: [212.25.79.133] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;MWHPR04MB0881;20:3ZbcLNY1pLJ+XxznN9HTjVEO0ieLFU6do/G+bFoMMlEJZTw9JA0hqqoTn2hG6wctPUn5kBUzvKqvZ7B3UP0b98WPotsDzX4o5K5681PIKoSPqrFLE5b39ahCqw8A4x2uzjHd6X2cuTqAyNJrWG9EF50tdhM9zAvIQdvUhxLyEyk= x-ms-exchange-antispam-srfa-diagnostics: SOS;SOR; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: aa3aeffe-6556-4f56-6a1c-08d58e5995ab x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:MWHPR04MB0881; x-ms-traffictypediagnostic: MWHPR04MB0881: wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(85827821059158)(104084551191319)(146099531331640)(7411616537696)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93001095)(3231221)(944501244)(52105095)(6055026)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(20161123564045)(6072148)(201708071742011);SRVR:MWHPR04MB0881;BCL:0;PCL:0;RULEID:;SRVR:MWHPR04MB0881; x-forefront-prvs: 061725F016 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(396003)(39860400002)(346002)(366004)(376002)(39380400002)(50944005)(13464003)(189003)(199004)(2900100001)(59450400001)(66066001)(53936002)(6246003)(478600001)(81156014)(72206003)(3280700002)(25786009)(6116002)(3846002)(106356001)(39060400002)(2906002)(4326008)(186003)(5250100002)(8676002)(74316002)(6506007)(110136005)(54906003)(105586002)(7416002)(33656002)(102836004)(305945005)(53546011)(55016002)(26005)(9686003)(2950100002)(229853002)(7736002)(316002)(5660300001)(6436002)(8936002)(68736007)(14454004)(81166006)(76176011)(97736004)(99286004)(7696005)(575784001)(86362001)(3660700001);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR04MB0881;H:MWHPR04MB1137.namprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; x-microsoft-antispam-message-info: CFVZg+eT9LHGvoYAc82t01ufqAt8wE+v3QGfsU99c9v57EW5KQ20vX+0zZGbOHyGMnbNM06SM8tqiSLa/e4gsica4eeNXhITS78zX+1MNJcpS3C8srWTt436UWPb6VYiaZb3HqlPTNJ8GWxXg5V55dnsmhNJMgOlevK5CnNxM8q7OH4dh/nP9OoUR4Tjh+o4UT4PcIRkAB47pf/qEumJrSj2DicymJJYSeFIang9/2EFRhCs/KT/mvm+9xdq0i+scBQCjJ8BnnChotmLXEaLZn31/qsaR2wb8xtIklCvYnCGCjPC8c3JKPusPmoXaEuAhiZAy/cHP2xQkjqJNcw9jg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: aa3aeffe-6556-4f56-6a1c-08d58e5995ab X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Mar 2018 11:56:15.5815 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR04MB0881 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Adrian Hunter [mailto:adrian.hunter@intel.com] > Sent: Monday, March 19, 2018 10:01 AM > To: Vinayak Holikatti ; Martin K. Petersen > ; James E.J. Bottomley > > Cc: Stanislav Nijnikov ; Jaegeuk Kim > ; Bart Van Assche ; linux- > scsi@vger.kernel.org; linux-kernel@vger.kernel.org; Szymon Mielczarek > ; Alim Akhtar > ; Alex Lemberg ; > Vivek Gautam > Subject: [PATCH V2 1/1] scsi: ufs: Add support for Auto-Hibernate Idle Ti= mer >=20 > UFS host controllers may support an autonomous power management > feature called the Auto-Hibernate Idle Timer. The timer is set to the num= ber > of microseconds of idle time before the UFS host controller will > autonomously put the link into Hibernate state. That will save power at t= he > expense of increased latency. Any access to the host controller interface > registers will automatically put the link out of Hibernate state. So once > configured, the feature is transparent to the driver. >=20 > Expose the Auto-Hibernate Idle Timer value via SysFS to allow users to > choose between power efficiency or lower latency. Set a default value of > 150 ms. >=20 > Signed-off-by: Adrian Hunter > --- > Documentation/ABI/testing/sysfs-driver-ufs | 15 ++++++ > drivers/scsi/ufs/ufs-sysfs.c | 77 > ++++++++++++++++++++++++++++++ > drivers/scsi/ufs/ufshcd.c | 26 ++++++++++ > drivers/scsi/ufs/ufshcd.h | 3 ++ > drivers/scsi/ufs/ufshci.h | 7 +++ > 5 files changed, 128 insertions(+) >=20 > diff --git a/Documentation/ABI/testing/sysfs-driver-ufs > b/Documentation/ABI/testing/sysfs-driver-ufs > index 83735f79e572..a4142329cc34 100644 > --- a/Documentation/ABI/testing/sysfs-driver-ufs > +++ b/Documentation/ABI/testing/sysfs-driver-ufs > @@ -1,3 +1,18 @@ > +What: /sys/bus/*/drivers/ufshcd/*/auto_hibern8 > +Date: February 2018 > +Contact: linux-scsi@vger.kernel.org > +Description: > + This file contains the auto-hibernate idle timer setting of a > + UFS host controller. A value of '-1' means auto-hibernate is > not > + supported. A value of '0' means auto-hibernate is not > enabled. > + Otherwise the value is the number of microseconds of idle > time > + before the UFS host controller will autonomously put the link > + into hibernate state. That will save power at the expense of > + increased latency. Note that the hardware supports 10-bit > values > + with a power-of-ten multiplier which allows a maximum > value of > + 102300000. Refer to the UFS Host Controller Interface > + specification for more details. > + > What: > /sys/bus/platform/drivers/ufshcd/*/device_descriptor/device_type > Date: February 2018 > Contact: Stanislav Nijnikov > diff --git a/drivers/scsi/ufs/ufs-sysfs.c b/drivers/scsi/ufs/ufs-sysfs.c = index > 4ff9e0b7eba1..17ad661b1cb5 100644 > --- a/drivers/scsi/ufs/ufs-sysfs.c > +++ b/drivers/scsi/ufs/ufs-sysfs.c > @@ -3,6 +3,7 @@ >=20 > #include > #include > +#include > #include >=20 > #include "ufs.h" > @@ -117,12 +118,87 @@ static ssize_t spm_target_link_state_show(struct > device *dev, > ufs_pm_lvl_states[hba- > >spm_lvl].link_state)); > } >=20 > +static void ufshcd_auto_hibern8_update(struct ufs_hba *hba, u32 ahit) { > + unsigned long flags; > + > + if (!(hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT)) > + return; > + > + spin_lock_irqsave(hba->host->host_lock, flags); > + if (hba->ahit =3D=3D ahit) > + goto out_unlock; > + hba->ahit =3D ahit; > + if (!pm_runtime_suspended(hba->dev)) > + ufshcd_writel(hba, hba->ahit, > REG_AUTO_HIBERNATE_IDLE_TIMER); > +out_unlock: > + spin_unlock_irqrestore(hba->host->host_lock, flags); } > + > +/* Convert Auto-Hibernate Idle Timer register value to microseconds */ > +static int ufshcd_ahit_to_us(u32 ahit) { > + int timer =3D FIELD_GET(UFSHCI_AHIBERN8_TIMER_MASK, ahit); > + int scale =3D FIELD_GET(UFSHCI_AHIBERN8_SCALE_MASK, ahit); > + > + for (; scale > 0; --scale) > + timer *=3D UFSHCI_AHIBERN8_SCALE_FACTOR; > + > + return timer; > +} > + > +/* Convert microseconds to Auto-Hibernate Idle Timer register value */ > +static u32 ufshcd_us_to_ahit(unsigned int timer) { > + unsigned int scale; > + > + for (scale =3D 0; timer > UFSHCI_AHIBERN8_TIMER_MASK; ++scale) > + timer /=3D UFSHCI_AHIBERN8_SCALE_FACTOR; > + > + return FIELD_PREP(UFSHCI_AHIBERN8_TIMER_MASK, timer) | > + FIELD_PREP(UFSHCI_AHIBERN8_SCALE_MASK, scale); } > + > +static ssize_t auto_hibern8_show(struct device *dev, > + struct device_attribute *attr, char *buf) { > + struct ufs_hba *hba =3D dev_get_drvdata(dev); > + int timer =3D -1; > + > + if (hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT) > + timer =3D ufshcd_ahit_to_us(hba->ahit); I think it's better to return EOPNOTSUPP when the feature is not supported = than to show "-1". > + > + return snprintf(buf, PAGE_SIZE, "%d\n", timer); } > + > +static ssize_t auto_hibern8_store(struct device *dev, > + struct device_attribute *attr, > + const char *buf, size_t count) > +{ > + struct ufs_hba *hba =3D dev_get_drvdata(dev); > + unsigned int timer; > + > + if (!(hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT)) > + return -EOPNOTSUPP; > + > + if (kstrtouint(buf, 0, &timer)) > + return -EINVAL; > + > + if (timer > UFSHCI_AHIBERN8_MAX) > + return -EINVAL; > + > + ufshcd_auto_hibern8_update(hba, ufshcd_us_to_ahit(timer)); > + > + return count; > +} > + > static DEVICE_ATTR_RW(rpm_lvl); > static DEVICE_ATTR_RO(rpm_target_dev_state); > static DEVICE_ATTR_RO(rpm_target_link_state); > static DEVICE_ATTR_RW(spm_lvl); > static DEVICE_ATTR_RO(spm_target_dev_state); > static DEVICE_ATTR_RO(spm_target_link_state); > +static DEVICE_ATTR_RW(auto_hibern8); >=20 > static struct attribute *ufs_sysfs_ufshcd_attrs[] =3D { > &dev_attr_rpm_lvl.attr, > @@ -131,6 +207,7 @@ static ssize_t spm_target_link_state_show(struct > device *dev, > &dev_attr_spm_lvl.attr, > &dev_attr_spm_target_dev_state.attr, > &dev_attr_spm_target_link_state.attr, > + &dev_attr_auto_hibern8.attr, > NULL > }; >=20 > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index > 3abcd31646eb..facee2b97926 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -41,6 +41,7 @@ > #include > #include > #include > +#include > #include "ufshcd.h" > #include "ufs_quirks.h" > #include "unipro.h" > @@ -3708,6 +3709,18 @@ static int ufshcd_uic_hibern8_exit(struct ufs_hba > *hba) > return ret; > } >=20 > +static void ufshcd_auto_hibern8_enable(struct ufs_hba *hba) { > + unsigned long flags; > + > + if (!(hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT) || !hba- > >ahit) > + return; > + > + spin_lock_irqsave(hba->host->host_lock, flags); > + ufshcd_writel(hba, hba->ahit, REG_AUTO_HIBERNATE_IDLE_TIMER); > + spin_unlock_irqrestore(hba->host->host_lock, flags); } > + > /** > * ufshcd_init_pwr_info - setting the POR (power on reset) > * values in hba power info > @@ -6307,6 +6320,9 @@ static int ufshcd_probe_hba(struct ufs_hba *hba) > /* UniPro link is active now */ > ufshcd_set_link_active(hba); >=20 > + /* Enable Auto-Hibernate if configured */ > + ufshcd_auto_hibern8_enable(hba); > + > ret =3D ufshcd_verify_dev_init(hba); > if (ret) > goto out; > @@ -7391,6 +7407,10 @@ static int ufshcd_resume(struct ufs_hba *hba, > enum ufs_pm_op pm_op) >=20 > /* Schedule clock gating in case of no access to UFS device yet */ > ufshcd_release(hba); > + > + /* Enable Auto-Hibernate if configured */ > + ufshcd_auto_hibern8_enable(hba); > + > goto out; >=20 > set_old_link_state: > @@ -7834,6 +7854,12 @@ int ufshcd_init(struct ufs_hba *hba, void > __iomem *mmio_base, unsigned int irq) > UFS_SLEEP_PWR_MODE, > UIC_LINK_HIBERN8_STATE); >=20 > + /* Set the default auto-hiberate idle timer value to 150 ms */ > + if (hba->capabilities & MASK_AUTO_HIBERN8_SUPPORT) { > + hba->ahit =3D FIELD_PREP(UFSHCI_AHIBERN8_TIMER_MASK, > 150) | > + FIELD_PREP(UFSHCI_AHIBERN8_SCALE_MASK, 3); > + } > + > /* Hold auto suspend until async scan completes */ > pm_runtime_get_sync(dev); >=20 > diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h index > deb3c5d382e9..8110dcd04d22 100644 > --- a/drivers/scsi/ufs/ufshcd.h > +++ b/drivers/scsi/ufs/ufshcd.h > @@ -531,6 +531,9 @@ struct ufs_hba { > struct device_attribute spm_lvl_attr; > int pm_op_in_progress; >=20 > + /* Auto-Hibernate Idle Timer register value */ > + u32 ahit; > + > struct ufshcd_lrb *lrb; > unsigned long lrb_in_use; >=20 > diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h index > 1a1b5d9fe514..bb5d9c7f3353 100644 > --- a/drivers/scsi/ufs/ufshci.h > +++ b/drivers/scsi/ufs/ufshci.h > @@ -86,6 +86,7 @@ enum { > enum { > MASK_TRANSFER_REQUESTS_SLOTS =3D 0x0000001F, > MASK_TASK_MANAGEMENT_REQUEST_SLOTS =3D 0x00070000, > + MASK_AUTO_HIBERN8_SUPPORT =3D 0x00800000, > MASK_64_ADDRESSING_SUPPORT =3D 0x01000000, > MASK_OUT_OF_ORDER_DATA_DELIVERY_SUPPORT =3D 0x02000000, > MASK_UIC_DME_TEST_MODE_SUPPORT =3D 0x04000000, > @@ -119,6 +120,12 @@ enum { > #define MANUFACTURE_ID_MASK UFS_MASK(0xFFFF, 0) > #define PRODUCT_ID_MASK UFS_MASK(0xFFFF, 16) >=20 > +/* AHIT - Auto-Hibernate Idle Timer */ > +#define UFSHCI_AHIBERN8_TIMER_MASK GENMASK(9, 0) > +#define UFSHCI_AHIBERN8_SCALE_MASK GENMASK(12, 10) > +#define UFSHCI_AHIBERN8_SCALE_FACTOR 10 > +#define UFSHCI_AHIBERN8_MAX (1023 * 100000) > + > /* > * IS - Interrupt Status - 20h > */ > -- > 1.9.1 Please fix all checkpatch errors. Regards Stas