From patchwork Thu Feb 10 09:58:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 541686 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 9489AC433FE for ; Thu, 10 Feb 2022 09:48:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238983AbiBJJss (ORCPT ); Thu, 10 Feb 2022 04:48:48 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237797AbiBJJsk (ORCPT ); Thu, 10 Feb 2022 04:48:40 -0500 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CCB81D4 for ; Thu, 10 Feb 2022 01:48:42 -0800 (PST) Received: by mail-pf1-x42a.google.com with SMTP id i6so7368524pfc.9 for ; Thu, 10 Feb 2022 01:48:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=72h5WKPlkHO5ooGhzFkIaNBrS5n0zDZmOPiouj12v/I=; b=Nsud+txbKDubfQlH1ulTvEFb0/Cpz1q+liWobej9mF65N3jTotE52LrPKGHH6FYhm9 Ke0NHaC22xi5BosUUOUyHffiucETYEB31NNtBDl0SLkcIk6vrIBO8RUSAounscmiVNke vVP2yc6jvlg8XH3S56Kize/gaUNVqdpAbH/90= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=72h5WKPlkHO5ooGhzFkIaNBrS5n0zDZmOPiouj12v/I=; b=Sro2Zlq+PtjuM51j6S/Nh8noJLfklAP/uX5T5zdexLmtELSQO21abwOYTojOixxEqx v9aS9Keqh+jkeNLOLFZrW4flJup19bnI4w5JTmOz2bARvx4I8qLkRHK7rIbfEdtoC5/A hur3PioG2JvaMsjGwEPXWwBV7D1ZV2+VVZ2yEwhQNXBNkx8SyRaIi0Bp+FPezMhVcU+Y SDIe+dFYfblTNjdoxp3tHhcoMnpamvs/tWmaBGlXq3H8zj1Xbe1zQks0AD8oCaBKo6aZ teYpFR0R0PkmhhLr14mxvxdMPFrd2NSQOkDUICKNJeh1IiFklI3WKEFeKIKi1V1KpDVb l+bg== X-Gm-Message-State: AOAM531pSKs5io/CUqdputr4OqnULNStQ0oZUnfEiRhWwc50Q+XXrvBM /SOLW6/321xfPtbPHsQ/7RgJ/WlYT+BL+hGOrNAiodbFLXZjVpb/NlXJRiRb0ietTJ3DuB/nYF5 6mjXvAjS4iaTaFBrzGSDgc4yu+5v0Y3emGrdyGBM0m6Ojzk7XY2EVutYATnqyHKeCM2DcH/R2VE THfwMxEhtVIc8= X-Google-Smtp-Source: ABdhPJyAmUzm8IzkY4zDwIyd+ijkaB5CYAGTH1hbXsWOz6AKQlNcaFNUeHm4TWTWv5g0xMjUGTcJfw== X-Received: by 2002:a63:d546:: with SMTP id v6mr5383758pgi.171.1644486521197; Thu, 10 Feb 2022 01:48:41 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id o21sm23706698pfu.100.2022.02.10.01.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 01:48:40 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, mpi3mr-linuxdrv.pdl@broadcom.com, Sreekanth Reddy Subject: [PATCH 4/9] mpi3mr: Fix hibernation issue Date: Thu, 10 Feb 2022 15:28:12 +0530 Message-Id: <20220210095817.22828-5-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> References: <20220210095817.22828-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Hibernation operation fails when it is issued for second time. This is getting failed as driver is trying to release IOC's PCI resources after setting it's power state to D3 state. So, Set the IOC's power state to D3 only after releasing the IOC's PCI resources. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_os.c b/drivers/scsi/mpi3mr/mpi3mr_os.c index 3eac18b..43e5cc6 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_os.c +++ b/drivers/scsi/mpi3mr/mpi3mr_os.c @@ -4473,8 +4473,8 @@ static int mpi3mr_suspend(struct pci_dev *pdev, pm_message_t state) ioc_info(mrioc, "pdev=0x%p, slot=%s, entering operating state [D%d]\n", pdev, pci_name(pdev), device_state); pci_save_state(pdev); - pci_set_power_state(pdev, device_state); mpi3mr_cleanup_resources(mrioc); + pci_set_power_state(pdev, device_state); return 0; }