Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1347441ybc; Tue, 12 Nov 2019 19:26:08 -0800 (PST) X-Google-Smtp-Source: APXvYqwW8jeC0wq4yzCM+aH+23912W8IVePbRd44LHycU1DR7TF2siuQUdzU6a9osP8pf4NpdIDZ X-Received: by 2002:a17:906:a981:: with SMTP id jr1mr672712ejb.255.1573615567926; Tue, 12 Nov 2019 19:26:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573615567; cv=none; d=google.com; s=arc-20160816; b=MvvjAadzY0/inBqdeHF0AF4s7qmY32uLFjH9ZXipqzFDz0pDoIBSCkxRVmIhF1lgXc NciL1UW7jU8mMQtd1TFwQ4X7CNxF9Cmt2bmWkzgh6dOzasw044q2/aLe8PqH7Il99F65 f36AdAo8DeZi6SxuTPvGQ5AEQo6fqJ9zQAbprMTwW62HBnWHWIIOgh9xRD67wi3cGKLP P6G6JpQxgtissc/RyFqR4tLs/3lj4pI6kN2HSC/O871lAJMBEJ6jYC+TVjWzT1x+Vy16 Cc2ZxLcKFDXwwipsbeZBvhB/7dj3JUN97TxrK7EQJGc419uqczchYquOnOfGqQg3YSqv BOdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=gPzmFZKgz6XjKMaCVBi8XSgRx94O7/gchC3dmv4Z0b4=; b=DjgA+f/WS8sdwlEN0EbSNvXHT8TIcmheiNLrtg2KIBikCJmgj6o2dYnvSt20yeXQon f5wQcFF+dznlWx7AsUIeTSqYA+OqPCwSxxWXgfc/SPPyLRzWmuWohjN6o6hbm/zcnWh5 U2K1Jm5k8PxIEndDQ6kHyBM7L5Bg6A5fwzFMYnwA4gSQJxFZxqoxX/k/K4jGqlXKTQWl W1lxqOQ7mMTdAeKTzqXIvV1ks+TcPtqbg8hHHppBfeqO5VUQnF/eaNc081gP/Yx5uTSO yI4ouxGhQjYj0EnS+dh+Fhkae5kgNMm4pG0EjoeF7x7FXBD+lbW6o15IgQkIP7/woo36 09hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=d9Mks2c0; dkim=pass header.i=@codeaurora.org header.s=default header.b=Tunb0nNN; 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 h5si488302edj.25.2019.11.12.19.25.43; Tue, 12 Nov 2019 19:26:07 -0800 (PST) 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; dkim=pass header.i=@codeaurora.org header.s=default header.b=d9Mks2c0; dkim=pass header.i=@codeaurora.org header.s=default header.b=Tunb0nNN; 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 S1727658AbfKMDWc (ORCPT + 99 others); Tue, 12 Nov 2019 22:22:32 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:50278 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfKMDWb (ORCPT ); Tue, 12 Nov 2019 22:22:31 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6C24060DB8; Wed, 13 Nov 2019 03:22:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1573615350; bh=4wayBfbLSFoI1QIEZSOXbyJu7tjEw32G4bge2B7Aor0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=d9Mks2c03YiGBLg3XKvL7uU7l+FC6NlWUELP2M7ijzo2/JoqoC3tgfWIogPEBZyWF mVnR/zdjQDiFSUrQPjFTpIouN+a7RgzDjR1iOYOBKdbHkze3oA403SnQ1ubk5lZNCG ElWi+re6nNGJlXNNL4IzOIh71GcJTepkP+/njJl0= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 5E54660DD1; Wed, 13 Nov 2019 03:22:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1573615345; bh=4wayBfbLSFoI1QIEZSOXbyJu7tjEw32G4bge2B7Aor0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Tunb0nNNrNywyXXECv+o87H5UAZVRvUM9+9vqlFRuo8BRDXOBP8M2wBERtZ9eykFF XIOoVSfxVd0zYiRq/89hbKOze+DKb89eozLuzWP66xhxZUFEGS83HyPIsauPR9vlv5 Sbr7N5Ji3IMTls+SKPHs67nzXvga415PD9DbNUGc= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 13 Nov 2019 11:22:25 +0800 From: cang@codeaurora.org To: "Martin K. Petersen" Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, "James E.J. Bottomley" , linux-kernel@vger.kernel.org, Can Guo Subject: Re: [PATCH v3 1/5] scsi: Adjust DBD setting in mode sense for caching mode page per LLD In-Reply-To: References: <1572670898-750-1-git-send-email-cang@codeaurora.org> <1572670898-750-2-git-send-email-cang@codeaurora.org> Message-ID: X-Sender: cang@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-11-13 11:03, Martin K. Petersen wrote: > Can, > >> Host sends MODE_SENSE_10 with caching mode page, to check if the >> device supports the cache feature. UFS JEDEC standards require DBD >> field to be set to 1. > > UFS requires DBD for all MODE SENSE(10) invocations, not just for > accessing the caching mode page. I think the flag name needs to reflect > this. > > Also, I do not particularly like this being a scsi_host flag. All the > other flags we have in this department are per scsi_device. > > My recommendation would be to add a set_dbd_for_ms flag to struct > scsi_device and then do: > > sdev->set_dbd_for_ms = 1; > > in ufshcd_slave_alloc() mirroring the existing: > > sdev->use_10_for_ms = 1; > > This makes the MODE SENSE tweakery consistent. > > Thanks! Hi Martin, Thank you, good idea. I will make the change in your way. Best regards, Can Guo.