Page MenuHomeFreeBSD

"device axp" requires miibus
ClosedPublic

Authored by bofh on Feb 2 2021, 9:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 22, 8:15 PM
Unknown Object (File)
Fri, Nov 22, 7:46 PM
Unknown Object (File)
Wed, Nov 13, 6:31 PM
Unknown Object (File)
Oct 4 2024, 8:47 PM
Unknown Object (File)
Oct 4 2024, 3:38 PM
Unknown Object (File)
Oct 1 2024, 11:35 PM
Unknown Object (File)
Oct 1 2024, 10:20 PM
Unknown Object (File)
Sep 29 2024, 11:24 PM
Subscribers

Details

Summary

I was trying to build a custom kernel. As I don't need miibus based interfaces I tried to build the kernel it failed with the following error:

  /usr/src/sys/dev/axgbe/if_axgbe_pci.c
/usr/src/sys/dev/axgbe/if_axgbe_pci.c:58:10: fatal error: 'miibus_if.h' file not found
#include "miibus_if.h"
         ^~~~~~~~~~~~~

Adding miibus fixes the build. Although I just removed axp for my purpose.

So this patch just notifies that this module requires miibus. Although I am not sure why an iflib based interface will require miibus.

Diff Detail

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

Event Timeline

bofh requested review of this revision.Feb 2 2021, 9:49 PM
bofh created this revision.
bofh edited the summary of this revision. (Show Details)

Other than the comment mentioned, this patch looks good to me.

Although I am not sure why an iflib based interface will require miibus.

Regarding this, As this driver is supposed to be unified driver for both SFP and MII interfaces, we added the miibus interfaces. Should we try avoid using miibus and iflib together? If so, how to implement unified drivers (supporting MII and SFP)?

sys/amd64/conf/NOTES
313

Hi @bofh , axp driver needs miibus only for direct RJ45 interfaces and not for SFP and SFP+ interfaces. So, can this comment add that something like "Requires the miibus module for RJ45 interfaces"?

Change in "GENERIC" file is fine. But, in NOTES it would be good if some details added.

Other than the comment mentioned, this patch looks good to me.

Thanks.

Although I am not sure why an iflib based interface will require miibus.

Regarding this, As this driver is supposed to be unified driver for both SFP and MII interfaces, we added the miibus interfaces. Should we try avoid using miibus and iflib together? If so, how to implement unified drivers (supporting MII and SFP)?

One option maybe to split it into two rather than unified.

sys/amd64/conf/NOTES
313

This might be counter productive or more confusing. Because the build system cannot detect or know which one I will use and eventually if I think that I won't need the RJ-45 so lets remove miibus it won't build the kernel. :P

bofh marked an inline comment as not done.Feb 3 2021, 6:34 PM

One option maybe to split it into two rather than unified.

Our initial plan is to have a single driver in sync with how it's in Linux for easy managing. Let's have it this way for now and decide on the split as per the need.

sys/amd64/conf/NOTES
313

Ok. Then this change is fine.

This revision is now accepted and ready to land.Feb 3 2021, 6:51 PM
imp added a subscriber: imp.

Seems good to me.