The loop in _base_readl_ext_retry is wrong, it runs 30 times regardless
of the result from readl.
This results in the value being incorrect and the device being reset
nearly continuously.
if (ret_val == 0) continue;
should be
if (ret_val != 0) break;
On 8/30/23 18:39, Martin K. Petersen wrote:
Ranjan,
Doorbell and Host diagnostic registers could return 0 even
after 3 retries and that leads to occasional resets of the
controllers, hence increased the retry count to thirty.
Applied to 6.6/scsi-staging, thanks!