Skip to content

Commit 4cebbac

Browse files
Michael Chandavem330
authored andcommitted
bnxt_en: Do not allow VF to read EEPROM.
Firmware does not allow the operation and would return failure, causing a warning in dmesg. So check for VF and disallow it in the driver. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 20c1d28 commit 4cebbac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,6 +1818,11 @@ static int nvm_get_dir_info(struct net_device *dev, u32 *entries, u32 *length)
18181818

18191819
static int bnxt_get_eeprom_len(struct net_device *dev)
18201820
{
1821+
struct bnxt *bp = netdev_priv(dev);
1822+
1823+
if (BNXT_VF(bp))
1824+
return 0;
1825+
18211826
/* The -1 return value allows the entire 32-bit range of offsets to be
18221827
* passed via the ethtool command-line utility.
18231828
*/

0 commit comments

Comments
 (0)