Received: by 10.223.176.5 with SMTP id f5csp4308853wra; Tue, 30 Jan 2018 05:29:01 -0800 (PST) X-Google-Smtp-Source: AH8x2248X4KkaaJEOE1Y4Ttr5v/KQnI7sLXIeVI33tzwCTJwzH0dl8ODzdt7QZfAl9VsFg41v5Yo X-Received: by 10.98.35.14 with SMTP id j14mr30417605pfj.62.1517318940968; Tue, 30 Jan 2018 05:29:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517318940; cv=none; d=google.com; s=arc-20160816; b=FwsRAOEjOcYFt5wxPdQjTCEf6CmSpvT/btCRYG9sX3gEeg8RZbIflfM857GE36SdAj AWxh2L1j+W4aooGORcHUVWMpmusS+/pXRuASSExOuAQ1/0eV8hbwT6bS3UeCPjI4Y6Uv Y8BNfKwTrVpY7smixXS+A9y6+u0baqCIh8PV5VzZ1pjSYuBwevUudOJ6cKDcWSCi3Ohg vQxHHc8Dva3/TYruBAiB7uS943qSBelL/oq2JCerYLNNT1Bk5GjzdmMNPA8JCZryK8ou YtsDazgW50cCpX/UZtle1EBYTzshAyucK7zlSIcul124OXKJsZgG6oQJy+TKI+wElC1F jIXg== 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:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=zxfHYvwV4t5tDi3mfoZGHN7FiDCmois+5YqU4VDTFPg=; b=ot0jeCqSFfeDgtuTtqHPTbmgi2QmAbs9Lq5dmk1RC5XizTVupzCwy8EKjc9qUHQSfb 3QJBWDorHaqtakJ5OPk8iEGwCgIuvhoGDo6v1s3lFXYmbuEIrB83YzRER+zfeWT6hZxC 3HloF92nSN5iJcaWtmpqjc88nPhhNwRkf5Q/ps8HRf6GXUiubPxOYQoX4OjHPd0ne2qj 06fW6JHGG4JFoUL/ZpLYjTtL+0Nn/pKesds19kPzZBfqpLLVS2DBL8Z/D2ENUL5lHiXl 47rKnopIHVOoY43GCmqtXQci0NKXbxQAOWlUwwMldy/PibGBAGsEp0XLofaLlDWA4ZGb dBRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bjorling.me header.s=google header.b=cONokP1q; 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 b129si9279531pgc.89.2018.01.30.05.28.45; Tue, 30 Jan 2018 05:29:00 -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=@bjorling.me header.s=google header.b=cONokP1q; 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 S1752602AbeA3N0e (ORCPT + 99 others); Tue, 30 Jan 2018 08:26:34 -0500 Received: from mail-lf0-f65.google.com ([209.85.215.65]:41732 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752255AbeA3N0R (ORCPT ); Tue, 30 Jan 2018 08:26:17 -0500 Received: by mail-lf0-f65.google.com with SMTP id f136so15315431lff.8 for ; Tue, 30 Jan 2018 05:26:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zxfHYvwV4t5tDi3mfoZGHN7FiDCmois+5YqU4VDTFPg=; b=cONokP1q2bcWS7KTaTEP1NQHsPFsVDMEeM8dmzV5Ugvc+7NLcpvPQGPsaLZbFtFRV/ DtHI3KJw28HSFDrvaKpmf8g4tQ2o4YMdMaNI1IIpZJ6knGR+5O/nRIygHoJIvjIBxoF4 chFzQw8nmSesXA0aov2YdTrnGDRYggb3lXfhU= 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=zxfHYvwV4t5tDi3mfoZGHN7FiDCmois+5YqU4VDTFPg=; b=Ukve/lpNoUacwwS37XgS3A/5i8j8SCnW0E5CupeZyhw3o9iSOuLR5AWCYVKNuDEuvk OK0h9Z8BZ947sdC3YzdY3gO5GeOaL56q9QgixPBfOti044EfqNi4wlxhtwrUAl2seDJo AsVTfGq2e6x8JcaYXSIi8mMltwSe7DeYL2G+l4pVy2zdu+Ynu40/zZk3wZoIXHVhMUIv sdgzRHG1eYPUOLkQNto7/XWCU7ExxDh+HvhvbCRhaXJmWctgqiTwE7DAyUWlaxvMATUs 8LWEs5mL05rZRu245x08gbxtqyF/xrYjW6L4ciBU8W55GA8YDTICmxNvB7HElnckTwV4 65QA== X-Gm-Message-State: AKwxyteqE99Z5FcxgYzBfOBGthbf63SbgNw+VAt50sm64gW4DzUwmylz VcEQSoAYIUYG55tKRKPds8Q6zQ== X-Received: by 10.25.158.67 with SMTP id h64mr16340327lfe.56.1517318775994; Tue, 30 Jan 2018 05:26:15 -0800 (PST) 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 28sm3434870lfw.57.2018.01.30.05.26.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Jan 2018 05:26:15 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 2/2] lightnvm: remove multiple groups in 1.2 data structure Date: Tue, 30 Jan 2018 14:26:05 +0100 Message-Id: <20180130132605.28635-2-m@bjorling.me> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180130132605.28635-1-m@bjorling.me> References: <20180130132605.28635-1-m@bjorling.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 16906327645e..e5544806fb0e 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -167,7 +167,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 { @@ -209,7 +210,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; -- 2.11.0