Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp70040pxb; Mon, 13 Sep 2021 13:12:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3yfd/IAoD+CCifqzZRhPQ1+sKN+ICCNEG5Q9T7cgw2yqywJ2lMeJa1Jd8YZEzmrzqhOs5 X-Received: by 2002:a17:906:2ac1:: with SMTP id m1mr14464820eje.518.1631563922823; Mon, 13 Sep 2021 13:12:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631563922; cv=none; d=google.com; s=arc-20160816; b=WRk8INaGsed5jyfp56vgU/NChsjL2HB/6t0bV4RnxwC5MjH0oWBVpMgrrUw5usdQJ1 zgDBX880pXRqArpzv1WQRX4K2KaKfsO8eBzhohjGXRI46foASJVI7beCOTIsRbRE1WB5 En0tj8SINwiZ9ER9Pr05ngaG2Sq1v8gLn0IlcMUcV75u9u+jkRkNycG5tbjo+TxOP27W Aast2UAcFiIt8Al6CXDOWpCXkC06brSh9b2audMmF08FdFvsym29BYDYrvGdG6711Zz/ FIWABHZ6kw1j5XEC18A84wKn/4hCI0jcAnNuWypGt6qKcP3N5UgOduzYIK6S+pWbcpbR Zlhg== 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=SbmzYMKEyXH7lT/6CdH3GFG+i05ggd5OQbVFnrgRZtA=; b=IhtvbVrSZ9wPCTVRF56YoyHldthGsxKqZVTvpBFqw5KkRxPd8CZr2mwvA/vzTKoWeO PViFykBj++NsUec8CKUuBG/FWtAvgFt6GpSB4ci5PgWr3e3QcaQRzTPp7kYJk1gTpiUB dl3NuYM2HW2no9seglkDVYST9DjT7Tj17uScaqcs1MnIKjj12aArVLixn4m/uizGGCUT J6XiClTmG6ZVRkZayeIka7EFfl426SZmHOmfJWvPkMRIlUHN4x963tRDfeLD4pmx9iiZ ibM2T2FV3aoQ2KYzYaWTVOrxjgBNr7X7VQQQyBqDgpjS3ba3c4OEnBjnGQZj/rojYQD6 f0Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i+gF2z4j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca5si2230174edb.284.2021.09.13.13.11.39; Mon, 13 Sep 2021 13:12:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=i+gF2z4j; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242295AbhIMNtx (ORCPT + 99 others); Mon, 13 Sep 2021 09:49:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:53624 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241556AbhIMNp7 (ORCPT ); Mon, 13 Sep 2021 09:45:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 37A1361242; Mon, 13 Sep 2021 13:31:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539913; bh=XF0uZ/NJuhtO93oLxSrCmNBUZFUFZrktfskP+lMO9hw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i+gF2z4jupMC/jhqi2wqz9OnoVub1dnvPLdVx4FhsoWB5cUg3yrwn0pVhr7qbeohX s8VmoUsQWw4kErmgE2RQli+JxfsiomIdFolnsdjbUx4CRVz7X0wAj0rW204uz0sSv+ jpx3JTZlhNI68gOLvlYHjgTcnBMg2flKhb+pcqf4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sudarsana Reddy Kalluru , Igor Russkikh , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 204/236] atlantic: Fix driver resume flow. Date: Mon, 13 Sep 2021 15:15:09 +0200 Message-Id: <20210913131107.320496103@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sudarsana Reddy Kalluru [ Upstream commit 57f780f1c43362b86fd23d20bd940e2468237716 ] Driver crashes when restoring from the Hibernate. In the resume flow, driver need to clean up the older nic/vec objects and re-initialize them. Fixes: 8aaa112a57c1d ("net: atlantic: refactoring pm logic") Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c index 59253846e885..f26d03735619 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c @@ -417,6 +417,9 @@ static int atl_resume_common(struct device *dev, bool deep) pci_restore_state(pdev); if (deep) { + /* Reinitialize Nic/Vecs objects */ + aq_nic_deinit(nic, !nic->aq_hw->aq_nic_cfg->wol); + ret = aq_nic_init(nic); if (ret) goto err_exit; -- 2.30.2