Re: [PATCH net-next] net: lan966x: Improve the CPU TX bitrate.

Andrew Lunn
2022-03-08T21:36:18Z

> static int lan966x_port_inj_ready(struct lan966x *lan966x, u8 grp)
> {
> - u32 val;
> + unsigned long time = jiffies + usecs_to_jiffies(READL_TIMEOUT_US);
> + int ret = 0;
>
> - return readx_poll_timeout_atomic(lan966x_port_inj_status, lan966x, val,
> - QS_INJ_STATUS_FIFO_RDY_GET(val) & BIT(grp),
> - READL_SLEEP_US, READL_TIMEOUT_US);
> + while (!(lan_rd(lan966x, QS_INJ_STATUS) &
> + QS_INJ_STATUS_FIFO_RDY_SET(BIT(grp)))) {
> + if (time_after(jiffies, time)) {
> + ret = -ETIMEDOUT;
> + break;
> + }

Did you try setting READL_SLEEP_US to 0? readx_poll_timeout_atomic()
explicitly supports that.

Andrew