Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2163804iof; Tue, 7 Jun 2022 21:53:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDCK5+9ejFSFMfOShYYr0JX3vpI8G7uFcerHbvZc9u4v9opTVDutFRQNmwy7mZ14jmoD67 X-Received: by 2002:a17:902:9684:b0:161:5b2b:6ea2 with SMTP id n4-20020a170902968400b001615b2b6ea2mr31529433plp.71.1654663980878; Tue, 07 Jun 2022 21:53:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663980; cv=none; d=google.com; s=arc-20160816; b=lUEdGxfI/7CVkZZk/1ApVwSSafQ7JFPb5wUfJ3i6zIe58pGUYMCcX72PavttuXyICy Afo6NTjLjRmQR9Zow9C8jv8QB4ojRpapPSuw6a828xLVBNr4pntp07LpmGoUi1tcw0lM Nbogm8db7UhoMr4JYRSS+IWEJ9sMUKEweDW0JzbkoybC8bgsEK5fK593+Bc9kjAyl7oR qHoyJRnmECo5EG0dgtvCk5mhkXoWDvGu+HEgDfTOW5EW0NQJs8KUMbsLv4jWyGjNchB3 j8M9w98hpgFdJrTHayYY4E99pg5+7cTvAnlmvNd3E4s6buPX9OIMqaayCgm8dqwmVD/+ vUHQ== 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=9Subss043IEMvOVSPtsHDYTuJiG5dxN4SRS8LkCdlV8=; b=syj3muYCOWG0gx554a9jysXvJACUJH5HFhKqBTZJN55AYVOQODjvgZmmHKjrW3r47O YC2foAQQ6CNBM02YwxMHdNqDL1yJ1YimPToxJT8UuSN0yKwbxJNU0EzZpHa1wtLf3U3P TSr60LVAsz7+lA6+wPUsDXvjs1Ts/LiDEPjL64byVePBjzvikHkped2hR7mtQLvC4H46 NeF6xkH/qt2tdjMM6i631ga9oOAO7kfUv/j0hlXdbjJpbJqWEENSHiwv8ylvMCKMwSVv xXhoKW5Oi0koYLq3NJ8QGNZbz+erp1PUZ9+mBcEeaGFAgfjkEro3m4L490xvy+CymX/f Y9xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1WVvSGRT; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id f11-20020a170902860b00b00163efacaf02si23309719plo.32.2022.06.07.21.52.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:53:00 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1WVvSGRT; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 DDB5B454BEB; Tue, 7 Jun 2022 21:22:31 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379644AbiFGVKs (ORCPT + 99 others); Tue, 7 Jun 2022 17:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359467AbiFGUNE (ORCPT ); Tue, 7 Jun 2022 16:13:04 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91A521C7EE3; Tue, 7 Jun 2022 11:28:07 -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 sin.source.kernel.org (Postfix) with ESMTPS id 2F2EDCE2439; Tue, 7 Jun 2022 18:28:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AED4C385A2; Tue, 7 Jun 2022 18:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654626484; bh=kJImaIrTdnGNJWNnXYrajPYnP1GG0dHB5UOP8/EZ9G4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1WVvSGRTJK/6qfQ8GDresksAeu9JJ9BGAntzrNVoijJOiPxewBbhE478e/Lz3TDDW iHelC+nqXINAGb6v213kRzQsYpLrm5MXq5o7RGJ82oHH9hGSdoNXysVkvWzjEx5pJ1 Yr8A0TFeFwkZxD3Vvvj1Qx3ulBGLvlPtkTmCtA8I= 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.17 396/772] nvme: set dma alignment to dword Date: Tue, 7 Jun 2022 18:59:48 +0200 Message-Id: <20220607165000.680924542@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164948.980838585@linuxfoundation.org> References: <20220607164948.980838585@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 79ef46356d40..e086440a2042 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1796,7 +1796,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