Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1604327pxb; Thu, 4 Mar 2021 16:06:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQjuyn8QzyG0eGPBwDqAnVGNzMvrGydYgBs75CZS+Nhhijwveotd299oZF7sXqCwXeG/KY X-Received: by 2002:a92:cda2:: with SMTP id g2mr6315949ild.297.1614902789935; Thu, 04 Mar 2021 16:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614902789; cv=none; d=google.com; s=arc-20160816; b=Uz9YQfIAH0Vbo45kFgKTMiFww06NzOcUxAAhZF7UMPvv9pp0QTge+B32MQebxic2I+ Eb7OHOd5LWa5GdHWPuw07+mqZ+Dnf8YdlxANUHeR20woTFdgfSP9YraDYq//xrmkIS+H AGhOenU/+LQWEDKBbB4O9lnWSi3xEDMlFOxSLjd0I7a6Ay6xmfN7y74xdXsWAGItc0dk i5XH9k3VcHbw/Yawj63novWDoYWVAkDHge889v3eEIgWuJRrq0Mb34k8yi5vqghGNA+u MCaX0et/1zkYp0C0RAmdlFAYYHoZodrzdsHxetfI73SYa/qyKMPu178NJxdfNnWRFAp9 ohYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=mEqUGAmQIw80rVkgfOpohiF/Cg6qjh2EbNOd+LrIMdU=; b=cB115IniuRKQCXvuICErHGFW14uHoZGKUwzNnH5O4SlhKN8WSAmtepL3g/ZAptkWwo 6lRqGzFEkC6kLQCnwLAERj1eEE3lPIG+Ga/zPcVfQPiac0Qu0BzTile0LdbfUpFyip+Q I4SFCCArkvZaotxGD3Ss13A0tT3JsdGugOgiS1sB+/RXEbmfywO2rXNJHI1cp2nworn6 wXcO+3QVRJqGu/o4SILpElBhqSDalhkZZ7GFOXnVUGrTBGDLlRUMW5HOvqeNkUSQoUam IimwtK5TXHqk7Qqu2QRJggEWVPm/fgIjJagZzoVcWAXkoqKWdATBjNbl1ZQ0UNSN4+xY 2mjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=nzimcUHO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k18si741620jam.96.2021.03.04.16.06.16; Thu, 04 Mar 2021 16:06:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=nzimcUHO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236190AbhCDIiX (ORCPT + 99 others); Thu, 4 Mar 2021 03:38:23 -0500 Received: from m42-2.mailgun.net ([69.72.42.2]:61262 "EHLO m42-2.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236134AbhCDIiM (ORCPT ); Thu, 4 Mar 2021 03:38:12 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1614847074; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=mEqUGAmQIw80rVkgfOpohiF/Cg6qjh2EbNOd+LrIMdU=; b=nzimcUHOK+LvSjVbHFfD2cViIWwypiS0bMeVBC54a2oy1a+Qo93WkRXsE3+4PDkzDnC1j6aK aQ7ELBO7KH/EEeVkvmL9+0h1QMJde0/VYd1oMekyiRHG68oiVeWqgfCXbpJcSLCPjTORDzAW qaw0i0/dJKHLUbSCE/ima1k01V8= X-Mailgun-Sending-Ip: 69.72.42.2 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-east-1.postgun.com with SMTP id 60409c431a5c93533f2ab50f (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 04 Mar 2021 08:37:23 GMT Sender: cang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 993F8C43462; Thu, 4 Mar 2021 08:37:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id DF3DFC433C6; Thu, 4 Mar 2021 08:37:21 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 04 Mar 2021 16:37:21 +0800 From: Can Guo To: Bean Huo Cc: daejun7.park@samsung.com, Greg KH , avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, asutoshd@codeaurora.org, stanley.chu@mediatek.com, bvanassche@acm.org, ALIM AKHTAR , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, JinHwan Park , Javier Gonzalez , SEUNGUK SHIN , Sung-Jun Park , Jinyoung CHOI , BoRam Shin Subject: Re: [PATCH v26 4/4] scsi: ufs: Add HPB 2.0 support In-Reply-To: <2f1b8ff5aec540ef731bf5b2c3691dd23ea2e6b0.camel@gmail.com> References: <20210303062633epcms2p252227acd30ad15c1ca821d7e3f547b9e@epcms2p2> <20210303062926epcms2p6aa6737e5ed3916eed9ab80011aad3d83@epcms2p6> <2f1b8ff5aec540ef731bf5b2c3691dd23ea2e6b0.camel@gmail.com> Message-ID: X-Sender: cang@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-03-03 22:50, Bean Huo wrote: > On Wed, 2021-03-03 at 15:29 +0900, Daejun Park wrote: >> + >> +static inline void ufshpb_put_pre_req(struct ufshpb_lu *hpb, >> + struct ufshpb_req *pre_req) >> +{ >> + pre_req->req = NULL; >> + pre_req->bio = NULL; >> + list_add_tail(&pre_req->list_req, &hpb->lh_pre_req_free); >> + hpb->num_inflight_pre_req--; >> +} >> + >> +static void ufshpb_pre_req_compl_fn(struct request *req, >> blk_status_t error) >> +{ >> + struct ufshpb_req *pre_req = (struct ufshpb_req *)req- >> >end_io_data; >> + struct ufshpb_lu *hpb = pre_req->hpb; >> + unsigned long flags; >> + struct scsi_sense_hdr sshdr; >> + >> + if (error) { >> + dev_err(&hpb->sdev_ufs_lu->sdev_dev, "block status >> %d", error); >> + scsi_normalize_sense(pre_req->sense, >> SCSI_SENSE_BUFFERSIZE, >> + &sshdr); >> + dev_err(&hpb->sdev_ufs_lu->sdev_dev, >> + "code %x sense_key %x asc %x ascq %x", >> + sshdr.response_code, >> + sshdr.sense_key, sshdr.asc, sshdr.ascq); >> + dev_err(&hpb->sdev_ufs_lu->sdev_dev, >> + "byte4 %x byte5 %x byte6 %x additional_len >> %x", >> + sshdr.byte4, sshdr.byte5, >> + sshdr.byte6, sshdr.additional_length); >> + } > > > How can you print out sense_key and sense code here? sense code will > not be copied to pre_req->sense. you should directly use > scsi_request->sense or let pre_req->sense point to scsi_request->sense. > > You update the new version patch so quickly. In another word, I am > wondering if you tested your patch before submitting? > > Bean Bean is right about the sense buffer...