2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
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 net: annotate data-races around dev->if_port 2024-05-08 18:51:30 -07:00
8390 net: ethernet: 8390: ne2k-pci: remove unused struct 'ne2k_pci_card' 2024-05-28 15:21:12 +02:00
actions
adaptec net: ethernet: starfire: remove unused structs 2024-05-28 15:21:04 +02:00
adi net: ethernet: adi: adin1110: Replace linux/gpio.h by proper one 2024-05-10 18:51:34 -07:00
aeroflex
agere net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
alacritech
allwinner
alteon net: alteon: Convert tasklet API to new bottom half workqueue mechanism 2024-07-31 18:59:46 -07:00
altera net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
amazon net: ena: Fix redundant device NUMA node override 2024-05-29 19:01:34 -07:00
amd net: xgbe: Convert tasklet API to new bottom half workqueue mechanism 2024-07-31 18:59:46 -07:00
apm net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
apple
aquantia net: atlantic: Avoid warning about potential string truncation 2024-08-22 16:54:53 -07:00
arc net: ethernet: arc: remove emac_arc driver 2024-06-21 10:07:17 +01:00
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 net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
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 net: ethernet: mac89x0: add missing MODULE_DESCRIPTION() macro 2024-06-19 17:22:00 -07:00
cisco net: Add struct kernel_ethtool_ts_info 2024-07-15 08:02:26 -07:00
cortina net: ethernet: cortina: Implement .set_pauseparam() 2024-06-01 16:07:29 -07:00
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 net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
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 net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
natsemi net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
neterion net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
netronome nfp: bpf: Use kmemdup_array instead of kmemdup for multiple allocation 2024-08-22 15:12:02 +02:00
ni net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
nvidia net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
nxp
oki-semi net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
packetengines
pasemi net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
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 qca_spi: Make interrupt remembering atomic 2024-06-18 11:38:51 +02:00
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 net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
samsung net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
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 net: annotate data-races around dev->if_port 2024-05-08 18:51:30 -07:00
smsc net: smc9194: add missing MODULE_DESCRIPTION() macro 2024-06-19 17:22:33 -07:00
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 net: dwc-xlgmac: fix missing MODULE_DESCRIPTION() warning 2024-06-17 18:05:38 -07:00
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 net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
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 net: annotate data-races around dev->if_port 2024-05-08 18:51:30 -07:00
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 net: annotate writes on dev->mtu from ndo_change_mtu() 2024-05-07 16:19:14 -07:00
Makefile eth: fbnic: Add scaffolding for Meta's NIC driver 2024-07-15 12:50:42 -07:00