Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2145824pxb; Mon, 11 Jan 2021 02:02:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyZWSipv5tfEnAWe8hB1H/afQ4SGrYbwVgDR3eVDBT+rNCg09AExaqWHK1WpmfbEyzDVGFB X-Received: by 2002:a17:906:edca:: with SMTP id sb10mr10735184ejb.284.1610359326330; Mon, 11 Jan 2021 02:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610359326; cv=none; d=google.com; s=arc-20160816; b=XYVElsG8i6Mw+a1JZZRiYwWl4qv358owwXmJIWlVIysPN+G0EYfdnV4iYThXBwTtK6 I8grk+J2EWKZ4BfHyyv4s1fe+4PqlvMESQ4/DEiVI3RRz498GTBqGPQiVclArMm7vJ3A AIVfbEnbjC7dJ+kbTY2wtVhwmQMUyMV4GC071UU+bmwqKDEiSGYpng1EvvSUXWf4Aux5 TBX6bPLYXx0AQJfeuHcb1AbFZdqfdbogIfnDuWiKCBbG34pC6GfCAVeibx7a1N1fiCyS p8AESeNoFK7ZDZkSvAbNvvjsYqxtcG4bBPdaN1jc3rn4QcbNz942fKrawV6Kozp/I+qq XSWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=r8uyZuYyDg8f40sNtmKyk+03I9UJOiC5GqhnGoZoa0Q=; b=nFcbI+Q5GQW3qr2x24JiM3YLn6S2n1kRm4KiavFrpBV4zM53A1hGc3lV7vcZoLO4pN rT4xcDs1ZE4KZSpMCMT6cQPOkb0RvLJXjgnrJP9YNsGPPFFkPJ9mT0I0rxztogEgs5Q8 0xFPt3n7416azXf86pQKsvlvOxCNDKkADYHff+f6ja37KGEMeWtEVK2CtJpkoH78eW0A qUtpXRYQ5au/knAOgG/n4hXpi+jSoMmV86aknJcFbJbyDNwEbmFwN9VEzpYbS+qZpWFj 1VTuyb+mcrOHT7YAvftDJKFG/5e0JBNTdR+1MvSgz9OF3Nr5VtcWhVvGgJaXI1ytUn5A lZ9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="bm8/GSmQ"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si6255517ejt.658.2021.01.11.02.01.40; Mon, 11 Jan 2021 02:02:06 -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=@kernel.org header.s=k20201202 header.b="bm8/GSmQ"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728540AbhAKJ7o (ORCPT + 99 others); Mon, 11 Jan 2021 04:59:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:41942 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbhAKJ7o (ORCPT ); Mon, 11 Jan 2021 04:59:44 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E37E522AAF; Mon, 11 Jan 2021 09:59:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610359143; bh=i3qjYaMyb4Fbq9fOi04wCv4NycJQX3mfmS+k6khBG6o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bm8/GSmQvXeBE5VLdR5Gs73RpO/2fVppL3nxDZmiBXMuCmoyWfQsFt8LwVfY3bvQw sL1+0qmsYm3dsOfZIDtJZVT+VjEUjOClRy0WNNxaFcRTCVqzOgOKy5yxiFkFTY8mGm EfyM/BoXqe/I5d8rEaqNOPmZKcOJ2ec+uf9aQZQa1l1vx0tmnqSGfmzlzW9iSU6WwD kR8N6wHXrPp3HuXMShVDvtzHn6T4hfe3MP9xOobwqc+LyKi7IzURvAVIhWZbo/Z1EF B6Vf0p84mDrHLyLpqTpxpJJ1Vo4EhQ/PrS7wnEbk8cyihbzan7VOyCKLoGAD5KBGcw Mw8yDcsX3LvJQ== Date: Mon, 11 Jan 2021 01:59:01 -0800 From: Jaegeuk Kim To: Avri Altman Cc: "linux-kernel@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "kernel-team@android.com" , "cang@codeaurora.org" , "alim.akhtar@samsung.com" , "bvanassche@acm.org" , "martin.petersen@oracle.com" , "stanley.chu@mediatek.com" Subject: Re: [PATCH v2] scsi: ufs: WB is not allowed in RPMB_LUN Message-ID: References: <20210111084756.1810924-1-jaegeuk@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/11, Avri Altman wrote: > > static inline bool ufs_is_valid_unit_desc_lun(struct ufs_dev_info *dev_info, > > - u8 lun) > > + u8 lun, u8 param_offset) > > { > > if (!dev_info || !dev_info->max_lu_supported) { > > pr_err("Max General LU supported by UFS isn't initialized\n"); > > return false; > > } > > - > > + /* WB is not allowed in RPMB_WLUN */ > /* wb is only allowed to either a sha*/ > > + if (param_offset == UNIT_DESC_PARAM_WB_BUF_ALLOC_UNITS) > > + return lun < dev_info->max_lu_supported; > I think here you should use UFS_UPIU_MAX_WB_LUN_ID and not dev_info->max_lu_supported. Ok, sending v3. > > Thanks, > Avri