mirror-linux/drivers/net
Vadim Fedorenko a47db2caae ixgbe: fix timestamp configuration code
[ Upstream commit 3c44191dd7 ]

The commit in fixes introduced flags to control the status of hardware
configuration while processing packets. At the same time another structure
is used to provide configuration of timestamper to user-space applications.
The way it was coded makes this structures go out of sync easily. The
repro is easy for 82599 chips:

[root@hostname ~]# hwstamp_ctl -i eth0 -r 12 -t 1
current settings:
tx_type 0
rx_filter 0
new settings:
tx_type 1
rx_filter 12

The eth0 device is properly configured to timestamp any PTPv2 events.

[root@hostname ~]# hwstamp_ctl -i eth0 -r 1 -t 1
current settings:
tx_type 1
rx_filter 12
SIOCSHWTSTAMP failed: Numerical result out of range
The requested time stamping mode is not supported by the hardware.

The error is properly returned because HW doesn't support all packets
timestamping. But the adapter->flags is cleared of timestamp flags
even though no HW configuration was done. From that point no RX timestamps
are received by user-space application. But configuration shows good
values:

[root@hostname ~]# hwstamp_ctl -i eth0
current settings:
tx_type 1
rx_filter 12

Fix the issue by applying new flags only when the HW was actually
configured.

Fixes: a9763f3cb5 ("ixgbe: Update PTP to support X550EM_x devices")
Signed-off-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-19 12:28:10 +02:00
..
appletalk
arcnet net: arcnet: Do not call kfree_skb() under local_irq_disable() 2023-09-13 09:42:35 +02:00
bonding bonding: fix macvlan over alb bond support 2023-08-30 16:11:04 +02:00
caif
can can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM 2023-09-13 09:42:31 +02:00
dsa net: dsa: sja1105: block FDB accesses that are concurrent with a switch reset 2023-09-19 12:28:09 +02:00
ethernet ixgbe: fix timestamp configuration code 2023-09-19 12:28:10 +02:00
fddi
fjes
hamradio
hippi
hyperv
ieee802154
ipa net: ipa: only reset hashed tables when supported 2023-08-11 12:08:09 +02:00
ipvlan ipvlan: Fix a reference count leak warning in ipvlan_ns_exit() 2023-08-30 16:11:01 +02:00
mctp
mdio
netdevsim netdevsim: fix uninitialized data in nsim_dev_trap_fa_cookie_write() 2023-07-23 13:49:27 +02:00
pcs net: pcs: Add missing put_device call in miic_create 2023-08-23 17:52:33 +02:00
phy net: sfp: handle 100G/25G active optical cables in sfp_parse_support 2023-09-13 09:42:25 +02:00
plip
ppp
pse-pd
slip
team team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves 2023-08-23 17:52:34 +02:00
usb r8152: check budget for r8152_poll() 2023-09-19 12:28:09 +02:00
vmxnet3
vxlan drivers: vxlan: vnifilter: free percpu vni stats on error path 2023-08-16 18:27:27 +02:00
wan
wireguard wireguard: allowedips: expand maximum node depth 2023-08-16 18:27:20 +02:00
wireless wifi: ath10k: Use RMW accessors for changing LNKCTL 2023-09-13 09:42:48 +02:00
wwan
xen-netback xen/netback: Fix buffer overrun triggered by unusual packet 2023-08-08 20:03:51 +02:00
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c Revert "net: macsec: preserve ingress frame ordering" 2023-09-13 09:42:26 +02:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: tap_open(): set sk_uid from current_fsuid() 2023-08-11 12:08:20 +02:00
thunderbolt.c
tun.c drivers: net: prevent tun_build_skb() to exceed the packet size limit 2023-08-16 18:27:27 +02:00
veth.c veth: Fixing transmit return status for dropped packets 2023-09-19 12:28:02 +02:00
virtio_net.c virtio-net: Zero max_tx_vq field for VIRTIO_NET_CTRL_MQ_HASH_CONFIG case 2023-08-23 17:52:39 +02:00
vrf.c
vsockmon.c
xen-netfront.c