From: dan.carpenter@oracle.com <dan.carpenter@oracle.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [bug report] igc: Add initial LTR support
Date: Wed, 8 Jul 2020 14:47:51 +0300 [thread overview]
Message-ID: <20200708114751.GA11509@mwanda> (raw)
Hello Sasha Neftin,
The patch 707abf069548: "igc: Add initial LTR support" from Jun 2,
2020, leads to the following static checker warning:
drivers/net/ethernet/intel/igc/igc_mac.c:424 igc_check_for_copper_link()
error: uninitialized symbol 'link'.
drivers/net/ethernet/intel/igc/igc_mac.c
363 s32 igc_check_for_copper_link(struct igc_hw *hw)
364 {
365 struct igc_mac_info *mac = &hw->mac;
366 s32 ret_val;
367 bool link;
^^^^^^^^^
368
369 /* We only want to go out to the PHY registers to see if Auto-Neg
370 * has completed and/or if our link status has changed. The
371 * get_link_status flag is set upon receiving a Link Status
372 * Change or Rx Sequence Error interrupt.
373 */
374 if (!mac->get_link_status) {
375 ret_val = 0;
376 goto out;
^^^^^^^^
377 }
378
379 /* First we want to see if the MII Status Register reports
380 * link. If so, then we want to get the current speed/duplex
381 * of the PHY.
382 */
383 ret_val = igc_phy_has_link(hw, 1, 0, &link);
384 if (ret_val)
385 goto out;
386
387 if (!link)
388 goto out; /* No link detected */
389
390 mac->get_link_status = false;
391
392 /* Check if there was DownShift, must be checked
393 * immediately after link-up
394 */
395 igc_check_downshift(hw);
396
397 /* If we are forcing speed/duplex, then we simply return since
398 * we have already determined whether we have link or not.
399 */
400 if (!mac->autoneg) {
401 ret_val = -IGC_ERR_CONFIG;
402 goto out;
403 }
404
405 /* Auto-Neg is enabled. Auto Speed Detection takes care
406 * of MAC speed/duplex configuration. So we only need to
407 * configure Collision Distance in the MAC.
408 */
409 igc_config_collision_dist(hw);
410
411 /* Configure Flow Control now that Auto-Neg has completed.
412 * First, we need to restore the desired flow control
413 * settings because we may have had to re-autoneg with a
414 * different link partner.
415 */
416 ret_val = igc_config_fc_after_link_up(hw);
417 if (ret_val)
418 hw_dbg("Error configuring flow control\n");
419
420 out:
421 /* Now that we are aware of our link settings, we can set the LTR
422 * thresholds.
423 */
424 ret_val = igc_set_ltr_i225(hw, link);
^^^^
Uninitialized.
425
426 return ret_val;
427 }
regards,
dan carpenter
next reply other threads:[~2020-07-08 11:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-08 11:47 dan.carpenter [this message]
2020-07-08 12:22 ` [Intel-wired-lan] [bug report] igc: Add initial LTR support Neftin, Sasha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200708114751.GA11509@mwanda \
--to=dan.carpenter@oracle.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox