Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2336900pxb; Fri, 5 Feb 2021 15:33:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVdv+A2Im6rnz+9a44MGPa/eFeZV2at8Z19dN4jL2XcXP53pVUeHT7o9enPJUy3zYzJ94V X-Received: by 2002:a17:907:2897:: with SMTP id em23mr6372715ejc.550.1612568032988; Fri, 05 Feb 2021 15:33:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612568032; cv=none; d=google.com; s=arc-20160816; b=ISOjx7zJ8gtuPct74B05mYpgsWhDfDO/yDgJHUn8yuTfsNm6KJWO1UboNOjMp0RTAb otBQ5H5yONIlkOdQhi9k6KpefeT9azqawL5y8y2DiHaaxkqRgDIPhuxnRK+mpOkDgnuY oBSOnv2aTX/TE/IjazroYc1GJkXIaPF3tzZXJm2GxAAB0fARhJzHD+J803N7G61na8l/ zokoxUDwXAnkkYlMTXFxRU2lJ9VsmvpckcdduPUVXtlNB+RdrDVdqF8Pj9CSGMg5RqXW 8GSDkZn4ABjJwhp0mZ7QebxOgJDgzzPfXOlmDgu2N/rncfsiBIhCTw/1I5ieh+60bddc VuXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=Zd+c4ooltVhxeT02OwlGyOjUnE2GSWiTDPcIAPn3MYU=; b=EB9+FCPHXOFk6JfZMbOPckHkXUys1enIbxHIrFaEQjQ76guDrUPG7SPMXGPN9w3Isu UtsLm3gDWzGYRr5++Ul2MGbn5RRSvL4dN2Tmm+Vv2o/x6CvFe6RpMKjaseDpSYXE3V5w 96flnMnwlnhNTo2ksIcYrYvtq6DVGury3V7QOrT6BD7SJ1izc6KmJmQtkpAFchhr7SG6 nqmVikb/In6/GQ7Qu0mP4XzyDzx6CbCud2XZRlMYV7PfsdA6vdu5LyIIqujs2bkPAiIA RqEgq3oO8s6CXvJv6PoFdZo2MykU/EfECjclF5UIF8uCDskh8BcQdR75T5dMGfh8D4gn QfaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=f+TJ3QX7; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si7107142edd.237.2021.02.05.15.33.06; Fri, 05 Feb 2021 15:33:52 -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=@gmail.com header.s=20161025 header.b=f+TJ3QX7; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229721AbhBEXbM (ORCPT + 99 others); Fri, 5 Feb 2021 18:31:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232558AbhBEOWu (ORCPT ); Fri, 5 Feb 2021 09:22:50 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCDFBC06121D; Fri, 5 Feb 2021 07:59:55 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id r23so6438334ljh.1; Fri, 05 Feb 2021 07:59:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=Zd+c4ooltVhxeT02OwlGyOjUnE2GSWiTDPcIAPn3MYU=; b=f+TJ3QX7m2SC6ZcxPUEQuDp7gpWX8I1nwRTbb7DIxswh6QjKWXMw9kp3enzvUMNxCg CJSSs72MqVDOe0yVAYjIfwbVYTp5eQF5tpthO+qQSoVcKwXGSq4p4iJQ8DhDLi6w6Mdj aGPQadAu1eo6e77bOFH923cMdfIrqkcCW3teZIgiugtr99d3ODgKDh323ZPmj03jiNoc 1LcCPVjjRFy66QJn6exOGkqhcHvIehLsF3dWTdz0xQnQBnucIstsSq3Y5LKhzGI7Gno3 xuouxbKrsDiKECNo5olldx9hr6MXoPPMlIeJhQZoGjEy3je98EYxL9Zuo+GJCj51jgYU 7AIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=Zd+c4ooltVhxeT02OwlGyOjUnE2GSWiTDPcIAPn3MYU=; b=XPNy7tWxM0nF5cBgtQeF63MkvL0hsfHlTsATtfN2/Yt2co0lXe3izzO8Y4q/b1iDzk MzX1mVOloaMw4kyGFFHW9qnob95d+ASRyXqqdR8zH7wXuNztF4aLSk7z+DSh2GnLNNgO sfHwN0yr2Vqq0aJCnwGTXViGc4xMGS/SW+sS7Q6BG2B1ddH1gB8+UV7wdfjdpXryh3jO 8l705mlxTvlZHHxMNxtIdu5NQvNOFWkA978L2Ov5AveP4+VkjcsSLyJIsdIxtRP1xf8o L6jZnndM7JCgKiIKtUV6i20kDBSJWFFIEQ+ofU4QFxTHGq5X6w9dmf/0UZRIxVIL+iu/ mRkQ== X-Gm-Message-State: AOAM532OfqzHJkqnYrv46FETiDdLqvslwODizNdmP/xhpVt9c/NFpa/F frsgO5/qKj2gtrVyzSg7EWTbz0RDmVg= X-Received: by 2002:a50:bacb:: with SMTP id x69mr3908359ede.39.1612537715856; Fri, 05 Feb 2021 07:08:35 -0800 (PST) Received: from ubuntu-laptop (ip5f5bee1b.dynamic.kabel-deutschland.de. [95.91.238.27]) by smtp.googlemail.com with ESMTPSA id g3sm4219086edk.75.2021.02.05.07.08.31 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Feb 2021 07:08:34 -0800 (PST) Message-ID: <12a011cd895dc9be5ec6c4f964b6011af492f06d.camel@gmail.com> Subject: Re: [PATCH v19 3/3] scsi: ufs: Prepare HPB read for cached sub-region From: Bean Huo To: Avri Altman , Can Guo , "daejun7.park@samsung.com" Cc: Greg KH , "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" , Sung-Jun Park , yongmyung lee , Jinyoung CHOI , BoRam Shin , SEUNGUK SHIN Date: Fri, 05 Feb 2021 16:08:31 +0100 In-Reply-To: References: <20210129052848epcms2p6e5797efd94e6282b76ad9ae6c99e3ab5@epcms2p6> <20210129053042epcms2p538e7fa396c3c2104594c44e48be53eb8@epcms2p5> <7f25ccb1d857131baa1c0424c4542e33@codeaurora.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-02-05 at 14:06 +0000, Avri Altman wrote: > > > > + put_unaligned_be64(ppn, &cdb[6]); > > > > > > You are assuming the HPB entries read out by "HPB Read Buffer" > > > cmd > > > are > > > in Little > > > Endian, which is why you are using put_unaligned_be64 here. > > > However, > > > this assumption > > > is not right for all the other flash vendors - HPB entries read > > > out > > > by > > > "HPB Read Buffer" > > > cmd may come in Big Endian, if so, their random read performance > > > are > > > screwed. > > > > For this question, it is very hard to make a correct format since > > the > > Spec doesn't give a clear definition. Should we have a default > > format, > > if there is conflict, and then add quirk or add a vendor-specific > > table? > > > > Hi Avri > > Do you have a good idea? > > I don't know. Better let Daejun answer this. > This was working for me for both Galaxy S20 (Exynos) as well as > Xiaomi Mi10 (8250). > Thanks, I tested Daejun's patchset before, it is also ok (I don't know which version patchset). maybe we can keep current implementation as default, then if there is conflict, and submit the quirk. Thanks, Bean > Thanks, > Avri