From patchwork Thu Mar 29 22:04:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10316595 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CFD7560383 for ; Thu, 29 Mar 2018 22:15:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6B632A4B9 for ; Thu, 29 Mar 2018 22:15:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB93E2A536; Thu, 29 Mar 2018 22:15:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C1C12A4B9 for ; Thu, 29 Mar 2018 22:15:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751325AbeC2WPa (ORCPT ); Thu, 29 Mar 2018 18:15:30 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:42610 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752297AbeC2WHE (ORCPT ); Thu, 29 Mar 2018 18:07:04 -0400 Received: by mail-lf0-f65.google.com with SMTP id a22-v6so10327198lfg.9 for ; Thu, 29 Mar 2018 15:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8pjceuuAmhOxNgD2tXoL7lxku8xc1b+p/Kc6pbYqDWw=; b=zV7s4iY3ZRV+hLYeVwlOevKZd/DdLEbqL4P8JumBKxldn/Fy8thbhoCsB7pNxm0VOd oOz7IWYHAI0/8pClTeOOqpkZA+KOr7ZGPZkj9O3SW/iX3DWfmqO/vj0HUTsbPJlcF6hX Z5CNm2vuum71aDQ8qAuon9TvdeF5BVUHDw87aMzvoAwR+a+UdSXSGsHnkriIriNKhNFf 9vIScWqR2nG6Rnmuwy1Tn5Xr39Tc9Jyv04yLTNV0kJKI5/fSbiPdsLNt1pEbbVbZffwF FaG9oWAfUjlAphw82nNRSrgGo44eMTRH3I6NJdseqZPGrLMXELM+FWQ8ne5rmcQgyXs7 Yc0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8pjceuuAmhOxNgD2tXoL7lxku8xc1b+p/Kc6pbYqDWw=; b=h7GsOjZhtPe9vnzILnS69oEL+9dMK3o+iu6q0o0o7iAD4SUo6AEufmqAJ9SJvp0/Ul xOrn/veVnohmayZZulKz6xV7co8oIT1NM9q5+ITIPH7FjnMk+MF37w8OFlXZwGT6AfVq BSt5+Qsds2O+XUgi0UV6Uy8z111bbXzJp8ax/qNIdcdw7gEJQ0Ebqsa3vy7UhiMuNUob sMJ+9l4KLYdl8Kmbdm7AQpm3JLBbLB2Flg4HOEfSLFbI9j+hsz8kYed5im8Rj7XnRiRp MzcPeMBy9HnKie32MYDdZX+d5oC/3PnfTkBW4oQ8MAinz7cKzrutSeDI2e5/o1DRdewe hPxA== X-Gm-Message-State: AElRT7EDcw1sa3i6Xnc+aV22lixuycztUMw+zXZVSOI1j6IjUb4FGTbH 21rxgzEAsrLv45mjI1TVFoerJw== X-Google-Smtp-Source: AIpwx49VK+Efq3Tlvtb0zCEk5LUukoCoSqt99N3BYlE0HvUtjnIjewJv8dJEPRvsJius5AIjcpqsJQ== X-Received: by 2002:a19:1f4a:: with SMTP id f71-v6mr6233954lff.12.1522361222982; Thu, 29 Mar 2018 15:07:02 -0700 (PDT) Received: from Macroninja.cnexlabs.com (x1-6-a4-08-f5-18-3c-3a.cpe.webspeed.dk. [188.176.29.198]) by smtp.gmail.com with ESMTPSA id i89-v6sm1365508lfk.12.2018.03.29.15.07.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 15:07:02 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, keith.busch@intel.com, javier@cnexlabs.com, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 07/37] lightnvm: remove multiple groups in 1.2 data structure Date: Fri, 30 Mar 2018 00:04:54 +0200 Message-Id: <20180329220524.30363-8-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180329220524.30363-1-mb@lightnvm.io> References: <20180329220524.30363-1-mb@lightnvm.io> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Only one id group from the 1.2 specification is supported. Make sure that only the first group is accessible. Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 940c9b9a2a09..dc0b1335c7c6 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -166,7 +166,8 @@ struct nvme_nvm_id { __le32 dom; struct nvme_nvm_addr_format ppaf; __u8 resv[228]; - struct nvme_nvm_id_group groups[4]; + struct nvme_nvm_id_group group; + __u8 resv2[2880]; } __packed; struct nvme_nvm_bb_tbl { @@ -208,7 +209,7 @@ static int init_grps(struct nvm_id *nvm_id, struct nvme_nvm_id *nvme_nvm_id) if (nvme_nvm_id->cgrps != 1) return -EINVAL; - src = &nvme_nvm_id->groups[0]; + src = &nvme_nvm_id->group; grp = &nvm_id->grp; grp->mtype = src->mtype;