* [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc
@ 2024-12-07 0:12 Hui Wang
2024-12-07 0:13 ` kernel test robot
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Hui Wang @ 2024-12-07 0:12 UTC (permalink / raw)
To: stable, linux-serial, gregkh; +Cc: hvilleneuve, hui.wang
Recently we found the fifo_read() and fifo_write() are broken in our
5.15 and 5.4 kernels after cherry-pick the commit e635f652696e
("serial: sc16is7xx: convert from _raw_ to _noinc_ regmap functions
for FIFO"), that is because the reg needs to shift if we don't
cherry-pick a prerequiste commit 3837a0379533 ("serial: sc16is7xx:
improve regmap debugfs by using one regmap per port").
Here fix it by shifting the reg as regmap_volatile() does.
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
drivers/tty/serial/sc16is7xx.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index d274a847c6ab..87e34099f369 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -487,7 +487,14 @@ static bool sc16is7xx_regmap_precious(struct device *dev, unsigned int reg)
static bool sc16is7xx_regmap_noinc(struct device *dev, unsigned int reg)
{
- return reg == SC16IS7XX_RHR_REG;
+ switch (reg >> SC16IS7XX_REG_SHIFT) {
+ case SC16IS7XX_RHR_REG:
+ return true;
+ default:
+ break;
+ }
+
+ return false;
}
/*
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc
2024-12-07 0:12 [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc Hui Wang
@ 2024-12-07 0:13 ` kernel test robot
2024-12-07 2:07 ` Sasha Levin
2024-12-07 6:31 ` Greg KH
2 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2024-12-07 0:13 UTC (permalink / raw)
To: Hui Wang; +Cc: stable, oe-kbuild-all
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-1
Rule: add the tag "Cc: stable@vger.kernel.org" in the sign-off area to have the patch automatically included in the stable tree.
Subject: [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc
Link: https://lore.kernel.org/stable/20241207001225.203262-1-hui.wang%40canonical.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc
2024-12-07 0:12 [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc Hui Wang
2024-12-07 0:13 ` kernel test robot
@ 2024-12-07 2:07 ` Sasha Levin
2024-12-07 6:31 ` Greg KH
2 siblings, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2024-12-07 2:07 UTC (permalink / raw)
To: stable; +Cc: Hui Wang, Sasha Levin
[ Sasha's backport helper bot ]
Hi,
No upstream commit was identified. Using temporary commit for testing.
Results of testing on various branches:
| Branch | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-5.15.y | Success | Success |
| stable/linux-5.10.y | Success | Success |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc
2024-12-07 0:12 [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc Hui Wang
2024-12-07 0:13 ` kernel test robot
2024-12-07 2:07 ` Sasha Levin
@ 2024-12-07 6:31 ` Greg KH
2024-12-07 13:47 ` Hui Wang
2 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2024-12-07 6:31 UTC (permalink / raw)
To: Hui Wang; +Cc: stable, linux-serial, hvilleneuve
On Sat, Dec 07, 2024 at 08:12:25AM +0800, Hui Wang wrote:
> Recently we found the fifo_read() and fifo_write() are broken in our
> 5.15 and 5.4 kernels after cherry-pick the commit e635f652696e
> ("serial: sc16is7xx: convert from _raw_ to _noinc_ regmap functions
> for FIFO"), that is because the reg needs to shift if we don't
> cherry-pick a prerequiste commit 3837a0379533 ("serial: sc16is7xx:
> improve regmap debugfs by using one regmap per port").
>
> Here fix it by shifting the reg as regmap_volatile() does.
>
> Signed-off-by: Hui Wang <hui.wang@canonical.com>
> ---
> drivers/tty/serial/sc16is7xx.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
Why not take the proper upstream commit instead?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc
2024-12-07 6:31 ` Greg KH
@ 2024-12-07 13:47 ` Hui Wang
0 siblings, 0 replies; 5+ messages in thread
From: Hui Wang @ 2024-12-07 13:47 UTC (permalink / raw)
To: Greg KH; +Cc: stable, linux-serial, hvilleneuve
On 12/7/24 14:31, Greg KH wrote:
> On Sat, Dec 07, 2024 at 08:12:25AM +0800, Hui Wang wrote:
>> Recently we found the fifo_read() and fifo_write() are broken in our
>> 5.15 and 5.4 kernels after cherry-pick the commit e635f652696e
>> ("serial: sc16is7xx: convert from _raw_ to _noinc_ regmap functions
>> for FIFO"), that is because the reg needs to shift if we don't
>> cherry-pick a prerequiste commit 3837a0379533 ("serial: sc16is7xx:
>> improve regmap debugfs by using one regmap per port").
>>
>> Here fix it by shifting the reg as regmap_volatile() does.
>>
>> Signed-off-by: Hui Wang <hui.wang@canonical.com>
>> ---
>> drivers/tty/serial/sc16is7xx.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
> Why not take the proper upstream commit instead?
The prerequisite commit 3837a0379533 will introduce significant change
and significant conflict if backport it to 5.15.y/5.10.y, It is more
likely to bring new regression.
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-07 13:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-07 0:12 [stable-kernel-only][5.15.y][5.10.y][PATCH] serial: sc16is7xx: the reg needs to shift in regmap_noinc Hui Wang
2024-12-07 0:13 ` kernel test robot
2024-12-07 2:07 ` Sasha Levin
2024-12-07 6:31 ` Greg KH
2024-12-07 13:47 ` Hui Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox