linux/drivers/net/ethernet
Jacob Keller 5f6df173f9 ice: implement and use rd32_poll_timeout for ice_sq_done timeout
The ice_sq_done function is used to check the control queue head register
and determine whether or not the control queue processing is done. This
function is called in a loop checking against jiffies for a specified
timeout.

The pattern of reading a register in a loop until a condition is true or a
timeout is reached is a relatively common pattern. In fact, the kernel
provides a read_poll_timeout function implementing this behavior in
<linux/iopoll.h>

Use of read_poll_timeout is preferred over directly coding these loops.
However, using it in the ice driver is a bit more difficult because of the
rd32 wrapper. Implement a rd32_poll_timeout wrapper based on
read_poll_timeout.

Refactor ice_sq_done to use rd32_poll_timeout, replacing the loop calling
ice_sq_done in ice_sq_send_cmd. This simplifies the logic down to a single
ice_sq_done() call.

The implementation of rd32_poll_timeout uses microseconds for its timeout
value, so update the CQ timeout macros used to be specified in microseconds
units as well instead of using HZ for jiffies.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
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>
2024-08-26 09:34:38 -07:00
..
3com
8390
actions
adaptec
adi
aeroflex
agere
alacritech
allwinner
alteon net: alteon: Convert tasklet API to new bottom half workqueue mechanism 2024-07-31 18:59:46 -07:00
altera
amazon
amd net: xgbe: Convert tasklet API to new bottom half workqueue mechanism 2024-07-31 18:59:46 -07:00
apm
apple
aquantia net: atlantic: Avoid warning about potential string truncation 2024-08-22 16:54:53 -07:00
arc
asix
atheros net: ag71xx: use devm for register_netdev 2024-08-16 11:21:08 -07:00
broadcom Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-22 17:06:18 -07:00
brocade bna: adjust 'name' buf size of bna_tcb and bna_ccb structures 2024-07-12 01:56:48 +01:00
cadence net: macb: increase max_mtu for oversized frames 2024-08-15 18:56:03 -07:00
calxeda
cavium net: thunder_bgx: Fix netdev structure allocation 2024-08-15 12:29:33 +02:00
chelsio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-22 17:06:18 -07:00
cirrus
cisco net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
cortina
davicom
dec
dlink net: ethernet: dlink: replace deprecated macro 2024-08-14 12:20:55 +01:00
emulex
engleder net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
ezchip
faraday
freescale Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-22 17:06:18 -07:00
fujitsu
fungible net/fungible: Avoid -Wflex-array-member-not-at-end warning 2024-08-07 20:00:01 -07:00
google gve: Remove unused declaration gve_rx_alloc_rings() 2024-08-19 17:48:20 -07:00
hisilicon net: hns3: Use ARRAY_SIZE() to improve readability 2024-08-20 15:18:21 -07:00
huawei net: hinic: use ethtool_sprintf/puts 2024-08-13 11:59:37 +02:00
i825xx
ibm net: ethernet: ibm: Simpify code with for_each_child_of_node() 2024-08-20 15:15:29 +02:00
intel ice: implement and use rd32_poll_timeout for ice_sq_done timeout 2024-08-26 09:34:38 -07:00
litex
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-22 17:06:18 -07:00
mediatek net: airoha: configure hw mac address according to the port id 2024-08-22 13:25:02 +02:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-22 17:06:18 -07:00
meta eth: fbnic: add support for basic qstats 2024-08-12 15:44:23 -07:00
micrel net: ks8851: Fix potential TX stall after interface reopen 2024-07-11 11:52:29 +02:00
microchip net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
microsoft net: mana: Fix doorbell out of order violation and avoid unnecessary doorbell rings 2024-08-13 13:09:54 +02:00
moxa
mscc net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged 2024-08-16 09:59:32 +01:00
myricom
natsemi
neterion
netronome nfp: bpf: Use kmemdup_array instead of kmemdup for multiple allocation 2024-08-22 15:12:02 +02:00
ni
nvidia
nxp
oki-semi
packetengines
pasemi
pensando net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
qlogic ipv4: Remove redundant !ifa->ifa_dev check. 2024-08-15 18:56:14 -07:00
qualcomm
rdc
realtek r8169: don't increment tx_dropped in case of NETDEV_TX_BUSY 2024-07-31 17:52:46 -07:00
renesas Driver core changes for 6.11-rc1 2024-07-25 10:42:22 -07:00
rocker
samsung
seeq
sfc ethtool: rss: don't report key if device doesn't support it 2024-08-12 14:16:24 +01:00
sgi
silan
sis
smsc
socionext
stmicro net: stmmac: dwmac-loongson: Add loongson module author 2024-08-13 09:48:01 +02:00
sun net: sunvnet: use ethtool_sprintf/puts 2024-08-12 13:25:38 +01:00
sunplus
synopsys
tehuti net: tn40xx: add per queue netdev-genl stats support 2024-07-09 13:26:57 +02:00
ti net: ti: icssg_prueth: populate netdev of_node 2024-08-08 19:59:31 -07:00
toshiba
tundra
vertexcom
via
wangxun Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-22 17:06:18 -07:00
wiznet
xilinx Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-08-22 17:06:18 -07:00
xircom
xscale net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c net: ethernet: use ip_hdrlen() instead of bit shift 2024-08-11 04:41:15 +01:00
jme.h
Kconfig eth: fbnic: Add scaffolding for Meta's NIC driver 2024-07-15 12:50:42 -07:00
korina.c
lantiq_etop.c net: ethernet: lantiq_etop: remove unused variable 2024-08-16 16:16:59 -07:00
lantiq_xrx200.c
Makefile eth: fbnic: Add scaffolding for Meta's NIC driver 2024-07-15 12:50:42 -07:00