Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp935720rdb; Fri, 1 Dec 2023 02:38:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IELOm0PIeOIvJcDjvUzs91XgZ/LJ5p3W5N5pU9080AAr7JulGgbluki7DbSdSMqxEQO3KvH X-Received: by 2002:a17:90a:354:b0:280:18ba:f016 with SMTP id 20-20020a17090a035400b0028018baf016mr31953807pjf.47.1701427114826; Fri, 01 Dec 2023 02:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701427114; cv=none; d=google.com; s=arc-20160816; b=gC/FcPDBbdXbfyT9AmwVa+OjVx4qFdDQThDwZoP6zy8HVWuyN6aqybhylgDFsmn+8l FX/cZgQOdsZl4l4+snvCaURuNFH1zJeZyTn77NJPIa9jo0SiKkiFz4Mj54Nznny02Xkh V6gSWOse8Ts775Aiw7ChhX27Z9t3t1L4IbBqEyL1zmJtomQuhunoWB0219TTe7mc77q/ up/92P1jiTd7YI2mY6vcZcG5JVQvnF654ynBXKMXree3xkZXS5qECKB+IMIiFspaBovJ PH4WTjVZ6k+jcTQOzU9nNkJnZ68c2cFE1nu6ISCHsjtzhacYM7nV+3FHrw2sPfOKbvLa VWLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=FemRC6Ky2/6muF6CkLPhLRajIAbH+Nd+i13oj191cEM=; fh=Y2dNocNlUzJ4dhjPPhh6s55+T5Yt8NesMHn04sSH8N8=; b=usrhpdDt1Ow8F0hm3uuk3MoKvaPODjYbd3AZ9kUcg3Rn/oQg2JvjDTvbimqf0xn7a5 uvo4R1Ut97pnsQN2ZiOTI5JPBbz8tKE/8tCvvfZFtM9WzA2b7HFgEE7yqlY1uYSlPguQ pTSNXHVqL6Eb50UD5x5tAwg7uzyz/3Uw1zbqgETLD1cK9LUrodfD0mqT9Gy8C7G6XnNU apocu/5dZ/7UQw/sJaHz7563HtWc8x5jzQEtP66bFM6Iw6o7EGaG+/E9PAO6ww6WsTDB Wx57dBSoGa6VIDrRUTtQ9z1xJjhjHRZLAlHfE2t6O6TBF/wA0wKRgjpep+ppr18zDlH+ 8TXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-448-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-448-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x11-20020a17090aca0b00b002859d376d2csi3240987pjt.29.2023.12.01.02.38.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 02:38:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto+bounces-448-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto+bounces-448-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-crypto+bounces-448-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 505E628145D for ; Fri, 1 Dec 2023 10:38:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1670F210E3 for ; Fri, 1 Dec 2023 10:38:34 +0000 (UTC) X-Original-To: linux-crypto@vger.kernel.org Received: from abb.hmeau.com (abb.hmeau.com [144.6.53.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9322184 for ; Fri, 1 Dec 2023 02:12:25 -0800 (PST) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1r90VQ-005hlD-Hr; Fri, 01 Dec 2023 18:12:21 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 01 Dec 2023 18:12:29 +0800 Date: Fri, 1 Dec 2023 18:12:29 +0800 From: Herbert Xu To: Damian Muszynski Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com, Giovanni Cabiddu , Ahsan Atta Subject: Re: [PATCH] crypto: qat - add sysfs_added flag for ras Message-ID: References: <20231121170046.8097-1-damian.muszynski@intel.com> Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231121170046.8097-1-damian.muszynski@intel.com> On Tue, Nov 21, 2023 at 05:59:45PM +0100, Damian Muszynski wrote: > The qat_ras sysfs attribute group is registered within the > adf_dev_start() function, alongside other driver components. > If any of the functions preceding the group registration fails, > the adf_dev_start() function returns, and the caller, to undo the > operation, invokes adf_dev_stop() followed by adf_dev_shutdown(). > However, the current flow lacks information about whether the > registration of the qat_ras attribute group was successful or not. > > In cases where this condition is encountered, an error similar to > the following might be reported: > > 4xxx 0000:6b:00.0: Starting device qat_dev0 > 4xxx 0000:6b:00.0: qat_dev0 started 9 acceleration engines > 4xxx 0000:6b:00.0: Failed to send init message > 4xxx 0000:6b:00.0: Failed to start device qat_dev0 > sysfs group 'qat_ras' not found for kobject '0000:6b:00.0' > ... > sysfs_remove_groups+0x29/0x50 > adf_sysfs_stop_ras+0x4b/0x80 [intel_qat] > adf_dev_stop+0x43/0x1d0 [intel_qat] > adf_dev_down+0x4b/0x150 [intel_qat] > ... > 4xxx 0000:6b:00.0: qat_dev0 stopped 9 acceleration engines > 4xxx 0000:6b:00.0: Resetting device qat_dev0 > > To prevent attempting to remove attributes from a group that has not > been added yet, a flag named 'sysfs_added' is introduced. This flag > is set to true upon the successful registration of the attribute group. > > Fixes: 532d7f6bc458 ("crypto: qat - add error counters") > Signed-off-by: Damian Muszynski > Reviewed-by: Giovanni Cabiddu > Reviewed-by: Ahsan Atta > --- > drivers/crypto/intel/qat/qat_common/adf_accel_devices.h | 1 + > .../crypto/intel/qat/qat_common/adf_sysfs_ras_counters.c | 7 ++++++- > 2 files changed, 7 insertions(+), 1 deletion(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt