Explorar o código

bnxt_en: Do not set firmware time from VF driver on older firmware.

Older firmware will reject this call and cause an error message to
be printed by the VF driver.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan %!s(int64=7) %!d(string=hai) anos
pai
achega
ca2c39e2ec
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      drivers/net/ethernet/broadcom/bnxt/bnxt.c

+ 2 - 1
drivers/net/ethernet/broadcom/bnxt/bnxt.c

@@ -5379,7 +5379,8 @@ int bnxt_hwrm_fw_set_time(struct bnxt *bp)
 	struct tm tm;
 	time64_t now = ktime_get_real_seconds();
 
-	if (bp->hwrm_spec_code < 0x10400)
+	if ((BNXT_VF(bp) && bp->hwrm_spec_code < 0x10901) ||
+	    bp->hwrm_spec_code < 0x10400)
 		return -EOPNOTSUPP;
 
 	time64_to_tm(now, 0, &tm);