From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:58084 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752338AbcKRKhZ (ORCPT ); Fri, 18 Nov 2016 05:37:25 -0500 Subject: Patch "Revert "bnx2: Reset device during driver initialization"" has been added to the 4.8-stable tree To: bhe@redhat.com, davem@davemloft.net, gregkh@linuxfoundation.org, pmenzel@molgen.mpg.de Cc: , From: Date: Fri, 18 Nov 2016 11:37:04 +0100 Message-ID: <14794654249378@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled Revert "bnx2: Reset device during driver initialization" to the 4.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-bnx2-reset-device-during-driver-initialization.patch and it can be found in the queue-4.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Fri Nov 18 11:35:46 CET 2016 From: Baoquan He Date: Sun, 13 Nov 2016 13:01:32 +0800 Subject: Revert "bnx2: Reset device during driver initialization" From: Baoquan He [ Upstream commit 5d0d4b91bf627f14f95167b738d524156c9d440b ] This reverts commit 3e1be7ad2d38c6bd6aeef96df9bd0a7822f4e51c. When people build bnx2 driver into kernel, it will fail to detect and load firmware because firmware is contained in initramfs and initramfs has not been uncompressed yet during do_initcalls. So revert commit 3e1be7a and work out a new way in the later patch. Signed-off-by: Baoquan He Acked-by: Paul Menzel Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bnx2.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -6356,6 +6356,10 @@ bnx2_open(struct net_device *dev) struct bnx2 *bp = netdev_priv(dev); int rc; + rc = bnx2_request_firmware(bp); + if (rc < 0) + goto out; + netif_carrier_off(dev); bnx2_disable_int(bp); @@ -6424,6 +6428,7 @@ open_err: bnx2_free_irq(bp); bnx2_free_mem(bp); bnx2_del_napi(bp); + bnx2_release_firmware(bp); goto out; } @@ -8570,12 +8575,6 @@ bnx2_init_one(struct pci_dev *pdev, cons pci_set_drvdata(pdev, dev); - rc = bnx2_request_firmware(bp); - if (rc < 0) - goto error; - - - bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET); memcpy(dev->dev_addr, bp->mac_addr, ETH_ALEN); dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG | @@ -8608,7 +8607,6 @@ bnx2_init_one(struct pci_dev *pdev, cons return 0; error: - bnx2_release_firmware(bp); pci_iounmap(pdev, bp->regview); pci_release_regions(pdev); pci_disable_device(pdev); Patches currently in stable-queue which might be from bhe@redhat.com are queue-4.8/revert-bnx2-reset-device-during-driver-initialization.patch queue-4.8/bnx2-wait-for-in-flight-dma-to-complete-at-probe-stage.patch