]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Return -EOPNOTSUPP for ETHTOOL_GREGS on VFs.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 21 Sep 2020 01:08:57 +0000 (21:08 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Sep 2020 02:04:44 +0000 (19:04 -0700)
commitd3b4d21b067c4c92060c64d8dabc79ac5dcc0848
tree17dfba40719e0c6e385e8b4d23119e662a6ac8ce
parent1279e477c27fd09a68c04c0f5ea85e95669771ec
bnxt_en: Return -EOPNOTSUPP for ETHTOOL_GREGS on VFs.

Debug firmware commands are not supported on VFs to read registers.
This patch avoids logging unnecessary access_denied error on VFs
when user calls ETHTOOL_GREGS.

By returning error in get_regs_len() method on the VF, the get_regs()
method will not be called.

Fixes: 029592b7296b ("bnxt_en: Add support for 'ethtool -d'")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.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_ethtool.c