Page MenuHomeFreeBSD

Add the Thunderbolt Apple interfaces to the bge(4) supported list
ClosedPublic

Authored by sevan on Jul 28 2017, 2:14 PM.

Details

Summary

Tested both entries (adapter & ethernet interface on monitor)

dmesg from thunderbolt display
http://dmesgd.nycbug.org/index.cgi?do=view&id=3185

dmesg snippet from gigabit adapter (mac address trimmed)
bge0: <Thunderbolt Ethernet, ASIC rev. 0x57766000> mem 0xacb00000-0xacb0ffff,0xacb10000-0xacb1ffff at device 0.0 on pci8
bge0: CHIP ID 0x57766000; ASIC REV 0x57766; CHIP REV 0x577660; PCI-E
miibus0: <MII bus> on bge0
bge0: Using defaults for TSO: 65518/35/2048
bge0: Ethernet address: 40:6c:8f:

Not sure if I should extend the man page to state that hot plug isn't supported on FreeBSD (like on OS X) hence device should be connected prior to system power up and removal should be avoided when system is live (system stays up if I recall correctly, but kernel freaks out that a bge interface just disappeared).

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

sevan created this revision.Jul 28 2017, 2:14 PM

Not sure if I should extend the man page to state that hot plug isn't supported on FreeBSD (like on OS X) hence device should be connected prior to system power up and removal should be avoided when system is live (system stays up if I recall correctly, but kernel freaks out that a bge interface just disappeared).

That seems like and important limitation, so yeah, I'd include that info.

Also: is that the right URL? The snippet doesn't appear there.

sevan added a comment.Jul 28 2017, 2:54 PM

That seems like and important limitation, so yeah, I'd include that info.

Sure, add a BUGS section?

sevan added a comment.Jul 28 2017, 2:56 PM

Also: is that the right URL? The snippet doesn't appear there.

The URL is the dmesg output taken from my system with a display connected (search for bge0)

The snippet is from my system, live, with a thunderbolt to gigabit adapter connected.
They're the two separate devices I'm adding to the manual.

That seems like and important limitation, so yeah, I'd include that info.

Sure, add a BUGS section?

If it's something that we plan on fixing soon, I'd say BUGS (i.e. this supposed to work, but we know it doesn't right now); if not, I'd say CAVEATS (i.e. this is a known limitation).

sevan added a comment.Jul 28 2017, 7:04 PM

If it's something that we plan on fixing soon, I'd say BUGS (i.e. this supposed to work, but we know it doesn't right now); if not, I'd say CAVEATS (i.e. this is a known limitation).

http://mdocml.bsd.lv/man/mdoc.7.html
mandoc manual states the CAVEATS and BUGS section are for
CAVEATS

Common misuses and misunderstandings should be explained in this section.

BUGS

Known bugs, limitations, and work-arounds should be described in this section.
bcr edited edge metadata.Aug 18 2017, 6:51 AM

If you can't find a fitting section, then just put it into the normal text.

sevan updated this revision to Diff 32211.Aug 18 2017, 5:45 PM

Add BUGS section and an entry to the DIAGNOSTICS section for the message reported when the interface is physically removed.

bcr added a comment.Aug 18 2017, 7:06 PM

One sentence needs some work, the rest is fine and I like how you solved your "dilemma". ;-)

share/man/man4/bge.4
277 ↗(On Diff #32211)

There is either a "the" missing before Thunderbolt here or it must be s/interface/interfaces/ to make the sentence sound better. Also, I think it must be "Thunderbolt-based".

sevan updated this revision to Diff 32219.Aug 18 2017, 7:38 PM

Address points raised.

sevan marked an inline comment as done.Aug 18 2017, 8:03 PM
bcr accepted this revision.Aug 18 2017, 8:13 PM

Good to go.

This revision is now accepted and ready to land.Aug 18 2017, 8:13 PM
This revision was automatically updated to reflect the committed changes.
wblock added inline comments.Sep 1 2017, 8:14 PM
head/share/man/man4/bge.4
245

"it is attached to" is not needed.

275

s/need to be/must be/

s/hence,/so/

s/prior to system power up on/before applying power on/

276

s/in order//

277
The lack of hotplug support means that Thunderbolt-based interfaces must not be removed
278

s/up as/up, as/