CAMBRIA and more than one atheros card
John Hay
jhay at meraka.org.za
Mon Jul 7 16:48:18 UTC 2014
On Mon, Jul 07, 2014 at 09:25:34AM -0700, Adrian Chadd wrote:
> hi,
>
> That call is returning ENOMEM. I'm not sure why. It allocated an mbuf
> fine, but it couldn't allocate the DMA map.
>
> What's the output of "vmstat -z" ? I wonder if it's failing an allocation.
:~ # vmstat -z
ITEM SIZE LIMIT USED FREE REQ FAIL SLEEP
UMA Kegs: 192, 0, 107, 19, 107, 0, 0
UMA Zones: 280, 0, 107, 5, 107, 0, 0
UMA Slabs: 56, 0, 1798, 2, 19024, 0, 0
UMA RCntSlabs: 64, 0, 128, 61, 128, 0, 0
UMA Hash: 128, 0, 11, 20, 12, 0, 0
4 Bucket: 16, 0, 10, 494, 2039, 0, 0
6 Bucket: 24, 0, 0, 0, 0, 0, 0
8 Bucket: 32, 0, 4, 374, 161, 0, 0
12 Bucket: 48, 0, 2, 334, 4, 0, 0
16 Bucket: 64, 0, 16, 299, 924, 17, 0
32 Bucket: 128, 0, 7, 148, 197, 0, 0
64 Bucket: 256, 0, 19, 56, 76, 0, 0
128 Bucket: 512, 0, 15, 17, 49, 0, 0
256 Bucket: 1024, 0, 39, 9, 2671, 996, 0
vmem btag: 28, 0, 4521, 231, 4521, 32, 0
VM OBJECT: 160, 0, 1492, 108, 34553, 0, 0
RADIX NODE: 48, 30324, 2145, 459, 124628, 0, 0
MAP: 152, 0, 3, 75, 3, 0, 0
KMAP ENTRY: 80, 0, 4, 146, 4, 0, 0
MAP ENTRY: 80, 0, 412, 238, 102729, 0, 0
VMSPACE: 1264, 0, 16, 11, 2373, 0, 0
L2 Table: 1024, 0, 106, 65, 23026, 0, 0
L2 Table: 196, 0, 48, 92, 10774, 0, 0
PV ENTRY: 28, 229824, 7771, 3749, 1285591, 0, 0
fakepg: 80, 0, 0, 0, 0, 0, 0
mt_zone: 80, 0, 191, 59, 191, 0, 0
16: 16, 0, 4016, 268, 8966, 0, 0
32: 32, 0, 1946, 196, 36992, 0, 0
64: 64, 0, 3150, 189, 37458, 0, 0
128: 128, 0, 1186, 85, 12522, 0, 0
256: 256, 0, 307, 68, 839, 0, 0
512: 512, 0, 84, 4, 3756, 0, 0
1024: 1024, 0, 53, 15, 4190, 0, 0
2048: 2048, 0, 130, 10, 3500, 0, 0
4096: 4096, 0, 1094, 9, 3455, 0, 0
dma maps: 56, 0, 2004, 84, 2004, 0, 0
dma buffer 32: 32, 0, 0, 0, 0, 0, 0
dma buffer 64: 64, 0, 0, 0, 0, 0, 0
dma buffer 128: 128, 0, 2, 153, 2, 0, 0
dma buffer 256: 256, 0, 0, 0, 0, 0, 0
dma buffer 512: 512, 0, 0, 0, 0, 0, 0
dma buffer 1024: 1024, 0, 0, 0, 0, 0, 0
dma buffer 2048: 2048, 0, 0, 0, 0, 0, 0
dma buffer 4096: 4096, 0, 0, 0, 0, 0, 0
dma coherent 32: 32, 0, 0, 0, 0, 0, 0
dma coherent 64: 64, 0, 0, 0, 0, 0, 0
dma coherent 128: 128, 0, 0, 0, 0, 0, 0
dma coherent 256: 256, 0, 0, 0, 0, 0, 0
dma coherent 512: 512, 0, 0, 0, 0, 0, 0
dma coherent 1024: 1024, 0, 0, 0, 0, 0, 0
dma coherent 2048: 2048, 0, 0, 0, 0, 0, 0
dma coherent 4096: 4096, 0, 0, 0, 0, 0, 0
SLEEPQUEUE: 44, 0, 96, 219, 96, 0, 0
64 pcpu: 8, 0, 1883, 385, 1883, 0, 0
ptr pcpu: 4, 0, 0, 0, 0, 0, 0
Files: 64, 0, 74, 241, 16140, 0, 0
TURNSTILE: 72, 0, 96, 30, 96, 0, 0
rl_entry: 32, 0, 33, 345, 33, 0, 0
umtx pi: 52, 0, 0, 0, 0, 0, 0
PROC: 800, 0, 33, 22, 2390, 0, 0
THREAD: 800, 0, 87, 8, 87, 0, 0
cpuset: 40, 0, 56, 247, 56, 0, 0
mbuf_packet: 256, 16335, 64, 189, 175, 0, 0
mbuf: 256, 16335, 118, 139, 4155, 0, 0
mbuf_cluster: 2048, 2552, 253, 3, 253, 0, 0
mbuf_jumbo_page: 4096, 1275, 0, 0, 0, 0, 0
mbuf_jumbo_9k: 9216, 378, 0, 0, 0, 0, 0
mbuf_jumbo_16k: 16384, 212, 0, 0, 0, 0, 0
mbuf_ext_refcnt: 4, 0, 0, 0, 0, 0, 0
sendfile_sync: 80, 0, 0, 0, 0, 0, 0
g_bio: 168, 0, 0, 144, 7360, 0, 0
ttyinq: 152, 0, 180, 28, 540, 0, 0
ttyoutq: 256, 0, 92, 43, 276, 0, 0
ata_request: 240, 0, 0, 64, 957, 0, 0
VNODE: 288, 0, 1224, 36, 1424, 0, 0
VNODEPOLL: 60, 0, 0, 0, 0, 0, 0
BUF TRIE: 48, 0, 36, 1476, 2371, 0, 0
NAMEI: 1024, 0, 0, 16, 54528, 0, 0
S VFS Cache: 72, 0, 1250, 150, 2945, 0, 0
STS VFS Cache: 116, 0, 0, 0, 0, 0, 0
L VFS Cache: 292, 0, 0, 0, 0, 0, 0
LTS VFS Cache: 336, 0, 0, 0, 0, 0, 0
procdesc: 76, 0, 0, 0, 0, 0, 0
pipe: 456, 0, 0, 32, 1349, 0, 0
Mountpoints: 688, 0, 4, 11, 4, 0, 0
ksiginfo: 80, 0, 43, 1007, 669, 0, 0
itimer: 256, 0, 1, 74, 1, 0, 0
bridge_rtnode: 36, 0, 0, 0, 0, 0, 0
KNOTE: 72, 0, 0, 0, 0, 0, 0
socket: 448, 3915, 50, 13, 1551, 0, 0
unpcb: 176, 3916, 10, 56, 170, 0, 0
ipq: 32, 126, 0, 0, 0, 0, 0
udp_inpcb: 256, 3915, 29, 46, 1128, 0, 0
udpcb: 12, 4032, 29, 475, 1128, 0, 0
tcp_inpcb: 256, 3915, 6, 69, 127, 0, 0
tcpcb: 776, 3915, 6, 9, 127, 0, 0
tcptw: 56, 792, 0, 288, 39, 0, 0
syncache: 124, 15360, 0, 128, 39, 0, 0
hostcache: 76, 15370, 0, 0, 0, 0, 0
sackhole: 20, 0, 0, 0, 0, 0, 0
udplite_inpcb: 256, 3915, 0, 0, 0, 0, 0
ripcb: 256, 3915, 1, 74, 118, 0, 0
rtentry: 108, 0, 28, 120, 28, 0, 0
selfd: 28, 0, 58, 230, 540800, 0, 0
SWAPMETA: 280, 15316, 0, 0, 0, 0, 0
FFS inode: 128, 0, 1203, 68, 1402, 0, 0
FFS1 dinode: 128, 0, 0, 0, 0, 0, 0
FFS2 dinode: 256, 0, 1203, 27, 1402, 0, 0
md0: 512, 0, 4211, 29, 4211, 0, 0
:~ #
John
>
>
>
> -a
>
>
> On 7 July 2014 07:25, John Hay <jhay at meraka.org.za> wrote:
> > Hi Guys,
> >
> > I'm further with getting my stuff working on the CAMBRIA xscale boards,
> > but now see this
> >
> > ath1: ath_legacy_rxbuf_init: bus_dmamap_load_mbuf_sg failed; error 12
> >
> > error when trying to configure a second or third atheros board. Below
> > is the script run with -x with its output. The same is working fine
> > on an Avila board. The Avila has 64M RAM and the CAMBRIA 128M. The
> > userlevel code is the same for both and in trying to see if it is
> > something missing in the kernel config, I have made a common kernel
> > config file with all the common AVILA and CAMBRIA configs and then
> > included that in a new AVILA and CAMBRIA config file. That gave the
> > same result. The output is from a 2 week old -current/head.
> >
> > ##############################
> > ~ # uname -a
> > FreeBSD 11.0-CURRENT FreeBSD 11.0-CURRENT #5 r267954M: Fri Jun 27 14:49:04 SAST 2014 jhay at dolphin.meraka.csir.co.za:/usr/obj/arm.armeb/snaps/arm/11-tst/src/sys/SMALL-CAMBRIA arm
> > ~ # /root/do-wlans
> > + crflags='wlanmode adhoc'
> > + dbgval=0x20000500c
> > + ifconfig wlan0 create wlandev ath0 wlanmode adhoc
> > wlan0: Ethernet address: 00:80:48:4f:24:ea
> > + ifconfig wlan0 inet 10.0.1.1/24 channel 36 ssid ptabb bssid 05:05:ca:fe:ba:be
> > + sysctl dev.ath.1.debug=0x20000500c
> > dev.ath.1.debug: 0 -> 8589955084
> > + ifconfig wlan1 create wlandev ath1 wlanmode adhoc
> > wlan1: Ethernet address: 00:80:48:4f:24:da
> > + ifconfig wlan1 inet 10.0.2.1/24 channel 40 ssid ptabb bssid 05:06:ca:fe:ba:be
> > ath1: ath_init: if_flags 0x8803
> > ath1: ath_stop_locked: invalid 0 if_flags 0x8803
> > ath1: ath_legacy_rxbuf_init: bus_dmamap_load_mbuf_sg failed; error 12
> > ath1: ath_legacy_startrecv: ath_rxbuf_init failed 12
> > ath1: unable to start recv logic
> > + sysctl dev.ath.1.debug=0
> > dev.ath.1.debug: 8589955084 -> 0
> > + sysctl dev.ath.2.debug=0x20000500c
> > dev.ath.2.debug: 0 -> 8589955084
> > + ifconfig wlan2 create wlandev ath2 wlanmode adhoc
> > wlan2: Ethernet address: 00:21:a4:32:38:c2
> > + ifconfig wlan2 inet 10.0.3.1/24 channel 1 ssid ptabb bssid 05:07:ca:fe:ba:be
> > ath2: ath_init: if_flags 0x8803
> > ath2: ath_stop_locked: invalid 0 if_flags 0x8803
> > ath2: ath_legacy_rxbuf_init: bus_dmamap_load_mbuf_sg failed; error 12
> > ath2: ath_legacy_startrecv: ath_rxbuf_init failed 12
> > ath2: unable to start recv logic
> > + sysctl dev.ath.2.debug=0
> > dev.ath.2.debug: 8589955084 -> 0
> > :~ # netstat -m
> > 182/328/510 mbufs in use (current/cache/total)
> > 64/192/256/2552 mbuf clusters in use (current/cache/total/max)
> > 64/189 mbuf+clusters out of packet secondary zone in use (current/cache)
> > 0/0/0/1275 4k (page size) jumbo clusters in use (current/cache/total/max)
> > 0/0/0/378 9k jumbo clusters in use (current/cache/total/max)
> > 0/0/0/212 16k jumbo clusters in use (current/cache/total/max)
> > 173K/466K/639K bytes allocated to network (current/cache/total)
> > 0/0/0 requests for mbufs denied (mbufs/clusters/mbuf+clusters)
> > 0/0/0 requests for mbufs delayed (mbufs/clusters/mbuf+clusters)
> > 0/0/0 requests for jumbo clusters delayed (4k/9k/16k)
> > 0/0/0 requests for jumbo clusters denied (4k/9k/16k)
> > 0/3/1488 sfbufs in use (current/peak/max)
> > 0 requests for sfbufs denied
> > 0 requests for sfbufs delayed
> > 0 requests for I/O initiated by sendfile
> > ##############################
> >
> > CAMBRIA config file
> > ##############################
> > include XSCALE-ARM
> >
> > ident SMALL-CAMBRIA
> >
> > include "../xscale/ixp425/std.ixp435"
> >
> > hints "CAMBRIA.hints"
> >
> > options IXP4XX_FLASH_SIZE=0x02000000 # stock 2358 comes w/ 32M
> >
> > device cambria_fled # Font Panel LED on I2C bus
> > device cambria_led # 8-LED latch
> >
> > device cambria_gpio # GPIO pins on J11
> >
> > env "SMALL-AVILA.env"
> > ##############################
> >
> > AVILA config file
> > ##############################
> > include XSCALE-ARM
> >
> > ident SMALL-AVILA
> >
> > include "../xscale/ixp425/std.ixp425"
> >
> > hints "AVILA.hints" # Default places to look for devices.
> >
> > device avila_led
> >
> > device avila_gpio # GPIO pins on J8
> >
> > env "SMALL-AVILA.env"
> > ##############################
> >
> > XSCALE-ARM config file
> > ##############################
> > include "../xscale/ixp425/std.avila"
> > options XSCALE_CACHE_READ_WRITE_ALLOCATE
> > makeoptions MODULES_OVERRIDE=""
> >
> > makeoptions CONF_CFLAGS=-mcpu=xscale
> > options HZ=100
> > options DEVICE_POLLING
> >
> > options ROOTDEVNAME=\"ufs:ad0s1a\"
> >
> > options SCHED_4BSD # 4BSD scheduler
> > options INET # Legacy InterNETworking
> > options INET6 # InterNETworking
> > options GEOM_PART_BSD # BSD partition scheme
> > options GEOM_PART_MBR # MBR partition scheme
> > options TMPFS # Efficient memory filesystem
> > options FFS # Berkeley Fast Filesystem
> > options SOFTUPDATES # Enable FFS soft updates support
> >
> > options HWPMC_HOOKS
> > device hwpmc
> >
> >
> > device pci
> > device uart
> >
> > device ixpwdog # watchdog timer
> > device cfi # flash support
> > device cfid # flash disk support
> > device geom_redboot # redboot fis parser
> >
> > device iicbus
> > device iicbb
> > device iic
> >
> > device ixpiic # I2C bus glue
> > device ds1672 # DS1672 on I2C bus
> > device ad7418 # AD7418 on I2C bus
> >
> >
> > device gpio
> > device gpioled
> >
> > device ata
> > device avila_ata # Gateworks CF/IDE support
> >
> > device npe # Network Processing Engine
> > device npe_fw
> > device firmware
> > device qmgr # Q Manager (required by npe)
> > device mii # NB: required by npe
> > device ether
> > device bpf
> >
> > device loop
> > device if_bridge
> >
> > device md
> > device random # Entropy device
> >
> > device wlan # 802.11 support
> > options IEEE80211_DEBUG
> > options IEEE80211_SUPPORT_TDMA
> > options IEEE80211_SUPPORT_MESH
> > device wlan_wep # 802.11 WEP support
> > device wlan_ccmp # 802.11 CCMP support
> > device wlan_tkip # 802.11 TKIP support
> > device wlan_xauth
> > device wlan_acl
> >
> > device ath # Atheros NICs
> > device ath_pci # Atheros pci/cardbus glue
> > options ATH_DEBUG
> > options ATH_DIAGAPI
> > device ath_rate_sample # SampleRate tx rate control for ath
> >
> > options AH_DEBUG
> > options AH_PRIVATE_DIAG
> > device ath_ar5212
> > device ath_rf2413
> > device ath_rf2417
> > device ath_rf2425
> > device ath_rf5111
> > device ath_rf5112
> > device ath_rf5413
> > device ath_ar5416
> > options AH_SUPPORT_AR5416
> > device ath_ar9160
> > device ath_ar9280
> >
> > device usb
> > options USB_EHCI_BIG_ENDIAN_DESC
> > device ohci
> > device ehci
> > device umass
> > device scbus # SCSI bus (required for ATA/SCSI)
> > device da # Direct Access (disks)
> > device pass # Passthrough device (direct ATA/SCSI access)
> >
> >
> > device gif
> > device tun
> > ##############################
> >
> >
> > Regards
> >
> > John
> > --
> > John Hay -- jhay at meraka.csir.co.za / jhay at meraka.org.za
> > _______________________________________________
> > freebsd-embedded at freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded
> > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe at freebsd.org"
More information about the freebsd-wireless
mailing list