samples: mei: don't wait on read completion upon write.
authorAlexander Usyskin <alexander.usyskin@intel.com>
Sun, 1 Aug 2021 07:25:32 +0000 (10:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Aug 2021 07:54:22 +0000 (09:54 +0200)
commit0fc7ca624b1452050d31b05cd198e38a1b74d1b3
treebe3a9ff0507896520bbebbcc20a63ca6390ad584
parent9b945d74a5fc14c1f9a7ae98c10921d48c194105
samples: mei: don't wait on read completion upon write.

The original mei driver communication was strictly write command and
receive response flow, the completion of write was determined when
response was ready using select(). This paradigm is a long time not
true.  There can be write without a response and an unsolicited read.
The driver is capable of handling those.
Adjust also the sample code and remove select() on read() from the
write flow. Add select to the read flow to showcase how to do the
read with a timeout.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Link: https://lore.kernel.org/r/20210801072532.8668-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
samples/mei/mei-amt-version.c