From patchwork Tue Oct 24 08:12:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Vecera X-Patchwork-Id: 13434007 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 87A0714A8F for ; Tue, 24 Oct 2023 08:12:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iAWFY5yK" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 677ED8F for ; Tue, 24 Oct 2023 01:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698135138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=M4KgBKcWnOf+HdfkmOB81ZgiYiCuChuxsC6xnZ9eoT8=; b=iAWFY5yK1O/qpC+WEiijgwNRE+OvW72e9/W0liBimLd1Xn582fyK7sca2MFY4ubYrXJvRb y1/6Rf4DwcBHcMrtbDaUaJBSrjEY2wqGdFxLEMSkyZJy3rlMUotMp6qG8dVzfKUO9Jr68N b+rhlIwOkI2CU9oPyKKjixiIHgEWqvg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-277-yxYj-cPHOz2shsJQt_URWg-1; Tue, 24 Oct 2023 04:12:16 -0400 X-MC-Unique: yxYj-cPHOz2shsJQt_URWg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D73231019C86; Tue, 24 Oct 2023 08:12:15 +0000 (UTC) Received: from p1.luc.com (unknown [10.43.2.183]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC239492BFB; Tue, 24 Oct 2023 08:12:13 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , intel-wired-lan@lists.osuosl.org, linux-kernel@vger.kernel.org, Jacob Keller , mschmidt@redhat.com, dacampbe@redhat.com, poros@redhat.com Subject: [PATCH iwl-next v2 0/3] i40e: Add and use version check helpers Date: Tue, 24 Oct 2023 10:12:08 +0200 Message-ID: <20231024081211.677502-1-ivecera@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 The series moves an existing check for AQ API version to header file, adds another ones for firmware version check and use them to refactor existing open-coded version checks. Series content: Patch 1: Moves i40e_is_aq_api_ver_ge() helper to header file Patch 2: Adds another helpers to check running FW version Patch 3: Re-factors existing open-coded checks to use the new helpers Changes: v2 - Fixed indentation Ivan Vecera (3): i40e: Move i40e_is_aq_api_ver_ge helper i40e: Add other helpers to check version of running firmware and AQ API i40e: Use helpers to check running FW and AQ API versions drivers/net/ethernet/intel/i40e/i40e_adminq.c | 56 ++++++--------- drivers/net/ethernet/intel/i40e/i40e_common.c | 48 +++++-------- drivers/net/ethernet/intel/i40e/i40e_dcb.c | 7 +- drivers/net/ethernet/intel/i40e/i40e_main.c | 6 +- drivers/net/ethernet/intel/i40e/i40e_type.h | 68 +++++++++++++++++++ 5 files changed, 108 insertions(+), 77 deletions(-)