[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3ff9fad-4939-bf94-4f92-c2072bc3955b@gmx.de>
Date: Fri, 29 Sep 2023 14:21:16 +0200
From: Lino Sanfilippo <LinoSanfilippo@....de>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: jirislaby@...nel.org, shawnguo@...nel.org, s.hauer@...gutronix.de,
ilpo.jarvinen@...ux.intel.com, mcoquelin.stm32@...il.com,
alexandre.torgue@...s.st.com, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org, l.sanfilippo@...bus.com,
lukas@...ner.de, p.rosenberger@...bus.com, stable@...r.kernel.org
Subject: Re: [PATCH 1/6] serial: Do not hold the port lock when setting
rx-during-tx GPIO
Hi,
On 29.09.23 07:50, Greg KH wrote:
> On Fri, Sep 29, 2023 at 12:12:41AM +0200, Lino Sanfilippo wrote:
>> From: Lino Sanfilippo <l.sanfilippo@...bus.com>
>>
>> Both the imx and stm32 driver set the rx-during-tx GPIO in the
>> rs485_config() function by means of gpiod_set_value(). Since rs485_config()
>> is called with the port lock held, this can be an problem in case that
>> setting the GPIO line can sleep (e.g. if a GPIO expander is used which is
>> connected via SPI or I2C).
>>
>> Avoid this issue by setting the GPIO outside of the port lock in the serial
>> core and by using gpiod_set_value_cansleep() instead of gpiod_set_value().
>>
>> Since now both the term and the rx-during-tx GPIO are set within the serial
>> core use a common function uart_set_rs485_gpios() to set both.
>>
>> With moving it into the serial core setting the rx-during-tx GPIO is now
>> automatically done for all drivers that support such a GPIO.
>>
>> Cc: stable@...r.kernel.org
>> Signed-off-by: Lino Sanfilippo <l.sanfilippo@...bus.com>
>
> You cc: stable on many of these, but do not provide a "Fixes:" tag
> showing just how far back they should go. Can you do that so that we
> have a hint as to what to do here?
>
Yes, will do so in the next version.
BR,
Lino
> thanks,
>
> greg k-h
Powered by blists - more mailing lists