Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp174351ybh; Mon, 9 Mar 2020 18:58:47 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtIM/XDKm+voxeosjjazipEJUYP6j3KYtKSFuAgI4PgcYfKi6GfZIWFacqebEf6S8W/SwTh X-Received: by 2002:aca:d11:: with SMTP id 17mr1421014oin.38.1583805527145; Mon, 09 Mar 2020 18:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583805527; cv=none; d=google.com; s=arc-20160816; b=S8ohWDfqHDUYbqyPCmfCyxD21U9h1bAEY/+uumLGjyHAf8DJ04Cj3kouKRa58lE/xw 330fN0mVnwK7Q5Ltmuu4nfxODN4QVg09t8BEeqohDLjxmf6uhSowuPVl+ZNWcQBtezxX MPkL/Rm465WIIolF/TLbdcDIwuco6hzqGu2S4lRNVQBytRXKA52/97wzduUECi2S7M/D gpa3+mHPfFZKVH71qQQcNMB2mt3CcbgtlbWBzUzQMTU8tUzFnxEB1qaKvTwNd0CNSZ9y GYOw7GhbcB85bGPsEdtf9naxj6G6Guipmdw1gXSvrq8AfpGl6LsPHYNNEUdarhtT5yB/ bLtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=qyOPcviTsbfhQO/ypGIatzcQW1kAEltFF4Vqey2P0bg=; b=tZIz5w4ZKg9lu6HF5E6bhcC12MTqfsR7NNnQ/x1dch6Gmt8pRCLOxzSHXhrj0WyN3m ofom4GilYeRPHlMhurS9EljmZDCJ5ArFr3mgbFB2fBfZPwmhrG8EpDflKXQtRwLEvpNU ZnssI8o0tjfrZsrljx+L8CYa7dq8VwrPdaouKLST9RRpcDpPpqLcnGQnXxq3VDmrwHe1 Qf8TzhUJ6S4U0gqjOohIfc36RQ8rvggPddjAf1dXlYVGRBpWa+I4+M4GPZF1fkicj/oc k6Z30EHuSXBmy/Govf52OXhtso8mrR3x/Q9CSOlNzRl6ev3oF9Ppmts0vz0u/YyI3aQB E7zg== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u24si6951967otk.287.2020.03.09.18.58.34; Mon, 09 Mar 2020 18:58:47 -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; 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 S1726480AbgCJB6R (ORCPT + 99 others); Mon, 9 Mar 2020 21:58:17 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40915 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726156AbgCJB6R (ORCPT ); Mon, 9 Mar 2020 21:58:17 -0400 Received: by mail-pl1-f193.google.com with SMTP id h11so1584064plk.7; Mon, 09 Mar 2020 18:58:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=qyOPcviTsbfhQO/ypGIatzcQW1kAEltFF4Vqey2P0bg=; b=aeEntUjxGHpxhYs1XpiPMjMYsgANMakFborTO9EJO1tPc6ym2zySzrwmjdC3AVcYPH U6Eo92U9nynWOap9haRqL5tJNyIOahJUkmMG7mVSsfB8JPIl3Xghu9at12178xJTIfHj vDRb0pOXDdBdqAXNvw3CRQQiXZpGVoo7aVS/7HJDKTGnJXjbJIUOJZkB2H81lphU78cI bT7ZMrgPxeR3SnrKHrOGuLQimAuuJjges+kOu8ddWTmW6TCY6IMelnrlF5wycU4Jbsjr BrTab00F3ESPNWFKT+ysHHnOK9QmQ/++pmeEXDL1MvY1tUE8vUF3xrCsvNPJ4WR6rcCj UzJg== X-Gm-Message-State: ANhLgQ3P/c4j2XozQTBKd78uHaHoUQcjzchUPzznl4AUUhNHPCDivuUv ng2c00X706R3pocYOEL8xhnsXvts X-Received: by 2002:a17:90b:3885:: with SMTP id mu5mr2189336pjb.25.1583805493868; Mon, 09 Mar 2020 18:58:13 -0700 (PDT) Received: from ?IPv6:2601:647:4000:d7:c0e4:71da:7a83:2357? ([2601:647:4000:d7:c0e4:71da:7a83:2357]) by smtp.gmail.com with ESMTPSA id r64sm748524pjb.15.2020.03.09.18.58.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Mar 2020 18:58:13 -0700 (PDT) Subject: Re: [PATCH v3 1/1] scsi: ufs: fix LRB pointer incorrect initialization issue To: huobean@gmail.com, alim.akhtar@samsung.com, avri.altman@wdc.com, asutoshd@codeaurora.org, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, tomas.winkler@intel.com, cang@codeaurora.org Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200309161057.9897-1-beanhuo@micron.com> <20200309161057.9897-2-beanhuo@micron.com> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbtBkVoJ/jQsi2H0vBiiCOy fmxMHIPcYxaJdXxrOG2UO4B60Y/BzE6OrPDT44w4cZA9DH5xialli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o998alUfn5XU0RQDYdwp6/kMEXMdmT oH0F0xB3SQ8WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: Date: Mon, 9 Mar 2020 18:58:11 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200309161057.9897-2-beanhuo@micron.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-03-09 09:10, huobean@gmail.com wrote: > @@ -4834,6 +4829,7 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba, > continue; > cmd = blk_mq_rq_to_pdu(req); > lrbp = scsi_cmd_priv(cmd); > + ufshcd_init_lrb(hba, lrbp, index); > if (ufshcd_is_scsi(req)) { > ufshcd_add_command_trace(hba, req, "complete"); > result = ufshcd_transfer_rsp_status(hba, lrbp); This ufshcd_init_lrb() call looks incorrect to me. I think that ufshcd_init_lrb() should only be called before a request is submitted to the UFS controller and also that ufshcd_init_lrb() should not be called from the completion path. Thanks, Bart.