Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1336579

Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485 direction control

From Ильяс Гасанов <torso.nafi@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485 direction control
Date 2016-02-17 18:00 +0100
Message-ID <r3dCj-Fn-7@gated-at.bofh.it> (permalink)
References <r12Bk-2Ym-9@gated-at.bofh.it> <r14MN-4Cs-1@gated-at.bofh.it> <r162e-5mV-13@gated-at.bofh.it> <r1gNY-3W4-5@gated-at.bofh.it> <r1imK-54w-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

After testing the patch v8, I found two more glitches, which happen at
least in 4.1 kernel (I applied the changes to 8250_core.c, since
8250_port.c isn't made separate in 4.1):

1) When serial8250_em485_init is called from omap_8250_rs485_config,
there is a lockdep warning, and according to the stack trace it
happens at kmalloc invocation. Passing GFP_ATOMIC instead of
GFP_KERNEL in flags apparently fixes the problem.

2) Once a transmission happens and completes, the behavior of AM335x
UART becomes strange - it seemingly doesn't receive anything (or fails
to return to userspace the received payload). At the time of next
transmission (sometimes just before, sometimes just after, but never
during it) the single last received byte is returned via read, the
rest of the payload discarded. However when SER_RS485_RX_DURING_TX is
set, it works just okay. The problem is, this happens when clearly the
payload is not received during transmission, so it isn't liable to be
discarded upon clearing FIFO. Best guess the Rx interrupt which is
disabled in start_tx_rs485 upon calling serial8250_stop_rx isn't
properly restored.


Regards,
Ilyas G.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control Ильяс Гасанов   <torso.nafi@gmail.com> - 2016-02-11 17:50 +0100
  Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control "Matwey V. Kornilov" <matwey@sai.msu.ru> - 2016-02-11 20:10 +0100
    Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control Ильяс Гасанов   <torso.nafi@gmail.com> - 2016-02-11 21:30 +0100
      Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control "Matwey V. Kornilov" <matwey@sai.msu.ru> - 2016-02-12 09:00 +0100
        Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control Ильяс Гасанов   <torso.nafi@gmail.com> - 2016-02-12 10:40 +0100
          Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control Ильяс Гасанов   <torso.nafi@gmail.com> - 2016-02-17 18:00 +0100
            Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control Ильяс Гасанов   <torso.nafi@gmail.com> - 2016-02-18 08:20 +0100
              Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control Ильяс Гасанов   <torso.nafi@gmail.com> - 2016-02-18 10:50 +0100
                Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control Peter Hurley <peter@hurleysoftware.com> - 2016-02-18 18:00 +0100
                Re: [PATCH v8 3/3] tty: 8250_omap: Use software emulated RS485  direction control Ильяс Гасанов   <torso.nafi@gmail.com> - 2016-02-18 19:20 +0100

csiph-web