diff options
author | Dan Williams <dcbw@redhat.com> | 2011-04-06 13:00:55 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2011-04-06 13:00:55 -0500 |
commit | 49150ca3a69d8a65c63fc691ffcaabd15f49818d (patch) | |
tree | 7cb0055aedcc4b68b92196521ae6e3c4e99348cf /src/mm-serial-parsers.h | |
parent | e520c2d448eb44464e0c932ac71a4895f7c8ea32 (diff) |
serial: don't let EAGAIN block sending commands until completion
If a port returns EAGAIN on write attempts, previously the code would
spin and attempt to resend the failed byte after send_delay
microseconds. This resulted in up to 3 second hard blocks in
the serial code when sending to ports that don't respond. While
in this blocking loop no other events or dbus commands could be
processed.
Instead, send each byte and reschedule sending the next byte in
send_delay microseconds, so that we can process other events in between
attempts to write to stupid ports.
This doesn't hugely decrease the amount of time that probing
requires, since we still need to probe all ports of the device
before exporting the modem to D-Bus, but it does let MM find
responsive ports much more quickly, and ensures that MM doesn't
block any D-Bus requests.
Diffstat (limited to 'src/mm-serial-parsers.h')
0 files changed, 0 insertions, 0 deletions