Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2274862ybb; Fri, 27 Mar 2020 02:25:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtI2fz4Gi2ZtHLXO59b4ExPicd+n7ktz+G9A1zQIKLm7bYvOz42Uqmv7QFlS2F9lO7c9p0G X-Received: by 2002:aca:ebca:: with SMTP id j193mr3176472oih.124.1585301114349; Fri, 27 Mar 2020 02:25:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1585301114; cv=pass; d=google.com; s=arc-20160816; b=y1pkXXvKlwm0ZkfvbZCZ39ab6+PGKmqqvd5PMnWfOfRJpkei9wi48fcJsIVp3coYdt 0cs1HN8NDcG5Yc9lP4iSMTOFWKV/tC9PgoczSGyN2Jiec4nwZy3S7hEd09k/oRoOqwg/ S97ttCE0qEHJet5vzmQ9lL4QP7QT9iDpFKPLCiwTTzik+SD8A+Ly/fF4wEbce0G9CU2h nRF5x45FMDI+Dnyjl5Saj90t7v0ZFMZHLEMhyADuhioHpwLU3Br5tJkgZFvmQwXshpm1 Z5m0EeZw0P7KLnXXVBuVAMy7qji04j4gJXtVkxRfR9+NvIA/LViB6c45HLGSWe3RboAU Pqcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :wdcipoutbound:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from:dkim-signature:ironport-sdr:dkim-signature; bh=mNQ1BYUdVc5K/V95K01VyKYqIl9Wxp3HozvKdePhMBU=; b=Yi+z7r2ykKkWiGi3VyWQ3fQiRYA9jgDs9X0/zTG26p14tylXu2Dp691VTWzDKKTXhP v0gJ1ONL1FxZiuQ6QZA4r5t7i4/J3RuGaEDKcBxH0TxFuysxk6JmcILEbyQ7nnJBGV1X ZdO3Aoqg/wrAmK7N/f0iuALrPnh5Dspnvt8pCOswGe5P4/tp1xMxtJ/qYfhQpl4/ZWAs dIFhUYFKju4E17nxRbl5jqr7E7uDJ4C58FJWqaR1gDuioMqi2KTgyIF5KmHStfJUGw6i VAkk3cmvJOEK1czvC6ac7Gmb9B1/iZOH5NQhIXx99i513GzHvu+IYCaU9tcJA6gFw6rj qVig== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b="H/j0JU84"; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=DxMuYOju; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si2104129oig.118.2020.03.27.02.25.01; Fri, 27 Mar 2020 02:25:14 -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="H/j0JU84"; dkim=pass header.i=@sharedspace.onmicrosoft.com header.s=selector2-sharedspace-onmicrosoft-com header.b=DxMuYOju; arc=pass (i=1 spf=pass spfdomain=wdc.com dkim=pass dkdomain=wdc.com dmarc=pass fromdomain=wdc.com); 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727801AbgC0JXK (ORCPT + 99 others); Fri, 27 Mar 2020 05:23:10 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:27503 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727652AbgC0JXJ (ORCPT ); Fri, 27 Mar 2020 05:23:09 -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=1585301009; x=1616837009; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=mNQ1BYUdVc5K/V95K01VyKYqIl9Wxp3HozvKdePhMBU=; b=H/j0JU84063i4Bh8whUUMzApD/wDUd0IZUbt/Lc06ZnGmsQtWOEHnd9F qnLUY4RVgWAWzDfcqL9axRsNYAOdJTY5yuSE9j9o/jEuRsup3jxgWj0q2 NxJHLe63kzyXjc5s4Xf8UG2VoQzHHzOvSkk2pV14yOn6AGZg9N8qKRv0B zUIufdI3ACrHH+DMp0boNsQcuxNFoMfZvjgCTV82yLYyxlR0yQSIe5ptC kbwESGqJspFaasuNS8ZER56TrP5JEThJIb1YCQtn1uA+RwC1l+oVYrcX/ dI3UbD/4IweB54araPlDsLVFEBOV8xs02cgfZi8JSDKA0MlGFZ0eL+7eX g==; IronPort-SDR: SBohh3zQ8ZHpbHeKlods0yKvt0GOCuL/IZja0t9g54s2mcmkE6HpfgYILH9nyfQFvuG0vLQ5mh tE6n3Foa2STlqo2ud8imr3wmlOYyB9LfmKUkuFxB7KDQzSDCFpy0dfLwsfRCMtcPQ4LtPAbAXa r/ikkr7rtjOFnLCBIIcVzv0cCIwXqGNlbnULu8k5mfWakc0kTnX6o7upz0eTRUnSQwkSD1CU9y 8Q0Vvt8oPG3e1AuVbQNL1obI8vSEI1vvbSLNvi8ye8vW/LmJVYbMoHmG0qExjLi4l/oEIXrtpN aPw= X-IronPort-AV: E=Sophos;i="5.72,311,1580745600"; d="scan'208";a="235910982" Received: from mail-cys01nam02lp2055.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([104.47.37.55]) by ob1.hgst.iphmx.com with ESMTP; 27 Mar 2020 17:23:26 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZASq4tjdP7UgF3YzRG3BppYNqjGopjWq4Zlbq+gOdPTjzdY3dI+r6muQqL2IEdoEZgzV0Um9CXWPjm8GbW77xQ67crQoqQoHQAv8mZn1gAj3ZJnTRYU7uSubWXFm/0ODeW0lq3+bXNMIJa7Gr0rydrHJZis/OKbFvgAivNbx0wtcsrVIExeJqTIkhSvOTn2nb1ngGKArgFbTe34sQSNebL5cL9g94bBBUuP3TBTM/reLpdQ+PCFxJ5zUqKc4Rpu9MinmswSrJUQlmJkG9qIAM6BaSr0KX9APLPZL2Su7YAUCec/hNgyAkYG1yWh68jbWh26AT1uQPByjNscBgw9Adg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mNQ1BYUdVc5K/V95K01VyKYqIl9Wxp3HozvKdePhMBU=; b=TuGty5oReKL9baFXWGdqYYIo5pVipJFf0zCcwVusO8Xz4h0XcfB3l9ljdoDWA4pIuYwmecKXbJUfeJUkKWZBg8nVN2322C7TatDknkOy/HIGk3d3YHmv5usHxGlvaD9yXZmdcqPa/VCbXWSk5cr/hE33m+Vo/gm3uKjNusopKLV5QwH7/l4BT/qGre2yMRYI9I1lISJXBCCFBX0G/BA4S56A75713udWxXPgjDrFfiYLjTy3uuOFs+JNAH9ki/NVTc3L/5H6eUQtxg0NustYnwgVZG3MMtSO6+rFSHGQ9gq064M9Y2KTcU6/9oJmB9zLAy27R5ir+IQxS/2L7mNemw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mNQ1BYUdVc5K/V95K01VyKYqIl9Wxp3HozvKdePhMBU=; b=DxMuYOjuATdbzpYYx4WPYJUEE5SB0cynG/gSiZAeQF5R5D7GH8zC/5jgXyxk4mCZxVx2etQTa50/evkfNMGY3BGoqFtK301PSqnonRFQNIX2uyGeLfuISvWijjgWDrzyc2nqAqByJtu9LDoUiOUgrKCh9Z05FyuOSBscfi4gnt8= Received: from SN6PR04MB4640.namprd04.prod.outlook.com (2603:10b6:805:a4::19) by SN6PR04MB4061.namprd04.prod.outlook.com (2603:10b6:805:47::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.22; Fri, 27 Mar 2020 09:23:06 +0000 Received: from SN6PR04MB4640.namprd04.prod.outlook.com ([fe80::3877:5e49:6cdd:c8b]) by SN6PR04MB4640.namprd04.prod.outlook.com ([fe80::3877:5e49:6cdd:c8b%5]) with mapi id 15.20.2856.019; Fri, 27 Mar 2020 09:23:06 +0000 From: Avri Altman To: Stanley Chu , "linux-scsi@vger.kernel.org" , "martin.petersen@oracle.com" , "alim.akhtar@samsung.com" , "jejb@linux.ibm.com" CC: "beanhuo@micron.com" , "asutoshd@codeaurora.org" , "cang@codeaurora.org" , "matthias.bgg@gmail.com" , "bvanassche@acm.org" , "linux-mediatek@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "kuohong.wang@mediatek.com" , "peter.wang@mediatek.com" , "chun-hung.wu@mediatek.com" , "andy.teng@mediatek.com" Subject: RE: [PATCH v2 2/2] scsi: ufs-mediatek: add error recovery for suspend and resume Thread-Topic: [PATCH v2 2/2] scsi: ufs-mediatek: add error recovery for suspend and resume Thread-Index: AQHWA4BdOgNxOg5M0Ea6RKkNMXHuBKhcKyNg Date: Fri, 27 Mar 2020 09:23:05 +0000 Message-ID: References: <20200326150747.11426-1-stanley.chu@mediatek.com> <20200326150747.11426-3-stanley.chu@mediatek.com> In-Reply-To: <20200326150747.11426-3-stanley.chu@mediatek.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=Avri.Altman@wdc.com; x-originating-ip: [2a00:a040:188:9054:d519:d5ac:475d:740a] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 1cf26652-61a5-4582-82e3-08d7d230750c x-ms-traffictypediagnostic: SN6PR04MB4061: x-microsoft-antispam-prvs: wdcipoutbound: EOP-TRUE x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 0355F3A3AE x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR04MB4640.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(4636009)(346002)(366004)(39860400002)(376002)(396003)(136003)(6506007)(66476007)(9686003)(66946007)(66446008)(86362001)(4744005)(110136005)(52536014)(66556008)(186003)(64756008)(7696005)(316002)(5660300002)(76116006)(4326008)(2906002)(54906003)(55016002)(478600001)(8676002)(33656002)(81166006)(71200400001)(15650500001)(8936002)(7416002)(81156014);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FB99npHAb/A/B0ZOhEgCDDOxIxrykPzJCMMlN0v03/DgkRKpqyMVqPbo9befSSpvunB8yLjEkxBCXdjrxUByIQEuwfw/EC3/CQmAEGxfV/Ol8bNZDHNkRmiyhL2jv02dW2Tqu5YMzPGqBa2a1F0qfMgxYqA3/F9G2xrgGS+5XZAvXxMhd/eodid/0g0SEuXYwyc6p1Pz4MZGwG1FnpxHaU0kbbzji9YHDUPJXY3REV5EfZx0h4nthxOtcGLNzdyW7H6AUsnVnjCNAEzmOTPV+9tMcLfdcnQm3TQNk8f9FnK8+R++jdMQVG3Z18oPty0jntdmwkSz5iP8td5DOHjuyi59O7tI2VLGDbRJ7FN5/PhLMzz8x9peMlWgxshpv0u0wFsqL5FD30DtRZaksEOL8m4T7fPGORm+COYFh/1x7fsTywTI5DcvSNaSMK8i9gwS x-ms-exchange-antispam-messagedata: 3aPsCig9xS1X1VouMycVfzyAPADgSiV6SuqBi3+MPoAA9J7IOkiCs80p3hs5jNeEkfKcz59kOcaeXi4No6rrcVS03oA5HzgH4RnqQnEr5/uJkoglqib9AAqe56PU7lCnfu2/zPHr0uika4pMCwAzG8mx04tbhPFOD1XCOKm9b7qWWTJE4UVg+bnazNI28nVcKNObnLacf30Oy2NGdjxCyQ== x-ms-exchange-transport-forked: True 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: 1cf26652-61a5-4582-82e3-08d7d230750c X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Mar 2020 09:23:05.8802 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: prFj0KJF3ihxTNTmQ0HOUG5pj41snkO2ALLOrglxfzLk/q/jDXV5bPzi5bRAS/mONUL1WMD8HQOzkcSzSGOMNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB4061 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org =20 >=20 > Once fail happens during suspend and resume flow if the desired low > power link state is H8, link recovery is required for MediaTek UFS > controller. >=20 > For resume flow, since power and clocks are already enabled before > invoking vendor's resume callback, simply using ufshcd_link_recovery() > inside callback is fine. >=20 > For suspend flow, the device power enters low power mode or is disabled > before suspend callback, thus ufshcd_link_recovery() can not be directly > used in callback. To leverage host reset flow during ufshcd_suspend(), > set link as off state enforcedly=20 Not sure this is a proper English, but I'm not sure. to let ufshcd_host_reset_and_restore() > be executed by ufshcd_suspend(). >=20 > Signed-off-by: Stanley Chu Reviewed-by: Avri Altman