From patchwork Fri May 6 18:03:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9035231 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9E9C2BF29F for ; Fri, 6 May 2016 18:05:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C35C820274 for ; Fri, 6 May 2016 18:05:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8BE720272 for ; Fri, 6 May 2016 18:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758779AbcEFSFh (ORCPT ); Fri, 6 May 2016 14:05:37 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36522 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932347AbcEFSD5 (ORCPT ); Fri, 6 May 2016 14:03:57 -0400 Received: by mail-wm0-f53.google.com with SMTP id n129so67108514wmn.1 for ; Fri, 06 May 2016 11:03:57 -0700 (PDT) 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=jDYbva7L0hhs/wSd9VrGJ3OQ9fV8kKMZ9+CwOnpphf8=; b=bsapNguFoXVF6grywBnw1OejmBNZp6yV9z0UYIjKvEZCQNuwDmMhqXBBsfM9sEhtLV qbov5KBb2Okw5TC01dayF/Z6Sfi9ORgadgz/I206v/LP5fogtClkJ4WAD/3USDugQtmR AlqfYYfJYqU0YkMPk/VFyoIqxXs92Sjeo07Q8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jDYbva7L0hhs/wSd9VrGJ3OQ9fV8kKMZ9+CwOnpphf8=; b=YizCwfXPgsyCeGbtik3/qgF4TGH7z1xTRF5X1s8ykdzhA4x6O03j5KZajEiwyacxtt r88Gp6f01UG7bOlba9aeH2H88jnO0iJB9wG6tzMvTcxPfDyIzV4P2qC279wjDFd4yTGC iuClcuh3l3CRAZ5tFuuOAtqY3Pa11S+mwD0c7u8vkmGDD3IHuTMJeITTvdSwn1a/GaZl Wgfv/gJawbnafGS5vmO6eLXCKSSxMEEpObiVRhroY4IrKlA8CNedBksdJyizStmYgqEL FGBN3HyeVoePWboJbQKJEEPKUrfU8SMn7mGy2YmuzC1JeNhNZvSG37oJsk/+bsAk86Tn eWJA== X-Gm-Message-State: AOPr4FVXRVcIVaTqqK4nEH9KtK2Z3uW8kgkhON8YClavuPOEiy1f1W1uf6Eih1uQXbqipA== X-Received: by 10.194.57.100 with SMTP id h4mr21657354wjq.18.1462557831539; Fri, 06 May 2016 11:03:51 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id kz1sm16076559wjc.46.2016.05.06.11.03.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 11:03:50 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 19/28] lightnvm: enable metadata to be sent to device Date: Fri, 6 May 2016 20:03:12 +0200 Message-Id: <1462557801-24974-20-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1462557801-24974-1-git-send-email-m@bjorling.me> References: <1462557801-24974-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Javier González Enable metadata buffer to be sent to the device through the metadata field on the physical rw nvme command. The size of the metadata buffer must follow dev->oob_size * # of PPAs. Signed-off-by: Javier González Updated description. Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 1 + include/linux/lightnvm.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index d426d95..69a47fb 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -467,6 +467,7 @@ static inline void nvme_nvm_rqtocmd(struct request *rq, struct nvm_rq *rqd, c->ph_rw.opcode = rqd->opcode; c->ph_rw.nsid = cpu_to_le32(ns->ns_id); c->ph_rw.spba = cpu_to_le64(rqd->ppa_addr.ppa); + c->ph_rw.metadata = cpu_to_le64(rqd->meta_list); c->ph_rw.control = cpu_to_le16(rqd->flags); c->ph_rw.length = cpu_to_le16(rqd->nr_pages - 1); diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index af72ca7..678df4d 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -230,8 +230,8 @@ struct nvm_rq { struct ppa_addr *ppa_list; - void *metadata; - dma_addr_t dma_metadata; + void *meta_list; + dma_addr_t dma_meta_list; struct completion *wait; nvm_end_io_fn *end_io;