From owner-svn-src-head@freebsd.org Sat Dec 2 06:27:42 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38961DF51DE; Sat, 2 Dec 2017 06:27:42 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 069B339F6; Sat, 2 Dec 2017 06:27:41 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-it0-f45.google.com with SMTP id m11so6127078iti.1; Fri, 01 Dec 2017 22:27:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nYReWcUl4Rc5OHOZmU4AYfU4ouMWOouhV5GlLp5gKnQ=; b=FCPJIJZUfpmns4srOEc7ua6jXFa/b2GYv0e93bI3cDPwrWUmLV2vByV/etNIsH9b5f 0ttG66jeMaqTWb2rqP6UmDGRRuq/xBLXk46EUILzVlTy1GqBO2WDC2iZ3ms9KuvqyIBS wKt4krUxYa0LCGxOcWrRx4LPJTrLIlR0JQpS4o34WVHLLkgYp1WKAa7aNpbX4vYCo35Y C61Qk7/DTHKGpuHvS+SCRgipV1AJzM+1yFJRf1f0gkfSyUhSJismMsq1IX0BSi5crviu bph5CUbv212d/DMfYv3wTYzCJeJ/LMBV6eme34552F3PKjiO2YqKvBaw21GzxrO3JU/R fBtQ== X-Gm-Message-State: AJaThX74WPAnTy9VpVIEDbVnDwjcx8swamYPCBkIvAyO/OiOZfFVSktp Nh0SMdBcqIZq3viA5z9RpcBPnMGW X-Google-Smtp-Source: AGs4zMZ632obdQuatsjDc1V9K/WN/OGl0vf3f5I9bksNVg0JUhxkP9+0Q6FRaKa3+nrkP3yTFUY1Dg== X-Received: by 10.36.77.143 with SMTP id l137mr5106442itb.50.1512195675694; Fri, 01 Dec 2017 22:21:15 -0800 (PST) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com. [209.85.214.51]) by smtp.gmail.com with ESMTPSA id 139sm1648718itm.2.2017.12.01.22.21.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Dec 2017 22:21:15 -0800 (PST) Received: by mail-it0-f51.google.com with SMTP id t1so4843151ite.5; Fri, 01 Dec 2017 22:21:15 -0800 (PST) X-Received: by 10.36.222.68 with SMTP id d65mr5437357itg.67.1512195674733; Fri, 01 Dec 2017 22:21:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.33.141 with HTTP; Fri, 1 Dec 2017 22:21:14 -0800 (PST) Received: by 10.107.33.141 with HTTP; Fri, 1 Dec 2017 22:21:14 -0800 (PST) In-Reply-To: <201712020221.vB22LRHZ088670@repo.freebsd.org> References: <201712020221.vB22LRHZ088670@repo.freebsd.org> From: Kyle Evans Date: Sat, 2 Dec 2017 00:21:14 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r326454 - in head/sys: conf dev/bwn gnu/dev/bwn/phy_n modules/bwn modules/bwn_pci To: "Landon J. Fuller" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2017 06:27:42 -0000 On Dec 1, 2017 8:21 PM, "Landon J. Fuller" wrote: Author: landonf Date: Sat Dec 2 02:21:27 2017 New Revision: 326454 URL: https://svnweb.freebsd.org/changeset/base/326454 Log: Introduce bwn(4) support for the bhnd(4) bus. Currently, bwn(4) relies on the siba_bwn(4) bus driver to provide support for the on-chip SSB interconnect found in Broadcom's older PCI(e) Wi-Fi adapters. Non-PCI Wi-Fi adapters, as well as the newer BCMA interconnect found in post-2009 Broadcom Wi-Fi hardware, are not supported by siba_bwn(4). The bhnd(4) bus driver (also used by the FreeBSD/MIPS Broadcom port) provides a unified kernel interface to a superset of the hardware supported by siba_bwn; by attaching bwn(4) via bhnd(4), we can support both modern PCI(e) Wi-Fi devices based on the BCMA backplane interconnect, as well as Broadcom MIPS WiSoCs that include a D11 MAC core directly attached to their SSB or BCMA backplane. This diff introduces opt-in bwn(4) support for bhnd(4) by providing: - A small bwn(4) driver subclass, if_bwn_bhnd, that attaches via bhnd(4) instead of siba_bwn(4). - A bhndb(4)-based PCI host bridge driver, if_bwn_pci, that optionally probes at a higher priority than the siba_bwn(4) PCI driver. - A set of compatibility shims that perform translation of bwn(4)'s siba_bwn function calls into their bhnd(9) API equivalents when bwn(4) is attached via a bhnd(4) bus parent. When bwn(4) is attached via siba_bwn(4), all siba_bwn function calls are simply passed through to their original implementations. To test bwn(4) with bhnd(4), place the following lines in loader.conf(5): hw.bwn_pci.preferred="1" if_bwn_pci_load="YES bwn_v4_ucode_load="YES" bwn_v4_lp_ucode_load="YES" To verify that bwn(4) is using bhnd(4), you can check dmesg: bwn0: ... on bhnd0 ... or devinfo(8): pcib2 pci2 bwn_pci0 bhndb0 bhnd0 bwn0 ... bwn(4)/bhnd(4) has been tested for regressions with most chipsets currently supported by bwn(4), including: - BCM4312 - BCM4318 - BCM4321 With minimal changes to the DMA code (not included in this commit), I was also able to test support for newer BCMA devices by bringing up basic working Wi-Fi on two previously unsupported, BCMA-based N-PHY chipsets: - BCM43224 - BCM43225 Hi, I'm pretty sure we've discussed this, but I don't recall to what detail that was- I recall that the 4313 is BCMA, but does it have one of the PHYs that we support already? If so, I'll happily test there. Thanks, Kyle Evans