staging: Add firewire-serial driver
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest1 patch 9 repliesIn review
- v11 patch 0 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | staging: fwserial: Add TTY-over-Firewire serial driverdrivers/ drivers/ drivers/ +6 more | +3824 | 9 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/1] staging: Add firewire-serial driver
v2 of this driver submission builds and runs cleanly against Greg KH's tty-next and (hopefully) addresses the concerns raised regarding the dependence on tty_buffer internals; specifically with the workarounds to fix
1) data loss on hangup and 2) throttling before the flip buffers are full.
1) Data loss on hangup
Although I experimented with alternative solutions as Alan suggested, none were practical. For example, this sequence (which is almost identical to what the n_tty ldisc does in input_available_p()):
tty_flush_to_ldisc(tty);
n = ldisc->ops->chars_in_buffer(tty);suffers from a race that the ldisc could have _just_ emptied the read buffer between these calls, so that n == 0 but data is still in the flip buffers.
For now, the driver v2 delays the hangup on carrier loss by a fixed timeout.
2) Flip buffers full before throttle received from ldisc Because driver throttling is performed by the ldisc, and not by the tty_buffer, the flip buffers can be filled before receiving a throttle request.
For now, the driver v2 pre-buffers in front of the tty_buffer; ie, rx data which is not accepted by tty_insert_flip_string...() is buffered in the driver, the sender is throttled and when ldisc unthrottles, normal operation resumes by feeding the tty_buffer from the pre-buffered data.
This driver v2 also fixes the occasionally flaky auto-connect, 2 (valid) lockdep warnings, racy line status changes, and delays fifo allocation until .activate() to minimize memory footprint.
As before, the TODO file notes the remaining issues.
Regards,
Peter
Peter Hurley (1):
staging: fwserial: Add TTY-over-Firewire serial driver
drivers/staging/Kconfig | 2 + drivers/staging/Makefile | 1 + drivers/staging/fwserial/Kconfig | 9 + drivers/staging/fwserial/Makefile | 2 + drivers/staging/fwserial/TODO | 37 + drivers/staging/fwserial/dma_fifo.c | 310 ++++ drivers/staging/fwserial/dma_fifo.h | 130 ++ drivers/staging/fwserial/fwserial.c | 2946 +++++++++++++++++++++++++++++++++++ drivers/staging/fwserial/fwserial.h | 387 +++++ 9 files changed, 3824 insertions(+) create mode 100644 drivers/staging/fwserial/Kconfig create mode 100644 drivers/staging/fwserial/Makefile create mode 100644 drivers/staging/fwserial/TODO create mode 100644 drivers/staging/fwserial/dma_fifo.c create mode 100644 drivers/staging/fwserial/dma_fifo.h create mode 100644 drivers/staging/fwserial/fwserial.c create mode 100644 drivers/staging/fwserial/fwserial.h
Signature · 1 line
1.7.12.3