[PATCH v9 1/2] net: brcm: netXtreme driver

Roman Bacik roman.bacik at broadcom.com
Mon Nov 8 23:06:16 CET 2021


On Mon, Nov 8, 2021 at 10:40 AM Roman Bacik <roman.bacik at broadcom.com> wrote:
>
> From: Bharat Gooty <bharat.gooty at broadcom.com>
>
> Broadcom bnxt L2 driver support. Used by the Broadcom
> iproc platforms.
>
> Signed-off-by: Bharat Gooty <bharat.gooty at broadcom.com>
> Reviewed-by: Ramon Fried <rfried.dev at gmail.com>
>
> Signed-off-by: Roman Bacik <roman.bacik at broadcom.com>
> ---
>
> Changes in v9:
> - remove bnxt_ver.h
> - add DRIVER_VERSION_* definitions to bnxt.h
> - remove pci_read_/pci_write_/pci_map_ definitions from bnxt.h
>
> Changes in v8:
> - remove PCICFG_ME_REGISTER
>
> Changes in v7:
> - move bnxt_*.h files to drivers/net/bnxt/
> - remove display_banner()
> - replace pci_map_bar() with dm_pci_map_bar()
> - remove changes to dev->flags_
> - move PCI DID and VID definitions to include/pci_ids.h
> - move bnxt_nics[] to bnxt.c
> - move bnxt_alloc_mem to bnxt_read_rom_hw
> - return proper error codes in bnxt_read_rom_hwaddr
>
> Changes in v6:
> - remove bnxt_eth_* env variables
> - clean up include headers
>
> Changes in v5:
> - remove bnxt_env_set_ethaddr/bnxt_env_del_ethaddr methods
> - add .read_rom_hwaddr = bnxt_read_rom_hwaddr
> - move bnxt_bring_pci/bnxt_bring_chip to bnxt_read_rom_hwddr
> - move mac copy from priv to plat to bnxt_read_rom_hwaddr
>
> Changes in v4:
> - remove static num_cards and use dev_seq(dev) instead
> - add .probe
> - merged probe/remove methods
> - select PCI_INIT_R when BNXT_ETH is selected
>
> 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    |    7 +
>  drivers/net/bnxt/Makefile   |    5 +
>  drivers/net/bnxt/bnxt.c     | 1706 +++++++++++++++++++++++++++++++++++
>  drivers/net/bnxt/bnxt.h     |  390 ++++++++
>  drivers/net/bnxt/bnxt_dbg.h |  536 +++++++++++
>  drivers/net/bnxt/bnxt_hsi.h |  889 ++++++++++++++++++
>  include/pci_ids.h           |    3 +
>  9 files changed, 3538 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.h
>  create mode 100644 drivers/net/bnxt/bnxt_dbg.h
>  create mode 100644 drivers/net/bnxt/bnxt_hsi.h
>
> +static int bnxt_read_rom_hwaddr(struct udevice *dev)
> +{
> +       struct eth_pdata *plat = dev_get_plat(dev);
> +       struct bnxt *bp = dev_get_priv(dev);
> +       int ret;
> +
> +       ret = bnxt_alloc_mem(bp);
> +       if (ret) {
> +               printf("*** error: bnxt_alloc_mem failed! ***\n");
> +               return ret;
> +       }
> +       bp->pdev = (struct udevice *)dev;
> +       bnxt_bring_pci(bp);
> +       ret = bnxt_bring_chip(bp);
> +       if (ret) {
> +               printf("*** error: bnxt_bring_chip failed! ***\n");
> +               return -ENODATA;
> +       }

We will move the code above back to the probe method in v10 as
requested. I was wrong, there was no need to move it here.
Thanks,

Roman

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


More information about the U-Boot mailing list