Bug 150251 - [patch] [ixgbe] Late cable insertion broken
Summary: [patch] [ixgbe] Late cable insertion broken
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Eric Joyner
URL:
Keywords: IntelNetworking
Depends on:
Blocks:
 
Reported: 2010-09-03 17:00 UTC by Andrew Boyer
Modified: 2016-02-16 14:11 UTC (History)
2 users (show)

See Also:


Attachments
file.diff (2.53 KB, patch)
2010-09-03 17:00 UTC, Andrew Boyer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Boyer 2010-09-03 17:00:07 UTC
On an 82599 card, the PHY type is not known until the SFP+ module is connected.  If no module is installed when the driver loads, the PHY type will be set to ixgbe_phy_none in ixgbe_identify_phy_82599().  Once it is set there, it will never be re-set, even after a cable is plugged in.  SFP+ modules which require initialization won't get it.

The detection logic in ixgbe_sfp_probe() won't do anything unless the PHY type is set to ixgbe_phy_nl, so it works on 82598 cards but not on 82599 cards.

Fix: Add PHY detection logic to ixgbe_handle_mod().
Add locking to ixgbe_handle_mod() and ixgbe_handle_msf() since PHY detection sometimes fails without it.
Since mod_task will call msf_task if necessary, simplify logic in ixgbe_config_link().

Patch attached with submission follows:
How-To-Repeat: Install an 82599 card but no SFP+ module.  Boot the system, then install a cable (copper or optical).
Comment 1 Volker Werth freebsd_committer 2010-09-03 19:58:05 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net


Over to maintainer(s).
Comment 2 Sean Bruno freebsd_committer 2015-06-30 17:54:38 UTC
Bugzilla is making it hard to tell where this applies to, but it *should* be applied to if_ix.c ... I think.
Comment 3 Sean Bruno freebsd_committer 2015-07-24 16:04:39 UTC
(In reply to aboyer from comment #0)
https://reviews.freebsd.org/D3188

Can you take a look at the review I've put up as I had to redo the patch after ixgbe(4) got an overhaul.
Comment 4 commit-hook freebsd_committer 2016-01-07 17:02:40 UTC
A commit references this bug:

Author: sbruno
Date: Thu Jan  7 17:02:34 UTC 2016
New revision: 293334
URL: https://svnweb.freebsd.org/changeset/base/293334

Log:
  Fixup SFP module insertion on the 82599 when insertion happens after
  the system is booted and running.

  Add PHY detection logic to ixgbe_handle_mod() and add locking to
  ixgbe_handle_msf() as well.

  PR:		150251
  Submitted by:	aboyer@averesystems.com
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D3188

Changes:
  head/sys/dev/ixgbe/if_ix.c