Page MenuHomeFreeBSD

"device axp" requires miibus
ClosedPublic

Authored by bofh on Feb 2 2021, 9:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 19, 10:04 PM
Unknown Object (File)
Thu, Mar 7, 12:54 PM
Unknown Object (File)
Feb 3 2024, 4:45 AM
Unknown Object (File)
Dec 22 2023, 11:53 PM
Unknown Object (File)
Dec 15 2023, 4:23 PM
Unknown Object (File)
Dec 12 2023, 4:19 AM
Unknown Object (File)
Nov 6 2023, 11:42 PM
Unknown Object (File)
Oct 5 2023, 10:42 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.