Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4048389ybi; Mon, 15 Jul 2019 03:04:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzq2uHMs/fUXXzAfguSiTsQM1j76mm/ZcsGlmDIGIdvcSUxYeiaHKWxxOre2qfcq4Dv68yC X-Received: by 2002:a63:6fcf:: with SMTP id k198mr25733427pgc.276.1563185041698; Mon, 15 Jul 2019 03:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563185041; cv=none; d=google.com; s=arc-20160816; b=j70nKfuDM9j8nJETORamk3xfChh5f2l2BO7Z360ZwYrdgeMLOgPZIlj4kMcut1Huya vpj2xHLcLmqR56x12QTQHD/we+EhMRQy5kxlFQftujQPtoQENeU0+xdAfPdSbgiHnrgs FHhrINVOrsJIVu+xLbzRZwpQE2p6l1/zSCXYC7XCURnu8ERMs0dA3deanPSZfPxQfSCK XemAJqUMpPBThT014z0szuacyf7Y42J8wtgW4UzpMQCv0993NgkPvMgFm3qt688ZDcAf Dq1aEqBMjMbo+kOSF2Y5Bk/BVmsEhEHgjPpi4y1A3b4PE4NN8C4051Z9f0fLM8aOPltc QKxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=C/+tctaknYpKvOHEIHPsFihDGQV1srQjSuvgmN4gJR4=; b=xPqBmwh2N7uakdgcKhSaya59a2fx4Y/cHjnZ378oo+w5xJInlg/LtqoCVgC5koppFP 6L53bHVQRJqDpxGBhP5ymTR2kWcpiJ72I06y7hzk3G4S/7jryBLQOYK4aHn8C2f97p1g 94XrsE0UdAwMOufnwLHxKY5LAGAsWnOMs2H7/YdKiJIsRgKP7djipo/XwU4mNi/AmNiQ U7lNWXGKObP/J3a0Xui1QwEVznBMpq0Npe3mCM7nIza+IhqQ0U4DntClaqU143C6VS6k PSgLHEpSy2PRuIKIsU6CH43Inzr0e299xvWuSmdV/7WXG71WhWWdenNgJ3JnYsMaIiIj vkfg== ARC-Authentication-Results: i=1; mx.google.com; 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 w1si15056873pll.257.2019.07.15.03.03.44; Mon, 15 Jul 2019 03:04:01 -0700 (PDT) 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; 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 S1729698AbfGOKBY (ORCPT + 99 others); Mon, 15 Jul 2019 06:01:24 -0400 Received: from gate.crashing.org ([63.228.1.57]:50397 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729518AbfGOKBY (ORCPT ); Mon, 15 Jul 2019 06:01:24 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x6FA15xe030672; Mon, 15 Jul 2019 05:01:06 -0500 Message-ID: Subject: Re: [PATCH] nvme: Add support for Apple 2018+ models From: Benjamin Herrenschmidt To: Maxim Levitsky , Christoph Hellwig Cc: Keith Busch , Jens Axboe , "linux-kernel@vger.kernel.org" , linux-nvme@lists.infradead.org, Paul Pawlowski Date: Mon, 15 Jul 2019 20:01:05 +1000 In-Reply-To: <4caeb954b2fa91445e02bac7ac9610ca886b4dd8.camel@redhat.com> References: <71b009057582cd9c82cff2b45bc1af846408bcf7.camel@kernel.crashing.org> <20190715081041.GB31791@lst.de> <25c3813ab1c2943658d7e79756803801b14a34db.camel@kernel.crashing.org> <4caeb954b2fa91445e02bac7ac9610ca886b4dd8.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-07-15 at 12:28 +0300, Maxim Levitsky wrote: > > To be honest, the spec explicitly states that minimum submission queue entry size is 64 > and minimum completion entry size should be is 16 bytes for NVM command set: > > "Bits 3:0 define the required (i.e., minimum) Submission Queue Entry size when > using the NVM Command Set. This is the minimum entry size that may be used. > The value is in bytes and is reported as a power of two (2^n). The required value > shall be 6, corresponding to 64." Yes, I saw that :-) Apple seems to ignore this and CC:IOSQES and effectively hard wire a size of 7 (128 bytes) for the IO queue. > "Bits 3:0 define the required (i.e., minimum) Completion Queue entry size when using > the NVM Command Set. This is the minimum entry size that may be used. The value > is in bytes and is reported as a power of two (2^n). The required value shall be 4, > corresponding to 16." > > Pages 136/137, NVME 1.3d. > > In theory the spec allows for non NVM IO command set, and for which the sq/cq entry sizes can be of any size, > as indicated in SQES/CQES and set in CC.IOCQES/CC.IOSQES, but than most of the spec won't apply to it. > > > Also FYI, values in CC (IOCQES/IOSQES) are for I/O queues, which kind of implies that admin queue, > should always use the 64/16 bytes entries, although I haven't found any explicit mention of that. Right, and it does on the Apple HW as well. Cheers, Ben.