Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2284913iof; Wed, 8 Jun 2022 01:25:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKdBx0ASo6sDdAjI1XaWO0zLTuh+KszukXieFpDjBKTLyS0omCmDNbCwjNtFq/L3tShpor X-Received: by 2002:a17:90b:4b88:b0:1e2:d504:fb22 with SMTP id lr8-20020a17090b4b8800b001e2d504fb22mr37056824pjb.97.1654676724437; Wed, 08 Jun 2022 01:25:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654676724; cv=none; d=google.com; s=arc-20160816; b=yZEX1wJniEWkCEAr1lai6Wo81C4ppOZVMHE+rM0KLDho0Ejei6ApZzT/S9csn936m+ RW3iERG2sgjyqE1NyNeWK14IyssuBULxzDkDpoR0jQhO5b0yNzNO9BOmutDMkrJFIDvW i+C2oeEkRn93RmTVDmpn+ukBKH05LaT9m4LxremxkezS+hpRlhn1qj+vlFexPSwgzuVz t+DD3K+gxrCLCyIjbjWWiJEWESVwdWM1Jqm0EcRBHxcrapXb3VfKKXXTT6fWWihKibws lRGvJLmqNRUpkdF1nJnIL0nwFrtjEXqRstBkWQreQDpBku+C24ZE8FTmbp0CknsDDkak Ix7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mqJzVOT2iZsmWYF7+z2ZrmMbEapk6YY8avtC1cwvlg4=; b=SO5gygro8GSGac+CfVo+nNOX1EB5Whbni+nVtxISdwkj/l0DtrtmX0u2fArRmRr0rm g2dj0XLglwScxwiNC0uoZSdyo+BMQdz31cNIdjjdCO+7X3OLoeW7ny8B8tormvLJfg0k Pcf+nAXzxXOLoVms5z8Q+e+uvRO8S1QPrmHCgO6W2PhU4ypSBDCyQAsz+Xpkchakl58W GJcls/rnLL/c51GYb2D1V40zK8eZjhmXs08UmJYZ7kbWbGJRBgikpVZ+HdWVovLbr87Z kKq97zkpiMsBaVvRkyPBBNyeQYjET3eYW1zKOtN7PCq1H9FaG+CVUr1PGI1ITUrOuLiy 81uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1yXY/VFe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id x14-20020a63170e000000b003fae900c345si25667730pgl.183.2022.06.08.01.25.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 01:25:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="1yXY/VFe"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DE43C1D8828; Wed, 8 Jun 2022 00:56:01 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354267AbiFGTJ2 (ORCPT + 99 others); Tue, 7 Jun 2022 15:09:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352907AbiFGSV7 (ORCPT ); Tue, 7 Jun 2022 14:21:59 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBC96C1EC7; Tue, 7 Jun 2022 10:54:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AA1E2B8236A; Tue, 7 Jun 2022 17:54:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E22DC34115; Tue, 7 Jun 2022 17:54:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654624451; bh=vAu5+r7HlC00gVwiCe2wADDvLXRtFq5deKKcUHRUyx0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1yXY/VFeFDlE6mT79bqpbgfTpykZj8g9b4emPFh3lyP9arc7y9tJmp4sKY4HZnEVX 70oAMD5JEwhWAS8/7NwjI0Pn2jP2R2SxJNYmHRYJ/dt3m/K0OQGGhgX5U1lg2V4CpW cNbUdZFDdlKOwoUFmwD5WHoxV8z59fuzc2+Az7jE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Keith Busch , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.15 332/667] nvme: set dma alignment to dword Date: Tue, 7 Jun 2022 18:59:57 +0200 Message-Id: <20220607164944.725643462@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164934.766888869@linuxfoundation.org> References: <20220607164934.766888869@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Keith Busch [ Upstream commit 52fde2c07da606f3f120af4f734eadcfb52b04be ] The nvme specification only requires qword alignment for segment descriptors, and the driver already guarantees that. The spec has always allowed user data to be dword aligned, which is what the queue's attribute is for, so relax the alignment requirement to that value. While we could allow byte alignment for some controllers when using SGLs, we still need to support PRP, and that only allows dword. Fixes: 3b2a1ebceba3 ("nvme: set dma alignment to qword") Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 711b89424bd0..af355b9ee5ea 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1777,7 +1777,7 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl, blk_queue_max_segments(q, min_t(u32, max_segments, USHRT_MAX)); } blk_queue_virt_boundary(q, NVME_CTRL_PAGE_SIZE - 1); - blk_queue_dma_alignment(q, 7); + blk_queue_dma_alignment(q, 3); blk_queue_write_cache(q, vwc, vwc); } -- 2.35.1