OSDN Git Service

bnxt_en: Fix VF mac address regression.
authorMichael Chan <michael.chan@broadcom.com>
Fri, 14 Sep 2018 19:41:29 +0000 (15:41 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Sep 2018 14:56:35 +0000 (07:56 -0700)
commit28ea334bd1657f3c43485b4a8592672fc6835fac
tree3f3e84f80aed6417b70eb5f75021d35b9e0dd9d4
parentbbd6528d28c1b8e80832b3b018ec402b6f5c3215
bnxt_en: Fix VF mac address regression.

The recent commit to always forward the VF MAC address to the PF for
approval may not work if the PF driver or the firmware is older.  This
will cause the VF driver to fail during probe:

  bnxt_en 0000:00:03.0 (unnamed net_device) (uninitialized): hwrm req_type 0xf seq id 0x5 error 0xffff
  bnxt_en 0000:00:03.0 (unnamed net_device) (uninitialized): VF MAC address 00:00:17:02:05:d0 not approved by the PF
  bnxt_en 0000:00:03.0: Unable to initialize mac address.
  bnxt_en: probe of 0000:00:03.0 failed with error -99

We fix it by treating the error as fatal only if the VF MAC address is
locally generated by the VF.

Fixes: 707e7e966026 ("bnxt_en: Always forward VF MAC address to the PF.")
Reported-by: Seth Forshee <seth.forshee@canonical.com>
Reported-by: Siwei Liu <loseweigh@gmail.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.h