Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5953252ybi; Tue, 4 Jun 2019 15:32:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgRGMMzI5ZJLlPFWlhEvMZGaj1uz1nL19WZdSFGSMAzmLzeqBDaWL/P2JqqmNOPVE/EEb9 X-Received: by 2002:a63:445b:: with SMTP id t27mr226463pgk.56.1559687523692; Tue, 04 Jun 2019 15:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559687523; cv=none; d=google.com; s=arc-20160816; b=zzUumjYoJBnBe0tOFcoZ/mp1vOCTZDDJy8HjifsJOqRRgFMPSjC2u5p+9VUL3uFzwd hH/hUdXFoPb1LlS7KG0VvD0NWOv3E43a+48Q5muUfqgGRCs4i+XEhJfToqsa6+nqcYKv ytAhhRaIfKgam/UzVzZ7u8931XUWnf7ksTStzYF+g45srCPyAauxyDg32YKj3WY/PaXu W4Gt04hh16XVSfqeNwZ/3Y8bCAs3EQ1zTw1WTQvQRbGaQlOLN+G5Lmm7DGZjrWc5JeUm GF39Z56ApuvCu1mMb8nGrSxMBZfjJ/52p3K9v46SdUZhtXVR9C9fTiipANSWwcLLFh0o EtOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LmDCNIRDhs7DNH9NPW4xy+8J+i5MZl5x+uVtCFZTa5g=; b=rNsoH47FpBOcVYtAyNtHRrOhiRt/vvLeyN49FY3chlfxmwawJkBNv7AmwvrHfgMYSt /jhZ2f/6THR2CMS+qia2Hk9j0z8qK58Uwy9Lxq0ZDCCEch6DfRqIpcvR7R8iGzNjayzV 6nsjysjh1TC/CcWVk8J3Cf5oltvgZRzT0/lZ0nfzZZ7FKccmpdaJTvegOutj8xWRrcr7 fLpO7tBVX+1PUOyBXwIi6JxAXEzC1LWBNXC/jxwF1RejORajD5vc9uxXk8dYHC4Sp9m1 a0V08rayvBlluLIb7MHOsBWnPJOeSvhLYcdf4un2GTWSlA0lRuKIyr4lOwR9Ct6SlERg OTmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sxVPDH4y; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si22258600pgd.32.2019.06.04.15.31.47; Tue, 04 Jun 2019 15:32:03 -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=@linaro.org header.s=google header.b=sxVPDH4y; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726566AbfFDWab (ORCPT + 99 others); Tue, 4 Jun 2019 18:30:31 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32989 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbfFDWa3 (ORCPT ); Tue, 4 Jun 2019 18:30:29 -0400 Received: by mail-pg1-f194.google.com with SMTP id h17so11200415pgv.0 for ; Tue, 04 Jun 2019 15:30:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=LmDCNIRDhs7DNH9NPW4xy+8J+i5MZl5x+uVtCFZTa5g=; b=sxVPDH4yKTfJRPnVkbZ54wQ58ysVL1hfzaDD4ECK1ZYB3PTci6r3+sjVoj2lHmW1pA AxyVgqJ30L6RACIMF0z+XOHSpGmMpm7vxX09D6iqPUVhLzQ5pqTNJ1h+ASZHtuiOp4/3 G2UROw7Iuy2bKZ0EuE+MyGB8C//LUGCveyBYXkkvxzoCg+bM/M8/PZPCq548R2ehAOj9 3xhPO+FITtygmugNozKr3AKWahz91BWyY+TCRv5Ktmbo+9zR+xPjsGJkYOKz+5Kuiipr WuxcpjbIEfEN/zxdK91N2P/Ked7QePfxQ/jtygOfuYTR1y4ygVj4KmOVD6ce5eEoPuuw FPiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=LmDCNIRDhs7DNH9NPW4xy+8J+i5MZl5x+uVtCFZTa5g=; b=uix4JMnfDho1OtMygv83QAZdYzq9ZSvsMsbcWQh7QA3ezymUsG1I/O3QnVlDL4GbmT Vo50ippTfSpywGcX3fuW9e7zEjxoeqGDpUsloFg+W+opFN4zM2OPK51N7/1tAaTjYanq 81mOHAY/t6bnEqVZGw/Cvn/x2b4KJIcar9I6VAxIHf/Sq5+L5rspT2xwy5RUOA08v+Wi FQ6DvYmwMgeWYHiLz3EonjnKKnm8ldwA29QYkGppZDBDJGNGtJ7DDfpg8phs+VJqEmul RDHjsD3W9rDkkeD3F2F4zMRzlszAVchYBxYxp7++1TtkN1fhvdW34qeJMLrEd6mnW+Qp Bdog== X-Gm-Message-State: APjAAAXBFhrCEmaKGLDInGGLT7x/bJBYUmLO+wiHyXyGJi20RtresHg3 nbBpxwhogmk+rMFoECJbEIa0Yg== X-Received: by 2002:a17:90a:c38a:: with SMTP id h10mr37802679pjt.112.1559687428923; Tue, 04 Jun 2019 15:30:28 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id u5sm16516107pgp.19.2019.06.04.15.30.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 15:30:27 -0700 (PDT) Date: Tue, 4 Jun 2019 15:30:25 -0700 From: Bjorn Andersson To: "Bean Huo (beanhuo)" 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 Message-ID: <20190604223025.GD4814@minitux> References: <20190604072001.9288-1-bjorn.andersson@linaro.org> <20190604072001.9288-3-bjorn.andersson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = 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 any 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 would be similar to the handover from bootloader to kernel that we do see an issue with. [1] https://source.codeaurora.org/quic/la/kernel/msm-4.4/commit/?h=msm-4.4&id=0c82737188e2d63a08196e078e411032dbbc3b89 Regards, Bjorn