Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp775343pxb; Tue, 5 Apr 2022 22:49:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5yxs6b6ShHeaicg1PhXcsisbFfiWPXSg+4l8wqpVFPIp2SazzfKvfs3ithDB1Zwazp4gL X-Received: by 2002:a05:6a00:1644:b0:4f6:d248:c059 with SMTP id m4-20020a056a00164400b004f6d248c059mr7418546pfc.78.1649224175519; Tue, 05 Apr 2022 22:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649224175; cv=none; d=google.com; s=arc-20160816; b=j+XGSe+ZDevAPvsHE0idovTCkNEk0uW+FRqoCCIhxTs/m+fxbuYYTRaoMlVZ7y/gTV 9FlO396PhA6mGkMOVpLTwteQDjKTVPwjBv15X4d+J1YGMoqlwRtLidULZMkz/gxEucKK KVm3Mv2uvdjzXQOfqLKk/DL15/n5QoszRFL0wxy5coRcwRl8SFkYl26OynWG9TgOMPni wHpNRVW9WZtQdMc1K/8B4fhXGzTkEQWtOeWQPsfKhXoyXJi+tJEczbjC/TKC5kBMJps+ EIiZpiRSJHo5rT4Go/PYira4klBFhbhXOx9GmxS/3tBweYwpY4QQuiqb7oAlJkTPmCDE HLxg== 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=J0GJMvoXmz9edC+1uC0hs5Inm1Sm1vtAfC8lDZ7O2Fc=; b=vJ/cSq+l/2CFgDyc/ZwINKkouq2eT5zqpRVK6Z3eHMYxGhjMOFY8XMN8qqRLL7CTeK eqbZSic3oo4ceisPiXwfJl3cVcw2IMXi+fQHlXQ1PnLENPNpx5UCX9+X5rKOP9/XZMId 1WNR2unfBqBFl1yaNPocpSPL5JZ0VXvsmF29257kD52NO6gR6ARfHsenGjZf9Z4Gmhc+ YeWhxzvGKkZzyUH+xlg+5U2VhdYJquT5WQRrjI8V6eRJpG3EHlSWqRnD0CmETRyxgAf2 P21waop7V5L2jWr1cjpMDV7xtyr0HDdeTJGSVMTS6xOt0Lr8rNoqi6zD+CA2n5R/GuNo /SmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mqJVOK1Q; 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 lp5-20020a17090b4a8500b001bf040acc3dsi4277140pjb.170.2022.04.05.22.49.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 22:49:35 -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=mqJVOK1Q; 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 0CF7F49E41B; Tue, 5 Apr 2022 22:22:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1840705AbiDFBLg (ORCPT + 99 others); Tue, 5 Apr 2022 21:11:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349423AbiDEJtu (ORCPT ); Tue, 5 Apr 2022 05:49:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06AC020F54; Tue, 5 Apr 2022 02:45:26 -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 ACD09B817D3; Tue, 5 Apr 2022 09:45:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09658C385A2; Tue, 5 Apr 2022 09:45:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151923; bh=ss11tPJGGNdIsAgJ8Xbztbtc1t9yrChn0oODZOPM5d8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mqJVOK1QTZdkNM5hNvVy1YbDENZK8jsXL0gsgS8VXcKQBxFdbQTx68ORtrROB865V r2oxBcVe0XP0cna5VoqgF1JduUyBiuPP3n5Srgk4Y0zglQaO9jvaNSgL04burNZOgy zX/T3PVJamHqKkdQ7Sa1EBtJwn2aL7elJ6DudiGM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Binuraj Ravindran , Dave Jiang , Vinod Koul , Sasha Levin Subject: [PATCH 5.15 591/913] dmaengine: idxd: restore traffic class defaults after wq reset Date: Tue, 5 Apr 2022 09:27:33 +0200 Message-Id: <20220405070357.558080802@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@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=-2.0 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=no 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: Dave Jiang [ Upstream commit ea7c8f598c323f6ebaf9ddae01fb2a981fe8c56a ] When clearing the group configurations, the driver fails to restore the default setting for DSA 1.x based devices. Add defaults in idxd_groups_clear_state() for traffic class configuration. Fixes: ade8a86b512c ("dmaengine: idxd: Set defaults for GRPCFG traffic class") Reported-by: Binuraj Ravindran Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/164304123369.824298.6952463420266592087.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/idxd/device.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index ac671b6c0c36..7bd9ac1e93b2 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -703,8 +703,13 @@ static void idxd_groups_clear_state(struct idxd_device *idxd) group->use_rdbuf_limit = false; group->rdbufs_allowed = 0; group->rdbufs_reserved = 0; - group->tc_a = -1; - group->tc_b = -1; + if (idxd->hw.version < DEVICE_VERSION_2 && !tc_override) { + group->tc_a = 1; + group->tc_b = 1; + } else { + group->tc_a = -1; + group->tc_b = -1; + } } } -- 2.34.1