Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
can: isotp: isotp_ops: fix poll() to not report false EPOLLOUT events
When using select()/poll()/epoll() with a non-blocking ISOTP socket to wait for when non-blocking write is possible, a false EPOLLOUT event is sometimes returned. This can happen at least after sending a message which must be split to multiple CAN frames. The reason is that isotp_sendmsg() returns -EAGAIN when tx.state is not equal to ISOTP_IDLE and this behavior is not reflected in datagram_poll(), which is used in isotp_ops. This is fixed by introducing ISOTP-specific poll function, which suppresses the EPOLLOUT events in that case. v2: https://lore.kernel.org/all/[email protected] v1: https://lore.kernel.org/all/[email protected] https://lore.kernel.org/all/[email protected] Signed-off-by: Michal Sojka <[email protected]> Reported-by: Jakub Jira <[email protected]> Tested-by: Oliver Hartkopp <[email protected]> Acked-by: Oliver Hartkopp <[email protected]> Fixes: e057dd3 ("can: add ISO 15765-2:2016 transport protocol") Link: https://lore.kernel.org/all/[email protected] Cc: [email protected] Signed-off-by: Marc Kleine-Budde <[email protected]>
- Loading branch information