Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp109062ybt; Thu, 18 Jun 2020 19:53:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT3BFQQ3Md0+e8xTYHS6jRUMhdTnkNMAAHyRqVj44OHCWKJlDghC3MjAiWvO08lTF+nTUP X-Received: by 2002:aa7:dc58:: with SMTP id g24mr1265535edu.136.1592535213635; Thu, 18 Jun 2020 19:53:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592535213; cv=none; d=google.com; s=arc-20160816; b=Fnxch/iu2PmBQqb8Z+QTihijybPytPXjBxC5S4YM+kOMnwM86Utp2uoHA5xh6fKGyj 4f6cwLXSPvQ++4aWtI/cKTcCTmdX1gVpp8FnY007XwIHQ0M/yGtbOxjMVYDCNnREbaug iyEJ4c4NOYlgYoFY2ppMJR2sJ3XRWtx7lDlH8SH2sBD5yMlWjbcAsDU/4sEjmRhTMEAc GnhhBkGnN4nBjl151d0i77LD3NI1QfW5vUHI3wXbbHWqj8rpT3eC8Ys9S6Xj7XpIhffY OZiefxzhBYrnOGkoaWGKNM7cs7ckxN4whRzTaWK1sLj4wlXn2ooJ1fFoUQrh/Ye2HBkb 6y/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:content-transfer-encoding:date :message-id:in-reply-to:cc:to:from:reply-to:subject:mime-version :dkim-signature:dkim-filter; bh=NOzT7vcRqkUZDzcSZQg51RrlT8m1JaJOcP0aBnou8x0=; b=q25sYg8CYcIWbwuB6ot6oeqkUHtN4k4OY1dpak+zSrzXdK3o4v3gC5JObdUJzfQWw6 gvtraxvfYHaYmlZIQG6uoFdKXxY0SllQn5k+KF2kWCGUu9M1XsRAxF4vtyhCUlXIsfx/ 5MYZlU9WPQLMhQ7ycnUchJkqdP/p+rZATcZ0pg0wIL2P3eoJ0T0lL3weI1OvkkQIK0v8 SelGl8m1GVJw/t41rqgyF6d8OtszBdcynPCz+1T0NhaYbk0aZ1XsJ+31g3YdU3Y9ELuZ Ckd+W3Kyy9/KhZMAfQEm48hN3Lk2UiTIMx6aC+4kN2lZNmzaxqGao10HJDSqLyjeVEVE 0PWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=WcoHXo64; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i4si3023907edq.200.2020.06.18.19.53.11; Thu, 18 Jun 2020 19:53:33 -0700 (PDT) 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=@samsung.com header.s=mail20170921 header.b=WcoHXo64; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728537AbgFSATF (ORCPT + 99 others); Thu, 18 Jun 2020 20:19:05 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:51033 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728104AbgFSASF (ORCPT ); Thu, 18 Jun 2020 20:18:05 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20200619001802epoutp010f2f759711b043fc60b955b5d9910787~ZydotO0M01214812148epoutp01B for ; Fri, 19 Jun 2020 00:18:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20200619001802epoutp010f2f759711b043fc60b955b5d9910787~ZydotO0M01214812148epoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1592525882; bh=NOzT7vcRqkUZDzcSZQg51RrlT8m1JaJOcP0aBnou8x0=; h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From; b=WcoHXo64NSq1YW4xtb0aUyA9BJuG3natt6KmHANxxr5X5LRPphn0hJLCnvXqgyI5H DnDXQItbQVL8AMQijk2NO0tig42PMZ5zgddegilSbQ5ixAW8yB3dYbNQa5bk6tfKp4 ykz2dKDi0jZY8DWccDu5D3Auy8vMv516Eb04cKU8= Received: from epcpadp2 (unknown [182.195.40.12]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20200619001801epcas1p25d0372cb0e391f0113c090f5210ea760~ZydoOis2a1582515825epcas1p2C; Fri, 19 Jun 2020 00:18:01 +0000 (GMT) Mime-Version: 1.0 Subject: RE: [RFC PATCH v2 4/5] scsi: ufs: L2P map management for HPB read Reply-To: daejun7.park@samsung.com From: Daejun Park To: Avri Altman , Daejun Park , ALIM AKHTAR , "jejb@linux.ibm.com" , "martin.petersen@oracle.com" , "asutoshd@codeaurora.org" , "beanhuo@micron.com" , "stanley.chu@mediatek.com" , "cang@codeaurora.org" , "bvanassche@acm.org" , "tomas.winkler@intel.com" CC: "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sang-yoon Oh , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , Adel Choi , BoRam Shin X-Priority: 3 X-Content-Kind-Code: NORMAL In-Reply-To: X-CPGS-Detection: blocking_info_exchange X-Drm-Type: N,general X-Msg-Generator: Mail X-Msg-Type: PERSONAL X-Reply-Demand: N Message-ID: <231786897.01592525881606.JavaMail.epsvc@epcpadp2> Date: Fri, 19 Jun 2020 09:12:20 +0900 X-CMS-MailID: 20200619001220epcms2p8ab5f114df7a40f2694b8e87468582921 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL X-CPGSPASS: Y X-CPGSPASS: Y X-Hop-Count: 3 X-CMS-RootMailID: 20200615062708epcms2p19a7fbc051bcd5e843c29dcd58fff4210 References: <231786897.01592213402355.JavaMail.epsvc@epcpadp1> <231786897.01592212081335.JavaMail.epsvc@epcpadp2> <336371513.41592205783606.JavaMail.epsvc@epcpadp2> <231786897.01592205482200.JavaMail.epsvc@epcpadp2> <231786897.01592214002170.JavaMail.epsvc@epcpadp1> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static void ufshpb_run_active_subregion_list(struct ufshpb_lu *hpb) > > +{ > > + struct ufshpb_region *rgn; > > + struct ufshpb_subregion *srgn; > > + struct ufshpb_map_ctx *mctx; > mctx doesn't really do anything here OK, I will delete it. > > + unsigned long flags; > > + int ret = 0; > > + > > + spin_lock_irqsave(&hpb->rsp_list_lock, flags); > > + while ((srgn = list_first_entry_or_null(&hpb->lh_act_srgn, > > + struct ufshpb_subregion, > > + list_act_srgn))) { > > + list_del_init(&srgn->list_act_srgn); > > + spin_unlock_irqrestore(&hpb->rsp_list_lock, flags); > > + > > + rgn = hpb->rgn_tbl + srgn->rgn_idx; > > + mctx = NULL; > > + ret = ufshpb_add_region(hpb, rgn); > > + if (ret) > > + break; > > + > > + ret = ufshpb_issue_map_req(hpb, rgn, srgn); > > + if (ret) { > > + dev_notice(&hpb->hpb_lu_dev, > > + "issue map_req failed. ret %d, region %d - %d\n", > > + ret, rgn->rgn_idx, srgn->srgn_idx); > > + break; > > + } > > + spin_lock_irqsave(&hpb->rsp_list_lock, flags); > > + } > > + > > + if (ret) { > > + dev_notice(&hpb->hpb_lu_dev, "region %d - %d, will retry\n", > > + rgn->rgn_idx, srgn->srgn_idx); > > + spin_lock_irqsave(&hpb->rsp_list_lock, flags); > > + ufshpb_add_active_list(hpb, rgn, srgn); > > + } > > + spin_unlock_irqrestore(&hpb->rsp_list_lock, flags); > > +} > >