cvs commit: src/sys/dev/uart uart_dev_z8530.c

Marcel Moolenaar marcel at FreeBSD.org
Sun Jan 30 01:00:51 PST 2005


marcel      2005-01-30 09:00:50 UTC

  FreeBSD src repository

  Modified files:
    sys/dev/uart         uart_dev_z8530.c 
  Log:
  o  Fix the various interrupt related problems caused by reverse
     engineering the pending interrupt sources from the current
     state of the controller. For channel A we can always read the
     interrupt pending register (RR3). For channel B we can read
     the interrupt vector register (RR2) because it contains the
     modified vector and thus includes the interrupt source.
     Since we currently need puc(4) for the Z8530, we know that
     the interrupt handler for both channels will be called and
     thus that RR3 will always be read at least once, even if ch A
     has no pending interrupt.
     NOTE: The modified interrupt vector has no value that represent
     a lack of pending interrupt for channel B. That is, the
     value read when no interrupts are pending is the same as the
     value for the special receive condition. Fortunately, we don't
     actually have to depend on that interrupt source. This does
     mean that we need to properly handle the overflow condition,
     when we read received character from the chip.
  o  The DSR signal is represented by the SYNC bit in the external
     status register (RR0). We now properly track DSR.
  o  It's save to enable the external/status interrupt source. We
     now get interrupts when line signals (DSR, DCD or CTS) change.
  
  Problems fixes:
  o  interrupt storms.
  o  blocked open(2).
  o  lack of (hardware) flow control.
  o  unable to report DSR.
  
  MFC after: 5 days
  
  Revision  Changes    Path
  1.11      +69 -31    src/sys/dev/uart/uart_dev_z8530.c


More information about the cvs-src mailing list