This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L138, Tiwi WL1271: MMC and dma troubles

Other Parts Discussed in Thread: OMAP-L138, WL1271

Hello,

I have some troubles with OMAP-L138 and Tiwi WL1271 wireless chip.

The WL1271 is connected to processor thought one MMC bus (actually the MMC/SD1). The wireless chipset isn't directly connected to this bus, there also a CPLD between them.

The other MMC/SD0 is used directly by a SD card reader.

So, when I disabled DMA in davinci_mmc kernel module (use_dma=0), all work perfectly (but with poor SD card read/write performanc). But, when I enabled DMA, it works well for SD card reader but for wireless, it doesn't work.

insmod works and setting basic config on interface with ifconfig (like mac address). But, when I launched hostapd, this program stays blocked in "Disk Sleep" state...

I use kernel 3.1.0-rc4+ :

------------------------------------
# uname -a
Linux 3.1.0-rc4+#6 PREEMPT Thu Mar 7 17:40:21 CET 2013 armv5tejl GNU/Linux
------------------------------------

Here some logs I can get :

------------------------------------
hostapd -dd /etc/hostapd.conf -B
random: Trying to read entropy from /dev/random
Configuration file: /etc/hostapd.conf
nl80211: interface wlan0 in phy phy0
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
nl80211: Using driver-based off-channel TX
nl80211: Add own interface ifindex 3
nl80211: Set mode ifindex 3 iftype 3 (AP)
nl80211: Create interface iftype 6 (MONITOR)
nl80211: New interface mon.wlan0 created: ifindex=4
nl80211: Add own interface ifindex 4
[... and no more activity ...]
------------------------------------
# cat /proc/782/status
Name:    hostapd
State:    D (disk sleep)
[...]
------------------------------------

There no much useful information in dmesg :
------------------------------------
# dmesg | grep mmc
davinci_mmc davinci_mmc.0: pdev->name = davinci_mmc, pdev->id = 0, irq = 16, host = c70b19e0
davinci_mmc davinci_mmc.0: Using DMA, 4-bit mode
davinci_mmc davinci_mmc.1: pdev->name = davinci_mmc, pdev->id = 1, irq = 72, host = c70b1de0
davinci_mmc davinci_mmc.1: Using DMA, 4-bit mode
mmc0: new SDHC card at address 1234
mmcblk0: mmc0:1234 SA04G 3.70 GiB
 mmcblk0: p1
mmc1: card claims to support voltages below the defined range. These will be ignored.
mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
mmc1: new SDIO card at address 0001
------------------------------------
# dmesg | grep wl12
wl1271: loaded
------------------------------------

I did a strace on hostapd to see what is the last system thing it does :
------------------------------------
write(1, "nl80211: Add own interface ifind"..., 37nl80211: Add own interface ifindex 4
) = 37
ioctl(6, SIOCGIFFLAGS, {ifr_name="mon.wlan0", ifr_flags=IFF_BROADCAST|IFF_MULTICAST}) = 0
ioctl(6, SIOCSIFFLAGS, {ifr_name="mon.wlan0", ifr_flags=IFF_UP|IFF_BROADCAST|IFF_MULTICAST}) = 0
socket(PF_PACKET, SOCK_RAW, 768)        = 8
setsockopt(8, SOL_SOCKET, SO_ATTACH_FILTER, "\35\0\0\0di\7\0", 8) = 0
bind(8, {sa_family=AF_PACKET, proto=0000, if4, pkttype=PACKET_HOST, addr(0)={0, }, 20) = 0
setsockopt(8, SOL_SOCKET, SO_PRIORITY, [20], 4) = 0
ioctl(6, SIOCGIFFLAGS, {ifr_name="wlan0", ifr_flags=IFF_BROADCAST|IFF_MULTICAST}) = 0
ioctl(6, SIOCSIFFLAGS
------------------------------------

I guess there a problem with the firmware, isn't it ? hostapd does a UP and the firmware can't be loaded. My analysis is correct ?

I'm not a kernel guru, so I don't how continue the debug adventure. Can you tell me how get more logs ? Or, maybe, you already know what's going on and have a solution for me ?

Regards,
Anthony Viallard.