On Sun, 2012-01-08 at 22:21 +0100, Jesper Juhl wrote:
Hi
In ixgbe_non_sfp_link_config(), the variable 'negotiation' is declared
without initializer and unless we take the true branch in the 'if
((!autoneg) && (hw->mac.ops.get_link_capabilities))' statement it will
remain uninitialized when it is subsequently read in the 'ret =
hw->mac.ops.setup_link(hw, autoneg, negotiation, link_up)' statement.
The test of 'ret' after the 'if ((!autoneg) &&
(hw->mac.ops.get_link_capabilities))' statement also looks fairly
pointless if we do not take the true branch, since then 'ret' will not
have been changed since the previous identical test.
The correct fix escapes me since I don't really know this code (and don't
plan to spend the time to get to know it), but I thought I'd just report
what I had noticed and then someone else can hopefully come up with a good
fix :-)
PS. Please CC me on replies.
Adding netdev mailing list and Don Skidmore (ixgbe maintainer)
Removed Bruce Allan (e1000e maintainer)
I see the potential issue you are referring to, I will defer to Don to
either explain the reasoning in the logic or suggest a fix.