RE: [PATCH] wifi: rtlwifi: Drastically reduce the attempts to read efuse bytes in case of failures

From: Ping-Ke Shih
Date: Sun Oct 27 2024 - 21:45:10 EST


Guilherme G. Piccoli <gpiccoli@xxxxxxxxxx> wrote:
>
> This procedure for reading efuse bytes relies in a loop that performs an
> I/O read up to *10k* times in case of failures. We measured the time of
> the loop inside read_efuse_byte() alone, and in this reproducer (which
> involves the dummy_hcd emulation layer), it takes 15 seconds each.

The I/O read of 10k times is to polling if efuse is ready, and then following
statement is to actually read efuse content back. For USB devices, I/O is
slow, so it might be fine to reduce retry times. But For PCIE devices,
I think this will be risky without testing with real hardware.

Possible way is to use "rtlhal->interface == INTF_PCI" to keep original times
for PCIE devices, and only reduce retry times for USB devices. But USB can
operate on USB-2/-3 modes, so maybe still need experiments with real hardware
to get reasonable retry times.