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


Groups > linux.kernel > #1332350

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-11 21:30 +0100
Message-ID <r162e-5mV-13@gated-at.bofh.it> (permalink)
References <r12Bk-2Ym-9@gated-at.bofh.it> <r14MN-4Cs-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


2016-02-11 22:08 GMT+03:00 Matwey V. Kornilov <matwey@sai.msu.ru>:
> Thanks for pointing out. serial8250_unregister_port should set
> serial8250_ports[line].em485 to NULL in order to prevent unneeded
> activation when this struct is reused.

Then the allocated/initialized resources should be freed/released as well.

> You would be able to use serial8250_em485_register in omap8250_probe
> on &up before serial8250_register_8250_port(&up) if
> serial8250_register_8250_port could replicate em485 member state.
> But there are alternatives in implementation.

I'm considering adding the relevant code to the omap8250_startup and
omap8250_shutdown callback functions. However the serial driver
documentation claims that these don't have port->lock taken when
invoked, only port_sem.

> serial8250_register_8250_port may either copy pointer up->em485 to
> uart->em485 or perform deep copy.

Actually, "up" here in omap8250_probe is not a pointer but a struct
variable on stack, so copying the pointer to it is out of question.


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