ionic: catch no ptp support earlier
authorShannon Nelson <snelson@pensando.io>
Fri, 23 Jul 2021 18:02:46 +0000 (11:02 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jul 2021 20:57:41 +0000 (21:57 +0100)
commitf79eef711eb57d56874b08ea11db69221de54a6d
tree60fdafba1e1a3787ab8517bb81d218d7316e647f
parent6840e17b8ea992453e2d6f460d403cb05d194e76
ionic: catch no ptp support earlier

If PTP configuration is attempted on ports that don't support
it, such as VF ports, the driver will return an error status
-95, or EOPNOSUPP and print an error message
    enp98s0: hwstamp set failed: -95

Because some daemons can retry every few seconds, this can end
up filling the dmesg log and pushing out other more useful
messages.

We can catch this issue earlier in our handling and return
the error without a log message.

Fixes: 829600ce5e4e ("ionic: add ts_config replay")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/pensando/ionic/ionic_lif.h
drivers/net/ethernet/pensando/ionic/ionic_phc.c