Bug 193628 - Marvell 88W8335 wireless NIC not enabled by malo(4) or ndis(4)
Summary: Marvell 88W8335 wireless NIC not enabled by malo(4) or ndis(4)
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: CURRENT
Hardware: i386 Any
: --- Affects Only Me
Assignee: freebsd-wireless mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-14 08:52 UTC by Juan Ramón Molina Menor
Modified: 2016-05-28 13:47 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juan Ramón Molina Menor 2014-09-14 08:52:35 UTC
FreeBSD 10.0-RELEASE. NIC: Cameo WLG-1203 (Marvell chip 88W8335).

Once the malo(4) firmware module is patched for staging (see bug #193588), both malo.ko and malofw.ko kernel modules can be installed and loaded without issues but the card is not recognized, no dmesg or pciconf output refer to it.

I had better luck with ndis(4): it created the module based on the Windows XP driver and the card was recognized, but failed with:
ndis0: <IEEE 802.11g Wireless Cardbus/PCI Adapter> mem 0xeb000000-0xeb00ffff,0xeb010000-0xeb01ffff irq 19 at device 8.0 on pci0
ndis0: NDIS API version: 5.0
ndis0: init handler failed
device_attach: ndis0 attach returned 6

At first I thought the problem was the lack of firmware, so I repeated the process adding to the XP driver files the two files (malo8335-h and malo8335-m) packed in the malo(4) firmware port:
http://weongyo.org/project/malo/malo-firmware-1.4.tar.gz

… but the result was the same.

I’m quite sure this card is ok (just bought it from a serious shop) but I have no XP computer to test it. The card is recognized in a Windows 7 computer but still does not start.
Comment 1 Carlos J Puga Medina 2014-09-14 09:31:18 UTC
Have you tried to use another PCI slot? Please, show the 'pciconf -lv' output.
Comment 2 Juan Ramón Molina Menor 2014-09-15 08:46:11 UTC
Hi Carlos.

It works! I applied your patch to the port, changed the PCI slot, reboot and the card is working well. I don’t understand what happened before, I have already tested all three free slots.

Nevertheless, I have some "need multicast update callback" messages on dmesg:

% dmesg -a | grep malo
malo0: <Marvell Libertas 88W8335 802.11g Wireless Adapter> mem 0xeb000000-0xeb00fff,0xeb010000-0xeb01ffff irq 19 at device 8.0 on pci0
malo0: load malo8335-h firmware image (256 bytes)
malo0: load malo8335-m firmware image (122624 bytes)
malo0: versions [hw 1 fw 3.0.0.39] (regioncode 16)
Starting Network: lo0 sis0 malo0.
malo0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
malo0: need multicast update callback
malo0: need multicast update callback
malo0: need multicast update callback

% pciconf -lv
malo0@pci0:0:8:0:       class=0x020000 card=0x1faa11ab chip=0x1faa11ab rev=0x03 hdrr0x00
    vendor     = 'Marvell Technology Group Ltd.'
    device     = '88w8335 [Libertas] 802.11b/g Wireless'
    class      = network
    subclass   = ethernet

Thank you very much, I was about returning the card to the shop!

Best regards,
Juan

P.S.: I am at your disposal to further test the driver. Also, I’m opening a new PR suggesting to improve a bit the malo(4) man page.
Comment 3 Carlos J Puga Medina 2014-09-15 11:13:45 UTC
Yes, also I noticed these annoying messages "malo0: need multicast update callback". 

Here it is  well explained why and how to remove them.

https://lists.freebsd.org/pipermail/freebsd-current/2008-April/085145.html
Comment 4 Juan Ramón Molina Menor 2014-09-15 13:10:14 UTC
Thanks. Unfortunately, modifying drivers is well over my current skills…

For me, the issue (and the related one on the firmware port) is resolved and could be closed. Thank you again!
Comment 5 Carlos J Puga Medina 2014-09-15 15:38:27 UTC
(In reply to Juan Ramón Molina Menor from comment #4)
> Thanks. Unfortunately, modifying drivers is well over my current skills…
> 
> For me, the issue (and the related one on the firmware port) is resolved and
> could be closed. Thank you again!

You can safely ignore those messages. Anyway, I will cc'ing the bug to the freebsd-wireless mailing list to see if some developer could take care of this.
Comment 6 Tilman Keskinoz freebsd_committer 2014-09-22 13:17:15 UTC
wrong component. Move to basesystem
Comment 7 Mark Linimon freebsd_committer freebsd_triage 2014-11-11 02:50:26 UTC
Over to maintainers.
Comment 8 Juan Ramón Molina Menor 2014-11-11 08:40:23 UTC
I think that bug can be closed, as the card is working (it seems it just needed to be on another PCI slot), or its title modified to reflect the minor issue of "need multicast update callback" messages, in case somebody could resolve it. For example: "malo(4) Marvell wireless driver need multicast update callback"
Comment 9 Juan Ramón Molina Menor 2016-05-27 20:46:49 UTC
I re-activate the bug as I have tried installing the NIC on a CURRENT computer and it does not work:

malo0: <Marvell Libertas 88W8335 802.11g Wireless Adapter> mem 0xe0510000-0xe051ffff,0xe0500000-0xe050ffff irq 16 at device 1.0 on pci4
malo0: could not read microcode malo8335-h!
malo0: failed to load bootrom loader.
malo0: unable to setup firmware
device_attach: malo0 attach returned 5

The firmware port is installed with the same sources used to build the system and the malofw.ko is in /boot/modules. Trying to load it spits an error:

# kldload malofw
KLD malofw.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type

I guess there is something in CURRENT that prevents this old firmware to load. Any clues?

Thanks is advance for your attention!
Comment 10 Adrian Chadd freebsd_committer 2016-05-27 21:36:55 UTC
Hi,

Check dmesg and see what's logged. Typically that happens because you need to recompile the firmware module.
Comment 11 Juan Ramón Molina Menor 2016-05-28 09:38:01 UTC
Thanks Adrian, but this is exactly what I’ve done: set up the new system from CURRENT sources then build the firmware module. I have rebuilt it again for good measure with the same result. Even moved the card to another PCI slot.

Do you happen to know how to obtain more detailed info than the following dmesg output after kldload malofw.ko?

KLD malofw.ko: depends on kernel - not available or version mismatch
linker_load_file: Unsupported file type

I don’t know if it’s relevant, but I have also built the NVIDIA kernel module, which also depends on kernel sources, and it loads and work as expected.
Comment 12 Juan Ramón Molina Menor 2016-05-28 13:47:56 UTC
Oh Adrian, sorry, you were right: I've been building from sources on a faster computer and installing on different ones via NFS mounts for months without issues, but somehow this is not compatible with building directly the malofw kernel module in the target computer. As soon as I downloaded source and built the kernel in this computer the malofw loaded and the Wi-Fi is working. I didn't even need to rebuild the module itself!

Well, now it works but I cannot say I understand why...