
Hi Marek
-----Original Message----- From: Marek Behún kabel@kernel.org Sent: Wednesday, October 27, 2021 9:36 AM To: Roman Bacik roman.bacik@broadcom.com Cc: Simon Glass sjg@chromium.org; U-Boot Mailing List <u- boot@lists.denx.de>; Bharat Gooty bharat.gooty@broadcom.com; Aswath Govindraju a-govindraju@ti.com; Bin Meng bmeng.cn@gmail.com; Franck LENORMAND franck.lenormand@nxp.com; Heinrich Schuchardt xypron.glpk@gmx.de; Kory Maincent kory.maincent@bootlin.com; Michal Simek michal.simek@xilinx.com; Patrick Delaunay patrick.delaunay@foss.st.com; Peng Fan peng.fan@nxp.com; Priyanka Jain priyanka.jain@nxp.com; Rayagonda Kokatanur rayagonda.kokatanur@broadcom.com; Sean Anderson sean.anderson@seco.com Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands
On Wed, 27 Oct 2021 08:05:11 -0700 Roman Bacik roman.bacik@broadcom.com wrote:
chimp_ld_secure #this command loads FW, which is necessary for PCIe to enumerate it pci enum #this command is necessary to call bnxt_bind
Wait, so what is this firmware for? Is it firmware for the netXtreme controller or for PCIe controller itself?
It is FW for netXtreme controller.
If it is for the ethernet controller, you should be able to determine whether there is netXtreme card present on the PCI bus without loading the firmware, by looking at PCI vendor / device ID.
The current code fails to enumerate PCI if FW is not loaded. Loading FW and trying to enumerate again still fails. Only reset helps after that.
In that case the firmware should be loaded when the ethernet controller is requested for, i.e. the ethact env variable points to that controller and a network command is executed (dhcp, tftpboot, ...).
(The ethact variable is used to set which ethernet controller is used for network commands when there are multiple etherent controllers.)
Thanks,
Roman