HomeFreeBSD

ntb_hw_plx: Workaround read-only scratchpad registers

Description

ntb_hw_plx: Workaround read-only scratchpad registers

On several systems we've noticed that when NTB link goes down, the
Physical Layer User Test Pattern registers we use as additional
scratchpad registers (that is explicitly allowed by the chip specs)
become read-only for about 100us. I see no explanation for this in
the chip specs, neither why it was not seen before, may be a race.
Since we do need these registers, workaround it by repeating writes
until we succeed or 1ms timeout expire.

MFC after: 1 week

(cherry picked from commit 3883c6fbf232452098ba6ea802ef1426d83d2d68)

Details

Provenance
mavAuthored on Jan 27 2024, 9:51 PM
Parents
rG4fedf2bec63f: sqlite3: Vendor import of sqlite3 3.45.0
Branches
Unknown
Tags
Unknown