Skip to content

Bugfix for phy mode init and improvement

Administrator requested to merge dev into jpe-dev

Created by: AndreasGeissler

This pull request shall fix two open PR's (MAIN_PR003930 and MAIN_PR006647).

MAIN_PR003930: This PR is only a suggested claim and is intended to declare a few functions as static and a variable as const.

MAIN_PR006647: The problem in function z77_init_phymode is that the structure ethtool_cmd is not initialized complettely. This means that members of the structure will be filled with random values and will be overwritte only partly in this function. The mii_ethtool_sset will fail in case of an invalid speed configuration because of undefined hi_speed. The reason why it works with ethtool_cmd_speed_set is that this function also initialize the hi_speed member which was previousely undefined. Fixed by initializing the structure with 0.

Please do a review of changes and merge them into jpe-dev branch. I guess that a functional test would also make sense. I just checked to see if the change affected error behavior and didn't test the rest.

Merge request reports