]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Don't assume all children of a nexus are ports.
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 28 Feb 2019 22:10:19 +0000 (22:10 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 28 Feb 2019 22:10:19 +0000 (22:10 +0000)
commitd18e541983aba63ac67a527d8801b77d9de0acf3
treecdfe7e80e82a054e45ecf56615ffc1b3426df6ca
parent2b64ab22e8a8140aab063bc3aedf2f6c682e3fc5
Don't assume all children of a nexus are ports.

Specifically, ccr(4) devices are also children of cxgbe nexus devices.
Rather than making assumptions about the child device's softc, walk
the list of ports from the nexus' softc to determine if a child is a
port in t4_child_location_str().  This fixes a panic when detaching a
ccr device.

Reviewed by: np
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D19399
sys/dev/cxgbe/t4_main.c