Page MenuHomeFreeBSD

files: make uart_bus_puc.c not depend on puc
ClosedPublic

Authored by manu on Feb 12 2024, 10:29 AM.
Tags
None
Referenced Files
F102698603: D43846.diff
Sat, Nov 16, 12:37 AM
Unknown Object (File)
Tue, Oct 29, 7:26 PM
Unknown Object (File)
Tue, Oct 29, 7:26 PM
Unknown Object (File)
Wed, Oct 23, 6:13 PM
Unknown Object (File)
Mon, Oct 21, 12:00 PM
Unknown Object (File)
Sep 21 2024, 4:06 PM
Unknown Object (File)
Sep 11 2024, 8:57 PM
Unknown Object (File)
Sep 11 2024, 8:57 PM
Subscribers

Details

Summary

If one wants to have puc working as a module we need the bus
in the kernel otherwise we won't be able to find any child to attach.

Sponsored by: Beckhoff Automation GmbH & Co. KG

Test Plan

Remove puc from kernel config, loading puc (manually or via devmatch or loader) and uart devices are created correctly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

manu requested review of this revision.Feb 12 2024, 10:29 AM
manu added a reviewer: imp.

I've tried to make a puc_bus module that contain dev/uart/uart_bus_puc.c and make puc depends on this, but behavior is the same.

This change is correct. It should be made no matter what. Puc is tied to pci.
I also think it shows some weaknesses in how we build ko.
What's your bigger picture goal in wanting to make puc more of a first class bus or module?

This revision is now accepted and ready to land.Feb 12 2024, 2:10 PM
In D43846#1000175, @imp wrote:

This change is correct. It should be made no matter what. Puc is tied to pci.

Thanks, I wasn't sure that this was the correct change or more an hack :)

I also think it shows some weaknesses in how we build ko.
What's your bigger picture goal in wanting to make puc more of a first class bus or module?

We have puc(4) device at work and most of our customer wants to use the uart for our PLC stuff so our kernel config doesn't include it.
But some customer wants it for connecting to devices via FreeBSD.
So with this change we have what we want :)

This revision was automatically updated to reflect the committed changes.