Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2195082iof; Tue, 7 Jun 2022 22:50:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAzq6Wav8Gx/dmbjwaip6fT1Qkacso0ExSBdFrVdX03jaTkipuETEnzSEBCKdwFZfo8HVj X-Received: by 2002:a17:90b:4c88:b0:1e6:71da:5eb0 with SMTP id my8-20020a17090b4c8800b001e671da5eb0mr37360617pjb.185.1654667450871; Tue, 07 Jun 2022 22:50:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667450; cv=none; d=google.com; s=arc-20160816; b=0JoQgQQ8WsGIbzlRNmSK9+xXtmlVuV9m45A8bh6BP55xCYqtGQ/1003AZMMyL5ecut 4T2OdkiJ07oNXNOgO1AS0d2d6WEwP8LgaUJjCgZNkYiWiA6Y+qN8W0b4eI+1tWS+1o9i wTg7do8sa33HxPtZSYXOU30onseqmH9TuRY6lUXEHqa5deGdstBN8gGk9KZnmj/QyjVc dtJ4w7hkU+aspu4y5viIzsP5NmtJLGAJ3f2J3Kh3MLTbNpmNEokO3/ve5NrVal9yo/y5 Ti/T8CCWMdwDAVDRQoGJk/0m9VKFXJyeUjC8mmeCDWG+BThiQv5tk47uNH0melTQbOZe 4jhQ== 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=84hrHDcqtbzIHKlkgBPj1N1MX/BdNRTfq98CVTYcLJg=; b=AmY/wijDh98Mvvwx1z60SuNtD+PnK51RRtGuLQLodCETOKeamELwC7b8ft8RJll5j6 /2NZgOL6feXfWGW3/Dn5E+ov1rAadWx975uKeGq/18cRmNFxBn/hnb5843BV88jRmbBK XHyMRCHy1bPD8YNH7TRVovfcDUX/xzqyJAZa31Z6HAOo2Jlpgz8S4EbRz96MKo8h6bXs iZ+DiY0TCSXbLq9rH1iaGRK2tSZMXBwgExAr/NOiAg0DNXSgbMv64LiIM9p7kw7SpCs+ DjAk4sfjbmZXavhmomd2BABim1cyxrex3HzkXfL4sAKh1r16jkIXXlRns95lye+n2/A+ dL4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ydaur3Cx; 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 b9-20020a170902d88900b0016390a937aesi24541809plz.524.2022.06.07.22.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:50:50 -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=ydaur3Cx; 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 859774A6BB8; Tue, 7 Jun 2022 22:17:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1390075AbiFHAq0 (ORCPT + 99 others); Tue, 7 Jun 2022 20:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382401AbiFGVvY (ORCPT ); Tue, 7 Jun 2022 17:51:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB4A01B7825; Tue, 7 Jun 2022 12:08:46 -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 0B292B823AE; Tue, 7 Jun 2022 19:08:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7485BC385A2; Tue, 7 Jun 2022 19:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628923; bh=aDXklFj4QxSRwAH8oeEkxX8UEqIXSQrOhWi8XCYMsRs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ydaur3CxA3/rG/xO148AFsW36+kGBEfQCO9zs+4h/qOrTl0nh9WV4BbAOxxvbLudz JWpKvTovxgODjXe0C9DhShLM75LxNqH6Xe4/N1EU4rS14F9xl5UgmPwKr1Wxaih7KA 3QdAyc55cpjNTvm2EGQHheRdUjCTpJso8r24e7fA= 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.18 465/879] nvme: set dma alignment to dword Date: Tue, 7 Jun 2022 18:59:43 +0200 Message-Id: <20220607165016.374006493@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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 ac32d1cd8477..2d6a01853109 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1771,7 +1771,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