HomeFreeBSD

twsi: make data receiving code safer

Description

twsi: make data receiving code safer

Assert that we are not receiving data beyond the requested length.
Assert that we have not NACK-ed incoming data prematurely.
Abort the current transfer if the incoming data is NACK-ed or not
NACK-ed unexpectedly.

Add debug logging of received data to complement logging of sent data.

MFC after: 3 weeks

Details

Provenance
avgAuthored on Nov 26 2021, 8:34 AM
Parents
rGaeacf172fd29: twsi: remove redundant write of control register
Branches
Unknown
Tags
Unknown