Received: by 10.223.185.116 with SMTP id b49csp1622533wrg; Wed, 21 Feb 2018 23:46:50 -0800 (PST) X-Google-Smtp-Source: AH8x225l9Dui4bzk/G1bNqvTix+2JcYz2N2wxElBGREz7K7PfZB5ilnRg10OQ2EQlkBRKwXQ6CT8 X-Received: by 10.101.81.4 with SMTP id f4mr5139716pgq.30.1519285609903; Wed, 21 Feb 2018 23:46:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519285609; cv=none; d=google.com; s=arc-20160816; b=Ga1SSMaFPqbKpqFVREvTTpXyRMEKpCw3h//MDppPtUK/rGKetQSobFhXfkNGby9jA+ 8Csy3uP7eLrYKw6fws6q7hiPa5pDto3G6HyV6/Jr0uvmVYhuolIJxD1PlS5wBvhBa0oy fHJKZZYcUpMlGxLJWVGyxdIttEA260oQpLzPGZjMOnUAMvRfzB5lps1tYzRS0ed+Uspv 1ZmIQuxdMPoAlwXgQGeEYMZtBo823xMjmmHd76AYN1ICDOD3vmf1qf1A3R8xWDopj5sC /mGCrhdaCXUfOQChFeKC/lLHR6B4/Y6aY5zpe7559LREj6vHw3WwXAzEvi6/PEeF0Hmj 00dw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=XjF8vWIXzWv/righPnB46Vr1CMuN5nHZUjxfVqRtbxE=; b=wvv6zJryvW/JiiO85IA5efcNMcPcg40zVP/3WmySCf4GNAo4i+/YFxlsLe0R0zaKGx dC+9oyhOeN+dQ9S0looIPNhEVlsxpBXxnB5f/VG+8L+EKqd9ng8zXiCksdHMKSWd/Zrc WbKjOm46xh7lcD9RozGPTjCdK0xEJCQV5R0wu52jXnKQsH0vXcgV/F7jwj/XweYyIERL js3KRBQQKTMd53W4G7qX0k4rmf8LgWaztzue2bYdstiayxnmYpPjgNIYFFeQvilZPXqT ETFibizzhp0tMy6qS+94aEmMacsQIjffe82ePDKU/0SgBn1FQNTwHPIfsvHCWRdvz2qP +AoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=0BT3JbUn; 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 p23si2338361pgc.730.2018.02.21.23.46.35; Wed, 21 Feb 2018 23:46:49 -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=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=0BT3JbUn; 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 S1752730AbeBVHph (ORCPT + 99 others); Thu, 22 Feb 2018 02:45:37 -0500 Received: from mail-lf0-f66.google.com ([209.85.215.66]:35857 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbeBVHpe (ORCPT ); Thu, 22 Feb 2018 02:45:34 -0500 Received: by mail-lf0-f66.google.com with SMTP id t79so6054787lfe.3 for ; Wed, 21 Feb 2018 23:45:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XjF8vWIXzWv/righPnB46Vr1CMuN5nHZUjxfVqRtbxE=; b=0BT3JbUnMW+lwlmVg4YM3Ey4Fnp5wHE03jbYpN2O9+G6v+3buPwhosZU43SkHVNcJx 7O89HW4zAifKplmw5IPLSPKmHkoeCcdj9OU7bFat9vCTgvVKfrBqQTuiH3k5G+Lv40m+ fL2jMha3yxvSbpPWEFpJleArBwbbPkgEr5PpfLSFWoUbqcEE62N8mjCOuYWoitgbEQCh cuu8jdMeIUE91Fk0mv0kWWJYC/ZxiF+sA/33VVVT+gLFwlExsEOXGdvXGGzVqW7ClxKX 4z+d/5nNwWU5HkYo5M+/8XR1z2LXjQy5vstjXLZ4W4W/cQbou4+XHsOHYz45dVKR9rJG Xy4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XjF8vWIXzWv/righPnB46Vr1CMuN5nHZUjxfVqRtbxE=; b=JsLJEfEh8duyx5py7iOFbTpzU7K5ALVyVLo2t2veLYIVmsVoU3cxHJAa4+Um8UMFF+ 8tomSqAm26ITVOV/vPFfoMnSANPFFF/dArhaEXLFSFzNJWuPwCRLSKQejip5ufWsVVYI YbmIjT+qX51ar/IkwoxerIyt0zJnTwiru+ApzVpB6gemt9EldlcCnx42I0pTW7UMY3Aq x9LSCA/ncyYJpfK1tFAxb+yzeuOmt+B6nWkon45Lq6a5N1BjseD+Zu83lGAvrD9fUbvW 3q3PwBq+j+3LxICCJjYUIXhvHpCRCg6YP38Aq0c9tdbWng35ySp7wfHklyrVz60ZfQQa 4J+w== X-Gm-Message-State: APf1xPBkCHBnUTgVzN9eVvEjXeQjGkeB/SVWPlz6gH+Adtzl0fG/z8Oo yfMoMf1Lso6tgP33n8TO6KCpWQ== X-Received: by 10.46.36.16 with SMTP id k16mr4028719ljk.14.1519285533228; Wed, 21 Feb 2018 23:45:33 -0800 (PST) Received: from [192.168.0.10] (x1-6-a4-08-f5-18-3c-3a.cpe.webspeed.dk. [188.176.29.198]) by smtp.googlemail.com with ESMTPSA id p190sm1055270lfp.3.2018.02.21.23.45.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 23:45:32 -0800 (PST) Subject: Re: [PATCH 08/20] lightnvm: complete geo structure with maxoc* To: =?UTF-8?Q?Javier_Gonz=c3=a1lez?= Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, =?UTF-8?Q?Javier_Gonz=c3=a1lez?= References: <1519205218-26994-1-git-send-email-javier@cnexlabs.com> <1519205218-26994-9-git-send-email-javier@cnexlabs.com> From: =?UTF-8?Q?Matias_Bj=c3=b8rling?= Message-ID: <5e2948ed-19a8-7bd5-6c50-df37a1454d16@lightnvm.io> Date: Thu, 22 Feb 2018 08:45:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1519205218-26994-9-git-send-email-javier@cnexlabs.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/21/2018 10:26 AM, Javier González wrote: > Complete the generic geometry structure with the maxoc and maxocpu > felds, present in the 2.0 spec. > > Signed-off-by: Javier González > --- > drivers/nvme/host/lightnvm.c | 4 ++++ > include/linux/lightnvm.h | 2 ++ > 2 files changed, 6 insertions(+) > > diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c > index cca32da05316..9c1f8225c4e1 100644 > --- a/drivers/nvme/host/lightnvm.c > +++ b/drivers/nvme/host/lightnvm.c > @@ -318,6 +318,8 @@ static int nvme_nvm_setup_12(struct nvme_nvm_id12 *id, > dev_geo->c.ws_min = sec_per_pg; > dev_geo->c.ws_opt = sec_per_pg; > dev_geo->c.mw_cunits = 8; /* default to MLC safe values */ > + dev_geo->c.maxoc = dev_geo->all_luns; /* default to 1 chunk per LUN */ > + dev_geo->c.maxocpu = 1; /* default to 1 chunk per LUN */ One can't assume that it is 1 open chunk per lun. If you need this for specific hardware, make a quirk for it. > > dev_geo->c.mccap = le32_to_cpu(src->mccap); > > @@ -405,6 +407,8 @@ static int nvme_nvm_setup_20(struct nvme_nvm_id20 *id, > dev_geo->c.ws_min = le32_to_cpu(id->ws_min); > dev_geo->c.ws_opt = le32_to_cpu(id->ws_opt); > dev_geo->c.mw_cunits = le32_to_cpu(id->mw_cunits); > + dev_geo->c.maxoc = le32_to_cpu(id->maxoc); > + dev_geo->c.maxocpu = le32_to_cpu(id->maxocpu); > > dev_geo->c.mccap = le32_to_cpu(id->mccap); > > diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h > index ccc5faa63cb7..e1c4292ea33d 100644 > --- a/include/linux/lightnvm.h > +++ b/include/linux/lightnvm.h > @@ -215,6 +215,8 @@ struct nvm_common_geo { > u32 ws_min; /* minimum write size */ > u32 ws_opt; /* optimal write size */ > u32 mw_cunits; /* distance required for successful read */ > + u32 maxoc; /* maximum open chunks */ > + u32 maxocpu; /* maximum open chunks per parallel unit */ > > /* device capabilities */ > u32 mccap; >