Skip to contentSkip to conversation

net: brcm: netXtreme driver

PATCH Superseded Roman Bacik 3 participants 19 messages Oct 25, 2021 – Oct 27, 2021 Network drivers

v3 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 net: brcm: netXtreme driver

From: Bharat Gooty <[email protected]>

Broadcom bnxt L2 driver support. Used by the Broadcom iproc platforms.

---

Changes in v3:
- change printf to debug in display_banner
- remove get/set/print mac/speed
- remove bnxt_hwrm_set_nvmem

Changes in v2:
- rebase and remove DM_PCI dependency from BNXT_ETH
- remove tautology assignment from debug_resp()

 drivers/net/Kconfig         |    1 +
 drivers/net/Makefile        |    1 +
 drivers/net/bnxt/Kconfig    |    6 +
 drivers/net/bnxt/Makefile   |    5 +
 drivers/net/bnxt/bnxt.c     | 1841 +++++++++++++++++++++++++++++++++++
 drivers/net/bnxt/bnxt_dbg.h |  537 ++++++++++
 drivers/net/bnxt/pci_ids.h  |   17 +
 include/broadcom/bnxt.h     |  407 ++++++++
 include/broadcom/bnxt_hsi.h |  889 +++++++++++++++++
 include/broadcom/bnxt_ver.h |   22 +
 10 files changed, 3726 insertions(+)
 create mode 100644 drivers/net/bnxt/Kconfig
 create mode 100644 drivers/net/bnxt/Makefile
 create mode 100644 drivers/net/bnxt/bnxt.c
 create mode 100644 drivers/net/bnxt/bnxt_dbg.h
 create mode 100644 drivers/net/bnxt/pci_ids.h
 create mode 100644 include/broadcom/bnxt.h
 create mode 100644 include/broadcom/bnxt_hsi.h
 create mode 100644 include/broadcom/bnxt_ver.h
drivers/net/Kconfig +1 -0
index 6c12959f3794..8dc81a3d6cf9 100644
@@ -1,6 +1,7 @@
 source "drivers/net/phy/Kconfig"
 source "drivers/net/pfe_eth/Kconfig"
 source "drivers/net/fsl-mc/Kconfig"
+source "drivers/net/bnxt/Kconfig"
 
 config ETH
 	def_bool y
drivers/net/Makefile +1 -0
index e4078d15a99f..1d9fbd6693cc 100644
@@ -101,3 +101,4 @@ obj-$(CONFIG_HIGMACV300_ETH) += higmacv300.o
 obj-$(CONFIG_MDIO_SANDBOX) += mdio_sandbox.o
 obj-$(CONFIG_FSL_ENETC) += fsl_enetc.o fsl_enetc_mdio.o
 obj-$(CONFIG_FSL_LS_MDIO) += fsl_ls_mdio.o
+obj-$(CONFIG_BNXT_ETH) += bnxt/
drivers/net/bnxt/Kconfig new file +6 -0
new file mode 100644
index 000000000000..edc319a10625
@@ -0,0 +1,6 @@
+config BNXT_ETH
+	bool "BNXT PCI support"
+	depends on DM_ETH
+	help
+	  This driver implements support for bnxt pci controller
+	  driver of ethernet class.
drivers/net/bnxt/Makefile new file +5 -0
new file mode 100644
index 000000000000..a9d6ce00d5e0
@@ -0,0 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright 2019-2021 Broadcom.
+
+# Broadcom nxe Ethernet driver
+obj-y += bnxt.o
drivers/net/bnxt/bnxt.c new file +1841 -0

1,841 lines not on this page · raw message

drivers/net/bnxt/bnxt_dbg.h new file +537 -0

537 lines not on this page · raw message

drivers/net/bnxt/pci_ids.h new file +17 -0
new file mode 100644
index 000000000000..e9312be5acb4
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2019-2021 Broadcom.
+ */
+
+#ifndef _PCI_IDS_H_
+#define _PCI_IDS_H_
+
+#define PCI_VID_BROADCOM            0x14e4
+#define PCI_DID_NXT_57320_1         0x16F0
+
+static struct pci_device_id bnxt_nics[] = {
+	{PCI_DEVICE(PCI_VID_BROADCOM, PCI_DID_NXT_57320_1)},
+	{}
+};
+
+#endif /* _PCI_IDS_H_ */
include/broadcom/bnxt.h new file +407 -0

407 lines not on this page · raw message

include/broadcom/bnxt_hsi.h new file +889 -0

176 lines not on this page · raw message

include/broadcom/bnxt_ver.h new file +22 -0
new file mode 100644
index 000000000000..fa84397338dd

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 15 lines
2.17.1


-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

Part of the diff is not shown here. View the raw message.

#1 lore raw

PATCH v3 2/2 cmd: brcm: netXtreme commands

From: Bharat Gooty <[email protected]>

Following netXtreme commands are supported:
probe, remove.

---

Changes in v3:
- remove commands set/get mac/speed
- add doc/bnxt.rst

 cmd/Kconfig           |  2 +
 cmd/broadcom/Kconfig  | 10 +++++
 cmd/broadcom/Makefile |  3 +-
 cmd/broadcom/bnxt.c   | 97 +++++++++++++++++++++++++++++++++++++++++++
 doc/usage/bnxt.rst    | 35 ++++++++++++++++
 doc/usage/index.rst   |  1 +
 6 files changed, 147 insertions(+), 1 deletion(-)
 create mode 100644 cmd/broadcom/Kconfig
 create mode 100644 cmd/broadcom/bnxt.c
 create mode 100644 doc/usage/bnxt.rst
cmd/Kconfig +2 -0
index 5b30b13e438f..e054292dbcd0 100644
@@ -1953,6 +1953,8 @@ endmenu
 
 source "cmd/ti/Kconfig"
 
+source "cmd/broadcom/Kconfig"
+
 config CMD_BOOTSTAGE
 	bool "Enable the 'bootstage' command"
 	depends on BOOTSTAGE
cmd/broadcom/Kconfig new file +10 -0
new file mode 100644
index 000000000000..6f16b09d1425
@@ -0,0 +1,10 @@
+menu "Broadcom specific command line interface"
+
+config BNXT_ETH_CMD
+	bool "BNXT commands"
+	depends on BNXT_ETH
+	help
+	  Broadcom NXS ethernet controller commands. Commands supported are:-
+	  Driver probe, Driver remove, Supported speeds, get/set MAC address and get/set Link speeds.
+
+endmenu
cmd/broadcom/Makefile +2 -1
index 62268d98d0dd..0027c1c15e5a 100644
@@ -1,6 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0+
-# Copyright 2020 Broadcom
+# Copyright 2020-2021 Broadcom
 
 obj-y += chimp_boot.o
 obj-y += nitro_image_load.o
 obj-y += chimp_handshake.o
+obj-$(CONFIG_BNXT_ETH_CMD) += bnxt.o
cmd/broadcom/bnxt.c new file +97 -0

97 lines not on this page · raw message

doc/usage/bnxt.rst new file +35 -0
new file mode 100644
index 000000000000..4b0b7b22411a
@@ -0,0 +1,35 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+bnxt command
+============
+
+Synopsis
+--------
+
+::
+
+    bnxt bnxt_eth# probe
+    bnxt bnxt_eth# remove
+
+Description
+-----------
+
+The bnxt commands are used to load and unload the bnxt driver. The probe loads and remove unloads the driver.
+
+Example
+-------
+
+::
+
+    => bnxt 0 probe
+    => bnxt 0 remove
+
+Configuration
+-------------
+
+The bnxt commands are only available if CONFIG_CMD_BNXT=y.
+
+Return value
+------------
+
+The return value $? is 0 if successful and nonzero error code if the command fails.
doc/usage/index.rst +1 -0
index 356f2a56181b..834e8d274646 100644
@@ -20,6 +20,7 @@ Shell commands
    addrmap
    askenv
    base
+   bnxt
    bootefi
    booti
    bootmenu
Signature · 15 lines
2.17.1


-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#2 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 8 lines · On Mon, 25 Oct 2021 16:44:44 -0700 Roman Bacik <[email protected]> wrote:

From: Bharat Gooty <[email protected]>

Following netXtreme commands are supported:
probe, remove.

Hi Roman,

why do you need to have custom command for probing / removing the driver?

U-Boot PCI code should probe the driver automatically upon recognizing PCI vendor / device ID.

Even if not, adding custom command for such a thing isn't nice, when we have the dm command for communicating with driver model.

Marek

#3 lore raw

RE: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 33 lines

-----Original Message-----
From: Marek Behún <[email protected]>
Sent: Tuesday, October 26, 2021 6:18 AM
To: Roman Bacik <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <a- [email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>; Priyanka Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>; Simon Glass <[email protected]>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 8 lines · On Mon, 25 Oct 2021 16:44:44 -0700 Roman Bacik <[email protected]> wrote:

From: Bharat Gooty <[email protected]>

Following netXtreme commands are supported:
probe, remove.

Hi Roman,

why do you need to have custom command for probing / removing the driver?

Quoted 7 lines

U-Boot PCI code should probe the driver automatically upon recognizing PCI vendor / device ID.

Even if not, adding custom command for such a thing isn't nice, when we have the dm command for communicating with driver model.

Marek

Hi Marek,

We do not want this driver to be automatically probed. It is not needed all the time and also slows down the boot time. We have stripped down everything else to bare minimum.
Thanks,

Roman

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#4 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 8 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed all the time and also slows down the boot time. We have stripped down everything else to bare minimum.
Thanks,

Roman

Hi Roman,

OK, that is reasonable, but not reasonable enough to introduce a new vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but you don't set a pointer to it into the U_BOOT_DRIVER structure, and instead you call this method when "brcm probe" command is called.

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the device is needed, there are 2 things you could do:

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag to your driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that takes long time into bnxt_start(), which is called only when network via this ethernet controller is requested for by U-Boot commands.

Also, you're still doing

+ if (env_get("ethaddr"))
+ secondary = 1;

in your driver, which is completely against DM.

Marek

#5 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 29 lines · Marek Behún
Quoted 8 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed all the time and also slows down the boot time. We have stripped down everything else to bare minimum.
Thanks,

Roman

Hi Roman,

OK, that is reasonable, but not reasonable enough to introduce a new vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but you don't set a pointer to it into the U_BOOT_DRIVER structure, and instead you call this method when "brcm probe" command is called.

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the device is needed, there are 2 things you could do:

Quoted 6 lines

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag to your driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that takes long time into bnxt_start(), which is called only when network via this ethernet controller is requested for by U-Boot commands.

So renaming bnxt probe/remove to bnxt start/stop will do, right?

Review

Quoted 5 lines

Also, you're still doing

(quoted diff) +2 -0
+       if (env_get("ethaddr"))
+               secondary = 1;

Why can't we access the env variable from our "bnxt start" method? Is there a blacklist of env variables one must not access from a driver?

Quoted 4 lines

in your driver, which is completely against DM.

Marek

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#6 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 41 lines · Roman Bacik
Quoted 29 lines · Marek Behún
Quoted 8 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed all the time and also slows down the boot time. We have stripped down everything else to bare minimum.
Thanks,

Roman

Hi Roman,

OK, that is reasonable, but not reasonable enough to introduce a new vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but you don't set a pointer to it into the U_BOOT_DRIVER structure, and instead you call this method when "brcm probe" command is called.

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the device is needed, there are 2 things you could do:

Quoted 6 lines

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag to your driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that takes long time into bnxt_start(), which is called only when network via this ethernet controller is requested for by U-Boot commands.

So renaming bnxt probe/remove to bnxt start/stop will do, right?

Quoted 1 line
Quoted 7 lines

Review

Quoted 4 lines

Also, you're still doing

(quoted diff) +2 -0
+       if (env_get("ethaddr"))
+               secondary = 1;

Why can't we access the env variable from our "bnxt start" method? Is there a blacklist of env variables one must not access from a driver?

Marek,

Sometimes we can have two ethernet devices. One is 10/100/1000M rgmii and another is chip internal 10/100G bnxt. If rgmii is there as eth0, we are incrementing eth number for bnxt:

if (env_get("ethaddr"))

    secondary = 1;

eth_env_get_enetaddr_by_index("eth",bp->cardnum+secondary,bp->mac_set);

This way the driver can find that rmii has already taken eth0 so it will use eth1 instead. Do you have a suggestion to work around this? Thanks,

Roman

Quoted 6 lines
Quoted 6 lines

in your driver, which is completely against DM.

Marek

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#7 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 56 lines · On Tue, 26 Oct 2021 09:40:44 -0700 Roman Bacik <[email protected]> wrote:
Quoted 41 lines · Roman Bacik
Quoted 29 lines · Marek Behún
Quoted 8 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed all the time and also slows down the boot time. We have stripped down everything else to bare minimum.
Thanks,

Roman

Hi Roman,

OK, that is reasonable, but not reasonable enough to introduce a new vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but you don't set a pointer to it into the U_BOOT_DRIVER structure, and instead you call this method when "brcm probe" command is called.

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the device is needed, there are 2 things you could do:

Quoted 6 lines

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag to your driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that takes long time into bnxt_start(), which is called only when network via this ethernet controller is requested for by U-Boot commands.

So renaming bnxt probe/remove to bnxt start/stop will do, right?

Quoted 1 line
Quoted 7 lines

Review

Quoted 4 lines

Also, you're still doing

(quoted diff) +2 -0
+       if (env_get("ethaddr"))
+               secondary = 1;

Why can't we access the env variable from our "bnxt start" method? Is there a blacklist of env variables one must not access from a driver?

Marek,

Sometimes we can have two ethernet devices. One is 10/100/1000M rgmii and another is chip internal 10/100G bnxt. If rgmii is there as eth0, we are incrementing eth number for bnxt:

Quoted 7 lines

if (env_get("ethaddr"))

    secondary = 1;

eth_env_get_enetaddr_by_index("eth",bp->cardnum+secondary,bp->mac_set);

This way the driver can find that rmii has already taken eth0 so it will use eth1 instead. Do you have a suggestion to work around this? Thanks,

I just replied to your first reply:

Every ethernet controller should use a specific ethNaddr, where N = dev_seq(dev) of that controller (and if N=0, it is omitted entirely).

So no magical things such as
bp->cardnum+secondary

instead you use dev_seq(dev), which gives you the correct number, i.e. for N-th UCLASS_ETH device bound it return the number N.

Marek

#8 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 74 lines · Marek Behún
Quoted 56 lines · On Tue, 26 Oct 2021 09:40:44 -0700 Roman Bacik <[email protected]> wrote:
Quoted 41 lines · Roman Bacik
Quoted 29 lines · Marek Behún
Quoted 8 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed all the time and also slows down the boot time. We have stripped down everything else to bare minimum.
Thanks,

Roman

Hi Roman,

OK, that is reasonable, but not reasonable enough to introduce a new vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but you don't set a pointer to it into the U_BOOT_DRIVER structure, and instead you call this method when "brcm probe" command is called.

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the device is needed, there are 2 things you could do:

Quoted 6 lines

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag to your driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that takes long time into bnxt_start(), which is called only when network via this ethernet controller is requested for by U-Boot commands.

So renaming bnxt probe/remove to bnxt start/stop will do, right?

Quoted 1 line
Quoted 7 lines

Review

Quoted 4 lines

Also, you're still doing

(quoted diff) +2 -0
+       if (env_get("ethaddr"))
+               secondary = 1;

Why can't we access the env variable from our "bnxt start" method? Is there a blacklist of env variables one must not access from a driver?

Marek,

Sometimes we can have two ethernet devices. One is 10/100/1000M rgmii and another is chip internal 10/100G bnxt. If rgmii is there as eth0, we are incrementing eth number for bnxt:

Quoted 7 lines

if (env_get("ethaddr"))

    secondary = 1;

eth_env_get_enetaddr_by_index("eth",bp->cardnum+secondary,bp->mac_set);

This way the driver can find that rmii has already taken eth0 so it will use eth1 instead. Do you have a suggestion to work around this? Thanks,

I just replied to your first reply:

Every ethernet controller should use a specific ethNaddr, where N = dev_seq(dev) of that controller (and if N=0, it is omitted entirely).

Quoted 7 lines

So no magical things such as
bp->cardnum+secondary

instead you use dev_seq(dev), which gives you the correct number, i.e. for N-th UCLASS_ETH device bound it return the number N.

Marek

Marek,

Thank you very much for your suggestion, we will try it.

Roman

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#9 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

In reply to Roman Bacik
Quoted 30 lines · On Tue, 26 Oct 2021 09:02:54 -0700 Roman Bacik <[email protected]> wrote:
Quoted 29 lines · Marek Behún
Quoted 8 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed all the time and also slows down the boot time. We have stripped down everything else to bare minimum.
Thanks,

Roman

Hi Roman,

OK, that is reasonable, but not reasonable enough to introduce a new vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but you don't set a pointer to it into the U_BOOT_DRIVER structure, and instead you call this method when "brcm probe" command is called.

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the device is needed, there are 2 things you could do:

Quoted 8 lines
Quoted 6 lines

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag to your driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that takes long time into bnxt_start(), which is called only when network via this ethernet controller is requested for by U-Boot commands.

So renaming bnxt probe/remove to bnxt start/stop will do, right?

No. The whole idea of adding the new "bnxt" command is wrong, because the command is *vendor specific*. The ethernet controller should work out of the box with standard U-Boot commands, i.e. it if I use the
dhcp
command, it should work, without needing to call the "bnxt" command.

Quoted 8 lines

Review

Quoted 5 lines

Also, you're still doing

(quoted diff) +2 -0
+       if (env_get("ethaddr"))
+               secondary = 1;  

Why can't we access the env variable from our "bnxt start" method? Is there a blacklist of env variables one must not access from a driver?

Because the "ethaddr" variable is the MAC address of the 0-th ethernet controller on the board, which does not have anything to do with yout broadcom netXtreme controller, unless your broadcom netXtreme controller is the zero-th ethernet controller on the board.

For example if I connect you controller to the PCIe slot on Turris Omnia, where there are 3 ethernet controllers already, and their MAC addresses are stored in
ethaddr
eth1addr
eth2addr
the MAC address of the netXtreme controller would be stored in variable
eth3addr

So in your UCLASS_ETH driver, you should only look at
dev_seq(dev)
ethaddr, by using
eth_env_get/set_enetaddr_by_index("eth", dev_seq(dev), ...);

Marek

#10 lore raw

RE: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 61 lines

-----Original Message-----
From: Marek Behún <[email protected]>
Sent: Tuesday, October 26, 2021 9:50 AM
To: Roman Bacik <[email protected]>
Cc: Simon Glass <[email protected]>; U-Boot Mailing List <u- [email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <[email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>; Priyanka Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 28 lines · On Tue, 26 Oct 2021 09:02:54 -0700 Roman Bacik <[email protected]> wrote:
Quoted 27 lines · Marek Behún
Quoted 10 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed
all the time and also slows down the boot time. We have stripped down
everything else to bare minimum.
Thanks,

Roman

Hi Roman,

OK, that is reasonable, but not reasonable enough to introduce a new vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but you don't set a pointer to it into the U_BOOT_DRIVER structure, and instead
you call this method when "brcm probe" command is called.

Quoted 7 lines
Quoted 7 lines

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the device is needed, there are 2 things you could do:

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag to

your

Quoted 5 lines
Quoted 4 lines

driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that takes long time into bnxt_start(), which is called only when network via this ethernet controller is requested for by U-Boot commands.

Quoted 7 lines
Quoted 1 line

So renaming bnxt probe/remove to bnxt start/stop will do, right?

No. The whole idea of adding the new "bnxt" command is wrong, because the command is *vendor specific*. The ethernet controller should work out of the box with standard U-Boot commands, i.e. it if I use the
dhcp
command, it should work, without needing to call the "bnxt" command.

Hi Marek,

In order to speed up the boot, we do not load bnxt driver on each boot. Also we do not need to load FW and initialize PCI required to bind bnxt. When bnxt is required, then we execute these commands:

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
bnxt 0 probe #this command would probe/load the driver

Do you have a suggestion on how to make this work without introducing bnxt commands if we do not want to enumerate PCIe, load FW and load bnxt on each boot? Currently we boot to uboot prompt in 1s, which is our requirement. Thanks,

Roman

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#11 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Hi Roman,

Quoted 81 lines · Roman Bacik
Quoted 62 lines

-----Original Message-----
From: Marek Behún <[email protected]>
Sent: Tuesday, October 26, 2021 9:50 AM
To: Roman Bacik <[email protected]>
Cc: Simon Glass <[email protected]>; U-Boot Mailing List <u- [email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <[email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>; Priyanka Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 28 lines · On Tue, 26 Oct 2021 09:02:54 -0700 Roman Bacik <[email protected]> wrote:
Quoted 27 lines · Marek Behún
Quoted 10 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed
all the time and also slows down the boot time. We have stripped down
everything else to bare minimum.
Thanks,

Roman

Hi Roman,

OK, that is reasonable, but not reasonable enough to introduce a new vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but you don't set a pointer to it into the U_BOOT_DRIVER structure, and instead
you call this method when "brcm probe" command is called.

Quoted 7 lines
Quoted 7 lines

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the device is needed, there are 2 things you could do:

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag to

your

Quoted 5 lines
Quoted 4 lines

driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that takes long time into bnxt_start(), which is called only when network via this ethernet controller is requested for by U-Boot commands.

Quoted 7 lines
Quoted 1 line

So renaming bnxt probe/remove to bnxt start/stop will do, right?

No. The whole idea of adding the new "bnxt" command is wrong, because the command is *vendor specific*. The ethernet controller should work out of the box with standard U-Boot commands, i.e. it if I use the
dhcp
command, it should work, without needing to call the "bnxt" command.

Hi Marek,

In order to speed up the boot, we do not load bnxt driver on each boot. Also we do not need to load FW and initialize PCI required to bind bnxt. When bnxt is required, then we execute these commands:

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
bnxt 0 probe #this command would probe/load the driver

Quoted 4 lines

Do you have a suggestion on how to make this work without introducing bnxt commands if we do not want to enumerate PCIe, load FW and load bnxt on each boot? Currently we boot to uboot prompt in 1s, which is our requirement. Thanks,

It sounds like your ethernet driver will not even be bound in the non-PCI case. Is that right?

What about the PCI driver? Does that get bound initially? If so, I think U-Boot will normally probe PCI. But we should provide a way to not auto--probe PCI. Would that help?

You could put the firmware loading (or a call to it) in your PCI driver, perhaps. Then bringing up Ethernet could be something like:

ret = uclass_first_device_err(UCLASS_PCI, &dev);

I think your use case is not that unusual and we should be able to support it in a standard way. If there are features missing for that I am very happy to help figure it out.

Regards,
Simon

#12 lore raw

RE: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Hi Simon,

Quoted 115 lines

-----Original Message-----
From: Simon Glass <[email protected]>
Sent: Wednesday, October 27, 2021 8:41 AM
To: Roman Bacik <[email protected]>
Cc: Marek Behún <[email protected]>; U-Boot Mailing List <u- [email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <[email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>; Priyanka Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Hi Roman,

Quoted 13 lines · Roman Bacik
Quoted 13 lines

-----Original Message-----
From: Marek Behún <[email protected]>
Sent: Tuesday, October 26, 2021 9:50 AM
To: Roman Bacik <[email protected]>
Cc: Simon Glass <[email protected]>; U-Boot Mailing List <u- [email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <[email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>;

Priyanka

Quoted 9 lines
Quoted 9 lines

Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 1 line · On Tue, 26 Oct 2021 09:02:54 -0700 Roman Bacik <[email protected]> wrote:

On Tue, Oct 26, 2021 at 8:55 AM Marek Behún <[email protected]>

Quoted 17 lines · wrote:
Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 10 lines · On Tue, 26 Oct 2021 08:14:28 -0700 Roman Bacik <[email protected]> wrote:

Hi Marek,

We do not want this driver to be automatically probed. It is not needed
all the time and also slows down the boot time. We have stripped down
everything else to bare minimum.
Thanks,

Roman

Hi Roman,

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

OK, that is reasonable, but not reasonable enough to introduce a new
vendor specific command.

Still NAK.

So you have the bnxt_drv_probe method defined in the driver, but

you

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

don't set a pointer to it into the U_BOOT_DRIVER structure, and instead
you call this method when "brcm probe" command is called.

I think this introduction of another vendor specific command is wrong.

If probing takes too much time and should be done only when the

device

Quoted 14 lines
Quoted 14 lines
Quoted 5 lines
Quoted 5 lines

is needed, there are 2 things you could do:

- you can create new driver flag saying that the device should be probeb only when needed, wire necessary code and add this flag
to

your

Quoted 8 lines
Quoted 7 lines

driver (this could get very complicated, though)
- you can do minimum stuff in probe method, and move the stuff that
takes long time into bnxt_start(), which is called only when
network
via this ethernet controller is requested for by U-Boot
commands.

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

So renaming bnxt probe/remove to bnxt start/stop will do, right?

No. The whole idea of adding the new "bnxt" command is wrong,

because

Quoted 8 lines
Quoted 4 lines

the command is *vendor specific*. The ethernet controller should work out of the box with standard U-Boot commands, i.e. it if I use the
dhcp
command, it should work, without needing to call the "bnxt" command.

Hi Marek,

In order to speed up the boot, we do not load bnxt driver on each boot.

Also

Quoted 9 lines

we do not need to load FW and initialize PCI required to bind bnxt. When bnxt is required, then we execute these commands:

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
bnxt 0 probe #this command would probe/load the driver

Do you have a suggestion on how to make this work without introducing

Quoted 8 lines

bnxt

Quoted 1 line

commands if we do not want to enumerate PCIe, load FW and load bnxt on

each

Quoted 2 lines

boot? Currently we boot to uboot prompt in 1s, which is our requirement. Thanks,

It sounds like your ethernet driver will not even be bound in the non-PCI case. Is that right?

Yes correct

Quoted 4 lines

What about the PCI driver? Does that get bound initially? If so, I think U-Boot will normally probe PCI. But we should provide a way to not auto--probe PCI. Would that help?

PCI is probed automatically but PCI must be enumerated only after FW is loaded, which we do not want to be executed each boot.

Quoted 5 lines

You could put the firmware loading (or a call to it) in your PCI driver, perhaps. Then bringing up Ethernet could be something like:

ret = uclass_first_device_err(UCLASS_PCI, &dev);

Where would we call this from? Will it include calling "pci enum" required for bnxt to bind? We need this sequence somewhere:

load fw -> pci enum (calls bnxt_bind which sets device name) -> bnxp_probe (needs bound device by name)

Quoted 7 lines

I think your use case is not that unusual and we should be able to support it in a standard way. If there are features missing for that I am very happy to help figure it out.

Regards,
Simon

Maybe probing on demand when more than one eth driver can be used could be acceptable?
Thank you very much for your help,

Roman

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#13 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

In reply to Roman Bacik
Quoted 3 lines · On Wed, 27 Oct 2021 08:05:11 -0700 Roman Bacik <[email protected]> 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?

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.

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.)

#14 lore raw

RE: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Hi Marek

Quoted 20 lines

-----Original Message-----
From: Marek Behún <[email protected]>
Sent: Wednesday, October 27, 2021 9:36 AM
To: Roman Bacik <[email protected]>
Cc: Simon Glass <[email protected]>; U-Boot Mailing List <u- [email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <[email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>; Priyanka Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

On Wed, 27 Oct 2021 08:05:11 -0700
Roman Bacik <[email protected]> wrote:

Quoted 6 lines
Quoted 3 lines

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.

Quoted 4 lines

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.

Quoted 7 lines

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

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#15 lore raw

RE: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Marek, Simon,

Thank you very much for your comments. We will remove bnxt commands and will probe bnxt driver each boot in the next version.
Thanks,

Roman

Quoted 68 lines

-----Original Message-----
From: Roman Bacik <[email protected]>
Sent: Wednesday, October 27, 2021 9:47 AM
To: Marek Behún <[email protected]>
Cc: Simon Glass <[email protected]>; U-Boot Mailing List <u- [email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <[email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>; Priyanka Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>
Subject: RE: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Hi Marek

Quoted 4 lines

-----Original Message-----
From: Marek Behún <[email protected]>
Sent: Wednesday, October 27, 2021 9:36 AM
To: Roman Bacik <[email protected]>

Quoted 8 lines

Cc: Simon Glass <[email protected]>; U-Boot Mailing List <u- [email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <[email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>;

Priyanka

Quoted 8 lines

Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

On Wed, 27 Oct 2021 08:05:11 -0700
Roman Bacik <[email protected]> wrote:

Quoted 6 lines
Quoted 3 lines

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.

Quoted 4 lines

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.

Quoted 7 lines

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

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#16 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 5 lines · On Wed, 27 Oct 2021 10:02:41 -0700 Roman Bacik <[email protected]> wrote:

Marek, Simon,

Thank you very much for your comments. We will remove bnxt commands and will probe bnxt driver each boot in the next version.
Thanks,

Roman

I think that the idea of not loading fw or initializing the controller during every boot, but only when needed, is quite reasonable.

But it has to be done without the need to call custom commands, which the user may not know about.

It has to be done in such a way that if the user calls for example the
dhcp
command, it will work.

I think this could be achieved by creating a new DM driver flag, and wiring the DM and/or PCI code so that when this flag is set, the PCI subsystem won't probe the driver, only bind the driver.

That way U-Boot will know that there is another ethernet controller which can be used by network commands when the ethact variable is set to point to that controller.

Marek

#17 lore raw

RE: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Hi Marek,

Quoted 35 lines

-----Original Message-----
From: Marek Behún <[email protected]>
Sent: Wednesday, October 27, 2021 10:40 AM
To: Roman Bacik <[email protected]>
Cc: Simon Glass <[email protected]>; U-Boot Mailing List <u- [email protected]>; Bharat Gooty <[email protected]>; Aswath Govindraju <[email protected]>; Bin Meng <[email protected]>; Franck LENORMAND <[email protected]>; Heinrich Schuchardt <[email protected]>; Kory Maincent <[email protected]>; Michal Simek <[email protected]>; Patrick Delaunay <[email protected]>; Peng Fan <[email protected]>; Priyanka Jain <[email protected]>; Rayagonda Kokatanur <[email protected]>; Sean Anderson <[email protected]>
Subject: Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 3 lines · On Wed, 27 Oct 2021 10:02:41 -0700 Roman Bacik <[email protected]> wrote:

Marek, Simon,

Thank you very much for your comments. We will remove bnxt commands

and will

Quoted 2 lines

probe bnxt driver each boot in the next version.
Thanks,

Roman

I think that the idea of not loading fw or initializing the controller during every boot, but only when needed, is quite reasonable.

But it has to be done without the need to call custom commands, which the user may not know about.

Quoted 7 lines

It has to be done in such a way that if the user calls for example the
dhcp
command, it will work.

I think this could be achieved by creating a new DM driver flag, and wiring the DM and/or PCI code so that when this flag is set, the PCI subsystem won't probe the driver, only bind the driver.

Thank you very much for your suggestion. To simplify, we will decouple this issue from the current bnxt driver submission.

Quoted 6 lines

That way U-Boot will know that there is another ethernet controller which can be used by network commands when the ethact variable is set to point to that controller.

Marek

Thanks,

Roman

Signature · 11 lines
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#18 lore raw

Re: [PATCH v3 2/2] cmd: brcm: netXtreme commands

Quoted 2 lines · On Wed, 27 Oct 2021 10:58:35 -0700 Roman Bacik <[email protected]> wrote:

Thank you very much for your suggestion. To simplify, we will decouple this issue from the current bnxt driver submission.

Very well, that seems reasonable.

I am willing to help you with this afterwards.

Marek