From patchwork Thu Aug 10 04:44:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Selvin Xavier X-Patchwork-Id: 13348763 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C50BDC001B0 for ; Thu, 10 Aug 2023 04:56:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229470AbjHJE4X (ORCPT ); Thu, 10 Aug 2023 00:56:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbjHJE4W (ORCPT ); Thu, 10 Aug 2023 00:56:22 -0400 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D635A211D for ; Wed, 9 Aug 2023 21:56:21 -0700 (PDT) Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6bc886d1504so525424a34.0 for ; Wed, 09 Aug 2023 21:56:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1691643381; x=1692248181; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=ueqRGJGiViI1JMOLJnAxFZ0CFuziAxRertdpYKGiipQ=; b=GONcpP4ZWrHQBHIfOOP7buLuHvtohkMGH6aLt0mJKe1zDUibUVoU9fzABkICocoq3V k0w6Lp1Ul+ZDD/iOs13kV5YEbPjTn47LSXr9nLyIG9RmPhWCN6yp9Zvfle4OwW/V7oBU /QSI8oR34yIPebfFO0ari43LgD8YiO4YGDib4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691643381; x=1692248181; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ueqRGJGiViI1JMOLJnAxFZ0CFuziAxRertdpYKGiipQ=; b=ERzalNCWlGQEDZ4cIk3vIwISFmmWfuI4s+PzJacbZOYlVMnbdWe7+YHnFvM+Cqat8J 2YnElIzXKR36+Hx6Er2sq99kVbqrGtk9VfTi4JH3SKdc28ElzNJcEmgerI7RXO6UpH1R 4UnfaT0+5IFWKC7xnIflKlJI4s3MrYYHmpFfPcmLCHKFADXHkSauxVvFDm4Gf7EAoIK2 sGrwqKYA5wNnU3O73ynJG0Zx2rzBX8z2xSHtqnU+B9aOW7pGjMo5jkOOzS9Voxd3Xw4D 9K2n0LwW/p6F3Y5PmnR8oW7I2wGE51hW3ORVBdmKTOK88Yc4gyDpAL0Q+R1q76d/zj5f tFMg== X-Gm-Message-State: AOJu0Yxv/ThUgAlo98E9otbQI603Zl90h4muUADkJ1u6kgJ6Gk5MYz5e ybRxWhfNjMYtUdDs8iEj0cIcjA== X-Google-Smtp-Source: AGHT+IFUrAggKgRQUw4bVnoB47979Xgy38WLPCUr1Nk5DOu662CSQ8O6c2jwWsbSP6g4590tqXRVYw== X-Received: by 2002:a05:6830:14d3:b0:6bc:e2a8:6e3c with SMTP id t19-20020a05683014d300b006bce2a86e3cmr1429404otq.27.1691643381083; Wed, 09 Aug 2023 21:56:21 -0700 (PDT) Received: from dhcp-10-192-206-197.iig.avagotech.net.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id x6-20020a63b346000000b00553b9e0510esm458672pgt.60.2023.08.09.21.56.18 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Aug 2023 21:56:19 -0700 (PDT) From: Selvin Xavier To: jgg@ziepe.ca, leon@kernel.org Cc: linux-rdma@vger.kernel.org, andrew.gospodarek@broadcom.com, Selvin Xavier Subject: [PATCH for-rc 1/3] RDMA/bnxt_re: Fix ib device unalloc Date: Wed, 9 Aug 2023 21:44:35 -0700 Message-Id: <1691642677-21369-2-git-send-email-selvin.xavier@broadcom.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1691642677-21369-1-git-send-email-selvin.xavier@broadcom.com> References: <1691642677-21369-1-git-send-email-selvin.xavier@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org ib_dealloc_device should be called only after device cleanup. Fix the dealloc sequence. Fixes: 6d758147c7b8 ("RDMA/bnxt_re: Use auxiliary driver interface") Signed-off-by: Selvin Xavier --- drivers/infiniband/hw/bnxt_re/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/bnxt_re/main.c b/drivers/infiniband/hw/bnxt_re/main.c index b42166f..1c76460 100644 --- a/drivers/infiniband/hw/bnxt_re/main.c +++ b/drivers/infiniband/hw/bnxt_re/main.c @@ -1526,8 +1526,8 @@ static void bnxt_re_remove(struct auxiliary_device *adev) } bnxt_re_setup_cc(rdev, false); ib_unregister_device(&rdev->ibdev); - ib_dealloc_device(&rdev->ibdev); bnxt_re_dev_uninit(rdev); + ib_dealloc_device(&rdev->ibdev); skip_remove: mutex_unlock(&bnxt_re_mutex); }