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
Unknown Object (File)
Thu, May 2, 11:40 PM
Unknown Object (File)
Mon, Apr 29, 3:52 AM
Unknown Object (File)
Sun, Apr 28, 10:47 PM
Unknown Object (File)
Mar 19 2024, 10:25 PM
Unknown Object (File)
Mar 19 2024, 10:25 PM
Unknown Object (File)
Mar 19 2024, 10:25 PM
Unknown Object (File)
Mar 18 2024, 12:04 PM
Unknown Object (File)
Feb 15 2024, 3:27 AM
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.