serdev: Set fwnode for serdev devices
Subsystems (2)
PATCH 1/1 serdev: Set fwnode for serdev devices
This allow fw_devlink to do dependency tracking for serdev devices.
---
Florian,
Can you give it a shot and a tested-by please?
-Saravana
drivers/tty/serdev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serdev/core.c +1 -1
@@ -534,7 +534,7 @@ static int of_serdev_register_devices(struct serdev_controller *ctrl)if (!serdev)continue ; - serdev->dev.of_node = node; +device_set_node (&serdev->dev,of_fwnode_handle (node)); err =serdev_device_add (serdev);if (err) {
Signature · 1 line
2.39.2.722.g9855ee24e9-goog
Quoted 6 lines · Saravana Kannan
This allow
fw_devlinkto do dependency tracking for serdev devices.Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>
Thanks for the quick fix!
Signature · 1 line
Florian
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 6 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>
since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
Thanks
Stefan
Quoted 23 lines
---
Florian,Can you give it a shot and a tested-by please?
(quoted diff) +0
-1-Saravana drivers/tty/serdev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serdev/core.c +1
-1@@ -534,7 +534,7 @@ static int of_serdev_register_devices(struct serdev_controller *ctrl)if (!serdev)continue ; - serdev->dev.of_node = node; +device_set_node (&serdev->dev,of_fwnode_handle (node)); err =serdev_device_add (serdev);if (err) {
Quoted 6 lines · Stefan Wahren
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.
Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written, fw_devlink wasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.
-Saravana
Quoted 27 lines
Thanks
StefanQuoted 23 lines
---
Florian,Can you give it a shot and a tested-by please?
(quoted diff) +0
-1-Saravana drivers/tty/serdev/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serdev/core.c +1
-1@@ -534,7 +534,7 @@ static int of_serdev_register_devices(struct serdev_controller *ctrl)if (!serdev)continue ; - serdev->dev.of_node = node; +device_set_node (&serdev->dev,of_fwnode_handle (node)); err =serdev_device_add (serdev);if (err) {
Quoted 20 lines · Saravana Kannan
Quoted 6 lines · Stefan Wahren
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.
That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the fw_devlink history. Given this did not appear to have a functional impact, we could go without one.
Signature · 1 line
Florian
Quoted 30 lines · Florian Fainelli
Quoted 20 lines · Saravana Kannan
Quoted 6 lines · Stefan Wahren
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.
Quoted 3 lines
That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the
fw_devlinkhistory.
I don't want to pick an arbitrary point in fw_devlink as I don't want people picking this up with some old version of fw_devlink and having to support it there.
Quoted 2 lines
Given this did not appear to have a
functional impact, we could go without one.
This is my take too.
Greg/Rob,
If you really want a Fixes here, can you please just add it instead of a v2 patch just for that? You can use this commit:3fb16866b51d driver core: fw_devlink: Make cycle detection more robust
-Saravana
Quoted 43 lines · Saravana Kannan
Quoted 30 lines · Florian Fainelli
Quoted 20 lines · Saravana Kannan
Quoted 6 lines · Stefan Wahren
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.Quoted 3 lines
That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the
fw_devlinkhistory.I don't want to pick an arbitrary point in
fw_devlinkas I don't want people picking this up with some old version offw_devlinkand having to support it there.Quoted 2 lines
Given this did not appear to have a
functional impact, we could go without one.
Quoted 7 lines
This is my take too.
Greg/Rob,
If you really want a Fixes here, can you please just add it instead of a v2 patch just for that? You can use this commit:
3fb16866b51ddriver core:fw_devlink: Make cycle detection more robust
Rob/Greg,
Can you pick this up for 6.3-rc2 please?
-Saravana
Greg Kroah-Hartman
maintainerQuoted 48 lines · Saravana Kannan
Quoted 47 lines · Saravana Kannan
Quoted 30 lines · Florian Fainelli
Quoted 20 lines · Saravana Kannan
Quoted 6 lines · Stefan Wahren
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.Quoted 3 lines
That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the
fw_devlinkhistory.I don't want to pick an arbitrary point in
fw_devlinkas I don't want people picking this up with some old version offw_devlinkand having to support it there.Quoted 2 lines
Given this did not appear to have a
functional impact, we could go without one.This is my take too.
Greg/Rob,
Quoted 7 lines
Quoted 3 lines
If you really want a Fixes here, can you please just add it instead of a v2 patch just for that? You can use this commit:
3fb16866b51ddriver core:fw_devlink: Make cycle detection more robustRob/Greg,
Can you pick this up for 6.3-rc2 please?
Will do, my queue is huge at the moment, it might be -rc3...
Hi,
Am 02.03.23 um 18:51 schrieb Florian Fainelli:
Quoted 23 lines · Saravana Kannan
Quoted 20 lines · Stefan Wahren
Quoted 6 lines
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 7 lines
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the
fw_devlinkhistory. Given this did not appear to have a functional impact, we could go without one.
i was under the impression that this issue breaks at least Bluetooth on Raspberry Pi 4 because the driver is never probed. I cannot see the success output in Florian's trace. Something like this:
[ 7.124879] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator [ 7.131743] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator
...
[ 7.517249] Bluetooth: hci0: BCM: chip id 107
[ 7.517499] Bluetooth: hci0: BCM: features 0x2f
[ 7.519757] Bluetooth: hci0: BCM4345C0
[ 7.519768] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[ 7.539495] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch
...
[ 8.348831] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+
[ 8.348845] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342
I just want to make sure that 6.2 doesn't have a regression.
Quoted 48 lines · Stefan Wahren
Hi,
Am 02.03.23 um 18:51 schrieb Florian Fainelli:
Quoted 23 lines · Saravana Kannan
Quoted 20 lines · Stefan Wahren
Quoted 6 lines
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 7 lines
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the
fw_devlinkhistory. Given this did not appear to have a functional impact, we could go without one.i was under the impression that this issue breaks at least Bluetooth on Raspberry Pi 4 because the driver is never probed. I cannot see the success output in Florian's trace. Something like this:
[ 7.124879]
hci_uart_bcmserial0-0: supply vbat not found, using dummy regulator [ 7.131743]hci_uart_bcmserial0-0: supply vddio not found, using dummy regulator
...
[ 7.517249] Bluetooth: hci0: BCM: chip id 107
[ 7.517499] Bluetooth: hci0: BCM: features0x2f
[ 7.519757] Bluetooth: hci0: BCM4345C0
[ 7.519768] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[ 7.539495] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch
...
[ 8.348831] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+
[ 8.348845] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342
Quoted 1 line
I just want to make sure that 6.2 doesn't have a regression.
My configuration uses hci_uart as a module, and it would always load fine, but I suppose I can make sure that even built-in this works properly. Give me a day or two to test that.
Signature · 1 line
Florian
Quoted 60 lines · Florian Fainelli
Quoted 58 lines · Stefan Wahren
Hi,
Am 02.03.23 um 18:51 schrieb Florian Fainelli:
Quoted 32 lines · Saravana Kannan
Quoted 23 lines
Quoted 12 lines · Stefan Wahren
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 7 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Reported-by Florian Fainelli <[email protected]>Link:
https://lore.kernel.org/lkml/[email protected]/Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>Quoted 3 lines
since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned
in the commit message and providing a Fixes tag?So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.Quoted 4 lines
That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the
fw_devlinkhistory. Given this did not appear to have a functional impact, we could go without one.i was under the impression that this issue breaks at least Bluetooth on Raspberry Pi 4 because the driver is never probed. I cannot see the success output in Florian's trace. Something like this:
[ 7.124879] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator [ 7.131743] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator ... [ 7.517249] Bluetooth: hci0: BCM: chip id 107 [ 7.517499] Bluetooth: hci0: BCM: features 0x2f [ 7.519757] Bluetooth: hci0: BCM4345C0 [ 7.519768] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000 [ 7.539495] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch ... [ 8.348831] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+ [ 8.348845] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342
Quoted 5 lines
Quoted 1 line
I just want to make sure that 6.2 doesn't have a regression.
My configuration uses
hci_uartas a module, and it would always load fine, but I suppose I can make sure that even built-in this works properly. Give me a day or two to test that.
Thanks Stefan and Florian! I'll wait to see the results.
But based on my mental model of fw_devlink I don't expect BT to be broken without this patch. If a device doesn't have fwnode set, it's effectively invisible to fw_devlink. That could only affect consumers of the device and not the device itself.
-Saravana
Stefan Wahren
Tested-byHi,
Am 03.03.23 um 18:22 schrieb Florian Fainelli:
Quoted 49 lines · Stefan Wahren
Quoted 48 lines
Hi,
Am 02.03.23 um 18:51 schrieb Florian Fainelli:
Quoted 23 lines · Saravana Kannan
Quoted 20 lines · Stefan Wahren
Quoted 6 lines
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 7 lines
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the
fw_devlinkhistory. Given this did not appear to have a functional impact, we could go without one.i was under the impression that this issue breaks at least Bluetooth on Raspberry Pi 4 because the driver is never probed. I cannot see the success output in Florian's trace. Something like this:
[ 7.124879]
hci_uart_bcmserial0-0: supply vbat not found, using dummy regulator [ 7.131743]hci_uart_bcmserial0-0: supply vddio not found, using dummy regulator
...
[ 7.517249] Bluetooth: hci0: BCM: chip id 107
[ 7.517499] Bluetooth: hci0: BCM: features0x2f
[ 7.519757] Bluetooth: hci0: BCM4345C0
[ 7.519768] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[ 7.539495] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch
...
[ 8.348831] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+
[ 8.348845] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342
Quoted 3 lines
Quoted 1 line
I just want to make sure that 6.2 doesn't have a regression.
My configuration uses
hci_uartas a module, and it would always load fine, but I suppose I can make sure that even built-in this works properly. Give me a day or two to test that.
okay, this is fine. From my point of view this is not necessary to test built-in.
I tested latest mainline with Raspberry Pi 4 (multi_v7_defconfig + ARM_LPAE) and there is no regression:
Thanks
Quoted 54 lines · Stefan Wahren
Hi,
Am 03.03.23 um 18:22 schrieb Florian Fainelli:
Quoted 51 lines · Stefan Wahren
Quoted 49 lines
Hi,
Am 02.03.23 um 18:51 schrieb Florian Fainelli:
Quoted 23 lines · Saravana Kannan
Quoted 20 lines · Stefan Wahren
Quoted 6 lines
Hi Saravana,
Am 02.03.23 um 03:35 schrieb Saravana Kannan:
Quoted 2 lines
This allow
fw_devlinkto do dependency tracking for serdev devices.Quoted 7 lines
Quoted 4 lines
Reported-by Florian Fainelli <[email protected]>Cc Stefan Wahren <[email protected]>Signed-off-by Saravana Kannan <[email protected]>since this fixes an issue on Raspberry Pi 4, shouldn't this be mentioned in the commit message and providing a Fixes tag?
So RPi 4 was never creating a device links between serdev devices and their consumers. The error message was just a new one I added and we are noticing and catching the fact that serdev wasn't setting fwnode for a device.
Quoted 7 lines
Quoted 5 lines
I'm also not sure if I can say this commit "Fixes" an issue in serdev core because when serdev core was written,
fw_devlinkwasn't a thing. Once I add Fixes, people will start pulling this into stable branches/other trees where I don't think this should be pulled into older stable branches.That is kind of the point of Fixes: tag, is not it? It is appropriate to list a commit that is not specific to serdev, but maybe a particular point into the
fw_devlinkhistory. Given this did not appear to have a functional impact, we could go without one.i was under the impression that this issue breaks at least Bluetooth on Raspberry Pi 4 because the driver is never probed. I cannot see the success output in Florian's trace. Something like this:
[ 7.124879]
hci_uart_bcmserial0-0: supply vbat not found, using dummy regulator [ 7.131743]hci_uart_bcmserial0-0: supply vddio not found, using dummy regulator
...
[ 7.517249] Bluetooth: hci0: BCM: chip id 107
[ 7.517499] Bluetooth: hci0: BCM: features0x2f
[ 7.519757] Bluetooth: hci0: BCM4345C0
[ 7.519768] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000
[ 7.539495] Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch
...
[ 8.348831] Bluetooth: hci0: BCM43455 37.4MHz Raspberry Pi 3+
[ 8.348845] Bluetooth: hci0: BCM4345C0 (003.001.025) build 0342I just want to make sure that 6.2 doesn't have a regression.
Quoted 7 lines
Quoted 1 line
My configuration uses
hci_uartas a module, and it would always load fine, but I suppose I can make sure that even built-in this works properly. Give me a day or two to test that.okay, this is fine. From my point of view this is not necessary to test built-in.
I tested latest mainline with Raspberry Pi 4 (
multi_v7_defconfig+ARM_LPAE) and there is no regression:Tested-by Stefan Wahren <[email protected]>
Tested with making the BT drivers built-in with and without the patch and it still worked OK in both cases.
Signature · 1 line
Florian