Date: Sat, 14 Jul 2018 16:06:53 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336281 - head/sys/dev/vnic Message-ID: <201807141606.w6EG6rCC011260@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sat Jul 14 16:06:53 2018 New Revision: 336281 URL: https://svnweb.freebsd.org/changeset/base/336281 Log: Fix vnic fallback PHY name matching after r334880. In some cases it seems that the PHY mode can only be identified by matching against the corresponding device node name in the FDT. r334880 broke this for the case where the node name contains a unit address. Fix the problem by allowing a match in that case. Reviewed by: andrew, sbruno Tested by: sbruno Differential Revision: https://reviews.freebsd.org/D16259 Modified: head/sys/dev/vnic/thunder_bgx_fdt.c Modified: head/sys/dev/vnic/thunder_bgx_fdt.c ============================================================================== --- head/sys/dev/vnic/thunder_bgx_fdt.c Sat Jul 14 15:45:11 2018 (r336280) +++ head/sys/dev/vnic/thunder_bgx_fdt.c Sat Jul 14 16:06:53 2018 (r336281) @@ -193,7 +193,8 @@ bgx_fdt_phy_name_match(struct bgx *bgx, char *phy_name if (sz > size) return (FALSE); - if (strncmp(phy_name, type, sz) == 0) + if (strncmp(phy_name, type, sz - 1) == 0 && + (phy_name[sz - 1] == '\0' || phy_name[sz - 1] == '@')) return (TRUE); return (FALSE);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807141606.w6EG6rCC011260>