[rtems-libbsd] Question how to treat necessary changes from freebsd master

Jan.Sommer at dlr.de Jan.Sommer at dlr.de
Tue Aug 4 20:46:21 UTC 2020


Hello,

I have now a patchset ready which should also properly enable the e1000 driver for the master branch of rtems-libbsd.
There is just a small problem:

The commit the current freebsd-org submodule points to has this line in the e1000/if_em.c (https://github.com/freebsd/freebsd/blob/6b0307a/sys/dev/e1000/if_em.c#L1839)

>	if (adapter->hw.mac.type < em_mac_min)
>		lem_smartspeed(adapter);
> 	E1000_WRITE_REG(&adapter->hw, E1000_IMS, EM_MSIX_LINK | E1000_IMS_LSC);

This works fine on qemu, but hangs when tested on actual hardware.
With the current master of freebsd this has been changed to:

>	if (hw->mac.type < em_mac_min)
>		lem_smartspeed(adapter);
>	else if (hw->mac.type == e1000_82574 &&
>	    adapter->intr_type == IFLIB_INTR_MSIX)
>		E1000_WRITE_REG(&adapter->hw, E1000_IMS, EM_MSIX_LINK |
>		    E1000_IMS_LSC);

And this also works on the hardware.
So, should I add this change with an ifdef __rtems__ to the patch set which has to be resolved during the next bump of freebsd-org?
Or should I leave it out for the moment and it will be added automatically with the next bump of the submodule?

Best regards,

    Jan


Deutsches Zentrum für Luft- und Raumfahrt e. V. (DLR)
German Aerospace Center
Simulation and Software Technology | Software for Space Systems and Interactive Visualization | Lilienthalplatz 7 | 38108 Braunschweig | Germany

Jan Sommer
Telephone +49 531 295-2494 | Telefax 0531 295-2767 | jan.sommer at dlr.de
DLR.de/SC



More information about the devel mailing list