linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
  • * Re: [PATCH 0/1] staging: Add firewire-serial driver
           [not found] ` <20121022224505.GD24489@kroah.com>
           [not found]   ` <1350959679.2621.55.camel@thor>
    @ 2012-10-24 13:41   ` Stefan Richter
      2012-10-24 15:56     ` Peter Hurley
      1 sibling, 1 reply; 15+ messages in thread
    From: Stefan Richter @ 2012-10-24 13:41 UTC (permalink / raw)
      To: Greg Kroah-Hartman
      Cc: Peter Hurley, devel, linux1394-devel, linux-kernel, linux-serial
    
    On Oct 22 Greg Kroah-Hartman wrote:
    > On Thu, Oct 18, 2012 at 08:56:55AM -0400, Peter Hurley wrote:
    > > Please consider this serial driver for review for submission to staging.
    > > The firewire-serial driver implements TTY over IEEE 1394. In its default
    > > configuration, it creates 4 TTY devices and one loopback device per
    > > firewire card (respectively, named fwtty<n>~fwtty<n+3> and fwloop<n>).
    > > 
    > > Currently, the TTY devices auto-connect to every cabled peer (the TODO
    > > list includes plans for providing a sysfs interface to control virtual
    > > cabling with whitelist/blacklist support per GUID).
    > > 
    > > Efforts are still ongoing for a companion console driver, with plans to
    > > eventually add early_printk & kgdb support (via additional drivers).
    > > 
    > > Some issues did arise with both the TTY and Firewire subsystems which
    > > are noted in the TODO file. Please review these workarounds.
    > > 
    > > Peter Hurley (1):
    > >   staging: fwserial: Add TTY-over-Firewire serial driver
    > 
    > I'd like to get an Ack from Stefan here, before I'll add this to the
    > staging tree.
    
    I have not formed an opinion yet, and have not taken the time to look over
    the code yet.  Personally, I am entirely unfamiliar with the application
    domain of tty drivers in general and with the tty-over-"high"speed-bus
    application domain in particular.  IOW, I don't know who is going to use
    this for which purposes.
    
    On the FireWire side, this driver implements an own transport protocol.
    AFAIK a standardized serial-over-1394 does not exist.  This means that
    interoperability of this driver will initially be limited to
    Linux-to-Linux.  Devices or other operating systems which implement this
    do not exist.
    
    Apart from that aspect, the proposed fwserial driver looks to have
    requirements similar to the existing IPv4-over-1394 and SBP target-mode
    drivers (drivers/firewire/net.* and drivers/target/sbp/*).  This means that
    (a) fw-serial motivated changes to the firewire subsystem and (b) firewire
    subsystem motivated changes to fwserial could quite possibly also be
    interesting for or required by those other drivers as well, meaning that
    maintenance overhead should not increase much.
    
    > >  drivers/staging/fwserial/dma_fifo.c |  310 ++++
    > >  drivers/staging/fwserial/dma_fifo.h |  130 ++
    > >  drivers/staging/fwserial/fwserial.c | 2885 +++++++++++++++++++++++++++++++++++
    > >  drivers/staging/fwserial/fwserial.h |  355 +++++
    
    drivers/firewire/net.c is 1721 lines, sbp_target is 2868 lines.
    Why is fwserial bigger?
    -- 
    Stefan Richter
    -=====-===-- =-=- ==---
    http://arcgraph.de/sr/
    
    ^ permalink raw reply	[flat|nested] 15+ messages in thread
  • * [PATCH v2 0/1] staging: Add firewire-serial driver
           [not found] <1350565015.23730.4.camel@thor>
           [not found] ` <20121022224505.GD24489@kroah.com>
    @ 2012-11-02 12:16 ` Peter Hurley
      2012-11-02 12:16   ` [PATCH v2 1/1] staging: fwserial: Add TTY-over-Firewire serial driver Peter Hurley
      1 sibling, 1 reply; 15+ messages in thread
    From: Peter Hurley @ 2012-11-02 12:16 UTC (permalink / raw)
      To: Greg Kroah-Hartman, Stefan Richter, Alan Cox
      Cc: linux-kernel, devel, linux1394-devel, linux-serial, Peter Hurley
    
    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
    
    -- 
    1.7.12.3
    
    
    ^ permalink raw reply	[flat|nested] 15+ messages in thread

  • end of thread, other threads:[~2012-11-28  1:00 UTC | newest]
    
    Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <1350565015.23730.4.camel@thor>
         [not found] ` <20121022224505.GD24489@kroah.com>
         [not found]   ` <1350959679.2621.55.camel@thor>
         [not found]     ` <20121023105140.5996c3a5@pyramind.ukuu.org.uk>
    2012-10-23 16:30       ` [PATCH 0/1] staging: Add firewire-serial driver Peter Hurley
    2012-10-23 18:41         ` Stefan Richter
    2012-10-24 13:41   ` Stefan Richter
    2012-10-24 15:56     ` Peter Hurley
    2012-11-02 12:16 ` [PATCH v2 " Peter Hurley
    2012-11-02 12:16   ` [PATCH v2 1/1] staging: fwserial: Add TTY-over-Firewire serial driver Peter Hurley
    2012-11-12 23:33     ` Stefan Richter
    2012-11-12 23:51       ` Greg Kroah-Hartman
    2012-11-13 19:37         ` Peter Hurley
    2012-11-13 19:47           ` Greg Kroah-Hartman
    2012-11-13 19:14       ` Peter Hurley
    2012-11-14  1:25         ` Stefan Richter
    2012-11-27 18:33           ` Peter Hurley
    2012-11-27 23:58             ` Stefan Richter
    2012-11-28  1:00               ` Peter Hurley
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox;
    as well as URLs for NNTP newsgroup(s).