Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7267982ybi; Wed, 5 Jun 2019 14:20:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyK2ivAK996AItDuJzFMxGqcrvVKUyKEt2HWbYNHo4YhpU5h8hfRuQ5Vr7jzacmXeOGXMes X-Received: by 2002:a62:5487:: with SMTP id i129mr46920177pfb.68.1559769622360; Wed, 05 Jun 2019 14:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559769622; cv=none; d=google.com; s=arc-20160816; b=DdO8CPD0NFIpOyc+6g0Qv2OPC52RjdbJmkG2Gt31JEpBFsNiQS2J7KIB7Zykc8ltZ/ h99ihECeNqqy0OaD813Bvg0fTGLYbJ+CYPyLfcv1EcW1UUj7Wh5TnklYy+PocOUB0KzN lhINZL6YjHv1hClO0xaPxmEUmI1A6ZGtVMev6GnFLHp1e+6KmSJy6UY+sI7iTuLgCD9O Rld9jPFlc4NmknYH04pfnvG7yoavgYHfa2OwPDr6s5pQnkCPyEcGnTd8yAnMLV0yo8jW SJ1/Gar5pHrglXWsk4gTDjPnmMlgCINP0v4hvCRJ680IrC3zH3aljUc42XcV/ButfQwN I0nw== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=M6Zhdr1Kn/YAwbuIZrv7cOH5SdjRclBqEpShpueDq0c=; b=a0s4LW/t4oBwielAqJ5QnQc2h+n+suO1GdCrukZ3y5lJF9wwRfKwSaDWtMotz5seJd j+i2SgYJ9mbFJTMWTxO6HAAk/OLvGWFyXbRCVac5wwRpv8MB2jca68vNuB7WRI6P/Dug 3QlyL4tbMakI5yRqgmsiIpG0ISdP6s8j4XyvGK8dS+YIaRmMSWV6Zu8TxmgKAGMGYzhh 08hJHaNP7qs3y45AqqQpzxoShvS7ct5KQ2U3DseaeqA12GUCNmj1ut6YfNVLoO6PYeIx cpTQCAk+S4rqGQBXY1lp0qUl6atngDwN85UxKkYHNXS9pgdY4jREMc9QIjYqrq115Lch WFGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@micron.com header.s=selector2 header.b=CdVn2rxO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=micron.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si31368843plb.402.2019.06.05.14.20.05; Wed, 05 Jun 2019 14:20:22 -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=pass header.i=@micron.com header.s=selector2 header.b=CdVn2rxO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=micron.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726699AbfFEVR4 (ORCPT + 99 others); Wed, 5 Jun 2019 17:17:56 -0400 Received: from mail-eopbgr790059.outbound.protection.outlook.com ([40.107.79.59]:2512 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726554AbfFEVRz (ORCPT ); Wed, 5 Jun 2019 17:17:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=micron.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M6Zhdr1Kn/YAwbuIZrv7cOH5SdjRclBqEpShpueDq0c=; b=CdVn2rxOqf/JonUFGechxkMr9ga+/KcyXvxjah7aLidhkBsOydVkntx27mGxFdQm03yVFzMG5xGrysWACVOH9yRBx/kQ+uXZlo0IdspvyAhkWlJh05dRiBtBo8eGomRRaeuwwvr0DMAefnzLwMOTWabGmjoIJCsLssRMW01oxdE= Received: from BN7PR08MB5684.namprd08.prod.outlook.com (20.176.31.141) by BN7PR08MB3843.namprd08.prod.outlook.com (52.132.5.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1943.22; Wed, 5 Jun 2019 21:17:48 +0000 Received: from BN7PR08MB5684.namprd08.prod.outlook.com ([fe80::8d6c:f350:4859:e532]) by BN7PR08MB5684.namprd08.prod.outlook.com ([fe80::8d6c:f350:4859:e532%4]) with mapi id 15.20.1943.018; Wed, 5 Jun 2019 21:17:48 +0000 From: "Bean Huo (beanhuo)" To: Bjorn Andersson CC: Pedro Sousa , "James E.J. Bottomley" , "Martin K. Petersen" , Andy Gross , Linus Walleij , Rob Herring , Mark Rutland , "linux-arm-msm@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" Subject: RE: [EXT] [PATCH 2/3] scsi: ufs: Allow resetting the UFS device Thread-Topic: [EXT] [PATCH 2/3] scsi: ufs: Allow resetting the UFS device Thread-Index: AQHVGqX7mZWyymp0D0+pRLZPzmjhVqaLH8wwgAD1HYCAAXihMA== Date: Wed, 5 Jun 2019 21:17:48 +0000 Message-ID: References: <20190604072001.9288-1-bjorn.andersson@linaro.org> <20190604072001.9288-3-bjorn.andersson@linaro.org> <20190604223025.GD4814@minitux> In-Reply-To: <20190604223025.GD4814@minitux> Accept-Language: en-150, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=beanhuo@micron.com; x-originating-ip: [165.225.81.60] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4414cfc2-6c39-416b-dbfb-08d6e9fb42c1 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020);SRVR:BN7PR08MB3843; x-ms-traffictypediagnostic: BN7PR08MB3843:|BN7PR08MB3843: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 00594E8DBA x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(396003)(376002)(136003)(39860400002)(346002)(199004)(189003)(7696005)(54906003)(55236004)(71190400001)(76176011)(11346002)(6506007)(14454004)(476003)(9686003)(6436002)(2906002)(76116006)(26005)(6916009)(25786009)(71200400001)(53936002)(99286004)(7416002)(229853002)(14444005)(52536014)(81156014)(4326008)(486006)(68736007)(55016002)(66476007)(66066001)(66556008)(66446008)(74316002)(5660300002)(45080400002)(446003)(478600001)(6246003)(256004)(6116002)(86362001)(8676002)(33656002)(5024004)(6306002)(186003)(102836004)(7736002)(8936002)(316002)(305945005)(81166006)(3846002)(73956011)(66946007)(64756008);DIR:OUT;SFP:1101;SCL:1;SRVR:BN7PR08MB3843;H:BN7PR08MB5684.namprd08.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: micron.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: bB0RHptXoY0oN9gfNYpsrwZhlAj/DQvFYUapaXM0Wiztqn7J8GnbHjmFn5ukYsG0t5k8hxl6As7reDo9/Z5KmOlC2M//V0HxktAKzKki1iKF+DqPt2uOSsUvJWCoH+Sf21u1Sff5wDKuZu7fZWYc3W4r3OuehOyNE2oE8yDk+866uDBpvhYIgmguS+Xfg9jS581nCHmogupbw9QKMJ/tiCqore70uXL+77zbdMPH1iBiuxISaFHTFocEg/+jhMBi3kPbbiO/io+XSWgC1n8x/Yfc7uVRZpwHnzOqRMyhClTN6I8VVvooTIVPyAZUfqqod2EKiOUdBB0qd434Dq8IL8+OXvGvW8OXkqgAeD3CtUdIYPky3T1Iftj3L4RO+KRU0KDlkj2CofXleI+ktelCPCihWGoczsj1i5M9kcjEXaQ= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: micron.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4414cfc2-6c39-416b-dbfb-08d6e9fb42c1 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jun 2019 21:17:48.3179 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f38a5ecd-2813-4862-b11b-ac1d563c806f X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: beanhuo@micron.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR08MB3843 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Bjorn I think I should give up my preview suggestion DME_ENDPOINTRESET.req softwa= re reset, go back to your HW reset. Although SW reset can cover most of the requirement, and compatible with di= fferent vendor UFS device, for some device fatal error cases, UFS internal stuck and would not accept SW Reset. An HW = reset is expected. =20 Please go on your reset way. Thanks, //Bean >Andy Gross ; Linus Walleij ; >Rob Herring ; Mark Rutland ; >linux-arm-msm@vger.kernel.org; linux-gpio@vger.kernel.org; >devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux- >scsi@vger.kernel.org >Subject: Re: [EXT] [PATCH 2/3] scsi: ufs: Allow resetting the UFS device > >On Tue 04 Jun 01:13 PDT 2019, Bean Huo (beanhuo) wrote: >> >@@ -6159,6 +6179,9 @@ static int ufshcd_reset_and_restore(struct >> >ufs_hba >> >*hba) >> > int retries =3D MAX_HOST_RESET_RETRIES; >> > >> > do { >> >+ /* Reset the attached device */ >> >+ ufshcd_device_reset(hba); >> >+ >> >> what's problem you met, and you should reset UFS device here? could you >give more info? >> >> It is true that we don't reset UFS device in case of device fatal >> error. According to UFS host spec, Host should be device reset except >> that in addition to resetting UIC. But as so far, We didn't experience a= ny >problems result from this missing reset. >> >> We have three UFS device reset ways. Comparing to this hardware >> reset, I prefer to use DME_ENDPOINTRESET.req software reset. >> > >Hi Bean, > >Thanks for your questions. With some memories we see issues establishing >the link during bootup, so that's the purpose of issuing this reset. > >Unfortunately the downstream Qualcomm patch [1] (which I should have >remembered to attribute), does not mention why the reset during host >controller reset is needed - but I'm fairly certain that this scenario wou= ld be >similar to the handover from bootloader to kernel that we do see an issue >with. > > >[1] >https://nam01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fsource >.codeaurora.org%2Fquic%2Fla%2Fkernel%2Fmsm- >4.4%2Fcommit%2F%3Fh%3Dmsm- >4.4%26id%3D0c82737188e2d63a08196e078e411032dbbc3b89&data=3D02% >7C01%7Cbeanhuo%40micron.com%7Cf72404eb906440e1f9c408d6e93c401d%7 >Cf38a5ecd28134862b11bac1d563c806f%7C0%7C0%7C636952842324926509&a >mp;sdata=3DI%2FH7km6b34jyoUa1RVEPApfYt5uSFtHqL3%2BvV1bvryM%3D& >;reserved=3D0 > >Regards, >Bjorn