Re: Wii: bwi driver fails to attach for device id 0x044b on NetBSD 11.0-BETA

Jared McNeill <[email protected]> Sat, 18 Oct 2025 22:17:09 -0300 (ADT)
Newsgroups gmane.os.netbsd.ports.powerpc
Message-ID <BYAPR14MB2632A2229B7F4BE4588C819CFAF4A@BYAPR14MB2632.namprd14.prod.outlook.com>
--8323329-760751007-1760836631=:816138
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT

I checked in a patch that should help. Can you give it a shot?

revision 1.44
date: 2025-10-18 22:15:45 -0300;  author: jmcneill;  state: Exp;  lines: +10 -3;  commitid: vHCZXTlZiGEnk7fG;
bwi: Retry SDIO common regwin probe a few times before giving up.

It seems that on some systems, we need to read the SDIO common regwin ID
register more than once to properly identify it. Try a couple of times
before giving up.

This makes bwi(4) attach on my red Wii.


On Fri, 10 Oct 2025, Jared McNeill wrote:

> Actually, don't waste your time with that patch, on second thought it won't 
> work. I'll do some more digging.
>
>
> On Fri, 10 Oct 2025, Jared McNeill wrote:
>
>> Hi!
>> 
>> That's interesting, I haven't been able to reproduce this myself with any 
>> of the NA units that I have, but after seeing your message I went back and 
>> looked at Jun Ebihara's dmesg from 
>> https://mail-index.netbsd.org/port-powerpc/2025/06/16/msg003701.html and 
>> the same error is there.
>> 
>> Maybe a different wifi chip in some revisions of the device?
>> 
>> For a quick test, can you build a kernel with the following hack to see if 
>> it helps?
>> 
>> --- sys/dev/sdmmc/if_bwi_sdio.c 19 Jan 2025 00:29:29 -0000      1.1
>> +++ sys/dev/sdmmc/if_bwi_sdio.c 10 Oct 2025 16:19:01 -0000
>> @@ -178,7 +178,7 @@ bwi_sdio_attach(device_t parent, device_
>>        sc->sc_reg_write_4 = bwi_sdio_reg_write_4;
>>        sc->sc_reg_read_4 = bwi_sdio_reg_read_4;
>>        sc->sc_pci_revid = 0;   /* XXX can this come from CIS? */
>> -       sc->sc_pci_did = cis->product;
>> +       sc->sc_pci_did = 0x4318;
>>        sc->sc_pci_subvid = cis->manufacturer;
>>        sc->sc_pci_subdid = cis->product;
>> 
>> 
>> On Sun, 5 Oct 2025, deltaresero wrote:
>> 
>>> Hello,
>>> 
>>> I'm running NetBSD 11.0-BETA (WII) on a Nintendo Wii (build from Oct 5, 
>>> 2025).
>>> 
>>> uname -a:
>>> NetBSD wii 11.0_BETA NetBSD 11.0_BETA (WII) #0 Fri Oct 3 16:09:55 UTC 2025 
>>> mk [email protected]:/usr/src/sys/arch/evbppc/compile/WII evbppc
>>> 
>>> dmesg | grep -i bwi -n
>>> 74:[     1.209984] bwi0 at sdmmc1 function 1: broadcom Wireless
>>> 75:[     1.209984] bwi0: autoconfiguration error: no BBP id for device id 
>>> 0x044b
>>> 
>>> I followed Jared McNeill’s instructions for adding Wii WLAN support to 
>>> -current (see: 
>>> https://mail-index.netbsd.org/port-powerpc/2025/01/19/msg003669.html) and 
>>> installed the v3 firmware per bwi(4). The driver detects the device but 
>>> reports “no BBP id for device id 0x044b” and, as expected, I only see the 
>>> loopback adapter lo0. I suspect this may be a hardware revision not 
>>> present in the driver's table. If that’s the case, is it possible to add 
>>> support for this device?
>>> 
>>> Thanks,
>>> DeltaResero
>>> 
>
--8323329-760751007-1760836631=:816138--