From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 03:12:35 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D0A78B07 for ; Sun, 18 Aug 2013 03:12:35 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm16.bullet.mail.bf1.yahoo.com (nm16.bullet.mail.bf1.yahoo.com [98.139.212.175]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 618732B01 for ; Sun, 18 Aug 2013 03:12:35 +0000 (UTC) Received: from [98.139.215.143] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 18 Aug 2013 03:12:34 -0000 Received: from [98.139.211.194] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 18 Aug 2013 03:12:34 -0000 Received: from [127.0.0.1] by smtp203.mail.bf1.yahoo.com with NNFMP; 18 Aug 2013 03:12:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376795554; bh=bD+oSWXjtam1e7KzZonUCj5K2+LvNhRGKxW4g1iysTI=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=s7dX0WPaZ/IM8pyY9n9BSRBRdrelWfxQW/QmfiORuIYZTaVZ4AoTf7NM0zL1zJcSA2DLF5yq0FgbsSIDg2ljs1EQ4nVLTC+CwWpGlPvfGFphNwkSZ/5YrVet8jIuODlH7fqMzjRbN4rAiHb+DEJ1ovZo+ZZp3JTjUBWuEN/dQp8= X-Yahoo-Newman-Id: 73746.21079.bm@smtp203.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: GI_0u8AVM1nvprttYXdAyWqUGQ8LLSi0dHzjbvfqQdseS1M GHmDG4_6h4PBwrJu5VRL8Bdf2j5PuI2fLdYBmGec8vLP6ZenJL4AxT.X2usi PTqvHl8CynFEAwkCrd.hrfvUlSeFJp4HoDrw2VWMH79tqSiUDHhsU04OoUSg nh.OWJ5in31z3cBuZoBVvCKjcUKgx_Ox6ilhvBpH7d2Tfplkl2TrFI.VtMVH g_ZcuaF775cl3bZ4jClwLJDxD6tbf9kz8IcZDkisTOAsp6yHaFU3heLAsKqa AN78bzb7n6sNrGBJpEXKq_DwUOxufx_SJ4e28URUXhUfkp2j8uzlQno84ZWn 72aiEU13JdacYD0EIyu6v1kiOHhaXA0TBO0iabGyXXDPhhSzSVA21ZjPipEU K26JIMcAtzv.2Suogcy.Bo8Aom1i6LChJCWrTTL98atk5LXlWkXQ8TuhhEpE nA1ZwvECvoMQrvv9YGPy0_zR4ZiI.hZls59B6DpdAWygpuoWZmyAm6FS_Fd4 uq1OseH1OXrwFg0toHJK8KFRjkjV8_6mJrrGNI2NdE36p_sdOgxo0GhOzhrb hqn1j6U0AUVfZ9cQIxq05IZfbN8Fq5fZU4RNxCdpUBeMA87uMsjVdsEMCAk5 8iDKI83MBN9Zal123mgY.Dft_0STrzdOXuJHy9QM- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp203.mail.bf1.yahoo.com with SMTP; 17 Aug 2013 20:12:34 -0700 PDT Subject: Re: Dlink DIR-825 B1 status [updated] From: Sean Bruno To: freebsd-embedded In-Reply-To: <1374340359.1421.3.camel@localhost> References: <1374340359.1421.3.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-vli7jXI+G4Xx7T/4x9bm" Date: Sat, 17 Aug 2013 20:12:32 -0700 Message-ID: <1376795552.1460.120.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 03:12:36 -0000 --=-vli7jXI+G4Xx7T/4x9bm Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable tl;dr basic functionality is awesome. no usb support not accessing MAC addrs's from h/w - uboot seems to be able to see them longer version: http://people.freebsd.org/~sbruno/dir825_fbsd_r254450.txt http://people.freebsd.org/~sbruno/dir825_fbsd_athregs.txt sean --=-vli7jXI+G4Xx7T/4x9bm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSEDugAAoJEBkJRdwI6BaHN8wIAIQGySeby7BflmfoMmqB29qB zy03FixVrOdApLU+I4utPOisemYn47NeJjBa6FwBus4iDRF+ByIOsspZlXIwLdQR ltF1qUpB41EPVJRpkHtbMAxu5ND1+Zxxe6AKcNnQz/rhftF5B0sieuSdz0oePyD8 Rf4/zhqk5yNMHLQFqnTHiIIP2rNB3cmWpH9YKM+r1JoI3Qfh2OatHNofgZL3oKha zBkjV3+2wfAdanMmh0D5oeLwz0Wjtn8Df0Dio1mk8tgrprXeF/fDRZ5KbVdp81WX H0Ia/aQWrJ7Ep6Wa6B9bpbT+8M+ceLlxZyKj+NAVVIXxuUdRUsbnkmmyF8PQKSs= =dbL8 -----END PGP SIGNATURE----- --=-vli7jXI+G4Xx7T/4x9bm-- From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 05:58:51 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 310336C1; Sun, 18 Aug 2013 05:58:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 937872038; Sun, 18 Aug 2013 05:58:50 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id f14so2763011wiw.4 for ; Sat, 17 Aug 2013 22:58:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=dgl1vAGJ16IPGvmPjzFgjeFiJsBbQo8K+BESsdBbjHs=; b=pefYitp3F5MZRvpAEvjiA8qyR+VC2hOVpsbm2FzTqBR0Y5HlJRRgAaGOSpjD45OvI9 qHdUJgD/51TP4EnIdrGiJD/7Hwi6GH5z3bEJXaoAahoAzk+ZhIKnF8aPEMS0+OJ0k7h5 kzHI0I2ijJeD7fag03cCK6bLsGMYZXD0mu1ckN2bIczU0o7ASdtVnp+7rQoy3wz+LdN+ NH/3eTvsQNvbcJbQDryQrQ/Mt9Q7UleB2jahQ8KHpJYojZrhhLh+Er8ecOZ3NaX9CHvb p+46AGwZGQce+hcckylsijWqOyti5UerrKHtVNk9XSp+HLJhjdKVj4KZtDA2yigUMAyE mPYA== MIME-Version: 1.0 X-Received: by 10.194.75.165 with SMTP id d5mr3848026wjw.18.1376805527747; Sat, 17 Aug 2013 22:58:47 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Sat, 17 Aug 2013 22:58:47 -0700 (PDT) In-Reply-To: <1376795552.1460.120.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> Date: Sat, 17 Aug 2013 22:58:47 -0700 X-Google-Sender-Auth: maNQK_oCcokOCOCGfOF58Aw1w_M Message-ID: Subject: Re: Dlink DIR-825 B1 status [updated] From: Adrian Chadd To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 05:58:51 -0000 .. the USB should work. What happens? Don't I build the ar71xx ehci code? -adrian On 17 August 2013 20:12, Sean Bruno wrote: > tl;dr > > basic functionality is awesome. > no usb support > not accessing MAC addrs's from h/w > - uboot seems to be able to see them > > longer version: > http://people.freebsd.org/~sbruno/dir825_fbsd_r254450.txt > > http://people.freebsd.org/~sbruno/dir825_fbsd_athregs.txt > > sean > From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 06:00:46 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 16BD9706; Sun, 18 Aug 2013 06:00:46 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x230.google.com (mail-we0-x230.google.com [IPv6:2a00:1450:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A0D2206A; Sun, 18 Aug 2013 06:00:45 +0000 (UTC) Received: by mail-we0-f176.google.com with SMTP id t59so2678794wes.35 for ; Sat, 17 Aug 2013 23:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=EsREtdFeYk3QCrbfwfy5FN/XTBLO6NhZaz7q40yq9JI=; b=K6cheV8XhrL90pqCoFwSmV0iV4irkiM4bLBMLeDAEpvNrNzfwhy/Kzugr8+iktuUJS wKDbXd+mBJmIEGplfFwFLbmx9njvGGjilzwFZep5EZVvfsllPuDGltYna4Dvt+9PZZO5 JdmUCqJy7E+uRJkQF9RI3PMG542/WjavcxUtXD71mkbnHW2EIAkubycJxAEGQeBP8xOT 9cgpoq5Ey9pggfxxcfUCqWba5B31vtRpFrz2YM4pjx47Bzv+PtWgk2bFay8b31AnJc5/ yavpEkXrL3PxKgP3cC6e0bdwAMw5+0FptyjLMujo5sISoWw2X2cgq3DANsNhNiI+v+v+ 8/aA== MIME-Version: 1.0 X-Received: by 10.180.10.136 with SMTP id i8mr5520wib.46.1376805643873; Sat, 17 Aug 2013 23:00:43 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Sat, 17 Aug 2013 23:00:43 -0700 (PDT) In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> Date: Sat, 17 Aug 2013 23:00:43 -0700 X-Google-Sender-Auth: SqUQonWUjOUniE6IhOWUc71tle0 Message-ID: Subject: Re: Dlink DIR-825 B1 status [updated] From: Adrian Chadd To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 06:00:46 -0000 .. and yes, we should fix the MAC address stuff. But first: * USB * a hack to make ath1's mac address be ath0's MAC + 1, or something, as what's stored in the EEPROM is garbage * then add the hack(s) to pull the MAC out of the image like openwrt does. -adrian From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 16:28:00 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C229C671; Sun, 18 Aug 2013 16:28:00 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-oa0-x232.google.com (mail-oa0-x232.google.com [IPv6:2607:f8b0:4003:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 73CB12EE6; Sun, 18 Aug 2013 16:28:00 +0000 (UTC) Received: by mail-oa0-f50.google.com with SMTP id i4so4368568oah.9 for ; Sun, 18 Aug 2013 09:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=S2VljLsSVQbrT30eeezfXxt+4zH5aukXfqf9/Iw8bWU=; b=GIX1DhjGnEnwNSgziXPA19aJ8+XrM53klCjz9hcryGCmBBQqws3qJV6P3DQsDZjOay S087bii+8JUzwhtzIQlRrxy2rm0klt95v/PIoJQ5bEFwpfYItbNtwdgWb9MrQJEXB/eC W78QgixkXIBkLCw+2p/ZV5nYHvrr3TO5xhb+5XG/wwzyqZJ+IYTN0nR1ZTcPF82sETJu eBGUygAiWFOFE5ZLAK9hm4AAe8++nlfub2ylROYttuRn/9abbXAqZuw/k/o+CK5YIFSc JoowkTDffXF1vNc2fHnBYPNol1d5/B/8yhlGZgyu1d+s0UEDKblpR4I6NcemrUjgFHQe RPhg== MIME-Version: 1.0 X-Received: by 10.60.46.193 with SMTP id x1mr8387085oem.36.1376843279767; Sun, 18 Aug 2013 09:27:59 -0700 (PDT) Received: by 10.76.2.110 with HTTP; Sun, 18 Aug 2013 09:27:59 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Sun, 18 Aug 2013 12:27:59 -0400 Message-ID: Subject: Re: Making Picostation m2HP work From: Outback Dingo To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 16:28:00 -0000 On Wed, Jul 31, 2013 at 5:52 PM, Adrian Chadd wrote: > Are you using the right flags to the _ports_ lzma to create an image > that uboot can actually decode? > > Curious if theres been any further work on this path ??? > > -adrian > > On 31 July 2013 14:23, hiren panchasara > wrote: > > On Tue, Jul 30, 2013 at 7:02 AM, Outback Dingo > wrote: > >> > >> > >> > >> On Tue, Jul 30, 2013 at 7:29 AM, Outback Dingo > >> wrote: > >>> > >>> > >>> > >>> > >>> On Tue, Jul 30, 2013 at 6:41 AM, Maciej Milewski wrote: > >>>> > >>>> On 29.07.2013 20:52, hiren panchasara wrote: > >>>>> > >>>>> Firmware check failed! > >>>> > >>>> AFAIR I had such info when I tried to flash image from RouterStation > Pro > >>>> to Routerstation. I think that it must be something with firmware > header or > >>>> firmware format. > >>>> > >>> I believe its the headers, there is something different about the 2HP > that > >>> required padding, im digging through data from 4 years ago to find it > >>> from when we deployed a ton of these based on OpenWRT, they are > different > >>> then all others, same with the RS/RSPRO, > >>> > >>> > >> > >> > >> Warning, my brain is dealing with 4 year old information again, > YMMV..... > >> but maybe some insight will help... I could be offbase, > >> Adrian would know best what his mkfwimage supports. > >> > >> its possible it was different offsets so that the mkfirmware image had > to be > >> modified to build the correct image, the image you are building requires > >> XS2-8 to be correct, I believe the ap91 image is using XS2 and not XS2-8 > >> ....... Adrian again will have to validate AP91 configuration for > XS2-8, or > >> create a config that uses it. > >> > >> > >> Okay digging back through this a bit in the UBNT SDK, Yes I still have > >> one..... it shows > >> -$(STAGING_DIR_HOST)/bin/mkfwimage \ > >> -B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \ > >> -k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \ > >> -r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \ > >> -o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin > >> > >> > >> and XS2-8 is for PicosStations built with > >> mkfwimage -i XS2-8.txt -v XS2.ar2316.OpenWRT-kamikaze -o > >> openwrt-picostation2-squashfs.bin > >> > >> > >> which required a file called XS2-8.txt > >> > >> kernel 0x01 0xA8030000 0x000D0000 0x80041000 > >> 0x80041000 openwrt-vmlinux.lzma > >> rootfs 0x02 0xA8100000 0x006C0000 0x00000000 > >> 0x00000000 .openwrt-vmlinux.squashfs > > > > So I looked at this file. (I found similar references of using this > > file too). So here is what it says: > > > > name index baseaddr size memaddr entryaddr file > > > > kernel 0x01 0xA8030000 0x000D0000 0x80041000 0x80041000 > openwrt-vmlinux.lzma > > rootfs 0x02 0xA8100000 0x006C0000 0x00000000 0x00000000 > openwrt-vmlinux.squashfs > > > > In the image I am generating (with adrian's scripts), the baseaddr for > > kernel is as mentioned above 0xA8030000. But the baseaddr for rootfs > > is calculated as: > > rootfs->partition_baseaddr = kernel->partition_baseaddr + > > kernel->partition_length; > > > > which is not 0xA8100000. but a little higher than that. So I thought > > kernel is a bit too big. So I trimmed down the kernel a bit and hard > > coded the value like: > > rootfs->partition_baseaddr = 0xA8100000; > > > > But no success. And the kernel I am using is lzma'ed. I am not sure if > > the rootfs has to be squashfs'ed? > > > > cheers, > > Hiren > > > > Journey continues.... > > > >> > >> > >> > >>>> > >>>> -- > >>>> Pozdrawiam, > >>>> Maciej Milewski > >>>> > >>>> > >>>> _______________________________________________ > >>>> freebsd-embedded@freebsd.org mailing list > >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > >>>> To unsubscribe, send any mail to > >>>> "freebsd-embedded-unsubscribe@freebsd.org" > >>> > >>> > >> > > _______________________________________________ > > freebsd-embedded@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > > To unsubscribe, send any mail to " > freebsd-embedded-unsubscribe@freebsd.org" > From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 17:10:55 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 554E7F97 for ; Sun, 18 Aug 2013 17:10:55 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm15.bullet.mail.bf1.yahoo.com (nm15.bullet.mail.bf1.yahoo.com [98.139.212.174]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E6F8C2153 for ; Sun, 18 Aug 2013 17:10:54 +0000 (UTC) Received: from [66.196.81.173] by nm15.bullet.mail.bf1.yahoo.com with NNFMP; 18 Aug 2013 17:10:47 -0000 Received: from [68.142.230.76] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 18 Aug 2013 17:10:47 -0000 Received: from [127.0.0.1] by smtp233.mail.bf1.yahoo.com with NNFMP; 18 Aug 2013 17:10:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376845847; bh=W29sR3FXBZwz2XNSa7mxFuQQNjqh3DQK/uSBXbdHbPA=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=QH1dSeVKF2nra79pTiPa1rrjPfqRGUcF+rYvueYAV9ZKv6O94HGbnpWjJa5LtNtmTj5K3/ufRNilY9++nkLjwNOWGsVbYpxBcMbRJHU4rAB7+3sAQMSZBZMvgUEkr0NeB9qoJOuf6KgV4tJy1bUMKBbvx5GDMbl4Pn5I3tIJYDA= X-Yahoo-Newman-Id: 439756.50039.bm@smtp233.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: jYf7i2sVM1k_x4PYs5zwr47DhKnCYIcSBBvHLQs5tA7G4Iu xht39yKEYpwVF45tDnGTJj6eatvML90AuzmHaD8e8SCBXxUV8pv9rMKKh7Xn Nfnl0w2pjlRxIQ.RDw7lzDVDoPQn5DlSTURoc4PX2Ei3tNWmdumTWQbgN434 Wzz8pE6kbHylWWkOUYHYmOlvaXhsaDju8rc3MkP618Zjs9Np_cdKMCUHJBj. XIb0hV9xRB.6Ko6vKMPaBqoAQkP9u_o3k03kIB_QNNB8R.nUvaOMC3PPmrSC 1AOQwxwKDv9bEukeOryA32gGScqe3NrnVMz8a_BktUvFH3n9EwdcTZQubjJ_ 5AiLitFf5AodmieF.fwZcnE4z3O3xORFdhvQBGe96ixHzgE_S2YhhxXO_P7U BW4RWXqEVlAJVMuNpRoA7jkhce410pJlgW4mxf7f6vmUH3n1OvzPFl8q7V2P sUg05sVKQE1f1Ydsn9Z3x00Mn5kFKRnDVAaG4d9nx_QCu.KcFAJEC8RIVvHl yb9atNQ2Nr_T1HPBpKc8LitW8AIFuamrrdww3MqvENO1FAOGS.4gopDpaZ74 0dNBfLhm7q6MmpOCCmiiEhmO4OINGspU8UTtjqA6dDzOkXumHuBUU19TrR5U GpnQRTUeLVXVXDFhrJEa.oLoaRf1KlJz7ImnlCA-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp233.mail.bf1.yahoo.com with SMTP; 18 Aug 2013 17:10:47 +0000 UTC Subject: Re: Dlink DIR-825 B1 status [updated] From: Sean Bruno To: Adrian Chadd In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-z9NTuHygeYAEkH6gu56r" Date: Sun, 18 Aug 2013 10:10:43 -0700 Message-ID: <1376845843.1460.124.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 17:10:55 -0000 --=-z9NTuHygeYAEkH6gu56r Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sat, 2013-08-17 at 22:58 -0700, Adrian Chadd wrote: > .. the USB should work. What happens? >=20 >=20 Nothing, there's not notification of anything happening on the USB bus. I tried loading the various usb modules by hand, and nothing. > Don't I build the ar71xx ehci code? >=20 >=20 >=20 >=20 I don't see anything specific in the kernconf about USB: device usb options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order options USB_DEBUG options USB_HOST_ALIGN=3D32 # AR71XX (MIPS in general?) requ ires this device ehci Are we missing something? >=20 >=20 > -adrian >=20 >=20 >=20 >=20 > On 17 August 2013 20:12, Sean Bruno wrote: > tl;dr > =20 > basic functionality is awesome. > no usb support > not accessing MAC addrs's from h/w > - uboot seems to be able to see them > =20 > longer version: > http://people.freebsd.org/~sbruno/dir825_fbsd_r254450.txt > =20 > http://people.freebsd.org/~sbruno/dir825_fbsd_athregs.txt > =20 > sean >=20 >=20 --=-z9NTuHygeYAEkH6gu56r Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSEQATAAoJEBkJRdwI6BaHqMsH/irGF4O2hgCeglPjKl+OmRdr hFVebfj0y8YYoET1NNOmgk7WlGVXNxtU86vc7HUInMOBcG7rvyZJiYL11PHBKTEX GpgFklET4Lj1ttWJeY9dcaWA0vs3rJldj1zCxO+bmyLhBjbGIDYKCujXgmTtSEQh MXTpY0Tv0uWVoYpP5NYdP+Gtb9ZlFf1G8DViI17hqKBjoZmkGaucXa2x+JnpdXFV /cPhI3GFLMAqQi8Q9+ERavSZLOsVMugdOvZ7X5F5lk0UuF9jeI4Nb4izd/jpvvRm jr1swgJg9iT2RmtktDvKd0R8WszTCNIa3zaZ+x9d2B0DMmMIgvRk0OrDOyrYOZ8= =GN97 -----END PGP SIGNATURE----- --=-z9NTuHygeYAEkH6gu56r-- From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 17:13:07 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 386F2140 for ; Sun, 18 Aug 2013 17:13:07 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm8-vm2.bullet.mail.ne1.yahoo.com (nm8-vm2.bullet.mail.ne1.yahoo.com [98.138.90.156]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB7172165 for ; Sun, 18 Aug 2013 17:13:06 +0000 (UTC) Received: from [98.138.226.178] by nm8.bullet.mail.ne1.yahoo.com with NNFMP; 18 Aug 2013 17:12:59 -0000 Received: from [98.138.226.125] by tm13.bullet.mail.ne1.yahoo.com with NNFMP; 18 Aug 2013 17:12:59 -0000 Received: from [127.0.0.1] by smtp204.mail.ne1.yahoo.com with NNFMP; 18 Aug 2013 17:12:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376845979; bh=8SRBItzbfVBa0gYrmiOL1YmmUlEdfSmeXe+8GYeQfwM=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=gvqeh8YNWsAHwH9ysbkw2bnZeFZguLcjYE9qxrGXRWeTZZgZvSQp1KqHNoFM2bsbz63XXPyHySmRL9/gLZEnqDaUUxP2d1D9Ho0cXHQKSshVIgtdjlZ1G3ifxGwFXqTd2wUoljDXsCTIJZgbUzGMqzeIx8nYF7rW/P1lgXeLL8A= X-Yahoo-Newman-Id: 551027.24751.bm@smtp204.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: wBGyX7AVM1laVQ61LuHvo0FBxocdsyUNydnBUoR6mNofiUu ZRqSWykgeCO_ApPR43vUNNl32vh2RNQYZWAoDHGFdzxxgbhbQV7c7QD7XAMS eydC8hh2U1QLt2SaOEFa3DsZikz875OYadkw77YlRkqsqyhSse_HIg3eOtDw BoNgB4nVzdGJ95Ix7K61xbbLHfbvlxVwPAXXsNRtO3Ib4Kec2PPDVaexyjIv C7SnXXD64OPISGZ7V.m_.JO0kTaCDRPoksN470Cr4H5q3FhB2JrgMAtQNz5e Y.jfRLvNLSC1YjsdDFWhDOKDo013LU6wES6nAg0z..RI.0sFNVREFy_KwzE_ 7iNzvhQQdGRnIddCOxOfB9vQhXqTJWEmZ15.C6QJ4udNAuuqew580JTgZbfW rO4alXFv1rO5ub43yvZVk12kMz9zuCamlw5KCd4z0m_ojoc_jeFYk.OXOnP2 xBHacl_ohOrwiWX_PbEBSn3Ikxb4Y75VkBeGHQ.fxe9Mxfr.ruelWlyeUHx. OcGlLTz_0P9cs4FGXMgGBaNaMYx0OXRpPu.HwkMxtL8GPzKnwDNe4J4fY X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp204.mail.ne1.yahoo.com with SMTP; 18 Aug 2013 10:12:59 -0700 PDT Subject: Re: Dlink DIR-825 B1 status [updated] From: Sean Bruno To: Adrian Chadd In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-WfeMja/nZESGCwaSx/RA" Date: Sun, 18 Aug 2013 10:12:58 -0700 Message-ID: <1376845978.1460.126.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 17:13:07 -0000 --=-WfeMja/nZESGCwaSx/RA Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sat, 2013-08-17 at 23:00 -0700, Adrian Chadd wrote: > .. and yes, we should fix the MAC address stuff. >=20 >=20 > But first: >=20 >=20 > * USB > * a hack to make ath1's mac address be ath0's MAC + 1, or something, > as what's stored in the EEPROM is garbage > * then add the hack(s) to pull the MAC out of the image like openwrt > does. >=20 Shouldn't we use the same method that U-Boot is using? Its generating "something" that looks like a MAC addr at boot. ar7100.c: eth0 using default MAC: c8:be:19:63:2a:cd eth0 up ar7100.c: eth1 using default MAC: c8:be:19:63:2a:ce eth1 up Since I can't find "ar7100.c" code in the u-boot project, I couldn't try and figure out what its doing. Sean --=-WfeMja/nZESGCwaSx/RA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSEQCaAAoJEBkJRdwI6BaHBf8H/jMYcORsd70ECNiiGYCJJ4B2 A0Se+2x1zq9sjGOUiPuocFYDvw5AcJ3+EO4/YvKRebpbqdUzZkyVQGHpOo3FOioD bwFDw03vn/RInhqJXsRxH+dRapgdXcpTybdLK7Ny6zEoDJN5PsIFchgS7uMlT0nM BgjLRG3bgGI51Fu+SOUUW6mEh3+c3gdrqvAWVjg6IaPBTJk3fkTzvL3vJ9n67YZX vDqpiF/+68mB4ndRRmSk7ylQ4YF/sRgO+tTbrlOObARJYVxSZMluKyz9ip/6hQqZ Hrqr9Lb04DwGUR44mKIFDnPoKEZSXw3gOkBp3bxYaDZ5s7ooBNbnrip1Vh2ve4c= =LHl/ -----END PGP SIGNATURE----- --=-WfeMja/nZESGCwaSx/RA-- From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 17:59:06 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8E2209D0; Sun, 18 Aug 2013 17:59:06 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x229.google.com (mail-ea0-x229.google.com [IPv6:2a00:1450:4013:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4183236A; Sun, 18 Aug 2013 17:59:05 +0000 (UTC) Received: by mail-ea0-f169.google.com with SMTP id k11so447084eaj.14 for ; Sun, 18 Aug 2013 10:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PqTWDW5NhMn4wNfflyczGuoAu4hDGpxXxYKUGmHzuPA=; b=0adCkx9hzTLPpvCQFMxj/VaGlfkwEPKrR/5ss6NB369efKDqfI1+2OM70h6bnuHY1/ rLb6/EjMSbaQ7joKulLorkZ6++lkw+h/Mhk+DjECcE8qPgPUoFTfQuOFaYyUGUCKWMeb uBiETcbM2bxZIAzJb+j7iFds0pT5YOz1EG5/jY3DHl6b49tHkuOky1aggsQRlYU0sI6T jqiUaXoTx85QwdCERL9CrkqH6Chg+TCfhWHcMOU2z2LA7K31or9N9EOo+pogIxPK9XmT u9eWfEXHt0sZNUrDJ2/HiHMYLed6toULSmTBf9V423pb9M0mc8/N8lL+GZwwuc83I6/T z1Xg== MIME-Version: 1.0 X-Received: by 10.15.67.131 with SMTP id u3mr15746421eex.34.1376848744217; Sun, 18 Aug 2013 10:59:04 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Sun, 18 Aug 2013 10:59:04 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Sun, 18 Aug 2013 10:59:04 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Outback Dingo Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 17:59:06 -0000 On Sun, Aug 18, 2013 at 9:27 AM, Outback Dingo wrote: > > > > On Wed, Jul 31, 2013 at 5:52 PM, Adrian Chadd wrote: > >> Are you using the right flags to the _ports_ lzma to create an image >> that uboot can actually decode? >> >> > Curious if theres been any further work on this path ??? > I am using ports lzma but I have no way of knowing if uboot liked it or not. (I mean its failing - thats what we all know :-)) I've tried to follow what openwrt was doing but couldn't quite get there. loos@ offered to help whenever he gets some time. Anyone can provide some more concrete help, I would love to try/test that. I have it sitting at my desk staring at me to make it work :-( cheers, Hiren From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 19:21:06 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A9241E51; Sun, 18 Aug 2013 19:21:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 15BD22794; Sun, 18 Aug 2013 19:21:05 +0000 (UTC) Received: by mail-we0-f175.google.com with SMTP id q58so737160wes.6 for ; Sun, 18 Aug 2013 12:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=xlHMOwvflAodGaXj6Cvj6ynaVAZQk59DB5tRgTEEhBE=; b=g7dfS538zG8tbrShx5/gq7M5im/jtkotiZyDEDwu34HGPu8ZrV6koaYwNAddbIPGi/ ZhVnh3FTg0wFnWyVkmDNgUpVf/iRA4MVo3JlV6r6RB/CwEiI3J39cYKzR3o86ctU+Do7 XuKiSAO8rgAO3DGcoX/9Kn74IMBl+O+JRwAGybg7uUgB3I/Q3adxXeOaDxZ02qV9Etpz 9cChNPRk5AqJCD9qNDvNNS7AoYRkw4c+7JUUSKJuqrRCCpSWUv61PcGoT8dLHdDzW84p JF78btcSt1f9pzs8QGbaQl0ckNDm8zSXS2vwQcBB5mB38LBdi0LkumAYITugk1ytGGSU BHwA== MIME-Version: 1.0 X-Received: by 10.194.123.227 with SMTP id md3mr5732597wjb.17.1376853664366; Sun, 18 Aug 2013 12:21:04 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Sun, 18 Aug 2013 12:21:04 -0700 (PDT) In-Reply-To: <1376845978.1460.126.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845978.1460.126.camel@localhost> Date: Sun, 18 Aug 2013 12:21:04 -0700 X-Google-Sender-Auth: XBYQvsRcgkwTTr-SHvIMI4vLs4Y Message-ID: Subject: Re: Dlink DIR-825 B1 status [updated] From: Adrian Chadd To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 19:21:06 -0000 you won't; it's a hacked up uboot. Sigh. Anyway - Just look at the board config file (a .c file) in openwrt for the ap96. -adrian On 18 August 2013 10:12, Sean Bruno wrote: > On Sat, 2013-08-17 at 23:00 -0700, Adrian Chadd wrote: > > .. and yes, we should fix the MAC address stuff. > > > > > > But first: > > > > > > * USB > > * a hack to make ath1's mac address be ath0's MAC + 1, or something, > > as what's stored in the EEPROM is garbage > > * then add the hack(s) to pull the MAC out of the image like openwrt > > does. > > > > > Shouldn't we use the same method that U-Boot is using? Its generating > "something" that looks like a MAC addr at boot. > > > ar7100.c: eth0 using default MAC: c8:be:19:63:2a:cd > eth0 up > ar7100.c: eth1 using default MAC: c8:be:19:63:2a:ce > eth1 up > > Since I can't find "ar7100.c" code in the u-boot project, I couldn't try > and figure out what its doing. > > Sean > From owner-freebsd-embedded@FreeBSD.ORG Sun Aug 18 19:21:44 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A2AB8E88; Sun, 18 Aug 2013 19:21:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 104622799; Sun, 18 Aug 2013 19:21:43 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id hi8so2335581wib.9 for ; Sun, 18 Aug 2013 12:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=HQtjbA2HkXWPhdcWcmkXb/+F50u9KicoIlORfOe0ukU=; b=wcqmXb5zRVeD6BDCXfDZhiUeGj0FQh/YrUrRuREahTcB2t2lLSHLBa/wIm/K/hHYqQ X/YKuHxhZjzO1lOJ2EFQ4wVtyI59thT4RGQtpnPBt6tIT4AtCNlZwJVvJwNPHA5M/NwV lP4Kw+TmFjWPw//2iA/1yoTr/rMOj2OxC2zqU1j0fdE+RbDaXaXoY6QVMR7knqqORJ2Y XVtI0oRhNV0lbWtwMcvAmtorWUimBVuXt1LIKgfM9Sbv9Z901cZ6g5aO1YsB8u14X2TI JeZGTFcOmwiRa/YTZePRc7dPuy1PTEimT5VNQNeg48fnw3VVxNVIMEd+GQA1CJpBUxDD H1Yg== MIME-Version: 1.0 X-Received: by 10.180.10.136 with SMTP id i8mr1758857wib.46.1376853702407; Sun, 18 Aug 2013 12:21:42 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Sun, 18 Aug 2013 12:21:42 -0700 (PDT) In-Reply-To: <1376845843.1460.124.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> Date: Sun, 18 Aug 2013 12:21:42 -0700 X-Google-Sender-Auth: BPzn7Bg_exaO11UxrY__XYLKZ1s Message-ID: Subject: Re: Dlink DIR-825 B1 status [updated] From: Adrian Chadd To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2013 19:21:44 -0000 Nope, that should be enough. USB worked for me on AR71xx the last time I checked. Does dmesg not show a USB device being probe/attached? -adrian On 18 August 2013 10:10, Sean Bruno wrote: > On Sat, 2013-08-17 at 22:58 -0700, Adrian Chadd wrote: > > .. the USB should work. What happens? > > > > > Nothing, there's not notification of anything happening on the USB bus. > > I tried loading the various usb modules by hand, and nothing. > > > Don't I build the ar71xx ehci code? > > > > > > > > > > I don't see anything specific in the kernconf about USB: > > > device usb > options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte > order > options USB_DEBUG > options USB_HOST_ALIGN=32 # AR71XX (MIPS in > general?) requ > ires this > device ehci > > Are we missing something? > > > > > > > -adrian > > > > > > > > > > On 17 August 2013 20:12, Sean Bruno wrote: > > tl;dr > > > > basic functionality is awesome. > > no usb support > > not accessing MAC addrs's from h/w > > - uboot seems to be able to see them > > > > longer version: > > http://people.freebsd.org/~sbruno/dir825_fbsd_r254450.txt > > > > http://people.freebsd.org/~sbruno/dir825_fbsd_athregs.txt > > > > sean > > > > > > From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 19 01:06:31 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 39865E83 for ; Mon, 19 Aug 2013 01:06:31 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm10-vm2.bullet.mail.ne1.yahoo.com (nm10-vm2.bullet.mail.ne1.yahoo.com [98.138.90.158]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CA05F26DD for ; Mon, 19 Aug 2013 01:06:30 +0000 (UTC) Received: from [98.138.101.130] by nm10.bullet.mail.ne1.yahoo.com with NNFMP; 19 Aug 2013 01:06:23 -0000 Received: from [98.138.84.46] by tm18.bullet.mail.ne1.yahoo.com with NNFMP; 19 Aug 2013 01:06:23 -0000 Received: from [127.0.0.1] by smtp114.mail.ne1.yahoo.com with NNFMP; 19 Aug 2013 01:06:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376874383; bh=RvMmb4w2cITzJHqQo+fu3iwzBJh1GoBYUq3g4YBvwk8=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=EcX16FUIR2U2yqBN4JhebQpqAqKcy9Zax/hCrwzH2qHTsldJWHWfgsukaevTeTBC76r8nRI8hDyGWKINtls+dyaSTR3uEv5adsCpQxh8mKcGHSMcAadih2Fud+MzvoyG38UMyMhLU48DjNBiLErdTInGGMfEA370EDKyc/7PtcE= X-Yahoo-Newman-Id: 243515.73384.bm@smtp114.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 05r4zMIVM1lq2Xeh8fILqonFUooummBqFRm8848g6NbdccK rKZcQFD5nN.PDweegVUE5GgRxJ3QxDSHrMxi1tvnx1bwDP4lxKFclIVcEFqM i5iwEEcbgvig7q1_dQ5elBy0YXKLpxKAx6kIER9JryuIisMqrLUDyJOcpt9Z jYlLdZcwyu1Lk5Y5PUopm5nZrP65BJiRI6x_uK7BpxaGPPA9MZ7lHT898cKB KCE0UAHnsNQ_GQHUS0GJaFYPd8fsriCmddH.7J0YYNJ8Ys3WvLesxMCsB1dw sizlajXaVQIeup7gCC6obmwKEq4igbznvww.N7g.ctf3HosuZNCdB7kEh3pF lK45_bH4XZJONgbOIlYGM0a7D__dbMq.OUSkeaofQaTz5_ljh0M0pIyBSXkg 9.BQdof5GMGTeSiF78j37fqkc.JNv.DNWNwPAMb.l3tYmZCBBnkCHV40x3cu ewps3ELIiCvzOJBM2f8DAkcQcXf0Thy4HrZjt3csIkLBev8PT9pjBrpvxWpX dGNIiDZTAN7s30yu5h6hnox0cjn0BH0Q3BjII8KA8WQwTrH2FkVtxAJJnhKt bhGCGp1LwTRlNyoRvIrLj.6gPEayaaZuSZP.ciT07VUUhko0q6D5hXK4uxXi 8AGoPWFrovNVQmkr2v0jRM8_wA79pLeejn0Ej4L6V.P4- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp114.mail.ne1.yahoo.com with SMTP; 18 Aug 2013 18:06:23 -0700 PDT Subject: Re: Dlink DIR-825 B1 status [updated] From: Sean Bruno To: Adrian Chadd In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-JFbQQtO+sinR7bdsAab7" Date: Sun, 18 Aug 2013 18:06:21 -0700 Message-ID: <1376874381.35487.93.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 01:06:31 -0000 --=-JFbQQtO+sinR7bdsAab7 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sun, 2013-08-18 at 12:21 -0700, Adrian Chadd wrote: >=20 > Nope, that should be enough.=20 >=20 > USB worked for me on AR71xx the last time I checked. =20 >=20 > Does dmesg not show a USB device being probe/attached?=20 >=20 Nope, nothing there. http://people.freebsd.org/~sbruno/dir825_fbsd_r254450.txt ahhhhh ... there it is. =20 /boot/kernel/ar71xx_ehci.ko /boot/kernel/ar71xx_ohci.ko Loading echi seems to lockup the router, but it does emit: ehci0: at mem 0x1b000000-0x1bffffff irq 1 on nexus0 Loading ohci seems to fail: # kldload ar71xx_ohci.ko link_elf_obj: symbol usb_bus_mem_free_all undefined linker_load_file: Unsupported file type kldload: can't load ar71xx_ohci.ko: Exec format error --=-JFbQQtO+sinR7bdsAab7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSEW+KAAoJEBkJRdwI6BaHdGYH/2rkvjwSxo6ARRpMbX6mdNl6 HcMLKK3i70NJNobkiy3q/NW9l/QfEloLbPT1XX2fzx1OkNgfgeVmOpK0qsZfJ+ts 4+pcj9caPVXzY6vud1mxYG9z0cKMz0Tz1C71z+nppACZAuiyM+kIn9vViNd5vWZv kIduRumAP+vAvTptlT/qb8rcxu3G63xnbWoaOakmnPfsJU2YQMW2HtZ15NkBIlzH VyacPgqMeeyidthAy3FaNcSQu/jXqKK6TK7CWAdaKlOquNiOpoQg+9bP3Obe5FGA 0BkfoNEhm5xC96SBmEN1y6eSmAEU56aJXLF1RoAVyysqStvZ1Hvl17yeLLY2tfM= =nktl -----END PGP SIGNATURE----- --=-JFbQQtO+sinR7bdsAab7-- From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 19 03:52:23 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2A183996 for ; Mon, 19 Aug 2013 03:52:23 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm29-vm1.bullet.mail.bf1.yahoo.com (nm29-vm1.bullet.mail.bf1.yahoo.com [98.139.213.144]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACA292ED7 for ; Mon, 19 Aug 2013 03:52:21 +0000 (UTC) Received: from [66.196.81.174] by nm29.bullet.mail.bf1.yahoo.com with NNFMP; 19 Aug 2013 03:52:13 -0000 Received: from [98.139.213.9] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 19 Aug 2013 03:52:13 -0000 Received: from [127.0.0.1] by smtp109.mail.bf1.yahoo.com with NNFMP; 19 Aug 2013 03:52:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376884333; bh=7lo0ajgu6QEBIiqKr8Ww9BwhNPo73c9ewCBuyG2GZ4U=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=J3oTeE4msxzivG+T7gqNJRqa6ullqrB+8QFVBR1e9Fow9Ahx2J6GzptF15yhmYjyYCGcommf5iujgz7uKq8BpBONa54tO5avhABfnNOo6M6upoAzDiLUiINQK1vLso3jU8J7bHU5oeDD9aE4FYkJL8GhZ41/u/TY6hDbZ0jSoLU= X-Yahoo-Newman-Id: 930984.71812.bm@smtp109.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Q28iCdwVM1kg2nfy53k_icWIn5ThdJZ1HKFUwR_sBOTnKbM WwLLXpnm1Fmb.1h_sDlPUxMEdscsA7Hm1onhNEaBwiMmCA126d6W6U6uGI3I T7SAixghTeCZyZhkeJ.HgoGjxV5sUdb6dDv.KWBGitTPvfOa32VDRpkpNAnz 3CIUNtSNWXw0YoBgPWO8pH4AkCXBDmo._LrpYtvY6dWDCV8BZgi6gwMcGNJT _3ewfVklk._4qGIyzZzWBVNkuc59imVqxMH7e8Bc6cF3Vp7CJ7kYeLPCKOch kRDALRbQGIsbUSuZiYP6KhyFR4J14MRiwOOfbw.JcC7HhIrtEfZEEPMXirEl hp2OkI4L8X_EvEapTgaXqgUHVi6CCoCq14bGsaxswh4miYWX0v7khFdUaCT5 ET0xXdbMatOVu859Nl5UAnFIDV0DKBMDxaM5R3dtURJDEC_YbjJsciizOK4. ndOXjW1Zy84jdjphXnCLlm5L4_3cGjHx2LwsgGYm5tUxhSNSgS1llo37nV.r 2hAWbw7g9QcXzFBUI.y5c1U6RBOTkxaB8NM4aH0P8_vnnZXdZSDhT X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp109.mail.bf1.yahoo.com with SMTP; 18 Aug 2013 20:52:13 -0700 PDT Subject: Re: Dlink DIR-825 B1 status [updated] From: Sean Bruno To: freebsd-embedded In-Reply-To: <1376874381.35487.93.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-/sKI2dHJteTOfa8r1/Fd" Date: Sun, 18 Aug 2013 20:52:12 -0700 Message-ID: <1376884332.1631.1.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 03:52:23 -0000 --=-/sKI2dHJteTOfa8r1/Fd Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sun, 2013-08-18 at 18:06 -0700, Sean Bruno wrote: >=20 > Loading echi seems to lockup the router, but it does emit: > ehci0: at mem > 0x1b000000-0x1bffffff irq 1 on nexus0=20 Ah, I guess I needed to wait a bit longer to see the failure? =20 # kldload /boot/kernel/ar71xx_ehci.ko=20 ehci0: at mem 0x1b000000-0x1bffffff irq 1 on nexus0 vm_thread_new: kstack allocation failed panic: kproc_create() failed with 12 KDB: enter: panic [ thread pid 236 tid 100032 ] Stopped at kdb_enter+0x4c: lui at,0x8038 db>=20 KDB: enter: Break to debugger [ thread pid 11 tid 100038 ] Stopped at kdb_enter+0x4c: lui at,0x8038 db> bt Tracing pid 11 tid 100038 td 0x8066d660 db_trace_thread+30 (?,?,?,?) ra c7f9776000000018 sp 0 sz 0 80078d3c+114 (0,?,ffffffff,?) ra c7f9777800000020 sp 100000000 sz 1 80078084+388 (?,?,?,?) ra c7f97798000000a8 sp 0 sz 0 db_command_loop+70 (?,?,?,?) ra c7f9784000000018 sp 0 sz 0 8007ab80+f4 (?,?,?,?) ra c7f97858000001a8 sp 0 sz 0 kdb_trap+110 (?,?,?,?) ra c7f97a0000000030 sp 0 sz 0 trap+c24 (?,?,?,?) ra c7f97a30000000b8 sp 0 sz 0 MipsKernGenException+134 (0,4,802db4dc,133) ra c7f97ae8000000c8 sp 100000001 sz 1 kdb_enter+4c (?,?,?,?) ra c7f97bb000000018 sp 0 sz 0 80152c9c+ac (?,?,?,?) ra c7f97bc800000018 sp 0 sz 0 kdb_alt_break+10 (?,?,?,?) ra c7f97be000000018 sp 0 sz 0 8009a788+24c (?,?,?,?) ra c7f97bf800000058 sp 0 sz 0 intr_event_handle+9c (?,?,?,?) ra c7f97c5000000030 sp 0 sz 0 802adf8c+140 (?,?,?,?) ra c7f97c8000000028 sp 0 sz 0 intr_event_handle+9c (?,?,?,?) ra c7f97ca800000030 sp 0 sz 0 cpu_intr+184 (c7f97d28,?,?,?) ra c7f97cd800000038 sp 100000000 sz 0 MipsKernIntr+158 (?,?,?,?) ra c7f97d10000000c8 sp 0 sz 0 pid 11 --=-/sKI2dHJteTOfa8r1/Fd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSEZZnAAoJEBkJRdwI6BaH2W8H/0HOdRocJq91YC4DvmYAPJvx 7P/rV/mszYRBic0jloreg9oVKKNWHdPaxUtntYZ2gr/XcnIvHaXRJeq1UcP9FoxI QH1Ibzpuy800UItTymN5LYJHYa1AloHC7XClpwki7asdFxgIfaD14vQYcOHaW5Uz vRzu53scg7Jl3hahNXEDygEkNwyFTvrgTgsgaLTdLDHaMY034U3PoNdxwbA8SI3W 8Vy2XFvRL2uK2iI+NnhrxkNZR9vpQMPlAb4DSfDRsI8nxtyRh7aMXjCQhluNzmI2 tHr2AzJJ24aaEPCZVBkIsIEP2dWEC5f6CEHuFO4qA0kLALZNx0Aan3LWGV3djS8= =4SOs -----END PGP SIGNATURE----- --=-/sKI2dHJteTOfa8r1/Fd-- From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 19 04:18:53 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BCAF8C78; Mon, 19 Aug 2013 04:18:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BFC4F2FD1; Mon, 19 Aug 2013 04:18:52 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id f14so2605514wiw.15 for ; Sun, 18 Aug 2013 21:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=IgI5XkvyH0NRUUIUU/RLbPlRhgV+gfIoDyk1isxoVS8=; b=vs2AQae0+6M4C6skuIw4upZiRQxVc3hsuB/veIZ4mv/HEILavqIDo1YH+9o3yI/sJe At5ZYaD1swTRHWrmBxeGKHrZrmSGn2OhDtmQYsvl26QwWczBBYdT+Nf1XHI9F1DEPQPA JQoKfRtwF641L/Gqsq/aHnyzdx7l2rVuzOqnEf8/fnxv46Uj+HCVkSgE9IaBrcHc2Zwa G+BMjz0Vz8LlL4dLSGeghfgp1kiDl2Vt3XGRy1MaoDOhlTQ628QwN+4IquZ6KP3WZwh8 WfT70odIrOvLKNyW36cPfGB2cPW97Dq8ezizpUVqgnWriEwzkGw/Lri6f/SaHuoP0e7M 22eg== MIME-Version: 1.0 X-Received: by 10.180.211.206 with SMTP id ne14mr6646990wic.30.1376885931059; Sun, 18 Aug 2013 21:18:51 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Sun, 18 Aug 2013 21:18:50 -0700 (PDT) In-Reply-To: <1376884332.1631.1.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> <1376884332.1631.1.camel@localhost> Date: Sun, 18 Aug 2013 21:18:50 -0700 X-Google-Sender-Auth: 65K-F8pxkVwuLJg8oKMXElLmq5w Message-ID: Subject: Re: Dlink DIR-825 B1 status [updated] From: Adrian Chadd To: Sean Bruno , "freebsd-mips@freebsd.org" , Jeff Roberson Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 04:18:53 -0000 Ah, look at that! I think this is fallout with jeffr's VM allocator changes. I suggest asking him about it. :P -adrian On 18 August 2013 20:52, Sean Bruno wrote: > On Sun, 2013-08-18 at 18:06 -0700, Sean Bruno wrote: > > > > Loading echi seems to lockup the router, but it does emit: > > ehci0: at mem > > 0x1b000000-0x1bffffff irq 1 on nexus0 > > Ah, I guess I needed to wait a bit longer to see the failure? > > # kldload /boot/kernel/ar71xx_ehci.ko > ehci0: at mem > 0x1b000000-0x1bffffff irq 1 on nexus0 > vm_thread_new: kstack allocation failed > panic: kproc_create() failed with 12 > KDB: enter: panic > [ thread pid 236 tid 100032 ] > Stopped at kdb_enter+0x4c: lui at,0x8038 > db> > KDB: enter: Break to debugger > [ thread pid 11 tid 100038 ] > Stopped at kdb_enter+0x4c: lui at,0x8038 > db> bt > Tracing pid 11 tid 100038 td 0x8066d660 > db_trace_thread+30 (?,?,?,?) ra c7f9776000000018 sp 0 sz 0 > 80078d3c+114 (0,?,ffffffff,?) ra c7f9777800000020 sp 100000000 sz 1 > 80078084+388 (?,?,?,?) ra c7f97798000000a8 sp 0 sz 0 > db_command_loop+70 (?,?,?,?) ra c7f9784000000018 sp 0 sz 0 > 8007ab80+f4 (?,?,?,?) ra c7f97858000001a8 sp 0 sz 0 > kdb_trap+110 (?,?,?,?) ra c7f97a0000000030 sp 0 sz 0 > trap+c24 (?,?,?,?) ra c7f97a30000000b8 sp 0 sz 0 > MipsKernGenException+134 (0,4,802db4dc,133) ra c7f97ae8000000c8 sp > 100000001 sz 1 > kdb_enter+4c (?,?,?,?) ra c7f97bb000000018 sp 0 sz 0 > 80152c9c+ac (?,?,?,?) ra c7f97bc800000018 sp 0 sz 0 > kdb_alt_break+10 (?,?,?,?) ra c7f97be000000018 sp 0 sz 0 > 8009a788+24c (?,?,?,?) ra c7f97bf800000058 sp 0 sz 0 > intr_event_handle+9c (?,?,?,?) ra c7f97c5000000030 sp 0 sz 0 > 802adf8c+140 (?,?,?,?) ra c7f97c8000000028 sp 0 sz 0 > intr_event_handle+9c (?,?,?,?) ra c7f97ca800000030 sp 0 sz 0 > cpu_intr+184 (c7f97d28,?,?,?) ra c7f97cd800000038 sp 100000000 sz 0 > MipsKernIntr+158 (?,?,?,?) ra c7f97d10000000c8 sp 0 sz 0 > pid 11 > > From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 19 08:40:28 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DE47AB47 for ; Mon, 19 Aug 2013 08:40:27 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6D06B2B2C for ; Mon, 19 Aug 2013 08:40:27 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id e12so3190949wgh.21 for ; Mon, 19 Aug 2013 01:40:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:user-agent:in-reply-to:references:mime-version :content-type:content-transfer-encoding:subject:from:date:to:cc :message-id; bh=4tZukS4CA6TqoNoHsgk+j1z36oAUJaNFpQkaEtJrVos=; b=bM1uCviQTwmt57TBQTFCCIAYgmOlc9HNx9CKafsLUvFggTVlVHycYu4fK8RPL6cGRR 5QS2t3c1gERkC1oxGqJioj0fL6MyALiwYUj3fMUwV1kTveppTkOAP0N+HTcy5kn6jk8Y g2BVoR03UGaZicLT21SU/lROucSi3Ug5j6h6smO/ECrgHgL4rRDqv/ahdumiZ+ZHER5Z Zw+oZcr8VFoB8jiHmnha9yNW4VIqEE1d+vcGleZBOeUbvu5xg4rGiWdwu+2hxBzipHuv LV41uD/C9qV3/AggNShD90XsNh/RDbIXef6FprwjBIYpsWMtDb57tE2Y1El2Us9F3ZxQ hpJg== X-Gm-Message-State: ALoCoQm2WNBLSMkRM9Ki4+1MbBrgRgbsaJNJywQo+Fb61y53+m4FF3cSUzHTmnJRxEdb6wkO2zfB X-Received: by 10.194.123.227 with SMTP id md3mr7478876wjb.17.1376897907354; Mon, 19 Aug 2013 00:38:27 -0700 (PDT) Received: from [159.160.235.84] ([159.160.235.84]) by mx.google.com with ESMTPSA id jf9sm15015827wic.5.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 19 Aug 2013 00:38:26 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> <1376884332.1631.1.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: Dlink DIR-825 B1 status [updated] From: Aleksandr Rybalko Date: Mon, 19 Aug 2013 10:38:12 +0300 To: Adrian Chadd , Sean Bruno , "freebsd-mips@freebsd.org" , Jeff Roberson Message-ID: <8d343e73-94b4-4f13-96f8-a062e3202288@email.android.com> Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 08:40:28 -0000 Adrian Chadd написав(ла): >Ah, look at that! I think this is fallout with jeffr's VM allocator >changes. > >I suggest asking him about it. :P > > > >-adrian > > > >On 18 August 2013 20:52, Sean Bruno wrote: > >> On Sun, 2013-08-18 at 18:06 -0700, Sean Bruno wrote: >> > >> > Loading echi seems to lockup the router, but it does emit: >> > ehci0: at mem >> > 0x1b000000-0x1bffffff irq 1 on nexus0 >> >> Ah, I guess I needed to wait a bit longer to see the failure? >> >> # kldload /boot/kernel/ar71xx_ehci.ko >> ehci0: at mem >> 0x1b000000-0x1bffffff irq 1 on nexus0 >> vm_thread_new: kstack allocation failed >> panic: kproc_create() failed with 12 >> KDB: enter: panic >> [ thread pid 236 tid 100032 ] >> Stopped at kdb_enter+0x4c: lui at,0x8038 >> db> >> KDB: enter: Break to debugger >> [ thread pid 11 tid 100038 ] >> Stopped at kdb_enter+0x4c: lui at,0x8038 >> db> bt >> Tracing pid 11 tid 100038 td 0x8066d660 >> db_trace_thread+30 (?,?,?,?) ra c7f9776000000018 sp 0 sz 0 >> 80078d3c+114 (0,?,ffffffff,?) ra c7f9777800000020 sp 100000000 sz 1 >> 80078084+388 (?,?,?,?) ra c7f97798000000a8 sp 0 sz 0 >> db_command_loop+70 (?,?,?,?) ra c7f9784000000018 sp 0 sz 0 >> 8007ab80+f4 (?,?,?,?) ra c7f97858000001a8 sp 0 sz 0 >> kdb_trap+110 (?,?,?,?) ra c7f97a0000000030 sp 0 sz 0 >> trap+c24 (?,?,?,?) ra c7f97a30000000b8 sp 0 sz 0 >> MipsKernGenException+134 (0,4,802db4dc,133) ra c7f97ae8000000c8 sp >> 100000001 sz 1 >> kdb_enter+4c (?,?,?,?) ra c7f97bb000000018 sp 0 sz 0 >> 80152c9c+ac (?,?,?,?) ra c7f97bc800000018 sp 0 sz 0 >> kdb_alt_break+10 (?,?,?,?) ra c7f97be000000018 sp 0 sz 0 >> 8009a788+24c (?,?,?,?) ra c7f97bf800000058 sp 0 sz 0 >> intr_event_handle+9c (?,?,?,?) ra c7f97c5000000030 sp 0 sz 0 >> 802adf8c+140 (?,?,?,?) ra c7f97c8000000028 sp 0 sz 0 >> intr_event_handle+9c (?,?,?,?) ra c7f97ca800000030 sp 0 sz 0 >> cpu_intr+184 (c7f97d28,?,?,?) ra c7f97cd800000038 sp 100000000 sz 0 >> MipsKernIntr+158 (?,?,?,?) ra c7f97d10000000c8 sp 0 sz 0 >> pid 11 >> >> >_______________________________________________ >freebsd-embedded@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-embedded >To unsubscribe, send any mail to >"freebsd-embedded-unsubscribe@freebsd.org" It fail in intr handler. Maybe wrong IRQ no? WBW ------ Aleksandr Rybalko From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 19 11:06:41 2013 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 97C77D3B for ; Mon, 19 Aug 2013 11:06:41 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 835C92508 for ; Mon, 19 Aug 2013 11:06:41 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7JB6f0x005966 for ; Mon, 19 Aug 2013 11:06:41 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7JB6fXI005964 for freebsd-embedded@FreeBSD.org; Mon, 19 Aug 2013 11:06:41 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 19 Aug 2013 11:06:41 GMT Message-Id: <201308191106.r7JB6fXI005964@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 11:06:41 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/177878 embedded [rtl8366rb] [patch] Update rtl8366rb switch driver to o bin/177873 embedded [patch] etherswitchcfg(): Change the per port vlangrou o bin/177872 embedded [patch] etherswitchcfg(8) crashes if called with no ar o bin/177871 embedded [patch] etherswitchcfg(8): uninitialized variable whil o kern/172968 embedded [arge] probe/attach occasionally fails to find a PHY o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c 7 problems total. From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 19 12:59:25 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AC3751A0 for ; Mon, 19 Aug 2013 12:59:25 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-we0-x230.google.com (mail-we0-x230.google.com [IPv6:2a00:1450:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2F1B62CC6 for ; Mon, 19 Aug 2013 12:59:25 +0000 (UTC) Received: by mail-we0-f176.google.com with SMTP id q56so595958wes.21 for ; Mon, 19 Aug 2013 05:59:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cqbr+eEy2f9/gw5fTy32RkLVj7oK1B8y0o5TWv2n0OU=; b=tz0GHh+CWUKOT5Q8e78QSRIU0GNQiMtul9CHoDRzAYgsu7pWVuC5iB8io5rayr9zcQ MUTwEaihufzSK8rL70KrJuBQl/pg/6br7dEb6OqhnQlj/PwVfyGrmtxGfrsWhAkW4FXp zQgWEsqPfbsfM3DwoC7LA3kHo+LUjjnewqnaYGwva7GgeGpXybaEsiypSrEbFiOUZN/x Nr0ee0U0w5+wXuS7inH8dLcmp4kZvBS41Wd3TN5UjFVnQjU2TlQm1/kdYNMk3z0vv5ej d+3eCNDjzdj8uiyovI/ripjVRymN623vL0wL/+xqXMBs2GcsFtdxibhv7THnoWpbJ2Qm 7SHA== MIME-Version: 1.0 X-Received: by 10.180.198.79 with SMTP id ja15mr8157581wic.36.1376917163467; Mon, 19 Aug 2013 05:59:23 -0700 (PDT) Received: by 10.216.75.140 with HTTP; Mon, 19 Aug 2013 05:59:23 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Mon, 19 Aug 2013 09:59:23 -0300 Message-ID: Subject: Re: Making Picostation m2HP work From: Luiz Otavio O Souza To: hiren panchasara Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 12:59:25 -0000 Hi Hiren, I've looked at ubnt firmwares and there are a few identifiers that i can gather: All the 'M' series (rockets, airgrids and many others) uses the same firmware identifier: 'XM'. The b/g 2Ghz radios uses the 'XS2' identifier and the 5Ghz models uses the 'XS5'. The original PicoStation2 HP firmware has the following identifier: $ hexdump -C PicoStation2HP-v4.0.3.build5058.bin 00000000 55 42 4e 54 58 53 32 2e 61 72 32 33 31 36 2e 76 |UBNTXS2.ar2316.v| 00000010 34 2e 30 2e 33 2e 35 30 35 38 2e 31 33 30 33 32 |4.0.3.5058.13032| 00000020 38 2e 31 30 35 34 00 00 00 00 00 00 00 00 00 00 |8.1054..........| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| [...] Can you try to build an image using 'XS2' as the board type and 'XS2.ar2316.FreeBSD' as the version string ? If you create a correct image the update process will succeed even if the compression is wrong (the loader will fail to boot, but that is ok, we can hopefully fix the image later). The kernel load address and entry point set by mkfwimage for the XS2 board is different from what we expect: .name = "XS2", .kern_start = 0xbfc30000, .kern_memstart = 0x80041000, .kern_entry = 0x80041000, .firmware_max_length= 0x00390000, So you may need to adjust your kernel or the settings on mkfwimage for this firmware template. Luiz From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 19 17:09:41 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84E6CD7E for ; Mon, 19 Aug 2013 17:09:41 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x22c.google.com (mail-ee0-x22c.google.com [IPv6:2a00:1450:4013:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 04ED42B62 for ; Mon, 19 Aug 2013 17:09:40 +0000 (UTC) Received: by mail-ee0-f44.google.com with SMTP id b47so2291497eek.3 for ; Mon, 19 Aug 2013 10:09:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=z6uBGOiC7Sv1D5gKdOxUg6JMwNQMiZJ4OKFdsp86Vic=; b=STWYpy6Frppj+k4eazgWIiZHc1GKS+jWLEQ41nImNbJ9+KllGagS7IgkiOrcRgyK+m cxhxu5YsJNBj7cZt4I9laUpCbR78eB+e5zr3k79y5qhDK5AmvhPVd0dl5xgTDPl1S+Kf +ZBA7KVSthBJzA+sLz5u1N3c0dDOBn7Cvx7LLJ8S3BXV7zEJbDGF2pmosxGLsci/2QSm 2dnMDXdguk/jEihHmHiLcSxLqw4zYg3qpnL7QptRlk6QyRBlgdWB8mYRgHhYInrlvmvm gGBa+OzzmjOZZbdb8PuR1oNKPJwPUyw6vA8FkNxwP4r9diHMLRdX9EE27PPPMBDKa6an 84tA== MIME-Version: 1.0 X-Received: by 10.15.43.13 with SMTP id w13mr24082124eev.37.1376932179168; Mon, 19 Aug 2013 10:09:39 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Mon, 19 Aug 2013 10:09:39 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Mon, 19 Aug 2013 10:09:39 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Luiz Otavio O Souza Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 17:09:41 -0000 On Mon, Aug 19, 2013 at 5:59 AM, Luiz Otavio O Souza wrote: > Hi Hiren, > > I've looked at ubnt firmwares and there are a few identifiers that i can > gather: > > All the 'M' series (rockets, airgrids and many others) uses the same > firmware identifier: 'XM'. > > The b/g 2Ghz radios uses the 'XS2' identifier and the 5Ghz models uses the > 'XS5'. > > The original PicoStation2 HP firmware has the following identifier: > > $ hexdump -C PicoStation2HP-v4.0.3.build5058.bin > 00000000 55 42 4e 54 58 53 32 2e 61 72 32 33 31 36 2e 76 > |UBNTXS2.ar2316.v| > 00000010 34 2e 30 2e 33 2e 35 30 35 38 2e 31 33 30 33 32 > |4.0.3.5058.13032| > 00000020 38 2e 31 30 35 34 00 00 00 00 00 00 00 00 00 00 > |8.1054..........| > 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > |................| > [...] > > Can you try to build an image using 'XS2' as the board type and > 'XS2.ar2316.FreeBSD' as the version string ? > > If you create a correct image the update process will succeed even if the > compression is wrong (the loader will fail to boot, but that is ok, we can > hopefully fix the image later). > > The kernel load address and entry point set by mkfwimage for the XS2 board > is different from what we expect: > > .name = "XS2", > .kern_start = 0xbfc30000, > .kern_memstart = 0x80041000, > .kern_entry = 0x80041000, > .firmware_max_length= 0x00390000, > kern_memstart is not there in the mkfwimage I am using but I thing that should be fine. fwiw, I am using Adrian's http://freebsd-wifi-build.googlecode.com/svn/trunk/ Trying rest of the things with XS2 and still getting the same result: ar7240> urescue Setting default IP 192.168.1.20 Starting TFTP server... Using eth0 (192.168.1.20), address: 0x81000000 Waiting for connection: / Receiving file from 192.168.1.254:42436 Received 6408760 bytes Firmware check failed! (-2) Here is the image I generated just for reference: http://www.strugglingcoder.info/pkgs/AP91.initial.img > > So you may need to adjust your kernel or the settings on mkfwimage for > this firmware template. > > Luiz > From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 19 19:55:45 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6FE613D5 for ; Mon, 19 Aug 2013 19:55:45 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 42B382529 for ; Mon, 19 Aug 2013 19:55:44 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id kq13so5006683pab.11 for ; Mon, 19 Aug 2013 12:55:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type; bh=ABv0KqBT5A4Zgnz/rcUb1VxkJPIwwTM78p+Hskdjjhw=; b=mQRQLURwV9pr7U1ny7Z42jxL2cvU2UzfO+HLDssT5d4YKeHe8mFB71g3fpGSbt4uMu kcmPKDCBAJTZm2JQLEnI0mqVIDdHo85g3W/YRontxRrsOY49ocDE5gF4LlcLpQ0bRI3Y VS3n+xSwA9W90P9svpfsehzNDMLNH5ZgLwexdq1rknOl++h3nvQm4R4cyF1K3i6IAK32 F7DeoO91QMYmtf12/ZxLrccF8EKpGR8iLDLdbu4DSx39W36Jmlc0uuN4aJZ0wSdQmjB6 pqwbn33y7knq6r916UDsm1pWc2BEa+m7a/JcaPxpYuY48WI9oXMSlfWsstMnFBZoyxk9 e1yg== X-Gm-Message-State: ALoCoQmmNB24JxZNWzJszoACGINokJKC72ZiIUbZfiGu/QZluB1QoUVRvIU0NK2eVn3BvbTCU8wl X-Received: by 10.69.12.36 with SMTP id en4mr6099075pbd.54.1376942144463; Mon, 19 Aug 2013 12:55:44 -0700 (PDT) Received: from rrcs-66-91-135-210.west.biz.rr.com (rrcs-66-91-135-210.west.biz.rr.com. [66.91.135.210]) by mx.google.com with ESMTPSA id 7sm17382254paf.22.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 19 Aug 2013 12:55:43 -0700 (PDT) Date: Mon, 19 Aug 2013 09:57:19 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Aleksandr Rybalko Subject: Re: Dlink DIR-825 B1 status [updated] In-Reply-To: <8d343e73-94b4-4f13-96f8-a062e3202288@email.android.com> Message-ID: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> <1376884332.1631.1.camel@localhost> <8d343e73-94b4-4f13-96f8-a062e3202288@email.android.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Jeff Roberson , "freebsd-mips@freebsd.org" , freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2013 19:55:45 -0000 On Mon, 19 Aug 2013, Aleksandr Rybalko wrote: > Adrian Chadd ???????(??): >> Ah, look at that! I think this is fallout with jeffr's VM allocator >> changes. >> >> I suggest asking him about it. :P >> >> >> >> -adrian >> >> >> >> On 18 August 2013 20:52, Sean Bruno wrote: >> >>> On Sun, 2013-08-18 at 18:06 -0700, Sean Bruno wrote: >>>> >>>> Loading echi seems to lockup the router, but it does emit: >>>> ehci0: at mem >>>> 0x1b000000-0x1bffffff irq 1 on nexus0 >>> >>> Ah, I guess I needed to wait a bit longer to see the failure? >>> >>> # kldload /boot/kernel/ar71xx_ehci.ko >>> ehci0: at mem >>> 0x1b000000-0x1bffffff irq 1 on nexus0 >>> vm_thread_new: kstack allocation failed Can you go to line 159 of vm_init and change PAGE_SIZE to 1MB (1 * 1024 * 1024) and tell me if that fixes it? Thanks! Jeff >>> panic: kproc_create() failed with 12 >>> KDB: enter: panic >>> [ thread pid 236 tid 100032 ] >>> Stopped at kdb_enter+0x4c: lui at,0x8038 >>> db> >>> KDB: enter: Break to debugger >>> [ thread pid 11 tid 100038 ] >>> Stopped at kdb_enter+0x4c: lui at,0x8038 >>> db> bt >>> Tracing pid 11 tid 100038 td 0x8066d660 >>> db_trace_thread+30 (?,?,?,?) ra c7f9776000000018 sp 0 sz 0 >>> 80078d3c+114 (0,?,ffffffff,?) ra c7f9777800000020 sp 100000000 sz 1 >>> 80078084+388 (?,?,?,?) ra c7f97798000000a8 sp 0 sz 0 >>> db_command_loop+70 (?,?,?,?) ra c7f9784000000018 sp 0 sz 0 >>> 8007ab80+f4 (?,?,?,?) ra c7f97858000001a8 sp 0 sz 0 >>> kdb_trap+110 (?,?,?,?) ra c7f97a0000000030 sp 0 sz 0 >>> trap+c24 (?,?,?,?) ra c7f97a30000000b8 sp 0 sz 0 >>> MipsKernGenException+134 (0,4,802db4dc,133) ra c7f97ae8000000c8 sp >>> 100000001 sz 1 >>> kdb_enter+4c (?,?,?,?) ra c7f97bb000000018 sp 0 sz 0 >>> 80152c9c+ac (?,?,?,?) ra c7f97bc800000018 sp 0 sz 0 >>> kdb_alt_break+10 (?,?,?,?) ra c7f97be000000018 sp 0 sz 0 >>> 8009a788+24c (?,?,?,?) ra c7f97bf800000058 sp 0 sz 0 >>> intr_event_handle+9c (?,?,?,?) ra c7f97c5000000030 sp 0 sz 0 >>> 802adf8c+140 (?,?,?,?) ra c7f97c8000000028 sp 0 sz 0 >>> intr_event_handle+9c (?,?,?,?) ra c7f97ca800000030 sp 0 sz 0 >>> cpu_intr+184 (c7f97d28,?,?,?) ra c7f97cd800000038 sp 100000000 sz 0 >>> MipsKernIntr+158 (?,?,?,?) ra c7f97d10000000c8 sp 0 sz 0 >>> pid 11 >>> >>> >> _______________________________________________ >> freebsd-embedded@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded >> To unsubscribe, send any mail to >> "freebsd-embedded-unsubscribe@freebsd.org" > > It fail in intr handler. Maybe wrong IRQ no? > WBW > ------ > Aleksandr Rybalko > > From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 00:08:34 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B2931A8C; Tue, 20 Aug 2013 00:08:34 +0000 (UTC) (envelope-from matheus@eternamente.info) Received: from phoenix.eternamente.info (phoenix.eternamente.info [109.169.62.232]) by mx1.freebsd.org (Postfix) with ESMTP id 88C5E219B; Tue, 20 Aug 2013 00:08:34 +0000 (UTC) Received: by phoenix.eternamente.info (Postfix, from userid 80) id 1932C1CC59; Mon, 19 Aug 2013 21:00:09 -0300 (BRT) Received: from 187.61.251.141 (SquirrelMail authenticated user matheus) by arroway.org with HTTP; Mon, 19 Aug 2013 21:00:09 -0300 Message-ID: In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> <1376884332.1631.1.camel@localhost> <8d343e73-94b4-4f13-96f8-a062e3202288@email.android.com> Date: Mon, 19 Aug 2013 21:00:09 -0300 Subject: Dlink DIR-825 B1 or TP-Link 1043ND From: "Nenhum_de_Nos" To: "freebsd-mips@freebsd.org" , "freebsd-embedded" User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 00:08:34 -0000 Hail, I've seen the messages about both routers, and now I have one of each. The dlink just arrived, but the serial cables dont :( which one is better for testing ? See I don't have the serial if right now. I really would like to have FreeBSD on one of them :) May later be on both :D thanks, matheus -- We will call you Cygnus, The God of balance you shall be A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? http://en.wikipedia.org/wiki/Posting_style From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 00:47:33 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8765DF1B; Tue, 20 Aug 2013 00:47:33 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x231.google.com (mail-ee0-x231.google.com [IPv6:2a00:1450:4013:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2F7F2363; Tue, 20 Aug 2013 00:47:32 +0000 (UTC) Received: by mail-ee0-f49.google.com with SMTP id d41so2415338eek.22 for ; Mon, 19 Aug 2013 17:47:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=a/5iyXJXaduI1UKXFi2nDnc1gEdSUZ3CR5hvouHyNyg=; b=De7cxKA4WezDOJUZIa/oO17AmiQrSCanJREMz+Hv+Q/8Exg2EIfR7raU9ehbeIHx7t lpa0jiRTOBQ59CEsT8lfIRFiWWOOJwPSQsa+LA5rsEYn9AGnSdDtMSCbvsSaAMLY8ujS XWZutjwX68hgU8DOBK3Z8vzFKq40wIe3h2aTX1mqNY1XEu6OUnciMoIkzP64aASwARmg ncLJ8/zv3IewCSnH1bmGgJXZYRp6m7hCQHnwhJ160OKISrRoGgkMVZGGeqBhDpHLMvXD xEZXn7+uHeInAwU/ZLdVkOzLRTG+ALnZPUPSBZJZ0zcXj5x0S9jIkweudn+C6vjCP7fA llgQ== MIME-Version: 1.0 X-Received: by 10.14.8.72 with SMTP id 48mr26823812eeq.25.1376959651213; Mon, 19 Aug 2013 17:47:31 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Mon, 19 Aug 2013 17:47:31 -0700 (PDT) In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> <1376884332.1631.1.camel@localhost> <8d343e73-94b4-4f13-96f8-a062e3202288@email.android.com> Date: Mon, 19 Aug 2013 17:47:31 -0700 Message-ID: Subject: Re: Dlink DIR-825 B1 or TP-Link 1043ND From: hiren panchasara To: Nenhum_de_Nos Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded , "freebsd-mips@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 00:47:33 -0000 On Mon, Aug 19, 2013 at 5:00 PM, Nenhum_de_Nos wrote: > Hail, > > I've seen the messages about both routers, and now I have one of each. The > dlink just arrived, but > the serial cables dont :( > > which one is better for testing ? See I don't have the serial if right now. > > I really would like to have FreeBSD on one of them :) May later be on both > :D > Awesome. You would need usb-ttl serial cable to do things. Something like: http://www.adafruit.com/products/954 I've made my tplink 1043ND work using Adrian's scripts and have documented it here: http://www.strugglingcoder.info/index.php/installing-freebsd-on-tp-link-tl-wr1043nd/ cheers, Hiren > > thanks, > > matheus > > -- > We will call you Cygnus, > The God of balance you shall be > > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > > http://en.wikipedia.org/wiki/Posting_style > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org > " > From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 01:11:32 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3BF4F4AF; Tue, 20 Aug 2013 01:11:32 +0000 (UTC) (envelope-from matheus@eternamente.info) Received: from phoenix.eternamente.info (phoenix.eternamente.info [109.169.62.232]) by mx1.freebsd.org (Postfix) with ESMTP id 114F724B1; Tue, 20 Aug 2013 01:11:31 +0000 (UTC) Received: by phoenix.eternamente.info (Postfix, from userid 80) id 95DB51CC59; Mon, 19 Aug 2013 22:11:16 -0300 (BRT) Received: from 187.61.251.141 (SquirrelMail authenticated user matheus) by arroway.org with HTTP; Mon, 19 Aug 2013 22:11:16 -0300 Message-ID: <435206d30f30e1b8db0e2dc7d0bc4f31.squirrel@arroway.org> In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> <1376884332.1631.1.camel@localhost> <8d343e73-94b4-4f13-96f8-a062e3202288@email.android.com> Date: Mon, 19 Aug 2013 22:11:16 -0300 Subject: Re: Dlink DIR-825 B1 or TP-Link 1043ND From: "Nenhum_de_Nos" User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: freebsd-embedded , "freebsd-mips@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 01:11:32 -0000 On Mon, August 19, 2013 21:47, hiren panchasara wrote: > On Mon, Aug 19, 2013 at 5:00 PM, Nenhum_de_Nos wrote: > >> Hail, >> >> I've seen the messages about both routers, and now I have one of each. The >> dlink just arrived, but >> the serial cables dont :( >> >> which one is better for testing ? See I don't have the serial if right now. >> >> I really would like to have FreeBSD on one of them :) May later be on both >> :D >> > > Awesome. You would need usb-ttl serial cable to do things. Something like: > http://www.adafruit.com/products/954 > > I've made my tplink 1043ND work using Adrian's scripts and have documented > it here: > http://www.strugglingcoder.info/index.php/installing-freebsd-on-tp-link-tl-wr1043nd/ > > cheers, > Hiren thanks, as is not in stock, will this solve the problem ? http://www.ebay.com/itm/New-USB-to-TTL-Serial-Cable-Adapter-FTDI-Chipset-FT232-USB-Cable-Computer-Cable-/261101529602?item=261101529602 thanks, matheus >> >> thanks, >> >> matheus >> >> -- >> We will call you Cygnus, >> The God of balance you shall be >> >> A: Because it messes up the order in which people normally read text. >> Q: Why is top-posting such a bad thing? >> >> http://en.wikipedia.org/wiki/Posting_style >> _______________________________________________ >> freebsd-embedded@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded >> To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org >> " >> > -- We will call you Cygnus, The God of balance you shall be A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? http://en.wikipedia.org/wiki/Posting_style From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 01:21:17 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AFE1181F for ; Tue, 20 Aug 2013 01:21:17 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm36-vm8.bullet.mail.bf1.yahoo.com (nm36-vm8.bullet.mail.bf1.yahoo.com [72.30.239.70]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F0612532 for ; Tue, 20 Aug 2013 01:21:16 +0000 (UTC) Received: from [98.139.212.151] by nm36.bullet.mail.bf1.yahoo.com with NNFMP; 20 Aug 2013 01:21:10 -0000 Received: from [68.142.230.75] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 20 Aug 2013 01:21:10 -0000 Received: from [127.0.0.1] by smtp232.mail.bf1.yahoo.com with NNFMP; 20 Aug 2013 01:21:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376961670; bh=8j+/AvcjFKFoLNRgv+c2PvwhXLSrk6dXQrabWAdBWqE=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=BRn7q7SMpyc7ENatZJhcBz418fXuqPjZMbSdIK4KQtd8U8Sod79vJdRv4zIGYwp485uibNdImQvrCdNArmoweyHpeCMN9AmRlf+BJGO37D2/eNtHPmYgIvendoBg0JYWsJSpVR+5KmdgtjAFqpnnI+zy49ygZLV069c95fn7JIM= X-Yahoo-Newman-Id: 600801.57747.bm@smtp232.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 4Euj9IgVM1nb5OyHTPDxg3qUnrMxzBMDhMklGnMqnCuCocE wdQZ_Xq4_m27ryDV81HiDzQsdYefq5RP4OH0XBXbJB3GjfFuVIj1BsLCtwOS SkwX5nHjGFn.TA6a4.jRW_1nOihYzuWe0tAzjLNk9PvUop.rxVWYSlrcDDF0 W_Re50U90bX7iX8OpgzML.jwydlhiiYNUKSQ641.qrZ.MfjqhM5eEddgDS18 P0yiMVjO3i7K1Pgj6N.ln7Ezr5lzl8yr8ourR80w9.oveSmxxG7BILRnxP0a 3jJQFm4SmpvbG23nKbuFZW9GRZvrzWSjZ9_gkdxh4QUpK.7PgHFx8RYgOZyS 3ULAYFuThE760A7bPyYvOCQogn6dQzjC7vc5bCZXDoz78TY4_.wZ0FQBvKcg THJjBPads7BDzThTbt_TA5zHWwkbQUt2_6iBYg9yChxn3IU8VHZ3t0kDvKvD anlNt3alSl5CWhZHgAzHy.6SnvQa7Kc5QWOzliIXLnyDWyS4TKyK.vQZIr2l ez1MzlGff4Z2VBF5gxX_Zq1bydXbg2ktRAOois5WR_1TSa0DfbVpWK9H1LdF EpszM90ohGtJynLsECEbIxV4nON0U3XfWkFwZjh1IGthPttbR_Hu6x_klrA8 3BLoavWM3HEiCdwbiaN9ZBeOZnT0BanKixJ4AG3xSe_wdIB_skxjHlV03O23 ZhOv2WF8i9PPvVNsjCWCxlaMdMRxYcc0h.c6yDHWvsTSdaME.pFDQYNVHaQu llXad2eA9y5mcXT.mSSk1dJPp7oYu2fddRmgfc9YzLxIjzM66NR_dnoyrvj1 nctcIo4zRL_zfj72.8LZyz44060TC3B11atKWGTt9FcBajCHFeyHu8rWQA4v 0gili._ufe5qO.GPtXoqEfPdr.y1OEm9PmalqAKmo7UdgXTxfJCKsHBiXTL7 13vtOTjc5yM_0F_z.D37adQyAm01DfOUmp003WsydX7ZC X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp232.mail.bf1.yahoo.com with SMTP; 20 Aug 2013 01:21:10 +0000 UTC Subject: Re: Dlink DIR-825 B1 or TP-Link 1043ND From: Sean Bruno To: Nenhum_de_Nos In-Reply-To: <435206d30f30e1b8db0e2dc7d0bc4f31.squirrel@arroway.org> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> <1376884332.1631.1.camel@localhost> <8d343e73-94b4-4f13-96f8-a062e3202288@email.android.com> <435206d30f30e1b8db0e2dc7d0bc4f31.squirrel@arroway.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-C+9Awuq4+HXb/KYe+7FO" Date: Mon, 19 Aug 2013 18:21:08 -0700 Message-ID: <1376961668.1445.2.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 01:21:17 -0000 --=-C+9Awuq4+HXb/KYe+7FO Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Mon, 2013-08-19 at 22:11 -0300, Nenhum_de_Nos wrote: > On Mon, August 19, 2013 21:47, hiren panchasara wrote: > > On Mon, Aug 19, 2013 at 5:00 PM, Nenhum_de_Nos wrote: > > > >> Hail, > >> > >> I've seen the messages about both routers, and now I have one of each.= The > >> dlink just arrived, but > >> the serial cables dont :( > >> > >> which one is better for testing ? See I don't have the serial if right= now. > >> > >> I really would like to have FreeBSD on one of them :) May later be on = both > >> :D > >> > > > > Awesome. You would need usb-ttl serial cable to do things. Something li= ke: > > http://www.adafruit.com/products/954 > > > > I've made my tplink 1043ND work using Adrian's scripts and have documen= ted > > it here: > > http://www.strugglingcoder.info/index.php/installing-freebsd-on-tp-link= -tl-wr1043nd/ > > > > cheers, > > Hiren >=20 > thanks, >=20 > as is not in stock, will this solve the problem ? >=20 > http://www.ebay.com/itm/New-USB-to-TTL-Serial-Cable-Adapter-FTDI-Chipset-= FT232-USB-Cable-Computer-Cable-/261101529602?item=3D261101529602 >=20 > thanks, >=20 > matheus Yeah, that should be the thing you need. Remember, your router will need to be opened and you will need to solder some pins onto the serial connection. Welcome to the fun and games! :-) Sean p.s. tisk, tisk ... cross posting. :-) --=-C+9Awuq4+HXb/KYe+7FO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSEsSBAAoJEBkJRdwI6BaHbBUH/0K11KjTEW3c99d7Y05S2teU ym9HReB7GbxqtTWEt/7EeWJQUnXYwDbpWG2nW+0RmJO9sYxfF78CGbwiPadZEUDA v75HxUOTie9b51gEkDrAbzyg28ThG3FM6tHsEyH7beZB87FgmjWFh9INZSzlz1MS gtxjJgOy4rUwpQLYYT7tBwv6a8xXHtHPaswz5SwxZu+GFmzHCJeJY1G03CDXRy+r khf4XprR8W/gCL8Tuggm0D9sJ9LlDl+S9K4wNovg9JR5twyx9ydUH24Wr+PV55ti Veipv0Okj0GD8Ua0UPo7kiJOu+D5IgiZMWUHMtd/y+fvjbf36PI6IHE0KkpKTyA= =VLNo -----END PGP SIGNATURE----- --=-C+9Awuq4+HXb/KYe+7FO-- From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 02:16:59 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B56EA2CA for ; Tue, 20 Aug 2013 02:16:59 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm49-vm2.bullet.mail.gq1.yahoo.com (nm49-vm2.bullet.mail.gq1.yahoo.com [67.195.87.232]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3134B2767 for ; Tue, 20 Aug 2013 02:16:58 +0000 (UTC) Received: from [216.39.60.184] by nm49.bullet.mail.gq1.yahoo.com with NNFMP; 20 Aug 2013 02:09:53 -0000 Received: from [98.136.164.69] by tm20.bullet.mail.gq1.yahoo.com with NNFMP; 20 Aug 2013 02:09:53 -0000 Received: from [127.0.0.1] by smtp231.mail.gq1.yahoo.com with NNFMP; 20 Aug 2013 02:09:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376964593; bh=baVndpBu1CBQMGblo7WoUp0MU48u/b3RzhIl495fiEk=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=n6/OiU93guSvDo4GgtTMto75TVbwrPKsjk7ch7/gEHTyqYfQhMl/SVSQT6TmRGXZKg+OSq/5J0AMzToG3M4Ci6vxZ5EPMfeRZ9VB94yPEOt2ncoseGN222wc+EEAKGGzgZpSMPckHBq0N3JlqdbzvuIGzjhwebRKWsuC278KiYU= X-Yahoo-Newman-Id: 168180.71419.bm@smtp231.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Ht81JFUVM1ku2sFhOC8W3C4iPdsQHeDWs_WIjELRNQSi8hh FZTER6pNhqu7V.gEh6rvKwVLTodqyfAlDsFMPF2vipRUAECz911eIfwts0Sh Eb8Vu7zXhU9J0Y_F5Y82bSMLiojFguMYbB9GDuC_iMLhQoPLNNYB.80R08mg Cy6udzn7gREhr1H7o4kju5FSEUjke_aQR3cajG2PNshrUBzNNBeSzPhtDZ_h mFRfvtFoOxn2LN0FbF5AWyVf3e53xg_.zxrZvXFRvpeb2SJ4a6fFdrDNaddC yo5GJLw0BTXyXtxMkBrciQPOTG6I_gXhaCM8fjjtUHgWerf6IkVFf4UA7aom 4s1qO19uFyvRLWx93QSE0NgeUa_jJQmlqSOctEyhglVtjo5u3LQ3YFUqxfrO J5ZTQVrJazgNyn9jLG35XS2q00_tTTVwWvriGX4H_hCnvdH0VAER37poSEq_ 4Gq9C60AP_Tchs_9ErAsr4npp2z.L4nnPPkh0ioze06hKgtoCbu56TgyVuds hlYgA3ruYwshJfDIW0TliL9S_SDo0OhfQYJ40dLsgBOliWvjxnBTRL3ct X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp231.mail.gq1.yahoo.com with SMTP; 20 Aug 2013 02:09:53 +0000 UTC Subject: Re: Dlink DIR-825 B1 status [updated] From: Sean Bruno To: Jeff Roberson In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845843.1460.124.camel@localhost> <1376874381.35487.93.camel@localhost> <1376884332.1631.1.camel@localhost> <8d343e73-94b4-4f13-96f8-a062e3202288@email.android.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-dAEEIAlcFdSpSaxMLA3K" Date: Mon, 19 Aug 2013 19:09:52 -0700 Message-ID: <1376964592.1445.47.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-embedded , Jeff Roberson , "freebsd-mips@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 02:16:59 -0000 --=-dAEEIAlcFdSpSaxMLA3K Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Mon, 2013-08-19 at 09:57 -1000, Jeff Roberson wrote: > > > >>> On Sun, 2013-08-18 at 18:06 -0700, Sean Bruno wrote: > >>>> > >>>> Loading echi seems to lockup the router, but it does emit: > >>>> ehci0: at mem > >>>> 0x1b000000-0x1bffffff irq 1 on nexus0 > >>> > >>> Ah, I guess I needed to wait a bit longer to see the failure? > >>> > >>> # kldload /boot/kernel/ar71xx_ehci.ko > >>> ehci0: at mem > >>> 0x1b000000-0x1bffffff irq 1 on nexus0 > >>> vm_thread_new: kstack allocation failed >=20 > Can you go to line 159 of vm_init and change PAGE_SIZE to 1MB (1 * > 1024 *=20 > 1024) and tell me if that fixes it? >=20 > Thanks! > Jeff=20 I see you committed at svn r254545 this (more or less), so I built a new snap and burned it onto the flash, looks to be fixed! ehci0: at mem 0x1b000000-0x1bffffff irq 1 on nexus0 usbus0: set host controller mode usbus0: EHCI version 1.0 usbus0: set host controller mode usbus0 on ehci0 ehci0: usbpf: Attached usbus0: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 uhub0: 2 ports with 2 removable, self powered ugen0.2: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks =3D 0x0100 umass0:0:0:-1: Attached to scbus0 GEOM: new disk da0 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SCSI-4 device=20 da0: Serial Number ABCDEF0123456847 da0: 40.000MB/s transfers da0: 953869MB (1953525168 512 byte sectors: 255H 63S/T 121601C) da0: quirks=3D0x2 da0: Delete methods: MAP: No valid partition found at da0 Added "ar71xx_ehci umass" to kernel_modules and all appears well.=20 Sean --=-dAEEIAlcFdSpSaxMLA3K Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSEs/vAAoJEBkJRdwI6BaH8lUH/RONcT9PN2DTR0OIIXHypOOr d+SO24O46wB2AMe/4IiBckB/Ls2tvRKncnwqAw9U8uYMUDqhvRIiBY9dvdbnoKE9 27w8s/grs8cpoJfh8FQHcbDHsNtrIlSzSBSw1Xm9eocBQCM5bTZi30IcSWbaA64B OFKbEd1BVMKxy5l8k7kgb2eGQZdETixEJ86TEw7nIeAOKiYLebCoOmievxsiP4kT Gtsgd03GnzDX82AAt/ma7O7H9B5DoHyQK0pWGqXH1yr82SWhI8rVkbJwwh/s27cY DqI0WTvqEjznvCNbq0lmqr97O+Z8kZg+A5hMRS4/QRuol6Agfdz42NEHEC84yjY= =3+qA -----END PGP SIGNATURE----- --=-dAEEIAlcFdSpSaxMLA3K-- From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 05:14:22 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 02A9E5D3 for ; Tue, 20 Aug 2013 05:14:21 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm18-vm3.bullet.mail.ne1.yahoo.com (nm18-vm3.bullet.mail.ne1.yahoo.com [98.138.91.148]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 89CEB22D9 for ; Tue, 20 Aug 2013 05:14:21 +0000 (UTC) Received: from [98.138.90.51] by nm18.bullet.mail.ne1.yahoo.com with NNFMP; 20 Aug 2013 05:08:43 -0000 Received: from [98.138.226.63] by tm4.bullet.mail.ne1.yahoo.com with NNFMP; 20 Aug 2013 05:08:43 -0000 Received: from [127.0.0.1] by smtp214.mail.ne1.yahoo.com with NNFMP; 20 Aug 2013 05:08:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1376975323; bh=u5O/H7MijQHSpJC0LrrwnmMAGduZzC4YYAFDJ+2d3J0=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=uTb2O68em3BrexS8+nVwatAFhGpK29eqtl17T/m690kdAg6CLtj7rsslP3EUM7XwDxrjTTqy6rFPla/hlL5OU4GVMgqiVx72ZyS5HWIhM7CEj1eHo/8SO5n4pVVSGN3kxz3v6U5HWWg1aqQkx5mGCmCL53xlWBwAjQcf8oDUvhw= X-Yahoo-Newman-Id: 251834.13307.bm@smtp214.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: g0iYd1cVM1mzXUoP2ZQQTfCSIrFUp4g1HgtUfczIzgM2GWa wK1otAHx85ODLaY9na98i1qVRIA1oT0MlHaF7_Gslq98vCanC7ACgV2HSZxm Vz9ygP2fsMejW22QuvMFGJG6JfIvZdJNIu4Gs1BeDGZjtOuMNIxMMZDzkX1Q TrVfs8sItxeolXR9INMCP4g9fTRzc8OwYggbm.H_qoan.BTWXYBeDEUI6bpv d5_Jmo9QuBPB3VvuDmM95BRiK8sxLjpTyAUrNfU98rUS3wgYFA19m8kDl3wN sbdx945NV4_LXc5URB9H3lqRTY9mmcmW7Pgiv2Q_wmGKgdqNWMLdTHbeI7Tm HiOVqTG6cyeRdzngfSPV9mXrVgf8LNs0PVLkv1dAkr.jWsVx_15hZH4sJQ9. C7mUUuE911NSzCs8gj7Locnl8paxdNAVLdPZ0INwAX0PNXcyBzola_S.0wwt VfsX_eBO6.B2VWvNoc45t30Qvq9R6o54XUXS1KPyHYI8aCNutlZ4QEO78PWM GieO.cHEzo_ddbhkTnPou3Be7eM7lBBC6ai6wb56ZUico7V6fx7MmMnGG887 0cryaZw5.uzKXmiiKxTHJae6jFhNcGuJvXnOYLDUgw6Kf1XssWsMYZP.tg11 KzLflNDIYBgbFds7wTbNYlCMC14YLLw-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp214.mail.ne1.yahoo.com with SMTP; 19 Aug 2013 22:08:43 -0700 PDT Subject: Re: Dlink DIR-825 B1 status [update 2] From: Sean Bruno To: sbruno@freebsd.org In-Reply-To: <1374340359.1421.3.camel@localhost> References: <1374340359.1421.3.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-/WZsgRe9l7kNKt6e4WXl" Date: Mon, 19 Aug 2013 22:08:41 -0700 Message-ID: <1376975321.1445.62.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 05:14:22 -0000 --=-/WZsgRe9l7kNKt6e4WXl Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sat, 2013-07-20 at 10:12 -0700, Sean Bruno wrote: > Using adrian's build sys, I've been able to get this router up with > FreeBSD. There's no indication that it has wireless interfaces on it, > which is odd. >=20 > dmesg --> http://people.freebsd.org/~sbruno/dir_825_dmesg.txt Now that usb seems to be working, I took a stab at mounting a USB drive for use as a NAS or external storage. I started with a "known good" msdosfs formatted drive that works "just fine" on my other BSD hosts. This generated two patches to the kernel conf files: - sys/mips/conf/AR71XX_BASE -- uncomment MSDOSFS - sys/mips/conf/DIR-825 -- add options GEOM_PART_GPT -- http://people.freebsd.org/~sbruno/sys_mips_conf.diff and one patch to the freebsd-wifi buildsys: - build/bin/build_mfsroot -- add lib/libkiconv.so.4 for mount_msdosfs -- http://people.freebsd.org/~sbruno/build_mfs_root.diff Inserting a 4G disk with a 1G msdosfs partition seems to let me mount and poke at files. Inserting a 1TB disk with a "large" msdosfs partition fails pretty badly, so I'm not sure if msdosfs is sucking down all the memory on the system or we're just falling over for some unrelated reason. # mount -t msdosfs /dev/da0p1 /mnt MAP: No valid partition found at da0 MAP: No valid partition found at da0p1 mount_msdosfs: /dev/da0p1: Disk too big, try '-o large' mount option: Invalid argument # mount -t msdosfs -o large /dev/da0p1 /mnt panic: _mtx_lock_sleep: recursed on non-recursive mutex vm page free queue @ /home/sbruno/bsd/fbsd_head/sys/vm/vm_page.c:1930 KDB: enter: panic [ thread pid 4 tid 100022 ] Stopped at kdb_enter+0x4c: lui at,0x8039 db> bt Tracing pid 4 tid 100022 td 0x80665660 db_trace_thread+30 (?,?,?,?) ra c81e772800000018 sp 0 sz 0 80078d3c+114 (0,?,ffffffff,?) ra c81e774000000020 sp 100000000 sz 1 80078084+388 (?,?,?,?) ra c81e7760000000a8 sp 0 sz 0 db_command_loop+70 (?,?,?,?) ra c81e780800000018 sp 0 sz 0 8007ab80+f4 (?,?,?,?) ra c81e7820000001a8 sp 0 sz 0 kdb_trap+110 (?,?,?,?) ra c81e79c800000030 sp 0 sz 0 trap+c24 (?,?,?,?) ra c81e79f8000000b8 sp 0 sz 0 MipsKernGenException+134 (0,4,802ebfe8,133) ra c81e7ab0000000c8 sp 100000001 sz 1 kdb_enter+4c (?,?,?,?) ra c81e7b7800000018 sp 0 sz 0 80127320+ec (?,?,?,?) ra c81e7b9000000020 sp 0 sz 0 kassert_panic+78 (?,802f55d8,80309db8,78a) ra c81e7bb000000020 sp 1 sz 1 __mtx_lock_sleep+7c (?,?,?,?) ra c81e7bd000000028 sp 0 sz 0 __mtx_lock_flags+148 (?,?,?,?) ra c81e7bf800000030 sp 0 sz 0 vm_page_alloc_freelist+64 (?,?,?,?) ra c81e7c2800000020 sp 0 sz 0 uma_small_alloc+78 (?,?,?,?) ra c81e7c4800000020 sp 0 sz 0 80276120+d4 (?,?,?,?) ra c81e7c6800000038 sp 0 sz 0 80277324+224 (?,?,?,?) ra c81e7ca000000040 sp 0 sz 0 80279538+68 (?,?,?,?) ra c81e7ce000000028 sp 0 sz 0 802784b0+68 (83ffec60,83ff440c,?,101) ra c81e7d0800000038 sp 100000001 sz 0 uma_zalloc_arg+48c (?,?,?,?) ra c81e7d4000000038 sp 0 sz 0 vm_radix_insert+190 (806371b4,83ed4688,?,?) ra c81e7d7800000040 sp 100000001 sz 0 vm_page_cache+244 (?,?,?,?) ra c81e7db800000030 sp 0 sz 0 80295590+a10 (?,?,?,?) ra c81e7de800000070 sp 0 sz 0 fork_exit+b0 (?,?,?,?) ra c81e7e5800000028 sp 0 sz 0 fork_trampoline+10 (?,?,?,?) ra c81e7e8000000000 sp 0 sz 0 pid 4 --=-/WZsgRe9l7kNKt6e4WXl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSEvnZAAoJEBkJRdwI6BaHJMMH/0JeG2kRc7LnFt/IxtQWVOV9 ZK83U9P52GT7gRVG8/aHKpHWOKYLlJLUlMC/INhTU1x9ajapp9iq5RghtAPpZU3Y 1RUXzwta5bIYCe8VFzXsr98BQQasu+eWnCCMuo174nkw0S4sEF2AwUnKYGSvSH4X 0UcdCTt057A9jh2LffjH03FZjYvtuhrCDmTdJkjbZpaRjDSU6EDMOXj8sCMCOorp KC+Mn9Co1YN54ja6eE+yRnMsPCueG10oWRSfy45GMsvq9VdwrLJ2hS25qtRfF9MT nbEhXDgmmlzvVU28gBhp+3jyZSiw/N2U18gxsJ6rpwBtDIiXSl50e+T3k3oSn0k= =3waC -----END PGP SIGNATURE----- --=-/WZsgRe9l7kNKt6e4WXl-- From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 08:58:20 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0575C538; Tue, 20 Aug 2013 08:58:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 55A7A2E64; Tue, 20 Aug 2013 08:58:19 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id z12so122627wgg.34 for ; Tue, 20 Aug 2013 01:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ICqi/mbFkzFZUBfsSUIINrqc7cYz0IcZZuYyIVBoVLY=; b=AfVN6lMTuI4gpctEOtzN2zcJHrGCQIvKKuiyT0DVHuwERpJ3FhO6ME3wfyb8owV+B5 uyn+385c1Hpun6kvc2MA2pzXwcUZCnOK6Kv6BcgsUDZFACLPGcEvTuvBjuyhuJOz22rJ jd+nsMKpwFAEqQA6/u1HPE+OScSALh10HH/7qn3ML1Sw1ScAyNqOnvm/f7Jj87VBBS7o eY9qpzs3cYsrxKuhyu40wC+bNZLf9i27wt0drU7k06D92c3LSpUT+VDxPopahDQ5wOZO 7UJA6CQxSEK4LHnM87SOuufRu7Y7/AsgJpqyK+yfBiRt9iPeDadvBhAifX/7ZUT7/Oiq yvcg== MIME-Version: 1.0 X-Received: by 10.194.110.138 with SMTP id ia10mr473863wjb.3.1376989097325; Tue, 20 Aug 2013 01:58:17 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Tue, 20 Aug 2013 01:58:17 -0700 (PDT) In-Reply-To: <1376975321.1445.62.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376975321.1445.62.camel@localhost> Date: Tue, 20 Aug 2013 01:58:17 -0700 X-Google-Sender-Auth: wEvNtRx_I8AtJkWCJgkPPoY-XCo Message-ID: Subject: Re: Dlink DIR-825 B1 status [update 2] From: Adrian Chadd To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 08:58:20 -0000 woo! cc jeff and alan! It's a VM problem! :-) -adrian On 19 August 2013 22:08, Sean Bruno wrote: > On Sat, 2013-07-20 at 10:12 -0700, Sean Bruno wrote: > > Using adrian's build sys, I've been able to get this router up with > > FreeBSD. There's no indication that it has wireless interfaces on it, > > which is odd. > > > > dmesg --> http://people.freebsd.org/~sbruno/dir_825_dmesg.txt > > Now that usb seems to be working, I took a stab at mounting a USB drive > for use as a NAS or external storage. > > I started with a "known good" msdosfs formatted drive that works "just > fine" on my other BSD hosts. > > This generated two patches to the kernel conf files: > - sys/mips/conf/AR71XX_BASE > -- uncomment MSDOSFS > - sys/mips/conf/DIR-825 > -- add options GEOM_PART_GPT > -- http://people.freebsd.org/~sbruno/sys_mips_conf.diff > > and one patch to the freebsd-wifi buildsys: > - build/bin/build_mfsroot > -- add lib/libkiconv.so.4 for mount_msdosfs > -- http://people.freebsd.org/~sbruno/build_mfs_root.diff > > > Inserting a 4G disk with a 1G msdosfs partition seems to let me mount > and poke at files. > > Inserting a 1TB disk with a "large" msdosfs partition fails pretty > badly, so I'm not sure if msdosfs is sucking down all the memory on the > system or we're just falling over for some unrelated reason. > > > > # mount -t msdosfs /dev/da0p1 /mnt > MAP: No valid partition found at da0 > MAP: No valid partition found at da0p1 > mount_msdosfs: /dev/da0p1: Disk too big, try '-o large' mount option: > Invalid argument > # mount -t msdosfs -o large /dev/da0p1 /mnt > panic: _mtx_lock_sleep: recursed on non-recursive mutex vm page free > queue @ /home/sbruno/bsd/fbsd_head/sys/vm/vm_page.c:1930 > > KDB: enter: panic > [ thread pid 4 tid 100022 ] > Stopped at kdb_enter+0x4c: lui at,0x8039 > db> bt > Tracing pid 4 tid 100022 td 0x80665660 > db_trace_thread+30 (?,?,?,?) ra c81e772800000018 sp 0 sz 0 > 80078d3c+114 (0,?,ffffffff,?) ra c81e774000000020 sp 100000000 sz 1 > 80078084+388 (?,?,?,?) ra c81e7760000000a8 sp 0 sz 0 > db_command_loop+70 (?,?,?,?) ra c81e780800000018 sp 0 sz 0 > 8007ab80+f4 (?,?,?,?) ra c81e7820000001a8 sp 0 sz 0 > kdb_trap+110 (?,?,?,?) ra c81e79c800000030 sp 0 sz 0 > trap+c24 (?,?,?,?) ra c81e79f8000000b8 sp 0 sz 0 > MipsKernGenException+134 (0,4,802ebfe8,133) ra c81e7ab0000000c8 sp > 100000001 sz 1 > kdb_enter+4c (?,?,?,?) ra c81e7b7800000018 sp 0 sz 0 > 80127320+ec (?,?,?,?) ra c81e7b9000000020 sp 0 sz 0 > kassert_panic+78 (?,802f55d8,80309db8,78a) ra c81e7bb000000020 sp 1 sz 1 > __mtx_lock_sleep+7c (?,?,?,?) ra c81e7bd000000028 sp 0 sz 0 > __mtx_lock_flags+148 (?,?,?,?) ra c81e7bf800000030 sp 0 sz 0 > vm_page_alloc_freelist+64 (?,?,?,?) ra c81e7c2800000020 sp 0 sz 0 > uma_small_alloc+78 (?,?,?,?) ra c81e7c4800000020 sp 0 sz 0 > 80276120+d4 (?,?,?,?) ra c81e7c6800000038 sp 0 sz 0 > 80277324+224 (?,?,?,?) ra c81e7ca000000040 sp 0 sz 0 > 80279538+68 (?,?,?,?) ra c81e7ce000000028 sp 0 sz 0 > 802784b0+68 (83ffec60,83ff440c,?,101) ra c81e7d0800000038 sp 100000001 > sz 0 > uma_zalloc_arg+48c (?,?,?,?) ra c81e7d4000000038 sp 0 sz 0 > vm_radix_insert+190 (806371b4,83ed4688,?,?) ra c81e7d7800000040 sp > 100000001 sz 0 > vm_page_cache+244 (?,?,?,?) ra c81e7db800000030 sp 0 sz 0 > 80295590+a10 (?,?,?,?) ra c81e7de800000070 sp 0 sz 0 > fork_exit+b0 (?,?,?,?) ra c81e7e5800000028 sp 0 sz 0 > fork_trampoline+10 (?,?,?,?) ra c81e7e8000000000 sp 0 sz 0 > pid 4 > > From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 10:40:30 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 21F6E9B9; Tue, 20 Aug 2013 10:40:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC25A2443; Tue, 20 Aug 2013 10:40:29 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KAeTGb009367; Tue, 20 Aug 2013 10:40:29 GMT (envelope-from sbruno@freefall.freebsd.org) Received: (from sbruno@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7KAeTe9009366; Tue, 20 Aug 2013 10:40:29 GMT (envelope-from sbruno) Date: Tue, 20 Aug 2013 10:40:29 GMT Message-Id: <201308201040.r7KAeTe9009366@freefall.freebsd.org> To: loos.br@gmail.com, sbruno@FreeBSD.org, freebsd-embedded@FreeBSD.org From: sbruno@FreeBSD.org Subject: Re: kern/177878: [rtl8366rb] [patch] Update rtl8366rb switch driver to match changes on kern/177873 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 10:40:30 -0000 Synopsis: [rtl8366rb] [patch] Update rtl8366rb switch driver to match changes on kern/177873 State-Changed-From-To: open->closed State-Changed-By: sbruno State-Changed-When: Tue Aug 20 10:39:37 UTC 2013 State-Changed-Why: Comitted at svn r249752 http://www.freebsd.org/cgi/query-pr.cgi?pr=177878 From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 10:41:12 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 757B49EF; Tue, 20 Aug 2013 10:41:12 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B5CE244A; Tue, 20 Aug 2013 10:41:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KAfCDV010893; Tue, 20 Aug 2013 10:41:12 GMT (envelope-from sbruno@freefall.freebsd.org) Received: (from sbruno@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7KAfCJT010892; Tue, 20 Aug 2013 10:41:12 GMT (envelope-from sbruno) Date: Tue, 20 Aug 2013 10:41:12 GMT Message-Id: <201308201041.r7KAfCJT010892@freefall.freebsd.org> To: loos.br@gmail.com, sbruno@FreeBSD.org, freebsd-embedded@FreeBSD.org From: sbruno@FreeBSD.org Subject: Re: bin/177873: [patch] etherswitchcfg(): Change the per port vlangroup option to pvid X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 10:41:12 -0000 Synopsis: [patch] etherswitchcfg(): Change the per port vlangroup option to pvid State-Changed-From-To: open->closed State-Changed-By: sbruno State-Changed-When: Tue Aug 20 10:40:39 UTC 2013 State-Changed-Why: Committed at svn r249752 http://www.freebsd.org/cgi/query-pr.cgi?pr=177873 From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 10:41:46 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8161FA2A; Tue, 20 Aug 2013 10:41:46 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57331244F; Tue, 20 Aug 2013 10:41:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KAfkxH010946; Tue, 20 Aug 2013 10:41:46 GMT (envelope-from sbruno@freefall.freebsd.org) Received: (from sbruno@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7KAfk39010945; Tue, 20 Aug 2013 10:41:46 GMT (envelope-from sbruno) Date: Tue, 20 Aug 2013 10:41:46 GMT Message-Id: <201308201041.r7KAfk39010945@freefall.freebsd.org> To: loos.br@gmail.com, sbruno@FreeBSD.org, freebsd-embedded@FreeBSD.org From: sbruno@FreeBSD.org Subject: Re: bin/177872: [patch] etherswitchcfg(8) crashes if called with no argument for vlangroups members X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 10:41:46 -0000 Synopsis: [patch] etherswitchcfg(8) crashes if called with no argument for vlangroups members State-Changed-From-To: open->closed State-Changed-By: sbruno State-Changed-When: Tue Aug 20 10:41:18 UTC 2013 State-Changed-Why: Committed at svn r249748 http://www.freebsd.org/cgi/query-pr.cgi?pr=177872 From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 10:42:16 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9CB7A5B; Tue, 20 Aug 2013 10:42:16 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FCDC2455; Tue, 20 Aug 2013 10:42:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KAgGOw011000; Tue, 20 Aug 2013 10:42:16 GMT (envelope-from sbruno@freefall.freebsd.org) Received: (from sbruno@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7KAgG1P010999; Tue, 20 Aug 2013 10:42:16 GMT (envelope-from sbruno) Date: Tue, 20 Aug 2013 10:42:16 GMT Message-Id: <201308201042.r7KAgG1P010999@freefall.freebsd.org> To: loos.br@gmail.com, sbruno@FreeBSD.org, freebsd-embedded@FreeBSD.org From: sbruno@FreeBSD.org Subject: Re: bin/177871: [patch] etherswitchcfg(8): uninitialized variable while setting port vlangroup X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 10:42:16 -0000 Synopsis: [patch] etherswitchcfg(8): uninitialized variable while setting port vlangroup State-Changed-From-To: open->closed State-Changed-By: sbruno State-Changed-When: Tue Aug 20 10:41:49 UTC 2013 State-Changed-Why: Committed at svn r249747 http://www.freebsd.org/cgi/query-pr.cgi?pr=177871 From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 15:36:53 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1FC549E8 for ; Tue, 20 Aug 2013 15:36:53 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm8-vm2.bullet.mail.ne1.yahoo.com (nm8-vm2.bullet.mail.ne1.yahoo.com [98.138.90.156]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFD8F281D for ; Tue, 20 Aug 2013 15:36:52 +0000 (UTC) Received: from [98.138.90.56] by nm8.bullet.mail.ne1.yahoo.com with NNFMP; 20 Aug 2013 15:36:45 -0000 Received: from [98.138.226.30] by tm9.bullet.mail.ne1.yahoo.com with NNFMP; 20 Aug 2013 15:36:44 -0000 Received: from [127.0.0.1] by smtp201.mail.ne1.yahoo.com with NNFMP; 20 Aug 2013 15:36:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377013004; bh=uVLGC+CrtAQl+oPt3z863xd6dDcCFYSlj7lcSy1nJ88=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=0UpCaDqPHt/5sXy9It4DqvF1FQxHZ5Yb48US2MvncUbqoLlsYw6dH+OnDefm8266fjfwJvpCGpk4RqdxjAabwfG7Fdw4RRYdi38zoojwRIW5Im88H5fb7afY0LcL3kYS09ewMd689rEsWGUCedZrXrqJyenYUX1sjYAh70iBVwI= X-Yahoo-Newman-Id: 962584.19070.bm@smtp201.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: L5Xi_H4VM1mY1q1E6MqvUndS8FGwdlEizsWe4qqnp08BCk_ y5Dj49851N6JYW9SW.Xb6KqrEvy4a7ZkR8e7.zntHHg6JRuaUbZSwa0aX8wC WB40EKXqRiXGy0GN.5Hl3tSYuZq8FJwF8BQPbCcV93U8mu9C0ldjSZYu1qmY 7qR3ES7y0xVoEmAog9LPMIBPJUB3rSkYsDJeYKEkCHbCpB9CytuqZhDYgTO7 hr0Ehrter0tazEEVF.xIChynQxJ0mfUje9EtEvLwKAyIRQtnrZuDtSJkfyo4 uyu4da8AOmHZw5okn7ePkWEkWR2QLB.KHrTKSbOVJ0r4nTD530LwOq7aeXsS AQhg_1JB70BGPbfF1iSh9yOB7hfKIoHtWam4SgJZ7KQBhGxPOA6s6jf4SRpW Wlel2.XHNDYW3x7P97QYVx76yS2XvVyY84NL2O.p9KhCNOG8iBRmd7UvR7zX s6AhW9vgAXU_XYofbI8c9Nvj0LkQpYAQuk2fc7AlNI.M4EeZLEr_JhSLeANh nQTZck3804jZmXzfJNNtk4s00JJuna1AP7gaWJpSjXiUXluGrrUU- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.43.121] (sean_bruno@70.197.4.172 with ) by smtp201.mail.ne1.yahoo.com with SMTP; 20 Aug 2013 08:36:44 -0700 PDT Subject: Re: Dlink DIR-825 B1 status [update 2] From: Sean Bruno To: Adrian Chadd In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376975321.1445.62.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-s5rnEQBm33Art8HWQhwg" Date: Tue, 20 Aug 2013 08:36:42 -0700 Message-ID: <1377013002.1325.6.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 15:36:53 -0000 --=-s5rnEQBm33Art8HWQhwg Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tue, 2013-08-20 at 01:58 -0700, Adrian Chadd wrote: > woo! cc jeff and alan! It's a VM problem! :-) >=20 >=20 >=20 >=20 >=20 >=20 > -adrian >=20 >=20 Crash on our little mips router with head. > =20 > Inserting a 4G disk with a 1G msdosfs partition seems to let > me mount > and poke at files. > =20 > Inserting a 1TB disk with a "large" msdosfs partition fails > pretty > badly, so I'm not sure if msdosfs is sucking down all the > memory on the > system or we're just falling over for some unrelated reason. > =20 > =20 > =20 > # mount -t msdosfs /dev/da0p1 /mnt > MAP: No valid partition found at da0 > MAP: No valid partition found at da0p1 > mount_msdosfs: /dev/da0p1: Disk too big, try '-o large' mount > option: > Invalid argument > # mount -t msdosfs -o large /dev/da0p1 /mnt > panic: _mtx_lock_sleep: recursed on non-recursive mutex vm > page free > queue @ /home/sbruno/bsd/fbsd_head/sys/vm/vm_page.c:1930 > =20 > KDB: enter: panic > [ thread pid 4 tid 100022 ] > Stopped at kdb_enter+0x4c: lui at,0x8039 > db> bt > Tracing pid 4 tid 100022 td 0x80665660 > db_trace_thread+30 (?,?,?,?) ra c81e772800000018 sp 0 sz 0 > 80078d3c+114 (0,?,ffffffff,?) ra c81e774000000020 sp 100000000 > sz 1 > 80078084+388 (?,?,?,?) ra c81e7760000000a8 sp 0 sz 0 > db_command_loop+70 (?,?,?,?) ra c81e780800000018 sp 0 sz 0 > 8007ab80+f4 (?,?,?,?) ra c81e7820000001a8 sp 0 sz 0 > kdb_trap+110 (?,?,?,?) ra c81e79c800000030 sp 0 sz 0 > trap+c24 (?,?,?,?) ra c81e79f8000000b8 sp 0 sz 0 > MipsKernGenException+134 (0,4,802ebfe8,133) ra > c81e7ab0000000c8 sp > 100000001 sz 1 > kdb_enter+4c (?,?,?,?) ra c81e7b7800000018 sp 0 sz 0 > 80127320+ec (?,?,?,?) ra c81e7b9000000020 sp 0 sz 0 > kassert_panic+78 (?,802f55d8,80309db8,78a) ra c81e7bb000000020 > sp 1 sz 1 > __mtx_lock_sleep+7c (?,?,?,?) ra c81e7bd000000028 sp 0 sz 0 > __mtx_lock_flags+148 (?,?,?,?) ra c81e7bf800000030 sp 0 sz 0 > vm_page_alloc_freelist+64 (?,?,?,?) ra c81e7c2800000020 sp 0 > sz 0 > uma_small_alloc+78 (?,?,?,?) ra c81e7c4800000020 sp 0 sz 0 > 80276120+d4 (?,?,?,?) ra c81e7c6800000038 sp 0 sz 0 > 80277324+224 (?,?,?,?) ra c81e7ca000000040 sp 0 sz 0 > 80279538+68 (?,?,?,?) ra c81e7ce000000028 sp 0 sz 0 > 802784b0+68 (83ffec60,83ff440c,?,101) ra c81e7d0800000038 sp > 100000001 > sz 0 > uma_zalloc_arg+48c (?,?,?,?) ra c81e7d4000000038 sp 0 sz 0 > vm_radix_insert+190 (806371b4,83ed4688,?,?) ra > c81e7d7800000040 sp > 100000001 sz 0 > vm_page_cache+244 (?,?,?,?) ra c81e7db800000030 sp 0 sz 0 > 80295590+a10 (?,?,?,?) ra c81e7de800000070 sp 0 sz 0 > fork_exit+b0 (?,?,?,?) ra c81e7e5800000028 sp 0 sz 0 > fork_trampoline+10 (?,?,?,?) ra c81e7e8000000000 sp 0 sz 0 > pid 4 > =20 >=20 >=20 --=-s5rnEQBm33Art8HWQhwg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSE40GAAoJEBkJRdwI6BaHDHsH/1G7IugDklmK7qQiRA+l6RMQ 0hPzTx7wAHtZbNjM3nZYiFjje3w0ikBWXdL/E3K07HHZ84oeONd+sMEHqRuoPFp0 Bc6sQ2KB4xzcShbkS3ePpt9O/0spvQnu1rnEIelc48VCgXWiky+MOoGdsJWR10J1 qNjtrX6BWrsg+vLjQ9BAJ+wmUU6Qeq2eJaP49F77aPypMw1eNfbiLj8qhcTVgpwj dYakUJ3MsXtpnlbYWXQPXpjn4mY+o1a0uMhmAY845K/5cfnoIyzoQ7VZOK+m46Ww KpCUR2Y/6Dg1mz14WltPlzZGtUnSJ22l0RTquhYrMQBTUWiAbtez4LvSkrvrc9U= =rNnC -----END PGP SIGNATURE----- --=-s5rnEQBm33Art8HWQhwg-- From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 15:39:31 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E2EF9A81 for ; Tue, 20 Aug 2013 15:39:30 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm6-vm2.bullet.mail.gq1.yahoo.com (nm6-vm2.bullet.mail.gq1.yahoo.com [98.136.218.193]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A16C32841 for ; Tue, 20 Aug 2013 15:39:30 +0000 (UTC) Received: from [98.137.12.62] by nm6.bullet.mail.gq1.yahoo.com with NNFMP; 20 Aug 2013 15:39:16 -0000 Received: from [208.71.42.211] by tm7.bullet.mail.gq1.yahoo.com with NNFMP; 20 Aug 2013 15:39:16 -0000 Received: from [127.0.0.1] by smtp222.mail.gq1.yahoo.com with NNFMP; 20 Aug 2013 15:39:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377013156; bh=ji1mfH1/0S5KpawI5ViU9Bs/rBxzoJHvQwZ9qvNINCs=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=apfOLpDSp7DpmkQS+E8AzZfELrhWImoVx/MdUE2SN9Cy6KImMoU1eOGgWlpf4V7LyRISX+22HdrAhAOGHfrVbyUnecvsEOTdZv943U3B0AL7fo1IFFWYSokeJfPQbEhUqLB16uLEbHBqLmVhBoPV9Vwo4hKgVkJgVeAZJWq0auM= X-Yahoo-Newman-Id: 603316.75187.bm@smtp222.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: tbQ1ZUUVM1mT6bo8InBhLmePcW8q12QyAPK5kCJixzi8U7N WCFvP7iJ.0o1p0WuMsp2fIe9AEXbJItbbVJiD227_CyqIHvZ3itA_pxE_Hf0 WlgcGsQornVjOKoKjGPxJNoWnZ9Og0JXpAJ8RHMG8UQHYSdJ20qcuJEjzuYv fX9.1G7EzY4gQU4dthq5piLhmAdJYNirfKSZ9pJNEeFQfD.3q5iAG8U4A7dU NUJkibY5VfYsMTnECAobSIsNLf5HbtCx0iYCWEaqwaDVWh8teCfZ4DTvreuR XlCgh3xaRSXZtl5fWi6UBfOEW8jMxJvQ9BUey2G4zwOqpjDsmvtU45g75NRB JovrXlxu1SmZaNeOXHOeb_WRfhCXktr3G20kb9403.rXrKYBLeDsG8tg5Vlt fgvtglN7JNqcN9j48ai2BzwYlEdg6eTXe93dgJSDVEDXKAXD9UCxuOh.8WIS JwfkB7lbTY03XaUcwW_esRjKdC__AsWA10mwJgJYx5TcNYxwQ7JgPYe5IPOv a7ESDRfFtJdsFXB6g4ZGH55SYQR3h5BarUrZjOzu0s_6TGPskFSNEarhiJjt SWRjtPxP8daHnRtIhwlDoPj3eickSbmbKuxiX9U4Kk2MWLwzQYkAbTmz3RHB QRQzng5pw8HCuzk2yOH_9XvqdNVmEBfQ- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.43.121] (sean_bruno@70.197.4.172 with ) by smtp222.mail.gq1.yahoo.com with SMTP; 20 Aug 2013 15:39:16 +0000 UTC Subject: Re: Dlink DIR-825 B1 status [update 2] PATCHES? From: Sean Bruno To: Adrian Chadd In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376975321.1445.62.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-gKtde8a9lgBUkNx0aKwr" Date: Tue, 20 Aug 2013 08:39:14 -0700 Message-ID: <1377013154.1325.9.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 15:39:31 -0000 --=-gKtde8a9lgBUkNx0aKwr Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > =20 > This generated two patches to the kernel conf files: > - sys/mips/conf/AR71XX_BASE > -- uncomment MSDOSFS > - sys/mips/conf/DIR-825 > -- add options GEOM_PART_GPT > -- http://people.freebsd.org/~sbruno/sys_mips_conf.diff > =20 I think that this is a useful thing to enable by default. Thoughts? > and one patch to the freebsd-wifi buildsys: > - build/bin/build_mfsroot > -- add lib/libkiconv.so.4 for mount_msdosfs > -- http://people.freebsd.org/~sbruno/build_mfs_root.diff Please update your builder when you get a chance, this library is required by mount_msdosfs (this is not the libiconv provided by libc, but yet another iconv support library!). Sean --=-gKtde8a9lgBUkNx0aKwr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSE42iAAoJEBkJRdwI6BaHvy4H/1CAikvDOmnopWZUaZ9CydiV n8ifxwHhhT4zIZoxR3vKq8lmG5pvT6gZJ2AT6FqOn1XoiDpI3PasXDV+mNY0q2aX RYQIH2ukMGgjMu6GqLx0IU5xocEZRPX89GlnHvLS4zj16ph3EE9CBKTe6jUxdUjK mx3DJuKwYLF/iapVwdyE7wwNF6yUbpWdkg/fEz7S2OfyFo5rBZmW1zplC0cMApuF A/8RRV8EpIckKH6lqW0yPzsdA8z+ZXNaf907K9FVEEQtKD+empEcV5ujcU0nUQIT onX9OnwWDeG0cMiwmceG7z7Nqx8jmxcI2JCmzsNAyIhIrCOJqkQAYU2e9mrz8iw= =fD+R -----END PGP SIGNATURE----- --=-gKtde8a9lgBUkNx0aKwr-- From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 16:19:29 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 323FD548; Tue, 20 Aug 2013 16:19:29 +0000 (UTC) (envelope-from alc@rice.edu) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E8FA62B1B; Tue, 20 Aug 2013 16:19:28 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id r7KAvJjX012920; Tue, 20 Aug 2013 11:19:22 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp2.rice.edu with ESMTP id 1e96f93j21-1; Tue, 20 Aug 2013 11:19:22 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from adsl-216-63-78-18.dsl.hstntx.swbell.net (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id EDB96401A4; Tue, 20 Aug 2013 11:19:20 -0500 (CDT) Message-ID: <52139707.9060807@rice.edu> Date: Tue, 20 Aug 2013 11:19:19 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130127 Thunderbird/17.0.2 MIME-Version: 1.0 To: sbruno@freebsd.org Subject: Re: Dlink DIR-825 B1 status [update 2] References: <1374340359.1421.3.camel@localhost> <1376975321.1445.62.camel@localhost> <1377013002.1325.6.camel@localhost> In-Reply-To: <1377013002.1325.6.camel@localhost> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Sean Bruno , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 16:19:29 -0000 On 08/20/2013 10:36, Sean Bruno wrote: > On Tue, 2013-08-20 at 01:58 -0700, Adrian Chadd wrote: >> woo! cc jeff and alan! It's a VM problem! :-) >> >> >> >> >> >> >> -adrian >> >> > > > Crash on our little mips router with head. Try this: Index: vm/vm_page.c =================================================================== --- vm/vm_page.c (revision 254571) +++ vm/vm_page.c (working copy) @@ -1927,7 +1927,7 @@ vm_page_alloc_freelist(int flind, int req) /* * Do not allocate reserved pages unless the req has asked for it. */ - mtx_lock(&vm_page_queue_free_mtx); + mtx_lock_flags(&vm_page_queue_free_mtx, MTX_RECURSE); if (cnt.v_free_count + cnt.v_cache_count > cnt.v_free_reserved || (req_class == VM_ALLOC_SYSTEM && cnt.v_free_count + cnt.v_cache_count > cnt.v_interrupt_free_min) || > >> >> Inserting a 4G disk with a 1G msdosfs partition seems to let >> me mount >> and poke at files. >> >> Inserting a 1TB disk with a "large" msdosfs partition fails >> pretty >> badly, so I'm not sure if msdosfs is sucking down all the >> memory on the >> system or we're just falling over for some unrelated reason. >> >> >> >> # mount -t msdosfs /dev/da0p1 /mnt >> MAP: No valid partition found at da0 >> MAP: No valid partition found at da0p1 >> mount_msdosfs: /dev/da0p1: Disk too big, try '-o large' mount >> option: >> Invalid argument >> # mount -t msdosfs -o large /dev/da0p1 /mnt >> panic: _mtx_lock_sleep: recursed on non-recursive mutex vm >> page free >> queue @ /home/sbruno/bsd/fbsd_head/sys/vm/vm_page.c:1930 >> >> KDB: enter: panic >> [ thread pid 4 tid 100022 ] >> Stopped at kdb_enter+0x4c: lui at,0x8039 >> db> bt >> Tracing pid 4 tid 100022 td 0x80665660 >> db_trace_thread+30 (?,?,?,?) ra c81e772800000018 sp 0 sz 0 >> 80078d3c+114 (0,?,ffffffff,?) ra c81e774000000020 sp 100000000 >> sz 1 >> 80078084+388 (?,?,?,?) ra c81e7760000000a8 sp 0 sz 0 >> db_command_loop+70 (?,?,?,?) ra c81e780800000018 sp 0 sz 0 >> 8007ab80+f4 (?,?,?,?) ra c81e7820000001a8 sp 0 sz 0 >> kdb_trap+110 (?,?,?,?) ra c81e79c800000030 sp 0 sz 0 >> trap+c24 (?,?,?,?) ra c81e79f8000000b8 sp 0 sz 0 >> MipsKernGenException+134 (0,4,802ebfe8,133) ra >> c81e7ab0000000c8 sp >> 100000001 sz 1 >> kdb_enter+4c (?,?,?,?) ra c81e7b7800000018 sp 0 sz 0 >> 80127320+ec (?,?,?,?) ra c81e7b9000000020 sp 0 sz 0 >> kassert_panic+78 (?,802f55d8,80309db8,78a) ra c81e7bb000000020 >> sp 1 sz 1 >> __mtx_lock_sleep+7c (?,?,?,?) ra c81e7bd000000028 sp 0 sz 0 >> __mtx_lock_flags+148 (?,?,?,?) ra c81e7bf800000030 sp 0 sz 0 >> vm_page_alloc_freelist+64 (?,?,?,?) ra c81e7c2800000020 sp 0 >> sz 0 >> uma_small_alloc+78 (?,?,?,?) ra c81e7c4800000020 sp 0 sz 0 >> 80276120+d4 (?,?,?,?) ra c81e7c6800000038 sp 0 sz 0 >> 80277324+224 (?,?,?,?) ra c81e7ca000000040 sp 0 sz 0 >> 80279538+68 (?,?,?,?) ra c81e7ce000000028 sp 0 sz 0 >> 802784b0+68 (83ffec60,83ff440c,?,101) ra c81e7d0800000038 sp >> 100000001 >> sz 0 >> uma_zalloc_arg+48c (?,?,?,?) ra c81e7d4000000038 sp 0 sz 0 >> vm_radix_insert+190 (806371b4,83ed4688,?,?) ra >> c81e7d7800000040 sp >> 100000001 sz 0 >> vm_page_cache+244 (?,?,?,?) ra c81e7db800000030 sp 0 sz 0 >> 80295590+a10 (?,?,?,?) ra c81e7de800000070 sp 0 sz 0 >> fork_exit+b0 (?,?,?,?) ra c81e7e5800000028 sp 0 sz 0 >> fork_trampoline+10 (?,?,?,?) ra c81e7e8000000000 sp 0 sz 0 >> pid 4 >> >> >> > From owner-freebsd-embedded@FreeBSD.ORG Tue Aug 20 23:56:36 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C297E208 for ; Tue, 20 Aug 2013 23:56:36 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ee0-x233.google.com (mail-ee0-x233.google.com [IPv6:2a00:1450:4013:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 40AE524F0 for ; Tue, 20 Aug 2013 23:56:36 +0000 (UTC) Received: by mail-ee0-f51.google.com with SMTP id c1so493070eek.38 for ; Tue, 20 Aug 2013 16:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4jTgaWwoOIFrbMzWPutspdpkwuCLP5vUo60r21h3EOA=; b=i3Srgw785QRmqLI1+nEiKRHBy82afyZbCXZH8kgdHnlyjBKreQPll8pnH9rlqJ94D0 c4q1MDXH69c3t7ARMvY120H9p877sQtEJvEQ8uqGCIMEMyQhNTMeCDdwI6iDWBft70Aj F6j3nmBt/FdU+B78FQd4bXU/Yo/8vtQlzo8HucwO/dfmHFMWjL5YAZ+F77u/yD6lN0JD xcwBJ5esgm/aaej2jNkBXUscWF6LkfjvlLgdYLiH4zea7yvGmiFq0RUuv8Hf4grRD239 ZDkfDspOrUCckRxq7r9hQW6uONZ+MDDeoemROxcGOhIMbpg6X4isUD7y5U+ntl7mLwOc M+Ug== MIME-Version: 1.0 X-Received: by 10.14.108.9 with SMTP id p9mr5481641eeg.8.1377042994080; Tue, 20 Aug 2013 16:56:34 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Tue, 20 Aug 2013 16:56:33 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Tue, 20 Aug 2013 16:56:33 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Luiz Otavio O Souza Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 23:56:36 -0000 On Mon, Aug 19, 2013 at 10:09 AM, hiren panchasara < hiren.panchasara@gmail.com> wrote: > > > > On Mon, Aug 19, 2013 at 5:59 AM, Luiz Otavio O Souza wrote: > >> Hi Hiren, >> >> I've looked at ubnt firmwares and there are a few identifiers that i can >> gather: >> >> All the 'M' series (rockets, airgrids and many others) uses the same >> firmware identifier: 'XM'. >> >> The b/g 2Ghz radios uses the 'XS2' identifier and the 5Ghz models uses >> the 'XS5'. >> >> The original PicoStation2 HP firmware has the following identifier: >> >> $ hexdump -C PicoStation2HP-v4.0.3.build5058.bin >> 00000000 55 42 4e 54 58 53 32 2e 61 72 32 33 31 36 2e 76 >> |UBNTXS2.ar2316.v| >> 00000010 34 2e 30 2e 33 2e 35 30 35 38 2e 31 33 30 33 32 >> |4.0.3.5058.13032| >> 00000020 38 2e 31 30 35 34 00 00 00 00 00 00 00 00 00 00 >> |8.1054..........| >> 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >> |................| >> [...] >> >> Can you try to build an image using 'XS2' as the board type and >> 'XS2.ar2316.FreeBSD' as the version string ? >> >> If you create a correct image the update process will succeed even if the >> compression is wrong (the loader will fail to boot, but that is ok, we can >> hopefully fix the image later). >> >> The kernel load address and entry point set by mkfwimage for the XS2 >> board is different from what we expect: >> >> .name = "XS2", >> .kern_start = 0xbfc30000, >> .kern_memstart = 0x80041000, >> > .kern_entry = 0x80041000, >> .firmware_max_length= 0x00390000, >> > > kern_memstart is not there in the mkfwimage I am using but I thing that > should be fine. > > fwiw, I am using Adrian's > > http://freebsd-wifi-build.googlecode.com/svn/trunk/ > > > Trying rest of the things with XS2 and still getting the same result: > > ar7240> urescue > Setting default IP 192.168.1.20 > Starting TFTP server... > Using eth0 (192.168.1.20), address: 0x81000000 > Waiting for connection: / > Receiving file from 192.168.1.254:42436 > Received 6408760 bytes > Firmware check failed! (-2) > Alright so I think we've got a little further in the journey and got past this error. I think the "Firmware check failed!" error was coming because we were setting UBNT_VERSION = "XS2.ar2316.FreeBSD" while it was expecting something along the lines of "XS2.ar7240.FreeBSD" ar7240 is the key thing here afaik. In retrospect it seems obvious(?) because when I drop into uboot after powering on the device, the prompt for uboot is: ar7240> That probably was the indication to not use ar2316 in version string. But who knew :-) Now after accepting the image it fails at a different point: Receiving file from 192.168.1.254:56679 Received 6300568 bytes Firmware Version: XS2.ar7240.FreeBSD Setting U-Boot environment variables Un-Protected 1 sectors Erasing Flash.... done Erased 1 sectors Writing to Flash... done Protected 1 sectors Copying partition 'kernel' to flash memory: erasing range 0x9F050000..0x9F19FFFF: ..................... done Erased 21 sectors writing to address 0x9f050000, length 0x00150000 ... Copying partition 'rootfs' to flash memory: erasing range 0x9F1A0000..0x9F65FFFF: ............................................................................ done Erased 76 sectors writing to address 0x9f1a0000, length 0x004c0000 ... Firmware update complete. Resetting... U-Boot 1.1.4.2-s594 (Dec 5 2012 - 15:23:07) Board: Ubiquiti Networks XM board (rev 1.0 e302) DRAM: 32 MB Flash: 8 MB PCIe WLAN Module found (#1). Net: eth0, eth1 Hit any key to stop autoboot: 0 ## Booting image at 9f050000 ... Bad Magic Number Boot failed: resetting... U-Boot 1.1.4.2-s594 (Dec 5 2012 - 15:23:07) Board: Ubiquiti Networks XM board (rev 1.0 e302) DRAM: 32 MB Flash: 8 MB PCIe WLAN Module found (#1). Net: eth0, eth1 Hit any key to stop autoboot: 0 ## Booting image at 9f050000 ... Bad Magic Number Boot failed: resetting... So, its stuck in this loop now. I also tried ar7240> bootm 0x80041000 ## Booting image at 80041000 ... Bad Magic Number ar7240> bootm 0xa8030000 ## Booting image at a8030000 ... Bad Magic Number Just for catching something obvious, ar7240> printenv bootdelay=1 baudrate=115200 ethaddr=00:15:6d:0d:00:00 mtdids=nor0=ar7240-nor0 filesize=10000 fileaddr=81000000 serverip=192.168.1.254 ethact=eth0 mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1344k(kernel),5440k(rootfs),256k(cfg),64k(EEPROM) bootcmd=bootm 0x9f050000 bootargs=console=tty0 root=31:03 rootfstype=squashfs init=/init ipaddr=192.168.1.20 stdin=serial stdout=serial stderr=serial cheers, Hiren From owner-freebsd-embedded@FreeBSD.ORG Wed Aug 21 04:14:17 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E39C8A3 for ; Wed, 21 Aug 2013 04:14:17 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm29-vm8.bullet.mail.gq1.yahoo.com (nm29-vm8.bullet.mail.gq1.yahoo.com [98.136.216.183]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3F29A2267 for ; Wed, 21 Aug 2013 04:14:17 +0000 (UTC) Received: from [98.137.12.174] by nm29.bullet.mail.gq1.yahoo.com with NNFMP; 21 Aug 2013 04:07:38 -0000 Received: from [98.136.164.65] by tm13.bullet.mail.gq1.yahoo.com with NNFMP; 21 Aug 2013 04:07:38 -0000 Received: from [127.0.0.1] by smtp227.mail.gq1.yahoo.com with NNFMP; 21 Aug 2013 04:07:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377058057; bh=b+QY/lke2eoJ5SsBs+o0oJo5iZ3v100+E9gysq8hxD0=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=d6ng5A/V3CWKJZjAmiyXijoVTepSK9BEii0zVNOcpKgq/JRXRa96SUSUIAEd6p4kAjmmWWST+zDlw6qAe5ODS4daUJ/Cdw5Ey7gJVpzLCeI971isB50IFfY2S5pTJ4dFao9aCcPOTbHWKDeiiMceEkiG67snspKiXyV6dZEbeSs= X-Yahoo-Newman-Id: 984140.98156.bm@smtp227.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _v45PE4VM1nm.pyJjO0RtydjxZS0CozYjQ.qftDhLmYBE3w tyTqzHmhaX3ujkH8qUu_C3rh3q58jaDcVByX.CJ70MTa0UqU0C5NKdOPm57u _GxMcDXlZJcCtQoUd9dpXmQ0A2xSpvz1IkenXS3nWxVzLCu3wpD23ibxzAhR 72N4S7jIg1d_CQiQRDdUJIcG_COOg8H0zSeEdhuEM7DgevgKeVzFDMFthvcj Rw3RxdoC8EEluXXf.8CEJ6NNWP3hXUnUebHY5aHMsMSs3RDHP6DlSu59oF3d GI99dF_mNvPRLGKgBwFEPVtg4XP53s31XnX1ntA5UAuC0FSaQXx7Cxo2y.6U E93Dc.i3wFUz34NguyfMHAszA4ipSVdtkRXIRfzVU3dGd0f8LjJSDrEycRpu uKTkqthHxD2hdTnaRPq6CDkr9x9YbqVX5HmkaCKT8CEUFg6gKbV9nV1j_fWp 2qFkMDGbbXym8o6DMl7rEP2GNkl1G_NZbvogxdIF0vm4FpaP_43Nksvya3q7 JaELU8un4LoNMUg6UsSXumVHMc0QeVLdnfGzEGP.C6rsDU9g8fB0Oz.bX X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp227.mail.gq1.yahoo.com with SMTP; 21 Aug 2013 04:07:37 +0000 UTC Subject: Re: Dlink DIR-825 B1 status [update 2] [fixed!] From: Sean Bruno To: Alan Cox In-Reply-To: <52139707.9060807@rice.edu> References: <1374340359.1421.3.camel@localhost> <1376975321.1445.62.camel@localhost> <1377013002.1325.6.camel@localhost> <52139707.9060807@rice.edu> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-PL64ZWk55NzrBx1qADhe" Date: Tue, 20 Aug 2013 21:07:30 -0700 Message-ID: <1377058050.2345.4.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 04:14:17 -0000 --=-PL64ZWk55NzrBx1qADhe Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tue, 2013-08-20 at 11:19 -0500, Alan Cox wrote: > Try this: >=20 > Index: vm/vm_page.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- vm/vm_page.c (revision 254571) > +++ vm/vm_page.c (working copy) > @@ -1927,7 +1927,7 @@ vm_page_alloc_freelist(int flind, int req) > /* > * Do not allocate reserved pages unless the req has asked for > it. > */ > - mtx_lock(&vm_page_queue_free_mtx); > + mtx_lock_flags(&vm_page_queue_free_mtx, MTX_RECURSE); > if (cnt.v_free_count + cnt.v_cache_count > cnt.v_free_reserved > || > (req_class =3D=3D VM_ALLOC_SYSTEM && > cnt.v_free_count + cnt.v_cache_count > > cnt.v_interrupt_free_min) ||=20 Fixed! It *does* take a while to mount though. :-) Note the I'm hitting on the console because the 1TB drive caused the mount command to go for quite a long time. # kldstat Id Refs Address Size Name 1 40 0x80050000 4a8d60 kernel 2 1 0xc0101000 1078 if_ath_pci.ko 3 1 0xc0103000 120c1c if_ath.ko 4 4 0xc0224000 620dc wlan.ko 5 2 0xc0287000 4da4 bridgestp.ko 6 1 0xc028c000 76e0 if_bridge.ko 7 1 0xc0294000 a7e0 random.ko 8 1 0xc029f000 3ac wlan_xauth.ko 9 1 0xc02a0000 2a94 wlan_tkip.ko 10 1 0xc02a3000 a2cc ar71xx_ehci.ko 11 2 0xc02ae000 2d610 usb.ko 12 1 0xc02dc000 6784 umass.ko # ugen0.2: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks =3D 0x0100 umass0:0:0:-1: Attached to scbus0 GEOM: new disk da0 da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SCSI-4 device=20 da0: Serial Number ABCDEF0123456847 da0: 40.000MB/s transfers da0: 953869MB (1953525168 512 byte sectors: 255H 63S/T 121601C) da0: quirks=3D0x2 da0: Delete methods: MAP: No valid partition found at da0 MAP: No valid partition found at da0p1 # mount -t msdosfs -o large /dev/da0p1 /mnt load: 1.33 cmd: mount_msdosfs 242 [biord] 11.76r 0.00u 3.73s 11% 700k load: 1.33 cmd: mount_msdosfs 242 [biord] 12.74r 0.00u 4.12s 12% 700k load: 1.30 cmd: mount_msdosfs 242 [biord] 13.66r 0.00u 4.49s 14% 700k load: 1.30 cmd: mount_msdosfs 242 [biord] 14.80r 0.00u 4.96s 15% 700k load: 1.30 cmd: mount_msdosfs 242 [biord] 15.40r 0.00u 5.21s 15% 700k load: 1.30 cmd: mount_msdosfs 242 [biord] 16.95r 0.00u 5.84s 17% 700k load: 1.30 cmd: mount_msdosfs 242 [biord] 18.15r 0.00u 6.33s 18% 700k load: 1.28 cmd: mount_msdosfs 242 [biord] 19.92r 0.00u 7.06s 20% 700k load: 1.28 cmd: mount_msdosfs 242 [biord] 20.76r 0.00u 7.40s 21% 700k load: 1.26 cmd: mount_msdosfs 242 [biord] 24.70r 0.00u 9.02s 24% 700k load: 1.26 cmd: mount_msdosfs 242 [biord] 25.56r 0.00u 9.37s 24% 700k load: 1.26 cmd: mount_msdosfs 242 [biord] 25.96r 0.00u 9.54s 25% 700k load: 1.26 cmd: mount_msdosfs 242 [biord] 26.65r 0.00u 9.82s 26% 700k load: 1.26 cmd: mount_msdosfs 242 [biord] 26.91r 0.00u 9.92s 26% 700k load: 1.26 cmd: mount_msdosfs 242 [runnable] 27.11r 0.00u 10.01s 26% 700k load: 1.26 cmd: mount_msdosfs 242 [biord] 27.31r 0.00u 10.09s 26% 700k load: 1.26 cmd: mount_msdosfs 242 [biord] 27.57r 0.00u 10.19s 26% 700k load: 1.24 cmd: mount_msdosfs 242 [biord] 29.58r 0.00u 11.02s 27% 700k load: 1.24 cmd: mount_msdosfs 242 [biord] 33.33r 0.00u 12.53s 29% 700k load: 1.22 cmd: mount_msdosfs 242 [biord] 34.23r 0.00u 12.90s 29% 700k load: 1.22 cmd: mount_msdosfs 242 [biord] 35.18r 0.00u 13.29s 30% 700k load: 1.22 cmd: mount_msdosfs 242 [biord] 36.23r 0.00u 13.72s 30% 700k load: 1.22 cmd: mount_msdosfs 242 [vnread] 37.25r 0.00u 13.99s 30% 732k # df -k Filesystem 1024-blocks Used Avail Capacity Mounted on /dev/map/rootfs.uncompress 21983 20765 -540 103% / devfs 1 1 0 100% /dev /dev/md0 828 8 756 1% /tmp /dev/md1 828 60 704 8% /var /dev/md2 828 440 324 58% /etc /dev/da0p1 976524128 329609728 646914400 34% /mnt #=20 --=-PL64ZWk55NzrBx1qADhe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSFDz+AAoJEBkJRdwI6BaH5JEH/24prfA5KCzjcAuelwRd9fsD tDMv4HOuBiaKxRHxPQMpf7CaLMXG2n1PH52hgJryfGLhRn4Q7CfRsVjjtliCqfwx EtccVSzZuuZBO1oycUtMk8KqroJGHHf+mo1AdLFafUGp1nOTNd8uyM8lVXuI4rKL ojGho3QfcviGBS0pSAPWS0o5KYgmEg07oYdr1iajEPsppSmyfmWCvR1fMabDCVNA 2MjgHgrIigFBSA3QvydMRcRDnqmubtIvqcQUaCtxrRy+7QgqMbfB2fBPFEcaaeBD 4k8CXy87IIkQT/9gbWiWHsGuU53+J3GmNp46fVyuxD9roE+ccJg1u2ad4y5BtXo= =QnMC -----END PGP SIGNATURE----- --=-PL64ZWk55NzrBx1qADhe-- From owner-freebsd-embedded@FreeBSD.ORG Wed Aug 21 09:58:53 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1564B48B; Wed, 21 Aug 2013 09:58:53 +0000 (UTC) (envelope-from kibab@olymp.kibab.com) Received: from olymp.kibab.com (olymp6.kibab.com [IPv6:2a01:4f8:160:84c1::2]) by mx1.freebsd.org (Postfix) with ESMTP id EE1972C62; Wed, 21 Aug 2013 09:58:51 +0000 (UTC) X-DKIM: OpenDKIM Filter v2.5.2 olymp.kibab.com E38F33F448 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bakulin.de; s=default; t=1377079129; bh=H7Xi6qPlIQ7qGA9XKUJz6RiiZWltytYJdpApvl5llnc=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=pUNq765mn4fa+lLYKjTHWyMVbjz4jNcRDyC8Qym1MYKXb9pWKL78dmEY65otNMiP7 KHbiy3pWDULJQp5VA+4WuW77HEwHAg37tr5Kf9HyfTor38Zv4/PLe+jgs/bbnPwrlg 7e2nKNk/KlvIWbJfZIYK0wpKZsuXBlfNAGfpfcVk= Date: Wed, 21 Aug 2013 11:58:49 +0200 From: Ilya Bakulin To: Warner Losh , Alexander Motin , Adrian Chadd Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug Message-ID: <20130821095849.GA7322@olymp.kibab.com> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51D5FE4C.9060102@bakulin.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 09:58:53 -0000 So, after fixing some bugs in my own code and adding a couple of bus methods I am finally able to load the firmware onto the card and receive "Firmare started" message. Next step will be adding support for setting IRQ handlers (SDIO stack) and writing the code to connect mv_sdiowl driver to our net80211 stack (Adrian I hope you will help with this). As SD8787 adapter uses the binary firmware, I had to import it in the tree. As I'm doing all testing without any root FS, I compile the formware blob into the kernel. The patch below is therefore incomplete; full snapshot is kept under [1]. To activate mv_sdiowl driver, add mmc, mv_sdio, mv_sdiowl and mv_sdiowl_fw to the kernel config. [1] https://github.com/kibab/freebsd/compare/master...kibab-dplug#files_bucket I will keep you all updated. -- Ilya diff --git a/sys/arm/mv/files.mv b/sys/arm/mv/files.mv index 116356d..489ac00 100644 --- a/sys/arm/mv/files.mv +++ b/sys/arm/mv/files.mv @@ -32,6 +32,8 @@ arm/mv/mv_sata.c optional ata | atamvsata arm/mv/mv_ts.c standard arm/mv/timer.c standard arm/mv/twsi.c optional iicbus +arm/mv/mv_sdio.c optional mv_sdio +arm/mv/mv_sdiowl.c optional mv_sdiowl dev/cesa/cesa.c optional cesa dev/mge/if_mge.c optional mge @@ -41,3 +43,23 @@ dev/uart/uart_dev_ns8250.c optional uart dev/usb/controller/ehci_mv.c optional ehci kern/kern_clocksource.c standard + +mv_sdiowl_fw.c optional mv_sdiowl_fw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk sd8787_uapsta.bin:sdiowl_fw -msdiowl_fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "mv_sdiowl_fw.c" +# +# NB: ld encodes the path in the binary symbols generated for the +# firmware image so link the file to the object directory to +# get known values for reference in the _fw.c file. +# +sd8787_uapsta.fwo optional mv_sdiowl_fw \ + dependency "sd8787_uapsta.bin" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} sd8787_uapsta.bin" \ + no-implicit-rule \ + clean "sd8787_uapsta.fwo" +sd8787_uapsta.bin optional mv_sdiowl_fw \ + dependency "$S/contrib/dev/mv_sdiowl/sd8787_uapsta.bin.uu" \ + compile-with "uudecode < $S/contrib/dev/mv_sdiowl/sd8787_uapsta.bin.uu" \ + no-obj no-implicit-rule \ + clean "sd8787_uapsta.bin" diff --git a/sys/arm/mv/mv_sdio.c b/sys/arm/mv/mv_sdio.c new file mode 100644 index 0000000..b1c9edc --- /dev/null +++ b/sys/arm/mv/mv_sdio.c @@ -0,0 +1,1684 @@ +/*- + * Copyright (c) 2009 Semihalf, Rafal Czubak + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Driver for Marvell Integrated SDIO Host Controller. + * Works stable in DMA mode. PIO mode has problems with large data transfers + * (timeouts). + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include "mmcbr_if.h" + +#include "mv_sdio.h" + +/* Minimum DMA segment size. */ +#define MV_SDIO_DMA_SEGMENT_SIZE 4096 + +/* Transferred block size. */ +#define MV_SDIO_BLOCK_SIZE 512 + +/* Maximum number of blocks the controller can handle. */ +#define MV_SDIO_BLOCKS_MAX 65535 + +/* Halfword bit masks used for command response extraction. */ +#define MV_SDIO_RSP48_BM2 0x0003 /* Lower 2 bits. */ +#define MV_SDIO_RSP48_BM6 0x003f /* Lower 6 bits. */ +#define MV_SDIO_RSP48_BM16 0xffff /* 16 bits */ + +/* SDIO aggregated command interrupts */ +#define MV_SDIO_IRQS_CMD (MV_SDIO_IRQ_CMD | MV_SDIO_IRQ_UNEXPECTED_RSP) +#define MV_SDIO_EIRQS_CMD (MV_SDIO_EIRQ_CMD_TMO | MV_SDIO_EIRQ_CMD_CRC7 | \ + MV_SDIO_EIRQ_CMD_ENDBIT | MV_SDIO_EIRQ_CMD_INDEX | \ + MV_SDIO_EIRQ_CMD_STARTBIT | MV_SDIO_EIRQ_RSP_TBIT) + +/* SDIO aggregated data interrupts */ +#define MV_SDIO_IRQS_DATA (MV_SDIO_IRQ_XFER | MV_SDIO_IRQ_TX_EMPTY | \ + MV_SDIO_IRQ_RX_FULL | MV_SDIO_IRQ_DMA | MV_SDIO_IRQ_AUTOCMD12) +#define MV_SDIO_EIRQS_DATA (MV_SDIO_EIRQ_DATA_TMO | \ + MV_SDIO_EIRQ_DATA_CRC16 | MV_SDIO_EIRQ_DATA_ENDBIT | \ + MV_SDIO_EIRQ_AUTOCMD12 | MV_SDIO_EIRQ_XFER_SIZE | \ + MV_SDIO_EIRQ_CRC_ENDBIT | MV_SDIO_EIRQ_CRC_STARTBIT | \ + MV_SDIO_EIRQ_CRC_STAT) + +/* + * Timing configuration. + */ + +/* SDIO controller base clock frequency. */ +#define MV_SDIO_F_BASE 100000000 /* 200 MHz */ + +/* Maximum SD clock frequency. */ +#define MV_SDIO_F_MAX (MV_SDIO_F_BASE / 2) /* 50 MHz */ + +/* Maximum timeout value. */ +#define MV_SDIO_TMO_MAX 0xf + +/* Reset delay in microseconds. */ +#define MV_SDIO_RESET_DELAY 10000 /* 10 ms */ + +/* Empty FIFO polling delay. */ +#define MV_SDIO_FIFO_EMPTY_DELAY 1000 /* 1 ms */ + +/* Delays between operations on multiple blocks. */ +#define MV_SDIO_RD_DELAY 50 /*50*/ /* Read access time. */ +#define MV_SDIO_WR_DELAY 10 /*10*/ /* Write access time. */ + +/* Maximum clock divider value. */ +#define MV_SDIO_CLK_DIV_MAX 0x7ff + +struct mv_sdio_softc { + device_t sc_dev; + device_t sc_child; + + bus_space_handle_t sc_bsh; + bus_space_tag_t sc_bst; + + int sc_use_dma; + bus_dma_tag_t sc_dmatag; + bus_dmamap_t sc_dmamap; + uint8_t *sc_dmamem; + bus_addr_t sc_physaddr; + int sc_mapped; + size_t sc_dma_size; + + struct resource *sc_mem_res; + int sc_mem_rid; + + struct resource *sc_irq_res; + int sc_irq_rid; + void *sc_ihl; + + struct resource *sc_cd_irq_res; + int sc_cd_irq_rid; + void *sc_cd_ihl; + + uint32_t sc_irq_mask; + uint32_t sc_eirq_mask; + + struct task sc_card_task; + struct callout sc_card_callout; + + struct mtx sc_mtx; + + int sc_bus_busy; + int sc_card_present; + struct mmc_host sc_host; + struct mmc_request *sc_req; + struct mmc_command *sc_curcmd; + + uint32_t sc_data_offset; +}; + +/* Read/write data from/to registers.*/ +static uint32_t MV_SDIO_RD4(struct mv_sdio_softc *, bus_size_t); +static void MV_SDIO_WR4(struct mv_sdio_softc *, bus_size_t, uint32_t); + +static int mv_sdio_probe(device_t); +static int mv_sdio_attach(device_t); + +static int mv_sdio_read_ivar(device_t, device_t, int, uintptr_t *); +static int mv_sdio_write_ivar(device_t, device_t, int, uintptr_t); + +static int mv_sdio_update_ios(device_t, device_t); +static int mv_sdio_request(device_t, device_t, struct mmc_request *); +static int mv_sdio_get_ro(device_t, device_t); +static int mv_sdio_acquire_host(device_t, device_t); +static int mv_sdio_release_host(device_t, device_t); + +/* Finalizes active MMC request. */ +static void mv_sdio_finalize_request(struct mv_sdio_softc *); + +/* Initializes controller's registers. */ +static void mv_sdio_init(device_t); + +/* Initializes host structure. */ +static void mv_sdio_init_host(struct mv_sdio_softc *); + +/* Used to add and handle sysctls. */ +static void mv_sdio_add_sysctls(struct mv_sdio_softc *); +static int mv_sdio_sysctl_use_dma(SYSCTL_HANDLER_ARGS); + +/* DMA initialization and cleanup functions. */ +static int mv_sdio_dma_init(struct mv_sdio_softc *); +static void mv_sdio_dma_finish(struct mv_sdio_softc *); + +/* DMA map load callback. */ +static void mv_sdio_getaddr(void *, bus_dma_segment_t *, int, int); + +/* Prepare command/data before transaction. */ +static int mv_sdio_start_command(struct mv_sdio_softc *, struct + mmc_command *); +static int mv_sdio_start_data(struct mv_sdio_softc *, struct mmc_data *); + +/* Finish command after transaction. */ +static void mv_sdio_finish_command(struct mv_sdio_softc *); + +/* Response handling. */ +static void mv_sdio_handle_136bit_resp(struct mv_sdio_softc *); +static void mv_sdio_handle_48bit_resp(struct mv_sdio_softc *, + struct mmc_command *); + +/* Interrupt handler and interrupt helper functions. */ +static void mv_sdio_intr(void *); +static void mv_sdio_cmd_intr(struct mv_sdio_softc *, uint32_t, uint32_t); +static void mv_sdio_data_intr(struct mv_sdio_softc *, uint32_t, uint32_t); +static void mv_sdio_disable_intr(struct mv_sdio_softc *); + +/* Used after card detect interrupt has been handled. */ +static void mv_sdio_card_task(void *, int); + +/* Read/write data from FIFO in PIO mode. */ +static uint32_t mv_sdio_read_fifo(struct mv_sdio_softc *); +static void mv_sdio_write_fifo(struct mv_sdio_softc *, uint32_t); + +/* + * PIO mode handling. + * + * Inspired by sdhci(4) driver routines. + */ +static void mv_sdio_transfer_pio(struct mv_sdio_softc *); +static void mv_sdio_read_block_pio(struct mv_sdio_softc *); +static void mv_sdio_write_block_pio(struct mv_sdio_softc *); + + +static device_method_t mv_sdio_methods[] = { + /* device_if */ + DEVMETHOD(device_probe, mv_sdio_probe), + DEVMETHOD(device_attach, mv_sdio_attach), + + /* Bus interface */ + DEVMETHOD(bus_read_ivar, mv_sdio_read_ivar), + DEVMETHOD(bus_write_ivar, mv_sdio_write_ivar), + + /* mmcbr_if */ + DEVMETHOD(mmcbr_update_ios, mv_sdio_update_ios), + DEVMETHOD(mmcbr_request, mv_sdio_request), + DEVMETHOD(mmcbr_get_ro, mv_sdio_get_ro), + DEVMETHOD(mmcbr_acquire_host, mv_sdio_acquire_host), + DEVMETHOD(mmcbr_release_host, mv_sdio_release_host), + + {0, 0}, +}; + +static driver_t mv_sdio_driver = { + "sdio", + mv_sdio_methods, + sizeof(struct mv_sdio_softc), +}; +static devclass_t mv_sdio_devclass; + +DRIVER_MODULE( sdio, simplebus, mv_sdio_driver, mv_sdio_devclass, 0, 0); + + +static __inline uint32_t +MV_SDIO_RD4(struct mv_sdio_softc *sc, bus_size_t off) +{ + + return (bus_read_4(sc->sc_mem_res, off)); +} + +static __inline void +MV_SDIO_WR4(struct mv_sdio_softc *sc, bus_size_t off, uint32_t val) +{ + + bus_write_4(sc->sc_mem_res, off, val); +} + +static int platform_sdio_slot_signal( int signal ) +{ + switch( signal ) + { + case MV_SDIO_SIG_CD: + { + return -1; + break; + } + case MV_SDIO_SIG_WP: + return 0; + break; + default: + return -1; + break; + } + + return 0; +} + +static int +mv_sdio_probe(device_t dev) +{ + uint32_t device, revision; + + if (!ofw_bus_is_compatible(dev, "mrvl,sdio")) + return (ENXIO); + + + soc_id(&device, &revision); + + switch (device) { + case MV_DEV_88F6281: + break; + default: + return (ENXIO); + } + + device_set_desc(dev, "Marvell Integrated SDIO Host Controller"); + + return (BUS_PROBE_SPECIFIC); +} + +static int +mv_sdio_attach(device_t dev) +{ + struct mv_sdio_softc *sc; + int task_initialized = 0; + + sc = device_get_softc(dev); + sc->sc_dev = dev; + + mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_DEF); + + /* Allocate memory and interrupt resources. */ + sc->sc_mem_rid = 0; + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->sc_mem_rid, RF_ACTIVE); + + if (sc->sc_mem_res == NULL) { + device_printf(dev, "Could not allocate memory!\n"); + goto fail; + } + + sc->sc_irq_rid = 0; + sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, + &sc->sc_irq_rid, RF_ACTIVE); + + if (sc->sc_irq_res == NULL) { + device_printf(dev, "Could not allocate IRQ!\n"); + goto fail; + } + + sc->sc_bst = rman_get_bustag(sc->sc_mem_res); + sc->sc_bsh = rman_get_bushandle(sc->sc_mem_res); + + + /* Initialize host controller's registers. */ + mv_sdio_init(dev); + + /* Try to setup DMA. */ + sc->sc_mapped = 0; /* No DMA buffer is mapped. */ + sc->sc_use_dma = 1; /* DMA mode is preferred to PIO mode. */ + + if (mv_sdio_dma_init(sc) < 0) { + device_printf(dev, "Falling back to PIO mode.\n"); + sc->sc_use_dma = 0; + } + + /* Add sysctls. */ + mv_sdio_add_sysctls(sc); + + if (platform_sdio_slot_signal(MV_SDIO_SIG_CD) != -1) { + /* Check if card is present in the slot. */ + if (platform_sdio_slot_signal(MV_SDIO_SIG_CD) == 1) + sc->sc_card_present = 1; + } + + TASK_INIT(&sc->sc_card_task, 0, mv_sdio_card_task, sc); + callout_init(&sc->sc_card_callout, 1); + task_initialized = 1; + + /* Setup interrupt. */ + if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | + INTR_MPSAFE, NULL, mv_sdio_intr, sc, &sc->sc_ihl) != 0) { + device_printf(dev, "Could not setup interrupt!\n"); + goto fail; + } + + /* Host can be acquired. */ + sc->sc_bus_busy = 0; + + /* + * Attach MMC bus only if the card is in the slot or card detect is + * not supported on the platform. + */ + if ((platform_sdio_slot_signal(MV_SDIO_SIG_CD) == -1) || + sc->sc_card_present) { + sc->sc_child = device_add_child(dev, "mmc", -1); + + if (sc->sc_child == NULL) { + device_printf(dev, "Could not add MMC bus!\n"); + goto fail; + } + + /* Initialize host structure for MMC bus. */ + mv_sdio_init_host(sc); + + device_set_ivars(sc->sc_child, &sc->sc_host); + } + + return (bus_generic_attach(dev)); + +fail: + mv_sdio_dma_finish(sc); + if (task_initialized) { + callout_drain(&sc->sc_card_callout); + taskqueue_drain(taskqueue_swi, &sc->sc_card_task); + } + if (sc->sc_ihl != NULL) + bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_ihl); + if (sc->sc_cd_ihl != NULL) + bus_teardown_intr(dev, sc->sc_cd_irq_res, sc->sc_cd_ihl); + if (sc->sc_irq_res != NULL) + bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irq_rid, + sc->sc_irq_res); + if (sc->sc_cd_irq_res != NULL) + bus_release_resource(dev, SYS_RES_IRQ, sc->sc_cd_irq_rid, + sc->sc_cd_irq_res); + if (sc->sc_mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_mem_rid, + sc->sc_mem_res); + mtx_destroy(&sc->sc_mtx); + return (ENXIO); +} + +static int +mv_sdio_update_ios(device_t brdev, device_t reqdev) +{ + struct mv_sdio_softc *sc; + struct mmc_host *host; + struct mmc_ios *ios; + uint32_t xfer, clk_div, host_cr; + + sc = device_get_softc(brdev); + host = device_get_ivars(reqdev); + ios = &host->ios; + + mtx_lock(&sc->sc_mtx); + + if (ios->power_mode == power_off) + /* Re-initialize the controller. */ + mv_sdio_init(brdev); + + xfer = MV_SDIO_RD4(sc, MV_SDIO_XFER); + + if (ios->clock == 0) { + /* Disable clock. */ + xfer |= MV_SDIO_XFER_STOP_CLK; + MV_SDIO_WR4(sc, MV_SDIO_XFER, xfer); + + /* Set maximum clock divider. */ + MV_SDIO_WR4(sc, MV_SDIO_CLK_DIV, MV_SDIO_CLK_DIV_MAX); + } else { + /* + * Calculate and set clock divider. + * Clock rate value is: + * clock = MV_SDIO_F_BASE / (clk_div + 1) + * Thus we calculate the divider value as: + * clk_div = (MV_SDIO_F_BASE / clock) - 1 + */ + clk_div = (MV_SDIO_F_BASE / ios->clock) - 1; + if (clk_div > MV_SDIO_CLK_DIV_MAX) + clk_div = MV_SDIO_CLK_DIV_MAX; + MV_SDIO_WR4(sc, MV_SDIO_CLK_DIV, clk_div); + + /* Enable clock. */ + xfer &= ~MV_SDIO_XFER_STOP_CLK; + MV_SDIO_WR4(sc, MV_SDIO_XFER, xfer); + } + + host_cr = MV_SDIO_RD4(sc, MV_SDIO_HOST_CR); + + /* Set card type. */ + if (host->mode == mode_mmc) + host_cr |= MV_SDIO_HOST_CR_MMC; /* MMC card. */ + else + host_cr &= ~MV_SDIO_HOST_CR_MMC; /* SD card. */ + + /* Set bus width. */ + if (ios->bus_width == bus_width_4) + host_cr |= MV_SDIO_HOST_CR_4BIT; /* 4-bit bus width */ + else + host_cr &= ~MV_SDIO_HOST_CR_4BIT; /* 1-bit bus width */ + + /* Set high/normal speed mode. */ +#if 0 /* Some cards have problems with the highspeed-mode + * Not selecting High-Speed mode enables all cards to work + */ + + if ((ios->timing == bus_timing_hs ) && ( 1 == 0 ) ) + host_cr |= MV_SDIO_HOST_CR_HIGHSPEED; + else +#endif + host_cr &= ~MV_SDIO_HOST_CR_HIGHSPEED; + + MV_SDIO_WR4(sc, MV_SDIO_HOST_CR, host_cr); + + mtx_unlock(&sc->sc_mtx); + + return (0); +} + +static int +mv_sdio_request(device_t brdev, device_t reqdev, struct mmc_request *req) +{ + struct mv_sdio_softc *sc; + int rv; + + sc = device_get_softc(brdev); + rv = EBUSY; + + mtx_lock(&sc->sc_mtx); + + if (sc->sc_req != NULL) { + mtx_unlock(&sc->sc_mtx); + return (rv); + } + + sc->sc_req = req; +/* + device_printf(sc->sc_dev, "cmd %d (hw state 0x%04x)\n", + req->cmd->opcode , MV_SDIO_RD4( sc, MV_SDIO_HOST_SR ) ); +*/ + rv = mv_sdio_start_command(sc, req->cmd); + + mtx_unlock(&sc->sc_mtx); + + return (rv); +} + +static int +mv_sdio_get_ro(device_t brdev, device_t reqdev) +{ + int rv; + + /* Check if card is read only. */ + rv = platform_sdio_slot_signal(MV_SDIO_SIG_WP); + + /* + * Assume that card is not write protected, when platform doesn't + * support WP signal. + */ + if (rv < 0) + rv = 0; + + return (rv); +} + +static int +mv_sdio_acquire_host(device_t brdev, device_t reqdev) +{ + struct mv_sdio_softc *sc; + int rv; + + sc = device_get_softc(brdev); + rv = 0; + + mtx_lock(&sc->sc_mtx); + while (sc->sc_bus_busy) + rv = mtx_sleep(sc, &sc->sc_mtx, PZERO, "sdioah", 0); + sc->sc_bus_busy++; + mtx_unlock(&sc->sc_mtx); + + return (rv); +} + +static int +mv_sdio_release_host(device_t brdev, device_t reqdev) +{ + struct mv_sdio_softc *sc; + + sc = device_get_softc(brdev); + + mtx_lock(&sc->sc_mtx); + sc->sc_bus_busy--; + wakeup(sc); + mtx_unlock(&sc->sc_mtx); + + return (0); +} + +static void +mv_sdio_finalize_request(struct mv_sdio_softc *sc) +{ + struct mmc_request *req; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + req = sc->sc_req; + + if (req) { + /* Finalize active request. */ + /*device_printf(sc->sc_dev, "Finalize request %i\n",req->cmd->opcode);*/ + sc->sc_req = NULL; + sc->sc_curcmd = NULL; + req->done(req); + + + } else + device_printf(sc->sc_dev, "No active request to finalize!\n"); +} + +static void +mv_sdio_init(device_t dev) +{ + struct mv_sdio_softc *sc; + uint32_t host_cr; + + sc = device_get_softc(dev); + + /* Disable interrupts. */ + sc->sc_irq_mask = 0; + sc->sc_eirq_mask = 0; + MV_SDIO_WR4(sc, MV_SDIO_IRQ_EN, sc->sc_irq_mask); + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_EN, sc->sc_eirq_mask); + + /* Clear interrupt status registers. */ + MV_SDIO_WR4(sc, MV_SDIO_IRQ_SR, MV_SDIO_IRQ_ALL); + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_SR, MV_SDIO_EIRQ_ALL); + + /* Enable interrupt status registers. */ + MV_SDIO_WR4(sc, MV_SDIO_IRQ_SR_EN, MV_SDIO_IRQ_ALL); + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_SR_EN, MV_SDIO_EIRQ_ALL); + + /* Initialize Host Control Register. */ + host_cr = (MV_SDIO_HOST_CR_PUSHPULL | MV_SDIO_HOST_CR_BE | + MV_SDIO_HOST_CR_TMOVAL(MV_SDIO_TMO_MAX) | MV_SDIO_HOST_CR_TMO); + + MV_SDIO_WR4(sc, MV_SDIO_HOST_CR, host_cr); + + /* Stop clock and reset Transfer Mode Register. */ + MV_SDIO_WR4(sc, MV_SDIO_XFER, MV_SDIO_XFER_STOP_CLK); + + /* Set maximum clock divider value. */ + MV_SDIO_WR4(sc, MV_SDIO_CLK_DIV, MV_SDIO_CLK_DIV_MAX); + + /* Reset status, state machine and FIFOs synchronously. */ + MV_SDIO_WR4(sc, MV_SDIO_SW_RESET, MV_SDIO_SW_RESET_ALL); + DELAY(MV_SDIO_RESET_DELAY); +} + +static void +mv_sdio_init_host(struct mv_sdio_softc *sc) +{ + struct mmc_host *host; + + host = &sc->sc_host; + + /* Clear host structure. */ + bzero(host, sizeof(struct mmc_host)); + + /* Calculate minimum and maximum operating frequencies. */ + host->f_min = MV_SDIO_F_BASE / (MV_SDIO_CLK_DIV_MAX + 1); + host->f_max = MV_SDIO_F_MAX; + + /* Set operation conditions (voltage). */ + host->host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; + + /* Set additional host controller capabilities. */ + host->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_HSPEED; +} + +static void +mv_sdio_add_sysctls(struct mv_sdio_softc *sc) +{ + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *children; + struct sysctl_oid *tree; + + ctx = device_get_sysctl_ctx(sc->sc_dev); + children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)); + tree = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "params", + CTLFLAG_RD, 0, "Driver parameters"); + children = SYSCTL_CHILDREN(tree); + + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "use_dma", + CTLTYPE_UINT | CTLFLAG_RW, sc, 0, mv_sdio_sysctl_use_dma, + "I", "Use DMA for data transfers (0-1)"); +} + +/* + * This sysctl allows switching between DMA and PIO modes for data transfers: + * + * dev.mv_sdio..params.use_dma + * + * Values: + * + * - 1 sets DMA mode + * - 0 sets PIO mode + * + * Driver uses DMA mode by default. + */ +static int +mv_sdio_sysctl_use_dma(SYSCTL_HANDLER_ARGS) +{ + struct mv_sdio_softc *sc; + uint32_t use_dma; + int error; + + sc = (struct mv_sdio_softc *)arg1; + + use_dma = sc->sc_use_dma; + + error = sysctl_handle_int(oidp, &use_dma, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + if (use_dma > 1) + return (EINVAL); + + mtx_lock(&sc->sc_mtx); + + /* Check if requested mode is already being used. */ + if (sc->sc_use_dma == use_dma) { + mtx_unlock(&sc->sc_mtx); + return (EPERM); + } + + if (!(sc->sc_mapped)) { + device_printf(sc->sc_dev, "DMA not initialized!\n"); + mtx_unlock(&sc->sc_mtx); + return (ENOMEM); + } + + /* Set new mode. */ + sc->sc_use_dma = use_dma; + + mtx_unlock(&sc->sc_mtx); + + return (0); +} + +static void +mv_sdio_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + + if (error != 0) + return; + + /* Get first segment's physical address. */ + *(bus_addr_t *)arg = segs->ds_addr; +} + +static int +mv_sdio_dma_init(struct mv_sdio_softc *sc) +{ + device_t dev; + bus_size_t dmabuf_size; + + dev = sc->sc_dev; + dmabuf_size = MAXPHYS; + + /* Create DMA tag. */ + if (bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ + MV_SDIO_DMA_SEGMENT_SIZE, 0, /* alignment, boundary */ + BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ + BUS_SPACE_MAXADDR, /* highaddr */ + NULL, NULL, /* filtfunc, filtfuncarg */ + MAXPHYS, 1, /* maxsize, nsegments */ + MAXPHYS, BUS_DMA_ALLOCNOW, /* maxsegsz, flags */ + NULL, NULL, /* lockfunc, lockfuncarg */ + &sc->sc_dmatag) != 0) { + device_printf(dev, "Could not create DMA tag!\n"); + return (-1); + } + + /* Allocate DMA memory. */ + if (bus_dmamem_alloc(sc->sc_dmatag, (void **)&sc->sc_dmamem, + BUS_DMA_NOWAIT, &sc->sc_dmamap) != 0) { + device_printf(dev, "Could not allocate DMA memory!\n"); + mv_sdio_dma_finish(sc); + return (-1); + } + + /* Find the biggest available DMA buffer size. */ + while (bus_dmamap_load(sc->sc_dmatag, sc->sc_dmamap, + (void *)sc->sc_dmamem, dmabuf_size, mv_sdio_getaddr, + &sc->sc_physaddr, 0) != 0) { + dmabuf_size >>= 1; + if (dmabuf_size < MV_SDIO_BLOCK_SIZE) { + device_printf(dev, "Could not load DMA map!\n"); + mv_sdio_dma_finish(sc); + return (-1); + } + } + + sc->sc_mapped++; + sc->sc_dma_size = dmabuf_size; + + return (0); +} + +static void +mv_sdio_dma_finish(struct mv_sdio_softc *sc) +{ + + /* Free DMA resources. */ + if (sc->sc_mapped) { + bus_dmamap_unload(sc->sc_dmatag, sc->sc_dmamap); + sc->sc_mapped--; + } + if (sc->sc_dmamem != NULL) + bus_dmamem_free(sc->sc_dmatag, sc->sc_dmamem, sc->sc_dmamap); + if (sc->sc_dmamap != NULL) + bus_dmamap_destroy(sc->sc_dmatag, sc->sc_dmamap); + if (sc->sc_dmatag != NULL) + bus_dma_tag_destroy(sc->sc_dmatag); +} + +static int +mv_sdio_start_command(struct mv_sdio_softc *sc, struct mmc_command *cmd) +{ + struct mmc_request *req; + uint32_t cmdreg; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + req = sc->sc_req; + + sc->sc_curcmd = cmd; + + cmd->error = MMC_ERR_NONE; + + /* Check if card is in the slot. */ + if ((platform_sdio_slot_signal(MV_SDIO_SIG_CD) != -1) && + (sc->sc_card_present == 0)) { + cmd->error = MMC_ERR_FAILED; + mv_sdio_finalize_request(sc); + return (-1); + } + + /* Check if clock is enabled. */ + if (MV_SDIO_RD4(sc, MV_SDIO_XFER) & MV_SDIO_XFER_STOP_CLK) { + cmd->error = MMC_ERR_FAILED; + mv_sdio_finalize_request(sc); + return (-1); + } + + /* Write command argument. */ + MV_SDIO_WR4(sc, MV_SDIO_CMD_ARGL, cmd->arg & 0xffff); + MV_SDIO_WR4(sc, MV_SDIO_CMD_ARGH, cmd->arg >> 16); + + /* Determine response type. */ + if (cmd->flags & MMC_RSP_136) + cmdreg = MV_SDIO_CMD_RSP_136; + else if (cmd->flags & MMC_RSP_BUSY) + cmdreg = MV_SDIO_CMD_RSP_48_BUSY; + else if (cmd->flags & MMC_RSP_PRESENT) + cmdreg = MV_SDIO_CMD_RSP_48; + else { + /* No response. */ + cmdreg = MV_SDIO_CMD_RSP_NONE; + /* Enable host to detect unexpected response. */ + cmdreg |= MV_SDIO_CMD_UNEXPECTED_RSP; + sc->sc_irq_mask |= MV_SDIO_CMD_UNEXPECTED_RSP; + } + + /* Check command checksum if needed. */ + if (cmd->flags & MMC_RSP_CRC) + cmdreg |= MV_SDIO_CMD_CRC7; + /* Check command opcode if needed. */ + if (cmd->flags & MMC_RSP_OPCODE) + cmdreg |= MV_SDIO_CMD_INDEX_CHECK; + + /* Set commannd opcode. */ + cmdreg |= MV_SDIO_CMD_INDEX(cmd->opcode); + + /* Setup interrupts. */ + sc->sc_irq_mask = MV_SDIO_IRQ_CMD; + sc->sc_eirq_mask = MV_SDIO_EIRQ_ALL; + + /* Prepare data transfer. */ + if (cmd->data) { + cmdreg |= (MV_SDIO_CMD_DATA_PRESENT | MV_SDIO_CMD_DATA_CRC16); + if (mv_sdio_start_data(sc, cmd->data) < 0) { + cmd->error = MMC_ERR_FAILED; + printf("mv_sdio_start_data() failed!\n"); + mv_sdio_finalize_request(sc); + return (-1); + } + } + + /* Write command register. */ + MV_SDIO_WR4(sc, MV_SDIO_CMD, cmdreg); + + /* Clear interrupt status. */ + MV_SDIO_WR4(sc, MV_SDIO_IRQ_SR, ~MV_SDIO_IRQ_CARD_EVENT /*MV_SDIO_IRQ_ALL*/); + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_SR, 0xffff /*MV_SDIO_EIRQ_ALL*/); + + /* Update interrupt/error interrupt enable registers. */ + MV_SDIO_WR4(sc, MV_SDIO_IRQ_EN, sc->sc_irq_mask); + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_EN, sc->sc_eirq_mask); + + /* Do not complete request, interrupt handler will do this. */ + return (0); +} + +static void +mv_sdio_finish_command(struct mv_sdio_softc *sc) +{ + struct mmc_command *cmd; + struct mmc_data *data; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + cmd = sc->sc_curcmd; + data = cmd->data; + + /* Get response. */ + if (cmd->flags & MMC_RSP_PRESENT) { + if(cmd->flags & MMC_RSP_136) + /* 136-bit response. */ + mv_sdio_handle_136bit_resp(sc); + else + /* 48-bit response. */ + mv_sdio_handle_48bit_resp(sc, NULL); + } + + if (data) { + /* + * Disable command complete interrupt. It has already been + * handled. + */ + sc->sc_irq_mask &= ~MV_SDIO_IRQ_CMD; + + /* Enable XFER interrupt. */ + sc->sc_irq_mask |= MV_SDIO_IRQ_XFER; + + /* Check which data interrupts we need to activate. */ + if (sc->sc_use_dma) + /* DMA transaction. */ + sc->sc_irq_mask |= MV_SDIO_IRQ_DMA; + else if (data->flags & MMC_DATA_READ) + /* Read transaction in PIO mode. */ + sc->sc_irq_mask |= MV_SDIO_IRQ_RX_FULL; + else + /* Write transaction in PIO mode. */ + sc->sc_irq_mask |= MV_SDIO_IRQ_TX_EMPTY; + + /* Check if Auto-CMD12 interrupt will be needed. */ + if (sc->sc_req->stop) + sc->sc_irq_mask |= MV_SDIO_IRQ_AUTOCMD12; + + /* Update interrupt enable register. */ + MV_SDIO_WR4(sc, MV_SDIO_IRQ_EN, sc->sc_irq_mask); + } else { + /* We're done. Disable interrupts and finalize request. */ + mv_sdio_disable_intr(sc); + mv_sdio_finalize_request(sc); + } +} + +static int +mv_sdio_start_data(struct mv_sdio_softc *sc, struct mmc_data *data) +{ + struct mmc_command *stop; + uint32_t autocmd12reg, xfer, host_sr; + size_t blk_size, blk_count; + int retries; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + /* + * No transfer can be started when FIFO_EMPTY bit in MV_SDIO_HOST_SR + * is not set. This bit is sometimes not set instantly after XFER + * interrupt has been asserted. + */ + host_sr = MV_SDIO_RD4(sc, MV_SDIO_HOST_SR); + + retries = 10; + while (!(host_sr & MV_SDIO_HOST_SR_FIFO_EMPTY)) { + if (retries == 0) + return (-1); + retries--; + DELAY(MV_SDIO_FIFO_EMPTY_DELAY); + host_sr = MV_SDIO_RD4(sc, MV_SDIO_HOST_SR); + } + + /* Clear data offset. */ + sc->sc_data_offset = 0; + + /* + * Set block size. It can be less than or equal to MV_SDIO_BLOCK_SIZE + * bytes. + */ + blk_size = (data->len < MV_SDIO_BLOCK_SIZE) ? data->len : + MV_SDIO_BLOCK_SIZE; + if (data->flags & MMC_DATA_MULTI) + blk_size = data->blocksz > MV_SDIO_BLOCK_SIZE ? + MV_SDIO_BLOCK_SIZE : data->blocksz; + MV_SDIO_WR4(sc, MV_SDIO_BLK_SIZE, blk_size); + + /* Set block count. */ + blk_count = (data->len + MV_SDIO_BLOCK_SIZE - 1) / MV_SDIO_BLOCK_SIZE; + if (data->flags & MMC_DATA_MULTI) + blk_count = data->len / blk_size; + MV_SDIO_WR4(sc, MV_SDIO_BLK_COUNT, blk_count); +// device_printf(sc->sc_dev, "BLK SIZE: %d, COUNT: %d\n", blk_size, blk_count); + + /* We want to initiate transfer by software. */ + xfer = MV_SDIO_XFER_SW_WR_EN; + + if (sc->sc_use_dma) { + /* Synchronize before DMA transfer. */ + if (data->flags & MMC_DATA_READ) + bus_dmamap_sync(sc->sc_dmatag, sc->sc_dmamap, + BUS_DMASYNC_PREREAD); + else { + memcpy(sc->sc_dmamem, data->data, data->len); + bus_dmamap_sync(sc->sc_dmatag, sc->sc_dmamap, + BUS_DMASYNC_PREWRITE); + } + + /* Write DMA buffer address register. */ + MV_SDIO_WR4(sc, MV_SDIO_DMA_ADDRL, sc->sc_physaddr & 0xffff); + MV_SDIO_WR4(sc, MV_SDIO_DMA_ADDRH, sc->sc_physaddr >> 16); + } else + /* Set PIO transfer mode. */ + xfer |= MV_SDIO_XFER_PIO; + + /* + * Prepare Auto-CMD12. This command is automatically sent to the card + * by the host controller to stop multiple-block data transaction. + */ + if (sc->sc_req->stop) { + stop = sc->sc_req->stop; + + /* Set Auto-CMD12 argument. */ + MV_SDIO_WR4(sc, MV_SDIO_AUTOCMD12_ARGL, stop->arg & 0xffff); + MV_SDIO_WR4(sc, MV_SDIO_AUTOCMD12_ARGH, stop->arg >> 16); + + /* Set Auto-CMD12 opcode. */ + autocmd12reg = MV_SDIO_AUTOCMD12_INDEX(stop->opcode); + + /* Check busy signal if needed. */ + if (stop->flags & MMC_RSP_BUSY) + autocmd12reg |= MV_SDIO_AUTOCMD12_BUSY_CHECK; + /* Check Auto-CMD12 index. */ + if (stop->flags & MMC_RSP_OPCODE) + autocmd12reg |= MV_SDIO_AUTOCMD12_INDEX_CHECK; + + MV_SDIO_WR4(sc, MV_SDIO_AUTOCMD12, autocmd12reg); + + xfer |= MV_SDIO_XFER_AUTOCMD12; + } + + /* Change data direction. */ + if (data->flags & MMC_DATA_READ) + xfer |= MV_SDIO_XFER_TO_HOST; + + /* Write transfer mode register. */ + MV_SDIO_WR4(sc, MV_SDIO_XFER, xfer); + + return (0); +} + +static void +mv_sdio_handle_136bit_resp(struct mv_sdio_softc *sc) +{ + struct mmc_command *cmd; + uint32_t resp[8]; + uint32_t base, extra; + int i, j, off; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + cmd = sc->sc_curcmd; + + /* Collect raw response from the controller. */ + for (i = 0; i < 8; i++) + resp[i] = MV_SDIO_RD4(sc, MV_SDIO_RSP(i)); + + /* Response passed to MMC bus is shifted by one byte. */ + extra = 0; + for (i = 0, j = 7; i < 4; i++, j -= 2) { + off = (i ? 0 : 2); + base = resp[j] | (resp[j - 1] << (16 - off)); + cmd->resp[3 - i] = (base << (6 + off)) + extra; + extra = base >> (26 - off); + } +} + +static void +mv_sdio_handle_48bit_resp(struct mv_sdio_softc *sc, struct mmc_command *stop) +{ + struct mmc_command *cmd; + uint32_t resp[3], word; + uint8_t *rp; + int i; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + if (stop == NULL) + cmd = sc->sc_curcmd; + else + cmd = stop; + + /* Collect raw response from the controller. */ + for (i = 0; i < 3; i++) { + if (stop == NULL) + resp[i] = MV_SDIO_RD4(sc, MV_SDIO_RSP(i)); + else + resp[i] = MV_SDIO_RD4(sc, MV_SDIO_AUTOCMD12_RSP(i)); + } + + /* Clear MMC bus response buffer. */ + bzero(&cmd->resp[0], 4 * sizeof(uint32_t)); + + /* + * Fill MMC bus response buffer. + */ + + rp = (uint8_t *)&cmd->resp[0]; + + /* Response bits [45:14] */ + word = (resp[1] & MV_SDIO_RSP48_BM16) | + ((resp[0] & MV_SDIO_RSP48_BM16) << 16); + + /* Response bits [15:14] and [13:8] */ + *rp++ = (resp[2] & MV_SDIO_RSP48_BM6) | + ((word & MV_SDIO_RSP48_BM2) << 6); + + /* Response bits [15:14] are already included. */ + word >>= 2; + + /* Response bits [45:16] */ + memcpy(rp, &word, sizeof(uint32_t)); +} + +static void +mv_sdio_intr(void *arg) +{ + struct mv_sdio_softc *sc; + uint32_t irq_stat, eirq_stat; + + sc = (struct mv_sdio_softc *)arg; +#if 0 + device_printf(sc->sc_dev,"intr 0x%04x intr_en 0x%04x hw_state 0x%04x\n", + MV_SDIO_RD4( sc, MV_SDIO_IRQ_SR ) , + MV_SDIO_RD4( sc, MV_SDIO_IRQ_EN ), + MV_SDIO_RD4( sc, MV_SDIO_HOST_SR )); +#endif + + + mtx_lock(&sc->sc_mtx); + + + + irq_stat = MV_SDIO_RD4(sc, MV_SDIO_IRQ_SR) & sc->sc_irq_mask; + eirq_stat = MV_SDIO_RD4(sc, MV_SDIO_EIRQ_SR) & sc->sc_eirq_mask; + + /* + * In case of error interrupt, interrupt cause will be identified by + * checking bits in error interrupt status register. + */ + irq_stat &= ~MV_SDIO_IRQ_ERR; + + /* Handle command interrupts. */ + if ((irq_stat & MV_SDIO_IRQS_CMD) || + (eirq_stat & MV_SDIO_EIRQS_CMD)) { + MV_SDIO_WR4(sc, MV_SDIO_IRQ_SR, irq_stat); + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_SR, eirq_stat); + mv_sdio_cmd_intr(sc, irq_stat, eirq_stat); + irq_stat &= ~MV_SDIO_IRQS_CMD; + eirq_stat &= ~MV_SDIO_EIRQS_CMD; + } + + /* Handle data interrupts. */ + if ((irq_stat & MV_SDIO_IRQS_DATA) || + (eirq_stat & MV_SDIO_EIRQS_DATA)) { + MV_SDIO_WR4(sc, MV_SDIO_IRQ_SR, irq_stat); + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_SR, eirq_stat); + mv_sdio_data_intr(sc, irq_stat, eirq_stat); + irq_stat &= ~MV_SDIO_IRQS_DATA; + eirq_stat &= ~MV_SDIO_EIRQS_DATA; + } + + /* Handle unexpected interrupts. */ + if (irq_stat) { + device_printf(sc->sc_dev, "Unexpected interrupt(s)! " + "IRQ SR = 0x%08x\n", irq_stat); + /* Clear interrupt status. */ + MV_SDIO_WR4(sc, MV_SDIO_IRQ_SR, irq_stat); + } + if (eirq_stat) { + device_printf(sc->sc_dev, "Unexpected error interrupt(s)! " + "EIRQ SR = 0x%08x\n", eirq_stat); + /* Clear error interrupt status. */ + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_SR, eirq_stat); + } + + mtx_unlock(&sc->sc_mtx); +} + +static void +mv_sdio_cmd_intr(struct mv_sdio_softc *sc, uint32_t irq, uint32_t eirq) +{ + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + if (!sc->sc_curcmd) { + device_printf(sc->sc_dev, "Got command interrupt, but there " + "is no active command!\n"); + return; + } + + /* Handle unexpected response error. */ + if (irq & MV_SDIO_IRQ_UNEXPECTED_RSP) { + sc->sc_curcmd->error = MMC_ERR_FAILED; + device_printf(sc->sc_dev, "Unexpected response!\n"); + } + + /* Handle errors. */ + if (eirq & MV_SDIO_EIRQ_CMD_TMO) { + sc->sc_curcmd->error = MMC_ERR_TIMEOUT; + device_printf(sc->sc_dev, "Error - command %d timeout!\n", + sc->sc_curcmd->opcode); + } else if (eirq & MV_SDIO_EIRQ_CMD_CRC7) { + sc->sc_curcmd->error = MMC_ERR_BADCRC; + device_printf(sc->sc_dev, "Error - bad command %d " + "checksum!\n", sc->sc_curcmd->opcode); + } else if (eirq & MV_SDIO_EIRQ_DATA_CRC16) { + sc->sc_curcmd->error = MMC_ERR_BADCRC; + device_printf(sc->sc_dev, "Error - bad command %d " + "DATA checksum!\n", sc->sc_curcmd->opcode); + } else if (eirq & MV_SDIO_EIRQ_DATA_ENDBIT) { + sc->sc_curcmd->error = MMC_ERR_BADCRC; + device_printf(sc->sc_dev, "Error - bad command %d " + "end bit error!\n", sc->sc_curcmd->opcode); + } else if (eirq) { + sc->sc_curcmd->error = MMC_ERR_FAILED; + device_printf(sc->sc_dev, "Command %d error eirq=%d!\n", + sc->sc_curcmd->opcode, eirq); + } + + if (sc->sc_curcmd->error != MMC_ERR_NONE) { + /* Error. Disable interrupts and finalize request. */ + mv_sdio_disable_intr(sc); + mv_sdio_finalize_request(sc); + return; + } + + if (irq & MV_SDIO_IRQ_CMD) + mv_sdio_finish_command(sc); +} + +static void +mv_sdio_data_intr(struct mv_sdio_softc *sc, uint32_t irq, uint32_t eirq) +{ + struct mmc_command *stop; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + if (!sc->sc_curcmd) { + device_printf(sc->sc_dev, "Got data interrupt, but there is " + "no active command.\n"); + return; + } + if ((!sc->sc_curcmd->data) && ((sc->sc_curcmd->flags & + MMC_RSP_BUSY) == 0)) { + device_printf(sc->sc_dev, "Got data interrupt, but there is " + "no active data transaction.n\n"); + sc->sc_curcmd->error = MMC_ERR_FAILED; + return; + } + + /* Handle errors. */ + if(eirq & MV_SDIO_EIRQ_DATA_TMO) { + sc->sc_curcmd->error = MMC_ERR_TIMEOUT; + device_printf(sc->sc_dev, "Data %s timeout!\n", + (sc->sc_curcmd->data->flags & MMC_DATA_READ) ? "read" : + "write"); + } else if (eirq & (MV_SDIO_EIRQ_DATA_CRC16 | + MV_SDIO_EIRQ_DATA_ENDBIT)) { + sc->sc_curcmd->error = MMC_ERR_BADCRC; + device_printf(sc->sc_dev, "Bad data checksum!\n"); + } else if (eirq) { + sc->sc_curcmd->error = MMC_ERR_FAILED; + device_printf(sc->sc_dev, "Data error!: 0x%04X \n", + eirq); + + if( 0 != ( eirq & MV_SDIO_EIRQ_CRC_STAT ) ) + { + device_printf(sc->sc_dev, "MV_SDIO_EIRQ_CRC_STAT\n"); + } + } + + /* Handle Auto-CMD12 error. */ + if (eirq & MV_SDIO_EIRQ_AUTOCMD12) { + sc->sc_req->stop->error = MMC_ERR_FAILED; + sc->sc_curcmd->error = MMC_ERR_FAILED; + device_printf(sc->sc_dev, "Auto-CMD12 error!\n"); + } + + if (sc->sc_curcmd->error != MMC_ERR_NONE) { + /* Error. Disable interrupts and finalize request. */ + mv_sdio_disable_intr(sc); + mv_sdio_finalize_request(sc); + return; + } + + /* Handle PIO interrupt. */ + if (irq & (MV_SDIO_IRQ_TX_EMPTY | MV_SDIO_IRQ_RX_FULL)) + mv_sdio_transfer_pio(sc); + + /* Handle DMA interrupt. */ + if (irq & (MV_SDIO_IRQ_DMA)) { + /* Synchronize DMA buffer. */ + if (MV_SDIO_RD4(sc, MV_SDIO_XFER) & MV_SDIO_XFER_TO_HOST) { + bus_dmamap_sync(sc->sc_dmatag, sc->sc_dmamap, + BUS_DMASYNC_POSTWRITE); + memcpy(sc->sc_curcmd->data->data, sc->sc_dmamem, + sc->sc_curcmd->data->len); + } else + bus_dmamap_sync(sc->sc_dmatag, sc->sc_dmamap, + BUS_DMASYNC_POSTREAD); + + /* Disable DMA interrupt. */ + sc->sc_irq_mask &= ~MV_SDIO_IRQ_DMA; + MV_SDIO_WR4(sc, MV_SDIO_IRQ_EN, sc->sc_irq_mask); + } + + /* Handle Auto-CMD12 interrupt. */ + if (irq & (MV_SDIO_IRQ_AUTOCMD12)) { + stop = sc->sc_req->stop; + /* Get 48-bit response. */ + mv_sdio_handle_48bit_resp(sc, stop); + + /* Disable Auto-CMD12 interrupt. */ + sc->sc_irq_mask &= ~MV_SDIO_IRQ_AUTOCMD12; + MV_SDIO_WR4(sc, MV_SDIO_IRQ_EN, sc->sc_irq_mask); + } + + /* Transfer finished. Disable interrupts and finalize request. */ + if (irq & (MV_SDIO_IRQ_XFER)) { + mv_sdio_disable_intr(sc); + mv_sdio_finalize_request(sc); + } +} + +static void +mv_sdio_disable_intr(struct mv_sdio_softc *sc) +{ + + /* Disable interrupts that were enabled. */ + sc->sc_irq_mask &= ~(sc->sc_irq_mask); + sc->sc_eirq_mask &= ~(sc->sc_eirq_mask); + MV_SDIO_WR4(sc, MV_SDIO_IRQ_EN, sc->sc_irq_mask); + MV_SDIO_WR4(sc, MV_SDIO_EIRQ_EN, sc->sc_eirq_mask); +} + +static void +mv_sdio_card_task(void *arg, int pending) +{ + struct mv_sdio_softc *sc; + + int device_probe_and_attach_ret_val = 0; + + sc = (struct mv_sdio_softc *)arg; + + mtx_lock(&sc->sc_mtx); + + if (sc->sc_card_present) { + if (sc->sc_child) { + mtx_unlock(&sc->sc_mtx); + return; + } + + /* Initialize host controller's registers. */ + mv_sdio_init(sc->sc_dev); + + sc->sc_child = device_add_child(sc->sc_dev, "mmc", -1); + if (sc->sc_child == NULL) { + device_printf(sc->sc_dev, "Could not add MMC bus!\n"); + mtx_unlock(&sc->sc_mtx); + return; + } + + /* Initialize host structure for MMC bus. */ + mv_sdio_init_host(sc); + + device_set_ivars(sc->sc_child, &sc->sc_host); + + mtx_unlock(&sc->sc_mtx); + + device_probe_and_attach_ret_val = device_probe_and_attach(sc->sc_child); + + if( 0 != device_probe_and_attach_ret_val ) { + device_printf(sc->sc_dev, "MMC bus failed on probe " + "and attach! %i\n",device_probe_and_attach_ret_val); + device_delete_child(sc->sc_dev, sc->sc_child); + sc->sc_child = NULL; + } + } else { + if (sc->sc_child == NULL) { + mtx_unlock(&sc->sc_mtx); + return; + } + + mtx_unlock(&sc->sc_mtx); + if (device_delete_child(sc->sc_dev, sc->sc_child) != 0) { + device_printf(sc->sc_dev, "Could not delete MMC " + "bus!\n"); + } + sc->sc_child = NULL; + } +} + +static uint32_t +mv_sdio_read_fifo(struct mv_sdio_softc *sc) +{ + uint32_t data; + device_printf(sc->sc_dev, "This is not tested, yet MV_SDIO_FIFO not ensured\n "); + + while (!(MV_SDIO_RD4(sc, MV_SDIO_IRQ_SR) & MV_SDIO_IRQ_RX_FULL)); + data = MV_SDIO_RD4(sc, MV_SDIO_FIFO); + while (!(MV_SDIO_RD4(sc, MV_SDIO_IRQ_SR) & MV_SDIO_IRQ_RX_FULL)); + data |= (MV_SDIO_RD4(sc, MV_SDIO_FIFO) << 16); + return data; +} + +static void +mv_sdio_write_fifo(struct mv_sdio_softc *sc, uint32_t val) +{ + while (!(MV_SDIO_RD4(sc, MV_SDIO_IRQ_SR) & MV_SDIO_IRQ_TX_EMPTY)); + MV_SDIO_WR4(sc, MV_SDIO_FIFO, val & 0xffff); + while (!(MV_SDIO_RD4(sc, MV_SDIO_IRQ_SR) & MV_SDIO_IRQ_TX_EMPTY)); + MV_SDIO_WR4(sc, MV_SDIO_FIFO, val >> 16); +} + +static void +mv_sdio_transfer_pio(struct mv_sdio_softc *sc) +{ + struct mmc_command *cmd; + + cmd = sc->sc_curcmd; + + if (cmd->data->flags & MMC_DATA_READ) { + while (MV_SDIO_RD4(sc, MV_SDIO_IRQ_SR) & + MV_SDIO_IRQ_RX_FULL) { + mv_sdio_read_block_pio(sc); + /* + * Assert delay after each block transfer to meet read + * access timing constraint. + */ + DELAY(MV_SDIO_RD_DELAY); + if (sc->sc_data_offset >= cmd->data->len) + break; + } + /* All blocks read in PIO mode. Disable interrupt. */ + sc->sc_irq_mask &= ~MV_SDIO_IRQ_RX_FULL; + MV_SDIO_WR4(sc, MV_SDIO_IRQ_EN, sc->sc_irq_mask); + } else { + while (MV_SDIO_RD4(sc, MV_SDIO_IRQ_SR) & + MV_SDIO_IRQ_TX_EMPTY) { + mv_sdio_write_block_pio(sc); + /* Wait while card is programming the memory. */ + while ((MV_SDIO_RD4(sc, MV_SDIO_HOST_SR) & + MV_SDIO_HOST_SR_CARD_BUSY)); + /* + * Assert delay after each block transfer to meet + * write access timing constraint. + */ + DELAY(MV_SDIO_WR_DELAY); + + if (sc->sc_data_offset >= cmd->data->len) + break; + } + /* All blocks written in PIO mode. Disable interrupt. */ + sc->sc_irq_mask &= ~MV_SDIO_IRQ_TX_EMPTY; + MV_SDIO_WR4(sc, MV_SDIO_IRQ_EN, sc->sc_irq_mask); + } +} + +static void +mv_sdio_read_block_pio(struct mv_sdio_softc *sc) +{ + uint32_t data; + char *buffer; + size_t left; + + buffer = sc->sc_curcmd->data->data; + buffer += sc->sc_data_offset; + /* Transfer one block at a time. */ + left = min(MV_SDIO_BLOCK_SIZE, sc->sc_curcmd->data->len - + sc->sc_data_offset); + sc->sc_data_offset += left; + + /* Handle unaligned and aligned buffer cases. */ + if ((intptr_t)buffer & 3) { + while (left > 3) { + data = mv_sdio_read_fifo(sc); + buffer[0] = data; + buffer[1] = (data >> 8); + buffer[2] = (data >> 16); + buffer[3] = (data >> 24); + buffer += 4; + left -= 4; + } + } else { + while (left > 3) { + data = mv_sdio_read_fifo(sc); + *((uint32_t *)buffer) = data; + buffer += 4; + left -= 4; + } + } + /* Handle uneven size case. */ + if (left > 0) { + data = mv_sdio_read_fifo(sc); + while (left > 0) { + *(buffer++) = data; + data >>= 8; + left--; + } + } +} + +static void +mv_sdio_write_block_pio(struct mv_sdio_softc *sc) +{ + uint32_t data = 0; + char *buffer; + size_t left; + + buffer = sc->sc_curcmd->data->data; + buffer += sc->sc_data_offset; + /* Transfer one block at a time. */ + left = min(MV_SDIO_BLOCK_SIZE, sc->sc_curcmd->data->len - + sc->sc_data_offset); + sc->sc_data_offset += left; + + /* Handle unaligned and aligned buffer cases. */ + if ((intptr_t)buffer & 3) { + while (left > 3) { + data = buffer[0] + + (buffer[1] << 8) + + (buffer[2] << 16) + + (buffer[3] << 24); + left -= 4; + buffer += 4; + mv_sdio_write_fifo(sc, data); + } + } else { + while (left > 3) { + data = *((uint32_t *)buffer); + left -= 4; + buffer += 4; + mv_sdio_write_fifo(sc, data); + } + } + /* Handle uneven size case. */ + if (left > 0) { + data = 0; + while (left > 0) { + data <<= 8; + data += *(buffer++); + left--; + } + mv_sdio_write_fifo(sc, data); + } +} + +static int +mv_sdio_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) +{ + struct mv_sdio_softc *sc; + struct mmc_host *host; + + sc = device_get_softc(dev); + host = device_get_ivars(child); + + switch (index) { + case MMCBR_IVAR_BUS_MODE: + *(int *)result = host->ios.bus_mode; + break; + case MMCBR_IVAR_BUS_WIDTH: + *(int *)result = host->ios.bus_width; + break; + case MMCBR_IVAR_CHIP_SELECT: + *(int *)result = host->ios.chip_select; + break; + case MMCBR_IVAR_CLOCK: + *(int *)result = host->ios.clock; + break; + case MMCBR_IVAR_F_MIN: + *(int *)result = host->f_min; + break; + case MMCBR_IVAR_F_MAX: + *(int *)result = host->f_max; + break; + case MMCBR_IVAR_HOST_OCR: + *(int *)result = host->host_ocr; + break; + case MMCBR_IVAR_MODE: + *(int *)result = host->mode; + break; + case MMCBR_IVAR_OCR: + *(int *)result = host->ocr; + break; + case MMCBR_IVAR_POWER_MODE: + *(int *)result = host->ios.power_mode; + break; + case MMCBR_IVAR_VDD: + *(int *)result = host->ios.vdd; + break; + case MMCBR_IVAR_CAPS: + *(int *)result = host->caps; + break; + case MMCBR_IVAR_TIMING: + *(int *)result = host->ios.timing; + break; + case MMCBR_IVAR_MAX_DATA: + mtx_lock(&sc->sc_mtx); + /* Return maximum number of blocks the driver can handle. */ + if (sc->sc_use_dma) + *(int *)result = (sc->sc_dma_size / + MV_SDIO_BLOCK_SIZE); + else + *(int *)result = MV_SDIO_BLOCKS_MAX; + mtx_unlock(&sc->sc_mtx); + break; + default: + return (EINVAL); + } + + return (0); +} + +static int +mv_sdio_write_ivar(device_t dev, device_t child, int index, uintptr_t value) +{ + struct mmc_host *host; + + host = device_get_ivars(child); + + switch (index) { + case MMCBR_IVAR_BUS_MODE: + host->ios.bus_mode = value; + break; + case MMCBR_IVAR_BUS_WIDTH: + host->ios.bus_width = value; + break; + case MMCBR_IVAR_CHIP_SELECT: + host->ios.chip_select = value; + break; + case MMCBR_IVAR_CLOCK: + host->ios.clock = value; + break; + case MMCBR_IVAR_MODE: + host->mode = value; + break; + case MMCBR_IVAR_OCR: + host->ocr = value; + break; + case MMCBR_IVAR_POWER_MODE: + host->ios.power_mode = value; + break; + case MMCBR_IVAR_VDD: + host->ios.vdd = value; + break; + case MMCBR_IVAR_TIMING: + host->ios.timing = value; + break; + case MMCBR_IVAR_CAPS: + case MMCBR_IVAR_HOST_OCR: + case MMCBR_IVAR_F_MIN: + case MMCBR_IVAR_F_MAX: + case MMCBR_IVAR_MAX_DATA: + default: + /* Instance variable not writable. */ + return (EINVAL); + } + + return (0); +} + diff --git a/sys/arm/mv/mv_sdio.h b/sys/arm/mv/mv_sdio.h new file mode 100644 index 0000000..b54b59d --- /dev/null +++ b/sys/arm/mv/mv_sdio.h @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2008 Marvell Semiconductors, All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef _MVSDMMC_INCLUDE +#define _MVSDMMC_INCLUDE + + +#define MVSDMMC_DMA_SIZE 65536 + + + +/* + * The base MMC clock rate + */ + +#define MVSDMMC_CLOCKRATE_MIN 100000 +#define MVSDMMC_CLOCKRATE_MAX 50000000 + +#define MVSDMMC_BASE_FAST_CLOCK 200000000 + + +/* + * SDIO register + */ + +#define MV_SDIO_DMA_ADDRL 0x000 +#define MV_SDIO_DMA_ADDRH 0x004 +#define MV_SDIO_BLK_SIZE 0x008 +#define MV_SDIO_BLK_COUNT 0x00c +#define MV_SDIO_CMD 0x01c +#define MV_SDIO_CMD_ARGL 0x010 +#define MV_SDIO_CMD_ARGH 0x014 +#define MV_SDIO_XFER 0x018 +#define MV_SDIO_HOST_SR 0x048 +#define MV_SDIO_HOST_CR 0x050 +#define MV_SDIO_SW_RESET 0x05c +#define MV_SDIO_IRQ_SR 0x060 +#define MV_SDIO_EIRQ_SR 0x064 +#define MV_SDIO_IRQ_SR_EN 0x068 +#define MV_SDIO_EIRQ_SR_EN 0x06c +#define MV_SDIO_IRQ_EN 0x070 +#define MV_SDIO_EIRQ_EN 0x074 +#define MV_SDIO_AUTOCMD12_ARGL 0x084 +#define MV_SDIO_AUTOCMD12_ARGH 0x088 +#define MV_SDIO_AUTOCMD12 0x08c +#define MV_SDIO_CLK_DIV 0x128 +#define MV_SDIO_FIFO 0xa2100 /* FIXME!!! */ + +#define MV_SDIO_RSP(i) (0x020 + ((i)<<2)) +#define MV_SDIO_AUTOCMD12_RSP(i) (0x090 + ((i)<<2)) + +/* + * SDIO Status-Register + */ +#define MV_SDIO_HOST_SR_CARD_BUSY (1<<1) +#define MV_SDIO_HOST_SR_FIFO_EMPTY (1<<13) + + + +/* + * SDIO_CMD + */ +#define MV_SDIO_CMD_RSP_NONE (0 << 0) +#define MV_SDIO_CMD_RSP_136 (1 << 0) +#define MV_SDIO_CMD_RSP_48 (2 << 0) +#define MV_SDIO_CMD_RSP_48_BUSY (3 << 0) +#define MV_SDIO_CMD_DATA_CRC16 (1<<2) +#define MV_SDIO_CMD_CRC7 (1<<3) +#define MV_SDIO_CMD_INDEX_CHECK (1<<4) +#define MV_SDIO_CMD_DATA_PRESENT (1<<5) +#define MV_SDIO_CMD_UNEXPECTED_RSP (1<<7) +#define MV_SDIO_CMD_INDEX(x) ( (x) << 8 ) + + +/* + * SDIO_XFER_MODE + */ +#define MV_SDIO_XFER_STOP_CLK (1 << 5) +#define MV_SDIO_XFER_TO_HOST (1 << 4) +#define MV_SDIO_XFER_PIO (1 << 3) +#define MV_SDIO_XFER_AUTOCMD12 (1 << 2) +#define MV_SDIO_XFER_SW_WR_EN (1 << 1) + +/* + * SDIO_HOST_CTRL + */ +#define MV_SDIO_HOST_CR_PUSHPULL (1 << 0) +#define MV_SDIO_HOST_CR_MMC (3 << 1) +#define MV_SDIO_HOST_CR_BE (1 << 3) +#define MV_SDIO_HOST_CR_4BIT (1 << 9) +#define MV_SDIO_HOST_CR_HIGHSPEED (1 << 10) + +#define MV_SDIO_HOST_CR_TMOVAL(x) ((x) << 11) +#define MV_SDIO_HOST_CR_TMO ( 1 << 15 ) + +/* + * NORmal status bits + */ + + +#define MV_SDIO_IRQ_ERR (1<<15) +#define MV_SDIO_IRQ_UNEXPECTED_RSP (1<<14) +#define MV_SDIO_IRQ_AUTOCMD12 (1<<13) +#define MV_SDIO_IRQ_SUSPENSE_ON_IRQ_EN (1<<12) +#define MV_SDIO_IRQ_IMB_FIFO_WORD_AVAIL (1<<11) +#define MV_SDIO_IRQ_IMB_FIFO_WORD_FILLED (1<<10) +#define MV_SDIO_IRQ_READ_WAIT (1<<9) +#define MV_SDIO_IRQ_CARD_EVENT (1<<8) +#define MV_SDIO_IRQ_RX_FULL (1<<5) +#define MV_SDIO_IRQ_TX_EMPTY (1<<4) +#define MV_SDIO_IRQ_DMA (1<<3) +#define MV_SDIO_IRQ_BLOCK_GAP (1<<2) +#define MV_SDIO_IRQ_XFER (1<<1) +#define MV_SDIO_IRQ_CMD (1<<0) + +#define MV_SDIO_IRQ_ALL (MV_SDIO_IRQ_CMD | MV_SDIO_IRQ_XFER | MV_SDIO_IRQ_BLOCK_GAP | MV_SDIO_IRQ_DMA | MV_SDIO_IRQ_RX_FULL | MV_SDIO_IRQ_TX_EMPTY | MV_SDIO_IRQ_CARD_EVENT | MV_SDIO_IRQ_READ_WAIT | MV_SDIO_IRQ_IMB_FIFO_WORD_FILLED | MV_SDIO_IRQ_IMB_FIFO_WORD_AVAIL | MV_SDIO_IRQ_SUSPENSE_ON_IRQ_EN | MV_SDIO_IRQ_AUTOCMD12 | MV_SDIO_IRQ_UNEXPECTED_RSP | MV_SDIO_IRQ_ERR ) + +//#define MV_SDIO_IRQ_SR + + +/* + * ERR status bits + */ +#define MV_SDIO_EIRQ_CRC_STAT (1<<14) +#define MV_SDIO_EIRQ_CRC_STARTBIT (1<<13) +#define MV_SDIO_EIRQ_CRC_ENDBIT (1<<12) +#define MV_SDIO_EIRQ_RSP_TBIT (1<<11) +#define MV_SDIO_EIRQ_XFER_SIZE (1<<10) +#define MV_SDIO_EIRQ_CMD_STARTBIT (1<<9) +#define MV_SDIO_EIRQ_AUTOCMD12 (1<<8) +#define MV_SDIO_EIRQ_DATA_ENDBIT (1<<6) +#define MV_SDIO_EIRQ_DATA_CRC16 (1<<5) +#define MV_SDIO_EIRQ_DATA_TMO (1<<4) +#define MV_SDIO_EIRQ_CMD_INDEX (1<<3) +#define MV_SDIO_EIRQ_CMD_ENDBIT (1<<2) +#define MV_SDIO_EIRQ_CMD_CRC7 (1<<1) +#define MV_SDIO_EIRQ_CMD_TMO (1<<0) + +#define MV_SDIO_EIRQ_ALL (MV_SDIO_EIRQ_CMD_TMO | \ + MV_SDIO_EIRQ_CMD_CRC7 | \ + MV_SDIO_EIRQ_CMD_ENDBIT | \ + MV_SDIO_EIRQ_CMD_INDEX | \ + MV_SDIO_EIRQ_DATA_TMO | \ + MV_SDIO_EIRQ_DATA_CRC16 | \ + MV_SDIO_EIRQ_DATA_ENDBIT | \ + MV_SDIO_EIRQ_AUTOCMD12 | \ + MV_SDIO_EIRQ_CMD_STARTBIT |\ + MV_SDIO_EIRQ_XFER_SIZE |\ + MV_SDIO_EIRQ_RSP_TBIT |\ + MV_SDIO_EIRQ_CRC_ENDBIT |\ + MV_SDIO_EIRQ_CRC_STARTBIT |\ + MV_SDIO_EIRQ_CRC_STAT) + +/* AUTOCMD12 register values */ +#define MV_SDIO_AUTOCMD12_BUSY_CHECK (1<<0) +#define MV_SDIO_AUTOCMD12_INDEX_CHECK (1<<1) +#define MV_SDIO_AUTOCMD12_INDEX(x) (x<<8) + +/* Software reset register */ +#define MV_SDIO_SW_RESET_ALL (1<<8) + +/* */ +#define MV_SDIO_SIG_CD 1 +#define MV_SDIO_SIG_WP 2 + +#endif /* _MVSDMMC_INCLUDE */ + diff --git a/sys/arm/mv/mv_sdiowl.c b/sys/arm/mv/mv_sdiowl.c new file mode 100644 index 0000000..491cd18 --- /dev/null +++ b/sys/arm/mv/mv_sdiowl.c @@ -0,0 +1,455 @@ +/*- + * Copyright (c) 2013 Ilya Bakulin. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Portions of this software may have been developed with reference to + * the SD Simplified Specification. The following disclaimer may apply: + * + * The following conditions apply to the release of the simplified + * specification ("Simplified Specification") by the SD Card Association and + * the SD Group. The Simplified Specification is a subset of the complete SD + * Specification which is owned by the SD Card Association and the SD + * Group. This Simplified Specification is provided on a non-confidential + * basis subject to the disclaimers below. Any implementation of the + * Simplified Specification may require a license from the SD Card + * Association, SD Group, SD-3C LLC or other third parties. + * + * Disclaimers: + * + * The information contained in the Simplified Specification is presented only + * as a standard specification for SD Cards and SD Host/Ancillary products and + * is provided "AS-IS" without any representations or warranties of any + * kind. No responsibility is assumed by the SD Group, SD-3C LLC or the SD + * Card Association for any damages, any infringements of patents or other + * right of the SD Group, SD-3C LLC, the SD Card Association or any third + * parties, which may result from its use. No license is granted by + * implication, estoppel or otherwise under any patent or other rights of the + * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing + * herein shall be construed as an obligation by the SD Group, the SD-3C LLC + * or the SD Card Association to disclose or distribute any technical + * information, know-how or other confidential information to any third party. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +MALLOC_DECLARE(M_MVSDIOWL); +MALLOC_DEFINE(M_MVSDIOWL, "mv_sdiowl", "Buffers of Marvell SDIO WLAN Driver"); + +#include "mmcbus_if.h" + +#define DN_LD_CARD_RDY (1u << 0) +#define CARD_IO_READY (1u << 3) + +/* Host Control Registers */ +/* Host Control Registers : Host interrupt mask */ +#define HOST_INT_MASK_REG 0x02 +/* Host Control Registers : Upload host interrupt mask */ +#define UP_LD_HOST_INT_MASK (0x1U) +/* Host Control Registers : Download host interrupt mask */ +#define DN_LD_HOST_INT_MASK (0x2U) +/* Enable Host interrupt mask */ +#define HOST_INT_ENABLE (UP_LD_HOST_INT_MASK | DN_LD_HOST_INT_MASK) +/* Disable Host interrupt mask */ +#define HOST_INT_DISABLE 0xff + +/* Host Control Registers : Host interrupt status */ +#define HOST_INTSTATUS_REG 0x03 +/* Host Control Registers : Upload host interrupt status */ +#define UP_LD_HOST_INT_STATUS (0x1U) +/* Host Control Registers : Download host interrupt status */ +#define DN_LD_HOST_INT_STATUS (0x2U) + +/* Host Control Registers : Host interrupt RSR */ +#define HOST_INT_RSR_REG 0x01 +#define SDIO_INT_MASK 0x3F + +/* Host Control Registers : I/O port 0 */ +#define IO_PORT_0_REG 0x78 +/* Host Control Registers : I/O port 1 */ +#define IO_PORT_1_REG 0x79 +/* Host Control Registers : I/O port 2 */ +#define IO_PORT_2_REG 0x7A + +/* Host F1 read base 0 */ +#define HOST_F1_RD_BASE_0 0x0040 +/* Host F1 read base 1 */ +#define HOST_F1_RD_BASE_1 0x0041 + +/* Card Control Registers : Card status register */ +#define CARD_STATUS_REG 0x30 +/* Card Control Registers : Miscellaneous Configuration Register */ +#define CARD_MISC_CFG_REG 0x6C + +/* Firmware status 0 register */ +#define CARD_FW_STATUS0_REG 0x60 +/* Firmware status 1 register */ +#define CARD_FW_STATUS1_REG 0x61 + +/* Misc. Config Register : Auto Re-enable interrupts */ +#define AUTO_RE_ENABLE_INT 1 << 4 + +/* SD block size can not bigger than 64 due to buf size limit in firmware */ +/* define SD block size for data Tx/Rx */ +#define SDIO_BLOCK_SIZE 256 + +#define FIRMWARE_READY_SDIO 0xfedc + +#define BUF_ALIGN 512 + +struct sdiowl_softc { + device_t dev; + struct mtx sc_mtx; + int running; + int sdio_function; + uint32_t ioport; +}; + +/* bus entry points */ +static int sdiowl_attach(device_t dev); +static int sdiowl_detach(device_t dev); +static int sdiowl_probe(device_t dev); + +#define SDIOWL_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define SDIOWL_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define SDIOWL_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ + "sdiowl", MTX_DEF) +#define SDIOWL_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); +#define SDIOWL_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); +#define SDIOWL_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); + +static int +sdiowl_probe(device_t dev) +{ + uint32_t media_size, sdio_vendor, sdio_product; + +// device_quiet(dev); + device_set_desc(dev, "Marvell dummy SDIO WLAN driver"); + + if(BUS_READ_IVAR(device_get_parent(dev), dev, MMC_IVAR_MEDIA_SIZE, + &media_size)) { + device_printf(dev, "Cannot get media size from the bus!\n"); + return (-1); + } + if (media_size > 0) + return(-1); + + if(BUS_READ_IVAR(device_get_parent(dev), dev, MMC_IVAR_SDIO_VENDOR, + &sdio_vendor) || + BUS_READ_IVAR(device_get_parent(dev), dev, MMC_IVAR_SDIO_PRODUCT, + &sdio_product)) { + device_printf(dev, "Cannot get vendor/product/function from the bus!\n"); + return (-1); + } + + if (sdio_vendor == 0x02DF && sdio_product == 0x9119) + return (0); + else + return (-1); +} + +static int +sdiowl_read_1(struct sdiowl_softc *sc, uint32_t reg, uint8_t *val) { + return MMCBUS_IO_READ_1(device_get_parent(sc->dev), sc->dev, + reg, val); +} + +static int +sdiowl_write_1(struct sdiowl_softc *sc, uint32_t reg, uint8_t val) { + return MMCBUS_IO_WRITE_1(device_get_parent(sc->dev), sc->dev, + reg, val); +} + +static int +sdiowl_get_fw_status(struct sdiowl_softc *sc, uint16_t *s) { + uint8_t s0, s1; + + if (sdiowl_read_1(sc, CARD_FW_STATUS0_REG, &s0) || + sdiowl_read_1(sc, CARD_FW_STATUS1_REG, &s1)) + return (-1); + + *s = ((s1 << 8) | s0); + + return 0; +} + +static int +sdiowl_check_fw_status(struct sdiowl_softc *sc) { + uint16_t status, status_ok; + int i, ret; + + status_ok = 0; + ret = -1; + + for (i=0; i < 200; i++) { + ret = sdiowl_get_fw_status(sc, &status); + if (ret) + continue; + if (status == FIRMWARE_READY_SDIO) { + status_ok = status; + ret = 0; + break; + } else { + pause("sdiowl", 10); + ret = -1; + } + } + + return (ret); +} + +static int +sdiowl_disable_host_int(struct sdiowl_softc *sc) { + uint8_t host_int_mask; + + if (sdiowl_read_1(sc, HOST_INT_MASK_REG, &host_int_mask)) + return (-1); + host_int_mask &= (uint8_t) ~HOST_INT_DISABLE; + if (sdiowl_write_1(sc, HOST_INT_MASK_REG, host_int_mask)) { + device_printf(sc->dev, "Disabling host interrupt failed!\n"); + return (-1); + } + + return 0; +} + +static int +sdiowl_enable_host_int(struct sdiowl_softc *sc) { + if (sdiowl_write_1(sc, HOST_INT_MASK_REG, HOST_INT_ENABLE)) { + device_printf(sc->dev, "Enabling host interrupt failed!\n"); + return (-1); + } + + return 0; +} + +static int +sdiowl_attach(device_t dev) +{ + struct sdiowl_softc *sc; + const struct firmware *fw; + uint8_t funcs_enabled; + uint8_t sdio_irq; + + sc = device_get_softc(dev); + sc->dev = dev; + SDIOWL_LOCK_INIT(sc); + sc->running = 1; + BUS_READ_IVAR(device_get_parent(dev), dev, MMC_IVAR_SDIO_FUNCTION, + &sc->sdio_function); + + /* Call FW loader from FreeBSD firmware framework */ + fw = firmware_get("sdiowl_fw"); + if (!fw) { + device_printf(dev, "Firmware request failed!\n"); + return (-1); + } + + device_printf(dev, "Got FW: name=%s, data=%08X, ver=%d, size=%d\n", + fw->name, (uint32_t )fw->data, fw->version, fw->datasize); + + if (MMCBUS_IO_F0_READ_1(device_get_parent(dev), dev, + SD_IO_CCCR_FN_ENABLE, &funcs_enabled)) + return (-1); + + /* + * XXX: We probably should just enable function from the driver code + * and not rely on MMC/SDIO stack to do this! + */ + if (funcs_enabled & (1 << sc->sdio_function)) + device_printf(dev, "My function is enabled, good!\n"); + else { + device_printf(dev, "My func is NOT enabled, bad (mask = %d, func=%d)!\n", funcs_enabled, sc->sdio_function); + return (-1); + } + + /* Set block size */ + device_printf(dev, "Setting block size to %d bytes\n", SDIO_BLOCK_SIZE); + if(MMCBUS_IO_SET_BLOCK_SIZE(device_get_parent(dev), dev, SDIO_BLOCK_SIZE)) + return (-1); + + /* ACK the first interrupt from bootloader, disable host intr mask */ + sdio_irq = 0; + if(sdiowl_read_1(sc, HOST_INTSTATUS_REG, &sdio_irq)) + return (-1); + + /* Disable host interrupts */ + sdiowl_disable_host_int(sc); + + /* Get IO Port */ + uint8_t reg; + if (sdiowl_read_1(sc, IO_PORT_0_REG, ®)) + return (-1); + sc->ioport = reg; + if (sdiowl_read_1(sc, IO_PORT_1_REG, ®)) + return (-1); + sc->ioport |= reg << 8; + if (sdiowl_read_1(sc, IO_PORT_2_REG, ®)) + return (-1); + sc->ioport |= reg << 16; + device_printf(dev, "IO Port: 0x%08X\n", sc->ioport); + + /* Set Host interrupt reset to read to clear */ + if (!sdiowl_read_1(sc, HOST_INT_RSR_REG, ®)) + sdiowl_write_1(sc, HOST_INT_RSR_REG, reg | SDIO_INT_MASK); + else + return (-1); + + /* Dnld/Upld ready set to auto reset */ + if (!sdiowl_read_1(sc, CARD_MISC_CFG_REG, ®)) + sdiowl_write_1(sc, CARD_MISC_CFG_REG, reg | AUTO_RE_ENABLE_INT); + else + return (-1); + + + /* XXX No idea but without this FW upload doesn't work :-( */ + char data[256]; + memset(data, 0, 256); + if (MMCBUS_IO_READ_MULTI(device_get_parent(dev), dev, 0, + data, 256, 1)) { + device_printf(dev, "Cannot read-multi\n"); + } + + /* Now upload FW to the card */ + uint8_t status, base0, base1, tries; + uint32_t len, txlen, tx_blocks, offset; + + uint8_t *fwbuf_ = malloc(2048 + BUF_ALIGN, M_MVSDIOWL, M_WAITOK); + + size_t fwbuf_a = (size_t) fwbuf_; + fwbuf_a &= ~ (BUF_ALIGN - 1) ; + fwbuf_a += BUF_ALIGN; + uint8_t *fwbuf = (uint8_t *) fwbuf_a; + offset = len = 0; + do { + for (tries = 0; tries < 200; tries ++) { + status = 0; + /* Ask card about its status */ + if (sdiowl_read_1(sc, CARD_STATUS_REG, &status)) + return (-1); + if (!(status | CARD_IO_READY | DN_LD_CARD_RDY)) { + device_printf(dev, + "Card NOT ready to accept FW (status %d)\n", + status); + return (-1); + } + + if (sdiowl_read_1(sc, HOST_F1_RD_BASE_0, &base0) > 0 || + sdiowl_read_1(sc, HOST_F1_RD_BASE_1, &base1) > 0) { + device_printf(dev, "Err while reading BASEx\n"); + return (-1); + } + + len = (((base1 & 0xff) << 8) | (base0 & 0xff)); + if (len) + break; + pause("sdiowl", 10); + } + + txlen = len; + + if (!len) + break; + if (len & 0x1) { + device_printf(sc->dev, "CRC error?! len=0x%04X, txlen=%d\n", len, txlen); + break; + } + + if (fw->datasize - offset < txlen) + txlen = fw->datasize - offset; + + tx_blocks = (txlen + SDIO_BLOCK_SIZE - 1) + / SDIO_BLOCK_SIZE; + /* Copy payload to buffer */ + memset(fwbuf_, 0, 2048 + BUF_ALIGN); + memmove(fwbuf, (uint8_t *)((size_t)fw->data + offset), txlen); + + if (MMCBUS_IO_WRITE_FIFO(device_get_parent(dev), dev, sc->ioport, + (uint8_t *) fwbuf, + tx_blocks * SDIO_BLOCK_SIZE)) { + device_printf(dev, "Cannot write-fifo\n"); + break; + } + + offset += txlen; + + if (offset >= fw->datasize) + break; + pause("sdiowl", 2); + + } while (true); + + device_printf(sc->dev, "FW download over, size %d bytes\n", offset); + + /* Check FW status */ + if (sdiowl_check_fw_status(sc)) { + device_printf(sc->dev, "FW did not come up in time\n"); + return (-1); + } else device_printf(sc->dev, "FW READY\n"); + + /* Enable host interrupts */ + sdiowl_enable_host_int(sc); + + return (0); +} + +static int +sdiowl_detach(device_t dev) +{ + /* Not implemented yet */ + return (-1); +} + +static device_method_t sdiowl_methods[] = { + DEVMETHOD(device_probe, sdiowl_probe), + DEVMETHOD(device_attach, sdiowl_attach), + DEVMETHOD(device_detach, sdiowl_detach), + DEVMETHOD_END +}; + +static driver_t sdiowl_driver = { + "sdiowl", + sdiowl_methods, + sizeof(struct sdiowl_softc), +}; +static devclass_t sdiowl_devclass; + +DRIVER_MODULE(sdiowl, mmc, sdiowl_driver, sdiowl_devclass, NULL, NULL); diff --git a/sys/boot/uboot/common/main.c b/sys/boot/uboot/common/main.c index 82c86b2..0a5b368 100644 --- a/sys/boot/uboot/common/main.c +++ b/sys/boot/uboot/common/main.c @@ -122,6 +122,7 @@ main(void) struct api_signature *sig = NULL; int i; struct open_file f; + char *ub_currdev; if (!api_search_sig(&sig)) return (-1); @@ -166,6 +167,7 @@ main(void) printf("(%s, %s)\n", bootprog_maker, bootprog_date); meminfo(); + ub_currdev = ub_env_get("currdev"); /* * March through the device switch probing for things. */ @@ -198,8 +200,13 @@ main(void) if (devsw[i] == NULL) panic("No boot device found!"); - env_setenv("currdev", EV_VOLATILE, uboot_fmtdev(&currdev), - uboot_setcurrdev, env_nounset); + if (ub_currdev) { + env_setenv("currdev", EV_VOLATILE, ub_currdev, + uboot_setcurrdev, env_nounset); + } else { + env_setenv("currdev", EV_VOLATILE, uboot_fmtdev(&currdev), + uboot_setcurrdev, env_nounset); + } env_setenv("loaddev", EV_VOLATILE, uboot_fmtdev(&currdev), env_noset, env_nounset); diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index f101e65..2da74a7 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -67,6 +67,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include + #include "mmcbr_if.h" #include "mmcbus_if.h" @@ -76,6 +79,13 @@ struct mmc_softc { struct intr_config_hook config_intrhook; device_t owner; uint32_t last_rca; + uint32_t __sdio_rca; /* XXX Temp; for testng only */ + uint32_t __sdio_cis1_info; + uint8_t sdio_nfunc; + u_char sdio_bus_width; + uint8_t sdio_support_hs; + struct sdio_function sdio_func0; + STAILQ_HEAD(, sdio_function) sdiof_head; }; /* @@ -102,6 +112,7 @@ struct mmc_ivars { uint32_t hs_tran_speed; /* Max speed in high speed mode */ uint32_t erase_sector; /* Card native erase sector size */ char card_id_string[64];/* Formatted CID info (serial, MFG, etc) */ + struct sdio_function *sdiof; }; #define CMD_RETRIES 3 @@ -159,10 +170,16 @@ static uint32_t mmc_get_bits(uint32_t *bits, int bit_len, int start, int size); static int mmc_highest_voltage(uint32_t ocr); static void mmc_idle_cards(struct mmc_softc *sc); +static int mmc_io_func_enable(struct mmc_softc *sc, uint32_t fn); +static uint8_t mmc_io_read_1(struct mmc_softc *sc, uint32_t fn, uint32_t adr); +static int mmc_io_rw_direct(struct mmc_softc *sc, int wr, uint32_t fn, + uint32_t adr, uint8_t *data); static void mmc_ms_delay(int ms); static void mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard); static void mmc_power_down(struct mmc_softc *sc); static void mmc_power_up(struct mmc_softc *sc); +static int mmc_probe_sdio(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr, + uint8_t *nfunc, uint8_t *mem_present); static void mmc_rescan_cards(struct mmc_softc *sc); static void mmc_scan(struct mmc_softc *sc); static int mmc_sd_switch(struct mmc_softc *sc, uint8_t mode, uint8_t grp, @@ -220,6 +237,8 @@ mmc_attach(device_t dev) sc->dev = dev; MMC_LOCK_INIT(sc); + STAILQ_INIT(&sc->sdiof_head); + /* We'll probe and attach our children later, but before / mount */ sc->config_intrhook.ich_func = mmc_delayed_attach; sc->config_intrhook.ich_arg = sc; @@ -470,6 +489,7 @@ mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, return (0); } +/* CMD0 */ static void mmc_idle_cards(struct mmc_softc *sc) { @@ -494,6 +514,7 @@ mmc_idle_cards(struct mmc_softc *sc) mmc_ms_delay(1); } +/* CMD41 -> CMD55 */ static int mmc_send_app_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr) { @@ -521,6 +542,7 @@ mmc_send_app_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr) return (err); } +/* CMD1 */ static int mmc_send_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr) { @@ -548,6 +570,7 @@ mmc_send_op_cond(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr) return (err); } +/* CMD8 */ static int mmc_send_if_cond(struct mmc_softc *sc, uint8_t vhs) { @@ -600,6 +623,7 @@ mmc_power_down(struct mmc_softc *sc) mmcbr_update_ios(dev); } +/* CMD7 */ static int mmc_select_card(struct mmc_softc *sc, uint16_t rca) { @@ -1042,6 +1066,7 @@ mmc_app_decode_sd_status(uint32_t *raw_sd_status, sd_status->erase_offset = mmc_get_bits(raw_sd_status, 512, 400, 2); } +/* CMD2 */ static int mmc_all_send_cid(struct mmc_softc *sc, uint32_t *rawcid) { @@ -1162,6 +1187,7 @@ mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp) return (err); } +/* CMD3 */ static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp) { @@ -1177,6 +1203,7 @@ mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp) return (err); } +/* CMD13 */ static int mmc_send_status(struct mmc_softc *sc, uint16_t rca, uint32_t *status) { @@ -1223,6 +1250,423 @@ mmc_log_card(device_t dev, struct mmc_ivars *ivar, int newcard) ivar->read_only ? ", read-only" : ""); } +/* + * Enables the given function on SDIO card. + */ +static int +mmc_io_func_enable(struct mmc_softc *sc, uint32_t fn) +{ + int err, i; + uint8_t funcs; + + if (fn > sc->sdio_nfunc) { + device_printf(sc->dev, "Invalid function to enable: %d\n", fn); + return (MMC_ERR_INVALID); + } + + funcs = mmc_io_read_1(sc, 0, SD_IO_CCCR_FN_READY); + + funcs |= 1 << fn; + err = mmc_io_rw_direct(sc, 1, 0, SD_IO_CCCR_FN_ENABLE, &funcs); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error writing SDIO func enable %d\n", err); + return (err); + } + + funcs = 0; + for(i=0; i < 10; i++) { + funcs = mmc_io_read_1(sc, 0, SD_IO_CCCR_FN_READY); + + if (funcs & (1 << fn)) + return 0; + mmc_ms_delay(10); + } + + device_printf(sc->dev, "Cannot enable function %d!\n", fn); + return (MMC_ERR_FAILED); +} + +/* CMD52 */ +static int +mmc_io_rw_direct(struct mmc_softc *sc, int wr, uint32_t fn, uint32_t adr, + uint8_t *data) +{ + struct mmc_command cmd; + int err; + + memset(&cmd, 0, sizeof(cmd)); + cmd.opcode = SD_IO_RW_DIRECT; + cmd.arg = SD_IO_RW_FUNC(fn) | SD_IO_RW_ADR(adr); + if (wr) + cmd.arg |= SD_IO_RW_WR | SD_IO_RW_RAW | SD_IO_RW_DAT(*data); + cmd.flags = MMC_RSP_R5 | MMC_CMD_AC; + cmd.data = NULL; + + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + if (err) + return (err); + if (cmd.error) + return (cmd.error); + + if (cmd.resp[0] & R5_COM_CRC_ERROR) + return (MMC_ERR_BADCRC); + if (cmd.resp[0] & (R5_ILLEGAL_COMMAND | R5_FUNCTION_NUMBER)) + return (MMC_ERR_INVALID); + if (cmd.resp[0] & R5_OUT_OF_RANGE) + return (MMC_ERR_FAILED); + + /* Just for information... */ + if (R5_IO_CURRENT_STATE(cmd.resp[0]) != 1) + printf("!!! SDIO state %d\n", R5_IO_CURRENT_STATE(cmd.resp[0])); + + if (cmd.resp[0] & R5_ERROR) + printf("An error was detected!\n"); + + if (cmd.resp[0] & R5_COM_CRC_ERROR) + printf("A CRC error was detected!\n"); + + *data = (uint8_t) (cmd.resp[0] & 0xff); + return (MMC_ERR_NONE); +} + +/* + * CMD53 + * incr = 1 with non-zero block count does not make any sense! +*/ +static int +mmc_io_rw_extended(struct mmc_softc *sc, int wr, uint32_t fn, uint32_t adr, + uint8_t *datap, size_t datalen, uint8_t incr, uint8_t blks) +{ + int err; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(cmd)); + memset(&data, 0, sizeof(data)); + + cmd.opcode = SD_IO_RW_EXTENDED; + cmd.flags = MMC_RSP_R5 | MMC_CMD_AC; + cmd.arg = SD_IO_RW_FUNC(fn); + cmd.arg |= SD_IO_RW_ADR(adr); + if (blks) + cmd.arg |= SD_IOE_RW_BLK | SD_IOE_RW_LEN(blks); + else + cmd.arg |= SD_IOE_RW_LEN(datalen); + if (wr) + cmd.arg |= SD_IO_RW_WR; + else + memset(datap, 0, datalen); + + if (incr) + cmd.arg |= SD_IO_RW_INCR; + cmd.data = &data; + + data.data = datap; + data.len = datalen; + data.flags = wr ? MMC_DATA_WRITE : MMC_DATA_READ; + if (blks > 1) { + data.flags |= MMC_DATA_MULTI; + data.blocksz = data.len / blks; + } + + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + + if (err) + return (err); + if (cmd.error) + return (cmd.error); + + if (cmd.resp[0] & R5_COM_CRC_ERROR) + return (MMC_ERR_BADCRC); + if (cmd.resp[0] & (R5_ILLEGAL_COMMAND | R5_FUNCTION_NUMBER)) + return (MMC_ERR_INVALID); + if (cmd.resp[0] & R5_OUT_OF_RANGE) + return (MMC_ERR_FAILED); + + return (MMC_ERR_NONE); +} + +static uint8_t +mmc_io_read_1(struct mmc_softc *sc, uint32_t fn, uint32_t adr) +{ + int err; + uint8_t val = 0; + + err = mmc_io_rw_direct(sc, 0, fn, adr, &val); + if (err) { + device_printf(sc->dev, "Err reading FN %d addr 0x%08X: %d", + fn, adr, err); + return (0xff); + } + return val; +} + +/* + * Parse Card Information Structure of the SDIO card. + * Both Function 0 CIS and Function 1-7 CIS are supported. + */ +static int +mmc_io_parse_cis(struct mmc_softc *sc, uint8_t func, uint32_t cisptr, struct sdio_function *sdio_func) +{ + uint32_t tmp; + + uint8_t tuple_id, tuple_len, func_id; + uint32_t addr, maninfo_p; + + char *cis1_info[4]; + int start, i, ch, count; + char cis1_info_buf[256]; + + sdio_func->number = func; + + cis1_info[0] = NULL; + cis1_info[1] = NULL; + cis1_info[2] = NULL; + cis1_info[3] = NULL; + memset(cis1_info_buf, 0, 256); + + tmp = 0; + addr = cisptr; + + /* + * XXX Some parts of this code are taken + * from sys/dev/pccard/pccard_cis.c. + * Need to think about making it more abstract. + */ + do { + tuple_id = mmc_io_read_1(sc, 0, addr++); + if (tuple_id == SD_IO_CISTPL_END) + break; + tuple_len = mmc_io_read_1(sc, 0, addr++); + if (tuple_len == 0 && tuple_id != 0x00) { + device_printf(sc->dev, + "Parse error: 0-length tuple %02X\n", tuple_id); + break; + } + + switch (tuple_id) { + case SD_IO_CISTPL_VERS_1: + maninfo_p = addr; + + sdio_func->cis1_major = mmc_io_read_1(sc, 0, maninfo_p); + sdio_func->cis1_minor = mmc_io_read_1(sc, 0, maninfo_p + 1); + + /* + * XXX Temp; use this to test if multi-byte read from + * cis1_info will also return crap + */ + sc->__sdio_cis1_info = maninfo_p + 2; + for (count = 0, start = 0, i = 0; + (count < 4) && ((i + 4) < 256); i++) { + ch = mmc_io_read_1(sc, 0, maninfo_p + 2 + i); + if (ch == 0xff) + break; + cis1_info_buf[i] = ch; + if (ch == 0) { + cis1_info[count] = + cis1_info_buf + start; + start = i + 1; + count++; + } + } + device_printf(sc->dev, "Read from %02X using 1-byte read:\n", sc->__sdio_cis1_info); + hexdump(cis1_info_buf, 256, NULL, 0); + + device_printf(sc->dev, "*** Info[0]: %s\n", cis1_info[0]); + device_printf(sc->dev, "*** Info[1]: %s\n", cis1_info[1]); + device_printf(sc->dev, "*** Info[2]: %s\n", cis1_info[2]); + device_printf(sc->dev, "*** Info[3]: %s\n", cis1_info[3]); + break; + + case SD_IO_CISTPL_MANFID: + if (tuple_len < 4) { + device_printf(sc->dev, "MANFID is too short\n"); + break; + } + sdio_func->manufacturer = mmc_io_read_1(sc, 0, addr); + sdio_func->manufacturer |= mmc_io_read_1(sc, 0, addr + 1) << 8; + + sdio_func->product = mmc_io_read_1(sc, 0, addr + 2); + sdio_func->product |= mmc_io_read_1(sc, 0, addr + 3) << 8; + break; + + case SD_IO_CISTPL_FUNCID: + /* Function ID for SDIO devices is always 0x0C */ + if (tuple_len < 1) { + device_printf(sc->dev, "FUNCID is too short\n"); + break; + } + func_id = mmc_io_read_1(sc, 0, addr); + if (func_id != 0x0C) + device_printf(sc->dev, "func_id non-std: %d\n", func_id); + break; + + case SD_IO_CISTPL_FUNCE: + if (tuple_len < 4) { + device_printf(sc->dev, "FUNCE is too short\n"); + break; + } + uint8_t ext_data_type = mmc_io_read_1(sc, 0, addr); + + if (func == 0) { + if (ext_data_type != 0x0) + device_printf(sc->dev, + "funce for func 0 non-std: %d\n", + ext_data_type); + sdio_func->max_blksize = + mmc_io_read_1(sc, 0, addr + 1); + sdio_func->max_blksize |= + mmc_io_read_1(sc, 0, addr + 2) << 8; + sdio_func->max_tran_speed = + mmc_io_read_1(sc, 0, addr + 3); + uint8_t max_tran_rate = + sdio_func->max_tran_speed & 0x7; + uint8_t timecode = + (sdio_func->max_tran_speed >> 3) & 0xF; + + device_printf(sc->dev, + "*** Max tran speed: %02X (unit %d, time value code %d\n", + sdio_func->max_tran_speed, max_tran_rate, timecode); + } else { + if (ext_data_type != 0x1) + device_printf(sc->dev, + "funce for func 0 non-std: %d\n", + ext_data_type); + sdio_func->max_blksize = + mmc_io_read_1(sc, 0, addr + 0x0c); + sdio_func->max_blksize |= + mmc_io_read_1(sc, 0, addr + 0x0d) << 8; + + } + + break; + + default: + device_printf(sc->dev, + "*** Skipping tuple ID %02X len %02X\n", + tuple_id, tuple_len); + break; + } + + addr += tuple_len; + tmp++; + } while (tuple_id != SD_IO_CISTPL_END && tmp < 10); + + return 0; +} + +/* + * Parse Card Common Control Register of the SDIO card + */ +static int +mmc_io_parse_cccr(struct mmc_softc *sc) +{ + uint32_t cisptr = 0; + + cisptr = mmc_io_read_1(sc, 0, SD_IO_CCCR_CISPTR); + cisptr |= mmc_io_read_1(sc, 0, SD_IO_CCCR_CISPTR + 1) << 8; + cisptr |= mmc_io_read_1(sc, 0, SD_IO_CCCR_CISPTR + 2) << 16; + + if (cisptr < SD_IO_CIS_START || + cisptr > SD_IO_CIS_START + SD_IO_CIS_SIZE) { + device_printf(sc->dev, "Bad CIS pointer in CCCR: %08X\n", cisptr); + return (-1); + } + + return mmc_io_parse_cis(sc, 0, cisptr, &sc->sdio_func0); +} + +/* + * Parse Function Basic Register of the given function + */ +static int +mmc_io_parse_fbr(struct mmc_softc *sc, uint8_t func) +{ + uint32_t fbr_addr, cisptr; + + fbr_addr = SD_IO_FBR_START * func + 0x9; + cisptr = mmc_io_read_1(sc, 0, fbr_addr); + cisptr |= mmc_io_read_1(sc, 0, fbr_addr + 1) << 8; + cisptr |= mmc_io_read_1(sc, 0, fbr_addr + 2) << 16; + + if (cisptr < SD_IO_CIS_START || + cisptr > SD_IO_CIS_START + SD_IO_CIS_SIZE) { + device_printf(sc->dev, "Bad CIS pointer in FBR: %08X\n", cisptr); + return (-1); + } + + struct sdio_function *f = malloc(sizeof(struct sdio_function), M_DEVBUF, M_WAITOK); + STAILQ_INSERT_TAIL(&sc->sdiof_head, f, sdiof_list); + + return mmc_io_parse_cis(sc, func, cisptr, f); +} + +static void +mmc_io_get_info(struct mmc_softc *sc) +{ + sc->sdio_bus_width = bus_width_1; + sc->sdio_support_hs = 0; + + uint8_t cardcap = mmc_io_read_1(sc, 0, SD_IO_CCCR_CARDCAP); + uint8_t hs_info = mmc_io_read_1(sc, 0, SD_IO_CCCR_CISPTR + 0x13); + + /* + * If the card is a full-speed card, it supports 4-bit bus width. + * If it is low-speed, we check 4BLS to determine if it + * supports 4-bit width + */ + if (((cardcap & (1 << 6)) && (cardcap & (1 << 7))) || + ((cardcap & (1 << 6)) == 0)) + sc->sdio_bus_width = bus_width_4; + + sc->sdio_support_hs = hs_info & (1 << 0); +} + +/* Set bus width for SDIO card */ +static int +mmc_io_set_bus_width(struct mmc_softc *sc, int width) +{ + uint8_t busctrl = mmc_io_read_1(sc, 0, SD_IO_CCCR_BUS_WIDTH); + + busctrl |= width == bus_width_4 ? CCCR_BUS_WIDTH_4 : 0; + + if (mmc_debug) + device_printf(sc->dev, "Setting SDIO bus width to %d bits\n", + width == bus_width_4 ? 4 : 1); + + return mmc_io_rw_direct(sc, 1, 0, SD_IO_CCCR_BUS_WIDTH, &busctrl); +} + +static int +mmc_io_set_block_size(struct mmc_softc *sc, struct sdio_function *sdiof, + uint16_t bs) +{ + uint32_t addr; + uint8_t val; + int err; + + addr = SD_IO_FBR_START * sdiof->number + 0x10; + val = bs & 0xFF; + + err = mmc_io_rw_direct(sc, 1, 0, + addr++, &val); + if (err) { + device_printf(sc->dev, "mmc_io_set_block_size: Err %d\n", err); + return (err); + } + + val = (bs >> 8) & 0xFF; + err = mmc_io_rw_direct(sc, 1, 0, + addr++, &val); + if (err) { + device_printf(sc->dev, "mmc_io_set_block_size: Err %d\n", err); + return (err); + } + sdiof->blksize = bs; + + return (err); +} + static void mmc_discover_cards(struct mmc_softc *sc) { @@ -1233,11 +1677,102 @@ mmc_discover_cards(struct mmc_softc *sc) device_t child; uint16_t rca = 2; u_char switch_res[64]; + uint8_t nfunc, mem_present; if (bootverbose || mmc_debug) device_printf(sc->dev, "Probing cards\n"); while (1) { - err = mmc_all_send_cid(sc, raw_cid); + /* + * Probe SDIO first, because SDIO cards don't have + * a CID register and won't respond to the CMD2 + */ + mmc_idle_cards(sc); + err = mmc_probe_sdio(sc, 0, NULL, &nfunc, &mem_present); + sc->sdio_nfunc = nfunc; + if (err != MMC_ERR_NONE && err != MMC_ERR_TIMEOUT) { + device_printf(sc->dev, "Error probing SDIO %d\n", err); + break; + } + + /* The card answered OK -> SDIO */ + if (err == MMC_ERR_NONE) { + device_printf(sc->dev, "Detected SDIO card\n"); + mmc_send_relative_addr(sc, &resp); /* CMD3 */ + uint16_t rca = resp >> 16; + err = mmc_select_card(sc, rca); /* CMD7 */ + sc->__sdio_rca = rca; /* XXX Temp; for testing only */ + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error selecting SDIO %d\n", err); + break; + } + + device_printf(sc->dev, "Get card info\n"); + mmc_io_parse_cccr(sc); + mmc_io_get_info(sc); + for(i=1; i <= nfunc; i++) { + device_printf(sc->dev, + "Get info for function %d\n", i); + mmc_io_parse_fbr(sc, i); + mmc_io_func_enable(sc, i); + } + + device_printf(sc->dev, "=== Functions ===\n"); + struct sdio_function *f; + + STAILQ_FOREACH(f, &sc->sdiof_head, sdiof_list) + device_printf(sc->dev, + "FN %d, vendor %04X, product %04X; blksize %02X\n", + f->number, f->manufacturer, f->product, f->max_blksize); + + /* + * Only set 4-bit width if both the host and the card + * support it. + * The card starts in 1-bit mode by default. + */ + if (mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA && + sc->sdio_bus_width == bus_width_4) { + mmc_io_set_bus_width(sc, sc->sdio_bus_width); + mmcbr_set_bus_width(sc->dev, sc->sdio_bus_width); + } + + u_char sdio_timing; + uint32_t sdio_tran_speed; + /* Set high speed mode if host and card support it */ + if (mmcbr_get_caps(sc->dev) & MMC_CAP_HSPEED && + sc->sdio_support_hs) { + device_printf(sc->dev, "Activating high-speed mode"); + uint8_t hs_info = 1; + err = mmc_io_rw_direct(sc, 1, 0, + SD_IO_CCCR_CISPTR + 0x13, &hs_info); + if (err != MMC_ERR_NONE) { + device_printf(sc->dev, "Error setting HS mode%d\n", err); + return; + } + sdio_timing = bus_timing_hs; + sdio_tran_speed = 50 * 1000 * 1000; + } else { + sdio_tran_speed = 25 * 1000 * 1000; + sdio_timing = bus_timing_normal; + } + + /* Attach children */ + STAILQ_FOREACH(f, &sc->sdiof_head, sdiof_list) { + ivar = malloc(sizeof(struct mmc_ivars), M_DEVBUF, + M_WAITOK | M_ZERO); + ivar->sec_count = 0; + ivar->sdiof = f; + ivar->rca = rca; + ivar->timing = sdio_timing; + ivar->tran_speed = + ivar->hs_tran_speed = sdio_tran_speed; + child = device_add_child(sc->dev, NULL, -1); + device_set_ivars(child, ivar); + } + if (!mem_present) + return; + } + + err = mmc_all_send_cid(sc, raw_cid); /* Command 2 */ if (err == MMC_ERR_TIMEOUT) break; if (err != MMC_ERR_NONE) { @@ -1491,9 +2026,45 @@ mmc_delete_cards(struct mmc_softc *sc) return (0); } +/* CMD 5 */ +static int +mmc_probe_sdio(struct mmc_softc *sc, uint32_t ocr, uint32_t *rocr, uint8_t *nfunc, uint8_t *mem_present) { + struct mmc_command cmd; + int err = MMC_ERR_NONE, i; + + memset(&cmd, 0, sizeof(cmd)); + cmd.opcode = IO_SEND_OP_COND; + cmd.arg = 0; + cmd.flags = MMC_RSP_R4; + cmd.data = NULL; + + for (i = 0; i < 1000; i++) { + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + if (err != MMC_ERR_NONE) + break; + if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || + (ocr & MMC_OCR_VOLTAGE) == 0) + break; + err = MMC_ERR_TIMEOUT; + mmc_ms_delay(10); + } + + if (err == MMC_ERR_NONE) { + if (rocr) + *rocr = cmd.resp[0]; + if (nfunc) + *nfunc = SD_IO_OCR_NUM_FUNCTIONS(cmd.resp[0]); + if (mem_present) + *mem_present = cmd.resp[0] >> 27 & 0x1; + } + + return (err); +} + static void mmc_go_discovery(struct mmc_softc *sc) { + uint8_t nfunc, mem_present; uint32_t ocr; device_t dev; int err; @@ -1509,17 +2080,24 @@ mmc_go_discovery(struct mmc_softc *sc) if (bootverbose || mmc_debug) device_printf(sc->dev, "Probing bus\n"); mmc_idle_cards(sc); - err = mmc_send_if_cond(sc, 1); + err = mmc_send_if_cond(sc, 1); /* SD_SEND_IF_COND = 8 */ if ((bootverbose || mmc_debug) && err == 0) device_printf(sc->dev, "SD 2.0 interface conditions: OK\n"); - if (mmc_send_app_op_cond(sc, 0, &ocr) != MMC_ERR_NONE) { + if (mmc_probe_sdio(sc, 0, &ocr, &nfunc, &mem_present) == MMC_ERR_NONE) { + device_printf(dev, "SDIO probe OK (OCR: 0x%08x, %d functions, memory: %d)\n", ocr, nfunc, mem_present); + if (nfunc > 0 && mem_present) { + device_printf(sc->dev, "SDIO combo cards are not supported yet"); + return; + } + } else + if (mmc_send_app_op_cond(sc, 0, &ocr) != MMC_ERR_NONE) { /* retry 55 -> then 41 */ if (bootverbose || mmc_debug) device_printf(sc->dev, "SD probe: failed\n"); /* * Failed, try MMC */ mmcbr_set_mode(dev, mode_mmc); - if (mmc_send_op_cond(sc, 0, &ocr) != MMC_ERR_NONE) { + if (mmc_send_op_cond(sc, 0, &ocr) != MMC_ERR_NONE) { /* command 1 */ if (bootverbose || mmc_debug) device_printf(sc->dev, "MMC probe: failed\n"); ocr = 0; /* Failed both, powerdown. */ @@ -1553,9 +2131,11 @@ mmc_go_discovery(struct mmc_softc *sc) * Reselect the cards after we've idled them above. */ if (mmcbr_get_mode(dev) == mode_sd) { - err = mmc_send_if_cond(sc, 1); - mmc_send_app_op_cond(sc, - (err ? 0 : MMC_OCR_CCS) | mmcbr_get_ocr(dev), NULL); + if (mem_present) { + err = mmc_send_if_cond(sc, 1); /* CMD 8 */ + mmc_send_app_op_cond(sc, /* 41 -> 55 */ + (err ? 0 : MMC_OCR_CCS) | mmcbr_get_ocr(dev), NULL); + } } else mmc_send_op_cond(sc, mmcbr_get_ocr(dev), NULL); mmc_discover_cards(sc); @@ -1564,6 +2144,30 @@ mmc_go_discovery(struct mmc_softc *sc) mmcbr_set_bus_mode(dev, pushpull); mmcbr_update_ios(dev); mmc_calculate_clock(sc); + + /* XXX TESTING RW_EXTENDED */ + mmc_select_card(sc, sc->__sdio_rca); + + /* Try to do normal CMD52 that should work correctly */ + uint8_t hs_info; + err = mmc_io_rw_direct(sc, 0, 0, SD_IO_CCCR_CISPTR + 0x13, &hs_info); + if (err) + device_printf(sc->dev, "HS INFO read err %d\n", err); + + /* Disable interrupts from all functions */ + hs_info = 0; + err = mmc_io_rw_direct(sc, 1, 0, SD_IO_CCCR_INT_ENABLE, &hs_info); + if (err) + device_printf(sc->dev, "Interrupt disable err %d\n", err); + + /* Now try actual command */ +// mmc_debug = 10; + uint8_t data[100]; + err = mmc_io_rw_extended(sc, 0, 0, sc->__sdio_cis1_info, data, 100, 0, 0); + if (err) + device_printf(sc->dev, "Ext read err %d\n", err); + hexdump(data, 100, NULL, 0); + bus_generic_attach(dev); /* mmc_update_children_sysctl(dev);*/ } @@ -1575,7 +2179,7 @@ mmc_calculate_clock(struct mmc_softc *sc) int nkid, i, f_min, f_max; device_t *kids; struct mmc_ivars *ivar; - + f_min = mmcbr_get_f_min(sc->dev); f_max = mmcbr_get_f_max(sc->dev); max_dtr = max_hs_dtr = f_max; @@ -1583,6 +2187,7 @@ mmc_calculate_clock(struct mmc_softc *sc) max_timing = bus_timing_hs; else max_timing = bus_timing_normal; + if (device_get_children(sc->dev, &kids, &nkid) != 0) panic("can't get children"); for (i = 0; i < nkid; i++) { @@ -1668,6 +2273,15 @@ mmc_read_ivar(device_t bus, device_t child, int which, uintptr_t *result) case MMC_IVAR_MAX_DATA: *result = mmcbr_get_max_data(bus); break; + case MMC_IVAR_SDIO_VENDOR: + *result = ivar->sdiof ? ivar->sdiof->manufacturer : 0; + break; + case MMC_IVAR_SDIO_PRODUCT: + *result = ivar->sdiof ? ivar->sdiof->product : 0; + break; + case MMC_IVAR_SDIO_FUNCTION: + *result = ivar->sdiof ? ivar->sdiof->number : 0; + break; case MMC_IVAR_CARD_ID_STRING: *(char **)result = ivar->card_id_string; break; @@ -1702,6 +2316,120 @@ mmc_child_location_str(device_t dev, device_t child, char *buf, return (0); } +/* SDIO-related MMC bus methods */ +static int +mmcb_io_set_block_size(device_t dev, device_t child, uint16_t bs) +{ + struct mmc_ivars *ivar = device_get_ivars(child); + + return mmc_io_set_block_size(device_get_softc(dev), ivar->sdiof, bs); +} + +static int +mmcb_io_f0_read_1(device_t dev, device_t child, uint32_t adr, uint8_t *val) +{ + int err; + err = mmc_io_rw_direct(device_get_softc(dev), 0, 0, adr, val); + if (err) + device_printf(dev, "mmc_io_f0_read_1: Err %d", err); + return (err); +} + +static int +mmcb_io_read_1(device_t dev, device_t child, uint32_t adr, uint8_t *val) +{ + int err; + struct mmc_ivars *ivar = device_get_ivars(child); + + err = mmc_io_rw_direct(device_get_softc(dev), 0, ivar->sdiof->number, + adr, val); + if (err) + device_printf(dev, "mmc_io_read_1: Err %d", err); + return (err); +} + +static int +mmcb_io_write_1(device_t dev, device_t child, uint32_t adr, uint8_t val) +{ + int err; + struct mmc_ivars *ivar = device_get_ivars(child); + + err = mmc_io_rw_direct(device_get_softc(dev), 0, ivar->sdiof->number, + adr, &val); + if (err) + device_printf(dev, "mmc_io_write_1: Err %d", err); + return (err); +} + +static int +mmcb_io_write_multi(device_t dev, device_t child, uint32_t adr, + uint8_t *datap, size_t datalen, uint16_t nblocks) +{ + int err; + struct mmc_ivars *ivar = device_get_ivars(child); + + err = mmc_io_rw_extended(device_get_softc(dev), 1, ivar->sdiof->number, + adr, datap, datalen, 1, nblocks); + if (err) + device_printf(dev, "mmcb_io_write_multi: Err %d", err); + return (err); +} + +static int +mmcb_io_read_multi(device_t dev, device_t child, uint32_t adr, + uint8_t *datap, size_t datalen, uint16_t nblocks) +{ + int err; + struct mmc_ivars *ivar = device_get_ivars(child); + + err = mmc_io_rw_extended(device_get_softc(dev), 0, ivar->sdiof->number, + adr, datap, datalen, 1, nblocks); + + if (err) + device_printf(dev, "mmc_io_read_multi: Err %d\n", err); + return (err); +} + +static int +mmcb_io_write_fifo(device_t dev, device_t child, uint32_t adr, + uint8_t *datap, size_t datalen) +{ + int err; + uint32_t b_written = 0; + uint32_t b_to_write = datalen; + uint32_t nblocks = 0; + struct mmc_ivars *ivar = device_get_ivars(child); + +// device_printf(dev, "mmcb_io_write_fifo: func %d, adr=0x%04X, datap=0x%04X, len %d\n", ivar->sdiof->number, adr, (unsigned int) datap, datalen); + err = 0; + +/* + * Linux code takes into account the max block size that is allowed + * by the host controller. Would be nice to be able to get such information. + */ + if (datalen >= ivar->sdiof->blksize) { + nblocks = datalen / ivar->sdiof->blksize; + b_to_write = ivar->sdiof->blksize * nblocks; + err = mmc_io_rw_extended(device_get_softc(dev), 1, + ivar->sdiof->number, adr, datap, b_to_write, 0, nblocks); + if (err) { + device_printf(dev, "mmcb_io_write_fifo: Err %d\n", err); + return (err); + } + + b_written = b_to_write; + } + + if (datalen - b_written > 0) { + b_to_write = datalen - b_written; + err = mmc_io_rw_extended(device_get_softc(dev), 1, + ivar->sdiof->number, adr, datap + b_written, b_to_write, 0, 0); + if (err) + device_printf(dev, "mmcb_io_write_fifo: Err %d\n", err); + } + return (err); +} + static device_method_t mmc_methods[] = { /* device_if */ DEVMETHOD(device_probe, mmc_probe), @@ -1717,6 +2445,13 @@ static device_method_t mmc_methods[] = { /* MMC Bus interface */ DEVMETHOD(mmcbus_wait_for_request, mmc_wait_for_request), + DEVMETHOD(mmcbus_io_set_block_size, mmcb_io_set_block_size), + DEVMETHOD(mmcbus_io_f0_read_1, mmcb_io_f0_read_1), + DEVMETHOD(mmcbus_io_read_1, mmcb_io_read_1), + DEVMETHOD(mmcbus_io_read_multi, mmcb_io_read_multi), + DEVMETHOD(mmcbus_io_write_1, mmcb_io_write_1), + DEVMETHOD(mmcbus_io_write_multi, mmcb_io_write_multi), + DEVMETHOD(mmcbus_io_write_fifo, mmcb_io_write_fifo), DEVMETHOD(mmcbus_acquire_bus, mmc_acquire_bus), DEVMETHOD(mmcbus_release_bus, mmc_release_bus), @@ -1735,3 +2470,4 @@ DRIVER_MODULE(mmc, at91_mci, mmc_driver, mmc_devclass, NULL, NULL); DRIVER_MODULE(mmc, sdhci_pci, mmc_driver, mmc_devclass, NULL, NULL); DRIVER_MODULE(mmc, sdhci_bcm, mmc_driver, mmc_devclass, NULL, NULL); DRIVER_MODULE(mmc, sdhci_fdt, mmc_driver, mmc_devclass, NULL, NULL); +DRIVER_MODULE(mmc, sdio, mmc_driver, mmc_devclass, NULL, NULL); diff --git a/sys/dev/mmc/mmcbus_if.m b/sys/dev/mmc/mmcbus_if.m index 14dc8e9..d62b139 100644 --- a/sys/dev/mmc/mmcbus_if.m +++ b/sys/dev/mmc/mmcbus_if.m @@ -73,6 +73,79 @@ METHOD int wait_for_request { }; # +# SDIO: Set block size for the current function +# Returns: error or 0 +METHOD int io_set_block_size { + device_t brdev; + device_t reqdev; + uint16_t bs; +}; + +# SDIO: read 1 byte from function 0 +# Returns: error or 0 +METHOD int io_f0_read_1 { + device_t brdev; + device_t reqdev; + uint32_t adr; + uint8_t *val; +}; + +# +# SDIO: read 1 byte from current function +# Return: error or 0 +METHOD int io_read_1 { + device_t brdev; + device_t reqdev; + uint32_t adr; + uint8_t *ret; +}; + +# +# SDIO: read multiple bytes from current function +# Return: error or 0 +METHOD int io_read_multi { + device_t brdev; + device_t reqdev; + uint32_t adr; + uint8_t *datap; + size_t datalen; + uint16_t nblocks; +}; + +# +# SDIO: write 1 byte to current function +# Return: error or 0 +METHOD int io_write_1 { + device_t brdev; + device_t reqdev; + uint32_t adr; + uint8_t val; +}; + +# +# SDIO: write multiple bytes to current function +# Return: error or 0 +METHOD int io_write_multi { + device_t brdev; + device_t reqdev; + uint32_t adr; + uint8_t *datap; + size_t datalen; + uint16_t nblocks; +}; + +# +# SDIO: write multiple bytes into the given FIFO +# Return: error or 0 +METHOD int io_write_fifo { + device_t brdev; + device_t reqdev; + uint32_t adr; + uint8_t *datap; + size_t datalen; +}; + +# # Claim the current bridge, blocking the current thread until the host # is no longer busy. # diff --git a/sys/dev/mmc/mmcioreg.h b/sys/dev/mmc/mmcioreg.h new file mode 100644 index 0000000..10e304b --- /dev/null +++ b/sys/dev/mmc/mmcioreg.h @@ -0,0 +1,96 @@ +/* $OpenBSD: sdmmc_ioreg.h,v 1.4 2007/06/02 01:48:37 uwe Exp $ */ +/* $FreeBSD$ */ + +/* + * Copyright (c) 2006 Uwe Stuehler + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _SDMMC_IOREG_H +#define _SDMMC_IOREG_H + +/* SDIO commands */ /* response type */ +#define SD_IO_SEND_OP_COND 5 /* R4 */ +#define SD_IO_RW_DIRECT 52 /* R5 */ +#define SD_IO_RW_EXTENDED 53 /* R5? */ + +/* CMD52 arguments */ +#define SD_ARG_CMD52_READ (0<<31) +#define SD_ARG_CMD52_WRITE (1<<31) +#define SD_ARG_CMD52_FUNC_SHIFT 28 +#define SD_ARG_CMD52_FUNC_MASK 0x7 +#define SD_ARG_CMD52_EXCHANGE (1<<27) +#define SD_ARG_CMD52_REG_SHIFT 9 +#define SD_ARG_CMD52_REG_MASK 0x1ffff +#define SD_ARG_CMD52_DATA_SHIFT 0 +#define SD_ARG_CMD52_DATA_MASK 0xff +#define SD_R5_DATA(resp) ((resp)[0] & 0xff) + +/* CMD53 arguments */ +#define SD_ARG_CMD53_READ (0<<31) +#define SD_ARG_CMD53_WRITE (1<<31) +#define SD_ARG_CMD53_FUNC_SHIFT 28 +#define SD_ARG_CMD53_FUNC_MASK 0x7 +#define SD_ARG_CMD53_BLOCK_MODE (1<<27) +#define SD_ARG_CMD53_INCREMENT (1<<26) +#define SD_ARG_CMD53_REG_SHIFT 9 +#define SD_ARG_CMD53_REG_MASK 0x1ffff +#define SD_ARG_CMD53_LENGTH_SHIFT 0 +#define SD_ARG_CMD53_LENGTH_MASK 0x1ff +#define SD_ARG_CMD53_LENGTH_MAX 64 /* XXX should be 511? */ + +/* 48-bit response decoding (32 bits w/o CRC) */ +#define MMC_R4(resp) ((resp)[0]) +#define MMC_R5(resp) ((resp)[0]) + +/* SD R4 response (IO OCR) */ +#define SD_IO_OCR_MEM_READY (1<<31) +#define SD_IO_OCR_NUM_FUNCTIONS(ocr) (((ocr) >> 28) & 0x3) +/* XXX big fat memory present "flag" because we don't know better */ +#define SD_IO_OCR_MEM_PRESENT (0xf<<24) +#define SD_IO_OCR_MASK 0x00fffff0 + +/* Card Common Control Registers (CCCR) */ +#define SD_IO_CCCR_START 0x00000 +#define SD_IO_CCCR_SIZE 0x100 +#define SD_IO_CCCR_FN_ENABLE 0x02 +#define SD_IO_CCCR_FN_READY 0x03 +#define SD_IO_CCCR_INT_ENABLE 0x04 +#define SD_IO_CCCR_CTL 0x06 +#define CCCR_CTL_RES (1<<3) +#define SD_IO_CCCR_BUS_WIDTH 0x07 +#define CCCR_BUS_WIDTH_4 (1<<1) +#define CCCR_BUS_WIDTH_1 (1<<0) +#define SD_IO_CCCR_CARDCAP 0x08 +#define SD_IO_CCCR_CISPTR 0x09 /* XXX 9-10, 10-11, or 9-12 */ + +/* Function Basic Registers (FBR) */ +#define SD_IO_FBR_START 0x00100 +#define SD_IO_FBR_SIZE 0x00700 + +/* Card Information Structure (CIS) */ +#define SD_IO_CIS_START 0x01000 +#define SD_IO_CIS_SIZE 0x17000 + +/* CIS tuple codes (based on PC Card 16) */ +#define SD_IO_CISTPL_VERS_1 0x15 +#define SD_IO_CISTPL_MANFID 0x20 +#define SD_IO_CISTPL_FUNCID 0x21 +#define SD_IO_CISTPL_FUNCE 0x22 +#define SD_IO_CISTPL_END 0xff + +/* CISTPL_FUNCID codes */ +/* OpenBSD incorrectly defines 0x0c as FUNCTION_WLAN */ +/* #define SDMMC_FUNCTION_WLAN 0x0c */ +#endif diff --git a/sys/dev/mmc/mmciovar.h b/sys/dev/mmc/mmciovar.h new file mode 100644 index 0000000..94d468b --- /dev/null +++ b/sys/dev/mmc/mmciovar.h @@ -0,0 +1,67 @@ +/*- + * Copyright (c) 2013 Ilya Bakulin. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * Portions of this software may have been developed with reference to + * the SD Simplified Specification. The following disclaimer may apply: + * + * The following conditions apply to the release of the simplified + * specification ("Simplified Specification") by the SD Card Association and + * the SD Group. The Simplified Specification is a subset of the complete SD + * Specification which is owned by the SD Card Association and the SD + * Group. This Simplified Specification is provided on a non-confidential + * basis subject to the disclaimers below. Any implementation of the + * Simplified Specification may require a license from the SD Card + * Association, SD Group, SD-3C LLC or other third parties. + * + * Disclaimers: + * + * The information contained in the Simplified Specification is presented only + * as a standard specification for SD Cards and SD Host/Ancillary products and + * is provided "AS-IS" without any representations or warranties of any + * kind. No responsibility is assumed by the SD Group, SD-3C LLC or the SD + * Card Association for any damages, any infringements of patents or other + * right of the SD Group, SD-3C LLC, the SD Card Association or any third + * parties, which may result from its use. No license is granted by + * implication, estoppel or otherwise under any patent or other rights of the + * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing + * herein shall be construed as an obligation by the SD Group, the SD-3C LLC + * or the SD Card Association to disclose or distribute any technical + * information, know-how or other confidential information to any third party. + */ + +#include +__FBSDID("$FreeBSD$"); +#include + +/* CIS structure of SDIO card */ +struct sdio_function { + int number; + uint8_t cis1_major; + uint8_t cis1_minor; + uint16_t manufacturer; + uint16_t product; + uint16_t max_blksize; + uint8_t max_tran_speed; /* only for func0 */ + uint16_t blksize; + STAILQ_ENTRY(sdio_function) sdiof_list; +}; diff --git a/sys/dev/mmc/mmcreg.h b/sys/dev/mmc/mmcreg.h index f454ddb..7a211cb 100644 --- a/sys/dev/mmc/mmcreg.h +++ b/sys/dev/mmc/mmcreg.h @@ -85,6 +85,8 @@ struct mmc_command { #define MMC_RSP_R1B (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE | MMC_RSP_BUSY) #define MMC_RSP_R2 (MMC_RSP_PRESENT | MMC_RSP_136 | MMC_RSP_CRC) #define MMC_RSP_R3 (MMC_RSP_PRESENT) +#define MMC_RSP_R4 (MMC_RSP_PRESENT) +#define MMC_RSP_R5 (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE) #define MMC_RSP_R6 (MMC_RSP_PRESENT | MMC_RSP_CRC) #define MMC_RSP_R7 (MMC_RSP_PRESENT | MMC_RSP_CRC) #define MMC_RSP(x) ((x) & MMC_RSP_MASK) @@ -151,6 +153,30 @@ struct mmc_command { #define R1_STATE_PRG 7 #define R1_STATE_DIS 8 +/* + * R5 responses + * + * Types (per SD 2.0 standard) + *e : error bit + *s : status bit + *r : detected and set for the actual command response + *x : Detected and set during command execution. The host can get + * the status by issuing a command with R1 response. + * + * Clear Condition (per SD 2.0 standard) + *a : according to the card current state. + *b : always related to the previous command. reception of a valid + * command will clear it (with a delay of one command). + *c : clear by read + */ +#define R5_COM_CRC_ERROR (1u << 15)/* er, b */ +#define R5_ILLEGAL_COMMAND (1u << 14)/* er, b */ +#define R5_IO_CURRENT_STATE_MASK (3u << 12)/* s, b */ +#define R5_IO_CURRENT_STATE(x) (((x) & R5_IO_CURRENT_STATE_MASK) >> 12) +#define R5_ERROR (1u << 11)/* erx, c */ +#define R5_FUNCTION_NUMBER (1u << 9)/* er, c */ +#define R5_OUT_OF_RANGE (1u << 8)/* er, c */ + struct mmc_data { size_t len; /* size of the data */ size_t xfer_len; @@ -160,6 +186,7 @@ struct mmc_data { #define MMC_DATA_READ (1UL << 1) #define MMC_DATA_STREAM (1UL << 2) #define MMC_DATA_MULTI (1UL << 3) + uint32_t blocksz; /* Size of the data block */ struct mmc_request *mrq; }; @@ -181,7 +208,7 @@ struct mmc_request { #define MMC_SET_RELATIVE_ADDR 3 #define SD_SEND_RELATIVE_ADDR 3 #define MMC_SET_DSR 4 - /* reserved: 5 */ +#define IO_SEND_OP_COND 5 #define MMC_SWITCH_FUNC 6 #define MMC_SWITCH_FUNC_CMDS 0 #define MMC_SWITCH_FUNC_SET 1 @@ -335,6 +362,20 @@ struct mmc_request { #define SD_MAX_HS 50000000 +/* + * SDIO Direct & Extended I/O + */ +#define SD_IO_RW_WR (1u << 31) +#define SD_IO_RW_FUNC(x) (((x) & 0x7) << 28) +#define SD_IO_RW_RAW (1u << 27) +#define SD_IO_RW_INCR (1u << 26) +#define SD_IO_RW_ADR(x) (((x) & 0x1FFFF) << 9) +#define SD_IO_RW_DAT(x) (((x) & 0xFF) << 0) +#define SD_IO_RW_LEN(x) (((x) & 0xFF) << 0) + +#define SD_IOE_RW_LEN(x) (((x) & 0x1FF) << 0) +#define SD_IOE_RW_BLK (1u << 27) + /* OCR bits */ /* diff --git a/sys/dev/mmc/mmcsd.c b/sys/dev/mmc/mmcsd.c index 63e0b54..61b6b1f 100644 --- a/sys/dev/mmc/mmcsd.c +++ b/sys/dev/mmc/mmcsd.c @@ -128,8 +128,18 @@ static daddr_t mmcsd_rw(struct mmcsd_softc *sc, struct bio *bp); static int mmcsd_probe(device_t dev) { + uint32_t media_size; - device_quiet(dev); +// device_quiet(dev); + + if(BUS_READ_IVAR(device_get_parent(dev), dev, MMC_IVAR_MEDIA_SIZE, + &media_size)) { + device_printf(dev, "Cannot get media size from bus!\n"); + return (-1); + } + device_printf(dev, "Media size: %d\n", media_size); + if (media_size == 0) + return(-1); device_set_desc(dev, "MMC/SD Memory Card"); return (0); } diff --git a/sys/dev/mmc/mmcvar.h b/sys/dev/mmc/mmcvar.h index b274d32..57a833b 100644 --- a/sys/dev/mmc/mmcvar.h +++ b/sys/dev/mmc/mmcvar.h @@ -69,6 +69,9 @@ enum mmc_device_ivars { MMC_IVAR_BUS_WIDTH, MMC_IVAR_ERASE_SECTOR, MMC_IVAR_MAX_DATA, + MMC_IVAR_SDIO_VENDOR, + MMC_IVAR_SDIO_PRODUCT, + MMC_IVAR_SDIO_FUNCTION, MMC_IVAR_CARD_ID_STRING }; @@ -89,6 +92,9 @@ MMC_ACCESSOR(card_type, CARD_TYPE, int) MMC_ACCESSOR(bus_width, BUS_WIDTH, int) MMC_ACCESSOR(erase_sector, ERASE_SECTOR, int) MMC_ACCESSOR(max_data, MAX_DATA, int) +MMC_ACCESSOR(sdio_vendor, SDIO_VENDOR, int) +MMC_ACCESSOR(sdio_product, SDIO_PRODUCT, int) +MMC_ACCESSOR(sdio_function, SDIO_FUNCTION, int) MMC_ACCESSOR(card_id_string, CARD_ID_STRING, const char *) #endif /* DEV_MMC_MMCVAR_H */ From owner-freebsd-embedded@FreeBSD.ORG Wed Aug 21 17:16:58 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3A688FB9 for ; Wed, 21 Aug 2013 17:16:58 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm22-vm1.bullet.mail.bf1.yahoo.com (nm22-vm1.bullet.mail.bf1.yahoo.com [98.139.212.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C1B382AF8 for ; Wed, 21 Aug 2013 17:16:57 +0000 (UTC) Received: from [98.139.215.140] by nm22.bullet.mail.bf1.yahoo.com with NNFMP; 21 Aug 2013 17:16:50 -0000 Received: from [68.142.230.64] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 21 Aug 2013 17:16:50 -0000 Received: from [127.0.0.1] by smtp221.mail.bf1.yahoo.com with NNFMP; 21 Aug 2013 17:16:50 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377105410; bh=IguOyk9tjhbJGAr0cZghZJsluzRHBHa2b+B8q4C452s=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=YJDwjVrZa54PXIkJgKFbsAI/huIBFFHdA+fEonBeBrMNA/eEe/dDIIVT0dIYmqsfyK2GWCNd+djenTHFVoEUPtLt/fzY9sJUx1zelWGR9FoOwFCouuTXeqcyrmFlpTFaQg31qtny/S1mLvjmtisN0RQa0bcOhV6FegPYvwYOoV0= X-Yahoo-Newman-Id: 254079.73559.bm@smtp221.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: yimC8sIVM1nzJfpeSi9jFe9L743iZ0219xbbNQQnk8.BSNV y_n7fNtHYI1x5GmfUQUr6TlhvFD2KHakmOprIIvCAywjsrsTi7gY5yDsB79d CuVPfrYO_ftHZUbMGwBsI09uZ5qWgfbVc8SzxkuRLTBUR2He2eCmwj7o7KaI tBPFiXaOD9LuORm3oD_qv4r1UCDlMy2gb9e_JBc3j2bc163s_VJW1MRFXj9q N6nbNjFw9ortcSqwH_nNdQ_lWNjnWDtjOXMIa5Upjt1pB7RbjeN0BDpvgNbQ _pJkYujz2Cb1FOd.v5KiSZqVXtrUEXlUmPgKq7ht_ZX8AJ6LyULazJ7Vk7A8 vAtKcLi0CWIRXazrCp7wze46wgfR1fy9nkhdE4oJQMjhLWu85b8nCAEHql07 ZAjs1xYJ8lnnR1flDsfUfyi7lEqPvuenvU7i6yXYFw18lHH66PfOu05cFAFu JIVkNCPF_omXzU9_I5c1nJwl2JDBhcJN3CZlL7.Ickr.m37wxZ.827_o4LHb PBq3P1qEuINyh7nnl27jdGQhm4mMl6Q2N0HNkcAD_gZknjFsa5c26f_1PfGI KfavArOmz1l_541Ta4RuqxdOg7fqL_YrV_2xsaqEY9qHGaE.5NBWJbfDboJI P1XZMnAqogK7PGuIIiD6gH0s2cK6PqBnsT30YuymM X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp221.mail.bf1.yahoo.com with SMTP; 21 Aug 2013 17:16:50 +0000 UTC Subject: Re: Dlink DIR-825 B1 status [updated] [status 3 - MAC addrs] From: Sean Bruno To: Adrian Chadd In-Reply-To: References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845978.1460.126.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-WPNVmYE3DQa/f2WvIAdv" Date: Wed, 21 Aug 2013 10:16:48 -0700 Message-ID: <1377105408.1492.12.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 17:16:58 -0000 --=-WPNVmYE3DQa/f2WvIAdv Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Sun, 2013-08-18 at 12:21 -0700, Adrian Chadd wrote: > you won't; it's a hacked up uboot. Sigh.=20 >=20 > Anyway - Just look at the board config file (a .c file) in openwrt for > the ap96.=20 >=20 >=20 >=20 > -adrian=20 >=20 >=20 Huh ... it looks like the caldata and the mac addrs are at "special" locations as the openwrt folks have special functions to read them in their "mach-dir-825-b1.c" I suspect that with this as a road map I can "do something" to try and pull in their specific methods to do stuff tonight. Is this the right path to go down? Sean=20 p.s. current dmesg with USB attach working http://people.freebsd.org/~sbruno/dir_825_dmesg.txt --=-WPNVmYE3DQa/f2WvIAdv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSFPYAAAoJEBkJRdwI6BaHBksIAJA48tMEqXL8W5MWVVLVfxPc BCSVSYl4kFJrfDhXvcTFBHO5f3xF0IJDfL+nacQJ198J285+0ObzC5x9x1XAhjpP 65Mr84VK/GJlHASblxNY/ZNkKiGsXjZtRzdggV3hOUNYpdNPWrnRcLKqvxh3hHMk 6EU1oLuU8iznJ8m5yaPgE7iPFgwESQke57RLp7OJXeiSkRFkXK/Mu5acUJhtGSoi xhKbqCIw1cGONfdBXQConCtxxEZ+77yo8YlUN4WRugbKTRii9p67aZtucybqFnDE tBl9VKVEmXKmYhaQtlNnM9NhNERRGDYAfgU31cAY80ZHAMehLqkjHDFJyJDPTEY= =M2At -----END PGP SIGNATURE----- --=-WPNVmYE3DQa/f2WvIAdv-- From owner-freebsd-embedded@FreeBSD.ORG Wed Aug 21 19:22:44 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5E086808 for ; Wed, 21 Aug 2013 19:22:44 +0000 (UTC) (envelope-from diegogutierrez1212@yahoo.com.ar) Received: from nm16-vm3.bullet.mail.ne1.yahoo.com (nm16-vm3.bullet.mail.ne1.yahoo.com [98.138.91.146]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E678A242F for ; Wed, 21 Aug 2013 19:22:42 +0000 (UTC) Received: from [98.138.101.129] by nm16.bullet.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 19:20:23 -0000 Received: from [98.138.101.171] by tm17.bullet.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 19:20:23 -0000 Received: from [127.0.0.1] by omp1082.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 19:20:23 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 795424.38105.bm@omp1082.mail.ne1.yahoo.com Received: (qmail 4539 invoked by uid 60001); 21 Aug 2013 19:20:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.ar; s=s1024; t=1377112823; bh=DHeRPQSXQSo7LuzaJHpaS/J6s4euq/xGKoPH1tD780I=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=alpg4Ry5cc1cGgtfuJ74f+gOdQcqxocwAkXbol4nPRHXjM0rzUdZN2ptGReVhTGXiGrK3QGQcSl1mar3Uv7wFF6YKPNYLGEb7fV3X+VMx3/5LlhAaWA2685Kq/m4dVrhpCymkDHbst1uxkqtSvd8H6xo8SQv8P26FEEMhtC05Zc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.ar; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gGwfl5xF+oP5ddzFgT4rWIyP7tVECCeJG//EOpblVPa4Sw2fffYQTr8X6X8VS+GO+aNdC/A9Jsy2o5+fUnnbn2wnz8f9HFQAhoibf22UuQHbFyiDC51vSDR9tKHWZrTUShLPmdIXvyfir3aSpR89n4QV3IbfCJEnQYordH1k4fM=; X-YMail-OSG: SrtN3i8VM1mlmE.RX9ls0GyL2iyQqcbk40WvGeYyfwrV5Tf RQIQvjSSZxChXXT9DAWsjXy09HYu285lwoftRmn0T_dYaL1DruvqIL5Am5e_ P8omptQT2LpyIcHnXz15SfdLyh61TPqy7dh5tVAiW8tw7vDCXwc42BhQZvjg yUcf06MgzJX9eBj06mPIp.gr8249l5CYsUMQpRcSzqlf7HO.qh37o.q3beDD agyev.3Gogx2g2SxBUJKf.W96r6iRZxjWcCGcaHHU.HGNGD.dCh3pviQN.Z_ qZgz34D1pPzyvJgUho1byiZoJAyvEEoSH4fBmqk_nk8l77KEJu5ovZZDxfMi 0PFnjIxph91TJMl2BjeaUHu1BCy_tCrmSK0Er871KcY..IvoQ99vd08twsEP pib0LxWnbJpzQgwZZ5CMN3FpwtrFhbJs.Bi1351K2Hji8BQtCC01.vPAV7mT 2NmrzQwkcS_XalbQM0LKdbVeSI29RacuTzZn_uMkKKv3pcidv4od.7QYl_HF FNtU7b_gD1SungJyKT3fUtHTwb1a9Gi33.BUTr8MEVSRdi9.akkCqT.1rWlE sW8ytjm0bHN4A28BFHfvua7MtYNv1F1jmrCa.P8M- Received: from [200.51.94.42] by web122304.mail.ne1.yahoo.com via HTTP; Wed, 21 Aug 2013 12:20:23 PDT X-Rocket-MIMEInfo: 002.001, SGksDQpJIGFuZCBteSBmcmllbmQgYXJlIHdvcmtpbmcgaW4gdGVzdGluZyBhbmQgcG9ydGluZyB0byBzZXZlcmFsIHJvdXRlcnMgd2l0aCBGcmVlYnNkLHRoZXNlIGFyZSB0aGUgbW9kZWxzOg0KDQpNUjMwMjAgdjEuNywNCk1SMzQyMCAsDQpXUjc0MU4sDQptaWtyb3RpayBSYjc1MXUtMmhuZCwNCldSMTA0M25kLA0KZWRpbWF4IEV3LTcyMDlhcGcgDQplZGltYXggRXctNzIwNmFwDQpkaXIgMzAwIA0KVHJlbmRuZXQgVGV3LTcxMWJyDQogDQpJbiBmZXcgZGF5cyB3ZSBhcmUgZ29pbmcgdG8gcmVwb3J0IHRoZWkBMAEBAQE- X-Mailer: YahooMailClassic/294 YahooMailWebService/0.8.155.576 Message-ID: <1377112823.90685.YahooMailBasic@web122304.mail.ne1.yahoo.com> Date: Wed, 21 Aug 2013 12:20:23 -0700 (PDT) From: Diego Guty Subject: Freebsd on Several Routers. To: freebsd-embedded@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 19:22:44 -0000 Hi, I and my friend are working in testing and porting to several routers with = Freebsd,these are the models: MR3020 v1.7, MR3420 , WR741N, mikrotik Rb751u-2hnd, WR1043nd, edimax Ew-7209apg=20 edimax Ew-7206ap dir 300=20 Trendnet Tew-711br =20 In few days we are going to report their functionality, the WR1043nd works great. Best Regards,Diego Gutierrez. From owner-freebsd-embedded@FreeBSD.ORG Wed Aug 21 21:37:03 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ABEB5EB4; Wed, 21 Aug 2013 21:37:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E50022E46; Wed, 21 Aug 2013 21:37:02 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id z12so872037wgg.34 for ; Wed, 21 Aug 2013 14:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=nwsYbgB+EGagKbJ8m1IU0x+SC8sg4KanRHdTYzgXGNs=; b=AAuNxXrLnV5bnDamirGsO6cM/XDA9UosrxYGU/jvkNwuYajy0y+x5HW9EvLh7/Fd8w SvUaQ8HCastI8TwWu6eGVmyY0zrH0RsoeEvriz4bf5wr5UFinblqc4BrVFq0OJ2xtKos eIqbshtIefohIQFpkzFNom1Fwmg5AM9WTvx2hUOeQEPQKDnTXpe1379ffn6HzLcvEHmv V71d/FYZB0F4eC5T4uRVTcGL6kEG7NKSOM7pkj/g3i0aCXgG0q1qbOYM4ZlMiOq31bYT 6rUkxzQIG6fNWnv0ZR+GCAftCwqJlYiY+Bf8RvGjGmhnKpfMIj5wA6ksyfwQ/pQn8XCG jsVQ== MIME-Version: 1.0 X-Received: by 10.194.122.129 with SMTP id ls1mr7245926wjb.37.1377121021213; Wed, 21 Aug 2013 14:37:01 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Wed, 21 Aug 2013 14:37:01 -0700 (PDT) In-Reply-To: <20130821095849.GA7322@olymp.kibab.com> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> Date: Wed, 21 Aug 2013 14:37:01 -0700 X-Google-Sender-Auth: j3I8FHkkKlOKeeRULkhlLc-0AYg Message-ID: Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug From: Adrian Chadd To: Ilya Bakulin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Alexander Motin , "freebsd-arm@freebsd.org" , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 21:37:03 -0000 Hi! The marvell wifi stuff isn't ARM specific, right? So it should live in dev/ rather than arm/ -adrian From owner-freebsd-embedded@FreeBSD.ORG Wed Aug 21 21:44:34 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D931B307 for ; Wed, 21 Aug 2013 21:44:34 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from n3-vm4.bullet.mail.bf1.yahoo.com (n3-vm4.bullet.mail.bf1.yahoo.com [72.30.235.40]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 548A12EC1 for ; Wed, 21 Aug 2013 21:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=gcom1024; t=1377121320; bh=2W1uLrdnQhZxrfCPiPVQmLj0ztxJBwpl98ne4TsuFig=; h=Received:Received:Received:DKIM-Signature:X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=HhGLbdzE8nqfNqNoqHIK0sAdC4kbEwBUiPB6rD8H5tzG4qXoBANMxlZH6cj5i7crteaPxemO3iFD90Ye+CN9Fk/AGHXmBBaieK0ECf5cmj7upl2flnvfJKYpCh5Kfhj/uL7sZlBOBvJtg72PUh/azlNrDtLQC7pbpmKpVv0f+ZE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=gcom1024; d=yahoo.com; b=ReQk7zG8/fETWiUXOZW3+07uNx9zhEM45qG0jePdLxbYkutNqickCYywtND+qPmspThiLXmiirN/QVjW8dOP2F851ydGRbgU6UUtcn+iPhVwrDWKj8U0Y5NYnEfZ3C0Ika1/aX22tCSJNF3/dLhuxdnOW/iL1A2STE3VEz+Nwuo=; Received: from [72.30.235.65] by n3.bullet.mail.bf1.yahoo.com with NNFMP; 21 Aug 2013 21:42:00 -0000 Received: from [98.139.211.200] by t2.bullet.mail.bf1.yahoo.com with NNFMP; 21 Aug 2013 21:42:00 -0000 Received: from [127.0.0.1] by smtp209.mail.bf1.yahoo.com with NNFMP; 21 Aug 2013 21:42:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377121320; bh=2W1uLrdnQhZxrfCPiPVQmLj0ztxJBwpl98ne4TsuFig=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=F2VDIuD8J3rD5HuIyzzCfZOBwjsnQQHWScYWMBsRXJE1/Fecs7locbh8kAhxBFL0g+KQ1G0Pu/i4aSGOXVMxa63nF9NNX11OGZF+qyMcUc6t+WALCUbgd9MJBiiqceKmb6P4NYY7JxfHxTrDFc9Yba7qykjSzgNCMi6dhi6E2LY= X-Yahoo-Newman-Id: 832606.27130.bm@smtp209.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: xc1hw5wVM1maDnmwGSAFrpLrmHbJtdU0TY9ecjLiZuVNIiG f.4S1WSzyrniYCfGTaUMrZFQFRB.o5UgpUpDVyTMgtQDqX5wEMVBR7_mqzKA XEIy560jCf9HMCI3jbOlVXZ739wjmuYPSBHbR1w4eg6BFVQyE6qxeMi1eM58 jyo_Tiu9L2c86JSOizbQ6bTKJwedR2DgCF43MYiuFEsbLoVMEpsagkBdtBuk W_w7Ir4RkfpT8OxGYsfeIjsoetDp3gnM1Nm3QSeOs0rsCl3XBA15nO4VCOE1 1UVn4cSJ2DGluFGqZio1wILg2jA23aPERUvDG_aetigBgkACTM_t8d4PKqiH 9LDJSzUqOTJsdHWVzpSLDcHOESPZW2QV9iKI63mIac9_77IBFExoL7Oimgmw DrGFVrz2B_Qm7HsL78k9u.IljCcffq11n6c.uij.HV72_4X3qtn1kZPvBw0D Jf34dvHbRbHnRNzUUtZdcJ7fd._qyBHmSF767cYNAJi_mw8yBBLW3cO0Uwnz t2UlrM3mEJG5iYqe7PJp3eFnTvCl1Jcf1tvf0UQR3oZJcm.lxaYOTgV7QAbk Zzw-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp209.mail.bf1.yahoo.com with SMTP; 21 Aug 2013 14:42:00 -0700 PDT Subject: Re: Freebsd on Several Routers. From: Sean Bruno To: Diego Guty In-Reply-To: <1377112823.90685.YahooMailBasic@web122304.mail.ne1.yahoo.com> References: <1377112823.90685.YahooMailBasic@web122304.mail.ne1.yahoo.com> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-IJzZNN51ckqcLc9+cz3U" Date: Wed, 21 Aug 2013 14:41:59 -0700 Message-ID: <1377121319.1492.32.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 21:44:35 -0000 --=-IJzZNN51ckqcLc9+cz3U Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Wed, 2013-08-21 at 12:20 -0700, Diego Guty wrote: > Hi, > I and my friend are working in testing and porting to several routers wit= h Freebsd,these are the models: >=20 > MR3020 v1.7, > MR3420 , > WR741N, > mikrotik Rb751u-2hnd, > WR1043nd, > edimax Ew-7209apg=20 > edimax Ew-7206ap > dir 300=20 > Trendnet Tew-711br > =20 > In few days we are going to report their functionality, > the WR1043nd works great. How are you building the images for these routers? Sean --=-IJzZNN51ckqcLc9+cz3U Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSFTQnAAoJEBkJRdwI6BaH45AH/j12jSxZuw7DVJzhePTlQyAr Kj4CBZKp/KLpENrlGSf80Q/ZlfS/uja1kAGi8aMOaFjHlBocq+xSQzIV2q8mfaTs 8QM5INlUIeR7dK/m78WR360cyDT2erV9hIq0xtfgUwnQdtfBV+qFZ9lYqEfsAiQa h70+QH239QJiTyLkvZzDx7DM6TS52GAtqVDL3SC3ifmYX4jLMc+AI3SWMIDep9V6 Ja9fYFsFaPD8683PYvOaJSY3LypSVEZQGO77XpkTqptoMasIx1WXc6uLq/OiwHJY JhW9PQFWf9j3Ac091nypCxDugmyEsdsKne0nVa941VE1OTY+FnnwkiD1+EZtcxA= =Ikce -----END PGP SIGNATURE----- --=-IJzZNN51ckqcLc9+cz3U-- From owner-freebsd-embedded@FreeBSD.ORG Wed Aug 21 23:07:04 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E493295B for ; Wed, 21 Aug 2013 23:07:03 +0000 (UTC) (envelope-from diegogutierrez1212@yahoo.com.ar) Received: from nm17-vm0.bullet.mail.ne1.yahoo.com (nm17-vm0.bullet.mail.ne1.yahoo.com [98.138.91.58]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A63FC2545 for ; Wed, 21 Aug 2013 23:07:03 +0000 (UTC) Received: from [98.138.101.132] by nm17.bullet.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 23:04:42 -0000 Received: from [98.138.87.4] by tm20.bullet.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 23:04:42 -0000 Received: from [127.0.0.1] by omp1004.mail.ne1.yahoo.com with NNFMP; 21 Aug 2013 23:04:42 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 238494.29278.bm@omp1004.mail.ne1.yahoo.com Received: (qmail 27175 invoked by uid 60001); 21 Aug 2013 23:04:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.ar; s=s1024; t=1377126282; bh=YIlrK3tF2tOx7lD47HzCi15bFDtAjMvMw3MdZtnpkV4=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=S/Dc4BO6GVVTDmB8zWeJTp93+wL66ggTO9j9TOWnrPVWIIDb6w8N+s+2YUQjFOv4KybflUl7gqknH3fioiVGzxXT2lwWqZ75aSQQ8LL9Fp3n0RHY5VR69gsZ+3wlFVqNVD/TAGuBgNYa2LBu8ypwS3pFyr9SPCzhVEitxjtMgQE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.ar; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=M2VKEWQqtxWy+BDsOuIL6HfOJG/hMXTybq4JeXPpnn1RYE4UbgVfirpabTHC16P0O+MSeqGWBSVdDsAsT4nROopWSFpII5av1LI3JnS3rVq6kD3VIhuQYzxg+9LkI3jUi+MW48qUYz1MiL522x+cFWjBk7FbDhcnupDRSSrva0E=; X-YMail-OSG: Dha2yAUVM1noOG34hRSUJl7mdKuZaGTDfn.pa0DY_F6kybl dnCCsXbhzCasLyKsspWKc3vR3cb8OsPCqVO6BZPrpA740lwqG55fiIBG_vU7 5ADQuW2QKF6kbcA64iXLwgPE6CSrlyx5NXaQVwbG8dQ1aZeXDXsyvcruWUC1 QKOJ60Nt1L5EeUSEH5k6Sw2piIi48OlF9.2CF1.rHBRNFqEVE8f8KlNsgfQ7 9hztSczmDGXPBNKIXakNrmfZoqojLJDJVFQoyL4Q1nVAQSRgc6U7Rob0lvfc Uej2P9H_CEyh4s7vHA255KbssnVng5wsNH4GHohQ4gNn4YzOjwf8hsRxjy.0 biRNbFzRTmiXtLQ9ATzPAPX8K2c7xv27Q2KKkWPieEu44q7Nk.N7JKlzHE33 saCgl3uEViD6kBXiypoa3oI..uQYJfhfP31GUB.177mp0pg4i5qmrQPoPYVK _lgOBzCC9.A.1z1QbhzfeW4jNmnJzCFp0LCnhQOYtuvb7duj3pwbEjIb9Kct aMfPXzVjg9EuMqxhgIcfC46w9Q90Lxp6In2KdSxz_hfVPeaH6oXUXktFUf2i w60pbWQjXAHcbnwKkcxURvI3S7vux8fKK_OjqsuXICMOXuB3lFa1rCp0qJ3q C5SDdDZZZuObOYzu0vjc_We8fpw.MErUL7GrJv3kKxUIkOJ9SI4m0I7DhUWd hAodskSbMGJC9ccjYgHp4HVR6hyCfaOmH41pARE95YpijiRTYVyJR1ebEQi6 bUQZE5.SxFS8u4E48sNCf.TE2GmX8SIWWpVLPQ27j9ehIeQ-- Received: from [200.70.14.12] by web122304.mail.ne1.yahoo.com via HTTP; Wed, 21 Aug 2013 16:04:42 PDT X-Rocket-MIMEInfo: 002.001, SGkgU2VhbiwNCg0KV2UgYXJlIGluIHRoYXQgcHJvZ3Jlc3Msbm93IHdlIGFyZSB0ZXN0aW5nIFdSMTA0M25kIGFuZCBkaXIzMDAsd2UgZ2VuZXJhdGUgdGhlIGltYWdlIHdpdGggYWRyaWFuIGNoYWQgc2NyaXB0IGZvciB3cjEwNDMybmRbMF0gIGFuZCBmb3IgZGlyMzAwIHdlIHVzZSB6cm91dGVyIFsxXS4NCk91ciBpbnRlbnRpb24gaXMgdG8gaGVscCBmcmVlYnNkIGNvbXVubml0eSB0ZXN0aW5nIHdpdGggdGhlc2Ugcm91dGVycyBhbmQgZGV2ZWxvcCBjb2RlIHRvIHN1cHBvcnQgdGhpcyBoYXJkd2FyZS4gDQoBMAEBAQE- X-Mailer: YahooMailClassic/294 YahooMailWebService/0.8.155.576 Message-ID: <1377126282.26713.YahooMailBasic@web122304.mail.ne1.yahoo.com> Date: Wed, 21 Aug 2013 16:04:42 -0700 (PDT) From: Diego Guty Subject: Re: Freebsd on Several Routers. To: sbruno@freebsd.org In-Reply-To: <1377121319.1492.32.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 23:07:04 -0000 Hi Sean, We are in that progress,now we are testing WR1043nd and dir300,we generate = the image with adrian chad script for wr10432nd[0] and for dir300 we use z= router [1]. Our intention is to help freebsd comunnity testing with these routers and d= evelop code to support this hardware.=20 [0] https://code.google.com/p/freebsd-wifi-build/wiki/TpLinkTLWR1043ND [1] http://zrouter.org/ Best Regards.Diego Gutierrez. -------------------------------------------- El mi=E9 21-ago-13, Sean Bruno escribi=F3: Asunto: Re: Freebsd on Several Routers. Para: "Diego Guty" Cc: freebsd-embedded@freebsd.org Fecha: mi=E9rcoles, 21 de agosto de 2013, 21:41 =20 On Wed, 2013-08-21 at 12:20 -0700, Diego Guty wrote: > Hi, > I and my friend are working in testing and porting to several routers with Freebsd,these are the models: >=20 > MR3020 v1.7, > MR3420 , > WR741N, > mikrotik Rb751u-2hnd, > WR1043nd, > edimax Ew-7209apg=20 > edimax Ew-7206ap > dir 300=20 > Trendnet Tew-711br >=A0=20 > In few days we are going to report their functionality, > the WR1043nd works great. =20 =20 How are you building the images for these routers? =20 Sean From owner-freebsd-embedded@FreeBSD.ORG Wed Aug 21 23:14:02 2013 Return-Path: Delivered-To: freebsd-embedded@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6EFBDB30; Wed, 21 Aug 2013 23:14:02 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 40B2A25AA; Wed, 21 Aug 2013 23:14:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7LNE2OV068425; Wed, 21 Aug 2013 23:14:02 GMT (envelope-from loos@freefall.freebsd.org) Received: (from loos@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7LNE2Mj068424; Wed, 21 Aug 2013 23:14:02 GMT (envelope-from loos) Date: Wed, 21 Aug 2013 23:14:02 GMT Message-Id: <201308212314.r7LNE2Mj068424@freefall.freebsd.org> To: adrian@FreeBSD.org, loos@FreeBSD.org, freebsd-embedded@FreeBSD.org From: loos@FreeBSD.org Subject: Re: kern/172968: [arge] probe/attach occasionally fails to find a PHY X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2013 23:14:02 -0000 Synopsis: [arge] probe/attach occasionally fails to find a PHY State-Changed-From-To: open->closed State-Changed-By: loos State-Changed-When: Wed Aug 21 23:14:01 UTC 2013 State-Changed-Why: Closing the PR. The problem was fixed by r253570. http://www.freebsd.org/cgi/query-pr.cgi?pr=172968 From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 00:22:32 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3A1D9E77 for ; Thu, 22 Aug 2013 00:22:32 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C51EF2944 for ; Thu, 22 Aug 2013 00:22:31 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id a12so1009289wgh.30 for ; Wed, 21 Aug 2013 17:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m0io2A3mVhGVE+gHhoHqFpLMFI9HZlf55d+siXGRgVc=; b=ZeZbXwGgJvM4wPiv9hppErtBLHAD7Ehhc2OcH56ysLDvDPUV7bVG8kEBx2WD66vwzd 76HTglPDKT7Y49CXGsg+iLy+klmWP+Q4Ma4X5I7rkC6mzoxS3vDfMjcbBAXGSK2jacUI a5Hs35OFPegqkFxuSK/3NfE0QCMyQdjpPSsh7qUkRdx1rrTZNDVQCY5YuMfsr0BuaQ2X CghREMkMBlnp4FIxHcul+IO6Oa0Xk3cmZAgX4eyE+uWC0y3xO3JaXmX9yYahdInK7KU0 zkoJlxgRpHR1H22P8hX2pzvQkYkWHdf6Ox7l2VX41ass0famgYIjr6M0cpG/aS+907U8 YOIg== MIME-Version: 1.0 X-Received: by 10.180.198.79 with SMTP id ja15mr7377782wic.36.1377130949807; Wed, 21 Aug 2013 17:22:29 -0700 (PDT) Received: by 10.216.75.140 with HTTP; Wed, 21 Aug 2013 17:22:29 -0700 (PDT) In-Reply-To: <1377112823.90685.YahooMailBasic@web122304.mail.ne1.yahoo.com> References: <1377112823.90685.YahooMailBasic@web122304.mail.ne1.yahoo.com> Date: Wed, 21 Aug 2013 21:22:29 -0300 Message-ID: Subject: Re: Freebsd on Several Routers. From: Luiz Otavio O Souza To: Diego Guty Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 00:22:32 -0000 On 21 August 2013 16:20, Diego Guty wrote: > Hi, > I and my friend are working in testing and porting to several routers with > Freebsd,these are the models: > > MR3020 v1.7, > MR3420 , > WR741N, > mikrotik Rb751u-2hnd, > WR1043nd, > edimax Ew-7209apg > edimax Ew-7206ap > dir 300 > Trendnet Tew-711br > > In few days we are going to report their functionality, > the WR1043nd works great. > I've all the settings for MR3x20. Let me know if you need something. They work fine, but the flash size is a big problem (or a small - 4MB - problem :). We don't have the storage driver for RB751 yet (NAND?). Luiz From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 05:00:59 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ADC82BF7; Thu, 22 Aug 2013 05:00:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1995F2D0B; Thu, 22 Aug 2013 05:00:58 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id t58so1168986wes.24 for ; Wed, 21 Aug 2013 22:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=6F65GxQT2U3qFYQZ+Gx8dGn6nKvslaZr/sCmikPWuIs=; b=GHPpBYJLgKHBDVpJjO+mzJtnikmIWVcuSzGnNvXbEfCANJfbxmB/qky/opD+HVkQSH 9oc3Xt4/fDy5OOV2OXB33jciUe5vN3mruSGt7LE6sfCAni0NclVcakOnQXc6/pzJp9VE ojmq01FqKIvnqcYnypVgIerhxOKJj9axFHMUfQtIsxywNZlJ3GAPXZyhNPAiLo8mACg+ +mThKjFhcU9qal8yZswZyTNiihaHp5+gDE16ErefNShmpRH2+0o6C66fGwIUPQ39MvQC PCDC7NAsEc2jSw8rLIes2gbuFu3BPRKaq0dyL17Wjx2SC3r+WXmTeEu7yigKVLA1YILv NVCw== MIME-Version: 1.0 X-Received: by 10.180.36.133 with SMTP id q5mr8289664wij.0.1377147656523; Wed, 21 Aug 2013 22:00:56 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Wed, 21 Aug 2013 22:00:56 -0700 (PDT) In-Reply-To: <1377105408.1492.12.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845978.1460.126.camel@localhost> <1377105408.1492.12.camel@localhost> Date: Wed, 21 Aug 2013 22:00:56 -0700 X-Google-Sender-Auth: UAzmMpS9crMX9_HsYzYoHnFEseQ Message-ID: Subject: Re: Dlink DIR-825 B1 status [updated] [status 3 - MAC addrs] From: Adrian Chadd To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 05:00:59 -0000 Hi, Right. Well, what I'd like to see in the short term is the .hints hack to pull the MAC address(es) out - if_arge.c has some hack to do this. It's terrible but it works. In the longer term I'd like to see there be some generic way in the machdep code to read in things like macaddresses from EEPROM early on, then populate kenv entries with the relevant info. We can then modify if_arge, if_ath to look at the relevant kenv/hints for "overrides". -adrian On 21 August 2013 10:16, Sean Bruno wrote: > On Sun, 2013-08-18 at 12:21 -0700, Adrian Chadd wrote: > > you won't; it's a hacked up uboot. Sigh. > > > > Anyway - Just look at the board config file (a .c file) in openwrt for > > the ap96. > > > > > > > > -adrian > > > > > > Huh ... it looks like the caldata and the mac addrs are at "special" > locations as the openwrt folks have special functions to read them in > their "mach-dir-825-b1.c" > > I suspect that with this as a road map I can "do something" to try and > pull in their specific methods to do stuff tonight. Is this the right > path to go down? > > Sean > > p.s. current dmesg with USB attach working > http://people.freebsd.org/~sbruno/dir_825_dmesg.txt > From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 05:02:25 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 917E3C42 for ; Thu, 22 Aug 2013 05:02:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x232.google.com (mail-we0-x232.google.com [IPv6:2a00:1450:400c:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 13B192D14 for ; Thu, 22 Aug 2013 05:02:24 +0000 (UTC) Received: by mail-we0-f178.google.com with SMTP id u54so1183854wes.37 for ; Wed, 21 Aug 2013 22:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=hZPg6bUru9WmSqc6jlh6a7JjPr2jRyulc7LBhDMhcSs=; b=U00dbA3wGB3e1BZcO4dXr4wsTEPAwAevJGh+ZZGn/jR0i2+e1IMnfotpJE5DTSrsg7 Zl9sPLCL6XEzePL3SbnvyCs7fkm47QU+S8bypwIF5nZ6jixNbWGhZJL2Z9+23H14XgTq 9HEOaLooPDwCxAvreLqLJlnwKasnfRJUzTZYRFafepfpIHOOr+8AczGJPide/xy1Llcm XS6iVy12T2ws1dUUsdmyJ97Pt2YrD3YkDCSy7End6t9w8PYEl0GW4q/VdySj+thEz99j EUx7jw78LnYiXK8HoQZgOBbrc02r39B4y2mjRfx6fiZlYQiKoM0GhbLBBTJFpMmLbb0Y KsRQ== MIME-Version: 1.0 X-Received: by 10.180.36.133 with SMTP id q5mr8294820wij.0.1377147743400; Wed, 21 Aug 2013 22:02:23 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Wed, 21 Aug 2013 22:02:23 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Wed, 21 Aug 2013 22:02:23 -0700 X-Google-Sender-Auth: NPCdHII0QxrpukFSKCltpvrhUlM Message-ID: Subject: Re: Making Picostation m2HP work From: Adrian Chadd To: hiren panchasara Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 05:02:25 -0000 Right! Nice work! So that tells me that whatever image you've stuffed into the ubiquiti firmware isn't setup right. Did you lzma compress the kernel, then wrap that in mkimage or whatever the u-boot command is, and then pass _that_ output to the ubiquiti firmware builder? -adrian On 20 August 2013 16:56, hiren panchasara wrote: > On Mon, Aug 19, 2013 at 10:09 AM, hiren panchasara < > hiren.panchasara@gmail.com> wrote: > > > > > > > > > On Mon, Aug 19, 2013 at 5:59 AM, Luiz Otavio O Souza >wrote: > > > >> Hi Hiren, > >> > >> I've looked at ubnt firmwares and there are a few identifiers that i can > >> gather: > >> > >> All the 'M' series (rockets, airgrids and many others) uses the same > >> firmware identifier: 'XM'. > >> > >> The b/g 2Ghz radios uses the 'XS2' identifier and the 5Ghz models uses > >> the 'XS5'. > >> > >> The original PicoStation2 HP firmware has the following identifier: > >> > >> $ hexdump -C PicoStation2HP-v4.0.3.build5058.bin > >> 00000000 55 42 4e 54 58 53 32 2e 61 72 32 33 31 36 2e 76 > >> |UBNTXS2.ar2316.v| > >> 00000010 34 2e 30 2e 33 2e 35 30 35 38 2e 31 33 30 33 32 > >> |4.0.3.5058.13032| > >> 00000020 38 2e 31 30 35 34 00 00 00 00 00 00 00 00 00 00 > >> |8.1054..........| > >> 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > >> |................| > >> [...] > >> > >> Can you try to build an image using 'XS2' as the board type and > >> 'XS2.ar2316.FreeBSD' as the version string ? > >> > >> If you create a correct image the update process will succeed even if > the > >> compression is wrong (the loader will fail to boot, but that is ok, we > can > >> hopefully fix the image later). > >> > >> The kernel load address and entry point set by mkfwimage for the XS2 > >> board is different from what we expect: > >> > >> .name = "XS2", > >> .kern_start = 0xbfc30000, > >> .kern_memstart = 0x80041000, > >> > > .kern_entry = 0x80041000, > >> .firmware_max_length= 0x00390000, > >> > > > > kern_memstart is not there in the mkfwimage I am using but I thing that > > should be fine. > > > > fwiw, I am using Adrian's > > > > http://freebsd-wifi-build.googlecode.com/svn/trunk/ > > > > > > Trying rest of the things with XS2 and still getting the same result: > > > > ar7240> urescue > > Setting default IP 192.168.1.20 > > Starting TFTP server... > > Using eth0 (192.168.1.20), address: 0x81000000 > > Waiting for connection: / > > Receiving file from 192.168.1.254:42436 > > Received 6408760 bytes > > Firmware check failed! (-2) > > > > Alright so I think we've got a little further in the journey and got past > this error. > > I think the "Firmware check failed!" error was coming because we were > setting UBNT_VERSION = "XS2.ar2316.FreeBSD" while it was expecting > something along the lines of "XS2.ar7240.FreeBSD" > > ar7240 is the key thing here afaik. In retrospect it seems obvious(?) > because when I drop into uboot after powering on the device, the prompt for > uboot is: > > ar7240> > > That probably was the indication to not use ar2316 in version string. But > who knew :-) > > Now after accepting the image it fails at a different point: > > > Receiving file from 192.168.1.254:56679 > Received 6300568 bytes > Firmware Version: XS2.ar7240.FreeBSD > Setting U-Boot environment variables > Un-Protected 1 sectors > Erasing Flash.... done > Erased 1 sectors > Writing to Flash... done > Protected 1 sectors > Copying partition 'kernel' to flash memory: > erasing range 0x9F050000..0x9F19FFFF: ..................... done > Erased 21 sectors > writing to address 0x9f050000, length 0x00150000 ... > Copying partition 'rootfs' to flash memory: > erasing range 0x9F1A0000..0x9F65FFFF: > > ............................................................................ > done > Erased 76 sectors > writing to address 0x9f1a0000, length 0x004c0000 ... > > Firmware update complete. > > Resetting... > > U-Boot 1.1.4.2-s594 (Dec 5 2012 - 15:23:07) > > Board: Ubiquiti Networks XM board (rev 1.0 e302) > DRAM: 32 MB > Flash: 8 MB > PCIe WLAN Module found (#1). > Net: eth0, eth1 > Hit any key to stop autoboot: 0 > ## Booting image at 9f050000 ... > Bad Magic Number > Boot failed: resetting... > > U-Boot 1.1.4.2-s594 (Dec 5 2012 - 15:23:07) > > Board: Ubiquiti Networks XM board (rev 1.0 e302) > DRAM: 32 MB > Flash: 8 MB > PCIe WLAN Module found (#1). > Net: eth0, eth1 > Hit any key to stop autoboot: 0 > ## Booting image at 9f050000 ... > Bad Magic Number > Boot failed: resetting... > > So, its stuck in this loop now. > > I also tried > > ar7240> bootm 0x80041000 > ## Booting image at 80041000 ... > Bad Magic Number > ar7240> bootm 0xa8030000 > ## Booting image at a8030000 ... > Bad Magic Number > > Just for catching something obvious, > > ar7240> printenv > bootdelay=1 > baudrate=115200 > ethaddr=00:15:6d:0d:00:00 > mtdids=nor0=ar7240-nor0 > filesize=10000 > fileaddr=81000000 > serverip=192.168.1.254 > ethact=eth0 > > mtdparts=mtdparts=ar7240-nor0:256k(u-boot),64k(u-boot-env),1344k(kernel),5440k(rootfs),256k(cfg),64k(EEPROM) > bootcmd=bootm 0x9f050000 > bootargs=console=tty0 root=31:03 rootfstype=squashfs init=/init > ipaddr=192.168.1.20 > stdin=serial > stdout=serial > stderr=serial > > cheers, > Hiren > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org > " > From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 05:27:13 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CCE15405 for ; Thu, 22 Aug 2013 05:27:13 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 92AB52E25 for ; Thu, 22 Aug 2013 05:27:13 +0000 (UTC) Received: by mail-ob0-f174.google.com with SMTP id wd6so2717609obb.19 for ; Wed, 21 Aug 2013 22:27:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=k1Lhm3WxsCoXl45grQxf9DTvxKIweSNmlkExyt7LzIw=; b=l0OB7MP5J+gAUT+YPvFkaimox33DGISZNsPSSRixAlHXLiSqjhmjRTf6UzTU3bnzBM 8XEbgfBwb8fV8yEIUZiGKHcPVRF706XDEE63Os3mXZYuFFVuWFwCtm0RpUm7dwTO2Q6K 9ED2bBGlFnHoXRQmdOxgKGtq2GUtyB61hv0Tra2Yd1FqkhL/pbPajGy7zKGzJX3OwWng v9W1EejwIZWujUVTAJZ7066Sr8qzzbhvjksVJA0+5tK6HwEMkRgit6RWv/UOGhairher tdaOrOjruAnf/ZJRJvnRpABo8U/d2DC3vqojTHrsVLkquiGpZJJamgaf0vhfe2ok/BNx qEng== X-Gm-Message-State: ALoCoQmygSxKN5DjIRYOSCa1ZXznbs0G4rZXZ29QXIEvXQfcKCYDjga9F4TZx/7lISPsU66y+o0/ X-Received: by 10.60.133.71 with SMTP id pa7mr12183978oeb.44.1377149226886; Wed, 21 Aug 2013 22:27:06 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id tz10sm16180965obc.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 22:27:05 -0700 (PDT) Sender: Warner Losh Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20130821095849.GA7322@olymp.kibab.com> Date: Wed, 21 Aug 2013 23:27:03 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <8D289F43-261C-43F2-A4AC-F027E70558B7@bsdimp.com> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> To: Ilya Bakulin X-Mailer: Apple Mail (2.1085) Cc: Alexander Motin , freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 05:27:13 -0000 What's the best git repo URL to clone from? Warner On Aug 21, 2013, at 3:58 AM, Ilya Bakulin wrote: > So, after fixing some bugs in my own code and adding a couple of bus = methods > I am finally able to load the firmware onto the card and receive = "Firmare started" message. >=20 > Next step will be adding support for setting IRQ handlers (SDIO stack) = and writing the code > to connect mv_sdiowl driver to our net80211 stack (Adrian I hope you = will help with this). >=20 > As SD8787 adapter uses the binary firmware, I had to import it in the = tree. As I'm doing all testing > without any root FS, I compile the formware blob into the kernel. > The patch below is therefore incomplete; full snapshot is kept under = [1]. > To activate mv_sdiowl driver, add mmc, mv_sdio, mv_sdiowl and = mv_sdiowl_fw to the kernel config. >=20 > [1] = https://github.com/kibab/freebsd/compare/master...kibab-dplug#files_bucket= >=20 > I will keep you all updated. From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 06:10:13 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DF685E51; Thu, 22 Aug 2013 06:10:13 +0000 (UTC) (envelope-from ilya@bakulin.de) Received: from olymp.kibab.com (olymp6.kibab.com [IPv6:2a01:4f8:160:84c1::2]) by mx1.freebsd.org (Postfix) with ESMTP id A1A1E206E; Thu, 22 Aug 2013 06:10:13 +0000 (UTC) X-DKIM: OpenDKIM Filter v2.5.2 olymp.kibab.com AE0C83F432 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bakulin.de; s=default; t=1377151811; bh=qEKqtbHReBC9ZAsTmlmoY2JUDlR2yakH8ZZAlGyX5Xs=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=xLdhxXhA0JkAjkR7oAM9C1YICciF67i+wUcvZ4IN2V0zOqocBYT6PPMhOx7koHcbs kaW/+ZaSbnSfcVkE0/p1OBOWa9u/zSVHxbmYMh2QcqFMvlZezkguK+fq46hi0079kn b53QsNanwjNyBeMViPr6ePmqZIro2u0WQr+sgwDU= Message-ID: <5215AB46.90707@bakulin.de> Date: Thu, 22 Aug 2013 08:10:14 +0200 From: Ilya Bakulin MIME-Version: 1.0 To: Warner Losh Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> <8D289F43-261C-43F2-A4AC-F027E70558B7@bsdimp.com> In-Reply-To: <8D289F43-261C-43F2-A4AC-F027E70558B7@bsdimp.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alexander Motin , freebsd-arm@freebsd.org, freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 06:10:14 -0000 Hi Warner, On 22.08.13 07:27, Warner Losh wrote: > What's the best git repo URL to clone from? > You need https://github.com/kibab/freebsd.git, kibab-dplug branch. -- Regards, Ilya Bakulin From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 06:18:25 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7210C14A; Thu, 22 Aug 2013 06:18:25 +0000 (UTC) (envelope-from ilya@bakulin.de) Received: from olymp.kibab.com (olymp6.kibab.com [IPv6:2a01:4f8:160:84c1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 32EC720E8; Thu, 22 Aug 2013 06:18:24 +0000 (UTC) X-DKIM: OpenDKIM Filter v2.5.2 olymp.kibab.com 931543F432 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bakulin.de; s=default; t=1377152303; bh=MmwlGgFENys88KUsp0h0JcsPw8z+qlngyOZuqWtVHbc=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=co8KPhTG5CebdOgTpLhMkEc2SguCp1cmZYFj6UOP8WhIXVph4QljZLC818Oh1oZYN JOe5+oXsBkw4mNZXIRy1vUDVLyNu7GYcDo55h/4xUhVH9UfOzJHG4eCe2MdVTqeH4N 0SdIVVCQDEykIwc2orBiLbzKSgFHpNIuj5SZ1KYQ= Message-ID: <5215AD32.3080800@bakulin.de> Date: Thu, 22 Aug 2013 08:18:26 +0200 From: Ilya Bakulin MIME-Version: 1.0 To: Adrian Chadd Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Alexander Motin , "freebsd-arm@freebsd.org" , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 06:18:25 -0000 Hi Adrian, On 21.08.13 23:37, Adrian Chadd wrote: > Hi! > > The marvell wifi stuff isn't ARM specific, right? So it should live in > dev/ rather than arm/ Furthermore, it's only partly SDIO-specific. The same driver should work for USB- and PCIe-based versions of Marvell Avastar 88W8787 and 88W8797. The Linux driver is split into several files, by the way, for PCIe, USB and SDIO, then for station and AP mode. I think the best way to organize the code is to split it in layers, like it is for ath. I didn't know that the code is going to be universal when I started to code the driver, so that's why if is in sys/arm/mv. The code in Linux driver is clean and understandable, although I would prefer to get the documentation for the chipset and not use Linux as the single source of information. What's with the licensing in this case by the way? -- Regards, Ilya Bakulin From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 06:28:39 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0BCCB696 for ; Thu, 22 Aug 2013 06:28:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-oa0-f49.google.com (mail-oa0-f49.google.com [209.85.219.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C45322170 for ; Thu, 22 Aug 2013 06:28:38 +0000 (UTC) Received: by mail-oa0-f49.google.com with SMTP id n10so2671911oag.8 for ; Wed, 21 Aug 2013 23:28:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=4lY1FD9T0pgtqJzkLPUEEK3Eg4UvdQCGn2pZsVJvgic=; b=hoxLApKGJ15+w+qcCZbWv+eGgRuJOEZp30szFl66F6tEb0q50Lm8AWJUJmiWf8lnI3 /RZDjCOAii+Tm0oufDF+x+wjBgE8SHSw7mI/LHJcid2zrMLYojl1ISolA4D4S6kgIRiH Z7qEm1K2JT7bHyLhglFBtVZpVibdeqaZPcr2A4IHSgXuonaZf3fZhvZYsZ79IAMleDLx UBiRVApiDWtjnRVluSL063JoymYia0rhiuRO1zCJZZarI+oC6aeLUdD1sUqkGEvFW26t psFsb1Bzt2v0T9vsj5X24FxyBLfd9qufgWkOHQ+1JpbK7DeQjtvpU7yygY+pRuUVqXfd QL6g== X-Gm-Message-State: ALoCoQlb6gT+uOyvvVg1qK957HwYpxsQaB6wmg12/q9VJypzUvMVHaZJay3peIUiX1w98+E0pUKS X-Received: by 10.182.246.232 with SMTP id xz8mr12500416obc.9.1377152912412; Wed, 21 Aug 2013 23:28:32 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id tz10sm16495136obc.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Aug 2013 23:28:31 -0700 (PDT) Sender: Warner Losh Subject: Re: Dlink DIR-825 B1 status [updated] [status 3 - MAC addrs] Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Thu, 22 Aug 2013 00:28:29 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <8BBEDE9B-26A6-41B0-B35E-2481A62E0874@bsdimp.com> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845978.1460.126.camel@localhost> <1377105408.1492.12.camel@localhost> To: Adrian Chadd X-Mailer: Apple Mail (2.1085) Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 06:28:39 -0000 Sure would be a lot simpler if we had FDT for these platforms... Sadly = we don't, but I really like the idea of the machdep code reading this = early in boot... Warner On Aug 21, 2013, at 11:00 PM, Adrian Chadd wrote: > Hi, >=20 > Right. Well, what I'd like to see in the short term is the .hints hack = to > pull the MAC address(es) out - if_arge.c has some hack to do this. = It's > terrible but it works. >=20 > In the longer term I'd like to see there be some generic way in the = machdep > code to read in things like macaddresses from EEPROM early on, then > populate kenv entries with the relevant info. We can then modify = if_arge, > if_ath to look at the relevant kenv/hints for "overrides". >=20 >=20 >=20 > -adrian >=20 >=20 >=20 > On 21 August 2013 10:16, Sean Bruno wrote: >=20 >> On Sun, 2013-08-18 at 12:21 -0700, Adrian Chadd wrote: >>> you won't; it's a hacked up uboot. Sigh. >>>=20 >>> Anyway - Just look at the board config file (a .c file) in openwrt = for >>> the ap96. >>>=20 >>>=20 >>>=20 >>> -adrian >>>=20 >>>=20 >>=20 >> Huh ... it looks like the caldata and the mac addrs are at "special" >> locations as the openwrt folks have special functions to read them in >> their "mach-dir-825-b1.c" >>=20 >> I suspect that with this as a road map I can "do something" to try = and >> pull in their specific methods to do stuff tonight. Is this the = right >> path to go down? >>=20 >> Sean >>=20 >> p.s. current dmesg with USB attach working >> http://people.freebsd.org/~sbruno/dir_825_dmesg.txt >>=20 > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to = "freebsd-embedded-unsubscribe@freebsd.org" From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 07:12:48 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5CE8756B for ; Thu, 22 Aug 2013 07:12:48 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 20A7923F2 for ; Thu, 22 Aug 2013 07:12:48 +0000 (UTC) Received: by mail-ob0-f174.google.com with SMTP id wd6so2906718obb.33 for ; Thu, 22 Aug 2013 00:12:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=opaVQiynfFI+/wauTRy0AqpGCIBfQuVF+t3xH80fcLM=; b=cbviUe84Fh+c0g3Gkj63SVn+A4DvBSxB0avzX8JpGTZOJGmVEBSY3RvKFtvdSchO7Q UrWWuLJ84TSo6JydGLPcNCVoMSgnHS63ppk3k337dLOm2ejXHhJal9XpxJn2MOr0YFBI xLIAnv+SEcTWX0ck43OXr0td+QKMNdnSpZDfisE8eiUem2zKRiIT2tSmfKh8QuE73BK9 EpTIyHgVWXDufAd8+qFGb7uPdoNmE1EPl6Fi8rsiX60NtTiUgEqoGUXWDnbcG7BNNRiy MHVXkvxt4bFnJxv/q2uwTY8Z6YToacyFaU9Pih0PjGYnz1a3VmGollmqq8n+O8THFYr0 jD9Q== X-Gm-Message-State: ALoCoQka6Zt8wc56pdQfyUc71OKQrauitnX/aeA4NLWpznqgilSiQkubSN20/jaTs3tyPUM7QCU8 X-Received: by 10.60.47.76 with SMTP id b12mr891941oen.78.1377155567319; Thu, 22 Aug 2013 00:12:47 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id rr6sm16784006oeb.0.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Aug 2013 00:12:46 -0700 (PDT) Sender: Warner Losh Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <5215AD32.3080800@bakulin.de> Date: Thu, 22 Aug 2013 01:12:44 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <3C9989C8-BB72-4BD6-9246-4AD3790D4732@bsdimp.com> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> <5215AD32.3080800@bakulin.de> To: Ilya Bakulin X-Mailer: Apple Mail (2.1085) Cc: "freebsd-arm@freebsd.org" , Alexander Motin , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 07:12:48 -0000 On Aug 22, 2013, at 12:18 AM, Ilya Bakulin wrote: > Hi Adrian, >=20 > On 21.08.13 23:37, Adrian Chadd wrote: >> Hi! >>=20 >> The marvell wifi stuff isn't ARM specific, right? So it should live = in >> dev/ rather than arm/ >=20 > Furthermore, it's only partly SDIO-specific. The same driver should = work > for USB- and PCIe-based versions of Marvell Avastar 88W8787 and = 88W8797. > The Linux driver is split into several files, by the way, for PCIe, = USB > and SDIO, then for station and AP mode. We don't have any drivers in the tree that are this bus agnostic. Would = be cool to grow some :) > I think the best way to organize the code is to split it in layers, = like > it is for ath. > I didn't know that the code is going to be universal when I started to > code the driver, > so that's why if is in sys/arm/mv. Makes sense. > The code in Linux driver is clean and understandable, although I would > prefer to get the documentation for the chipset and not use Linux as = the > single source of information. > What's with the licensing in this case by the way? Copying ideas and facts: no problem. Copying code: you must adhere to the license if you copied enough to be = covered under copyright law.... It's complicated and best avoided. From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 07:20:56 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E6D679BB; Thu, 22 Aug 2013 07:20:55 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x236.google.com (mail-ea0-x236.google.com [IPv6:2a00:1450:4013:c01::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 162362498; Thu, 22 Aug 2013 07:20:54 +0000 (UTC) Received: by mail-ea0-f182.google.com with SMTP id o10so725237eaj.27 for ; Thu, 22 Aug 2013 00:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6cY7zwUt/t+8P9W09wD56mJ5GT5oKEyYuFqL0z6DK+Q=; b=NUO3Dm6sGVxyTmfrJuMW6YwV+eNdm+2S7mvo9Jjf2iT0qQWnVKjHDwQGrsReD0WECn s/bGikczipdZPjFJRjc6kbdARITqLx7xuamlYjZImyR5wBBwZDkamS6YU8pWjLEJkDks WuTWI11yl/z2FtFADcxepQEhDSyJF10U98Z4nYo7r9CAnDTYfRHY6DDCkwbnnMCpfsVe mt0HtpvULduPVdqbQnMpGybpiepdwRBB5zh1N1RXOzLvI13jCUOG9B9B4c+LrTPqKkTk s9XFhejUJcBUdqn4aOPn47QUdP/225f9t4SX1nwsg5sdSrMP3nRoGu0HZqtnyL+h+3ct 9ZKg== MIME-Version: 1.0 X-Received: by 10.15.75.73 with SMTP id k49mr16298241eey.36.1377156053137; Thu, 22 Aug 2013 00:20:53 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Thu, 22 Aug 2013 00:20:52 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Thu, 22 Aug 2013 00:20:52 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded , ray@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 07:20:56 -0000 On Wed, Aug 21, 2013 at 10:02 PM, Adrian Chadd wrote: > Right! Nice work! > > So that tells me that whatever image you've stuffed into the ubiquiti > firmware isn't setup right. Did you lzma compress the kernel, then wrap > that in mkimage or whatever the u-boot command is, and then pass _that_ > output to the ubiquiti firmware builder? > Alright, so as Adrian suggested, I tried to create uboot'ed kernel by running: "# ../build/build/bin/build ap91 uboot" which basically runs build_uboot which does following: /usr/local/bin/lzma e ${X_KERNEL} /tftpboot/kernel.${KERNCONF}.lzma || exit 1 # Create the firmware mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C lzma \ -a ${UBOOT_KERN_LOADADDR} -e ${UBOOT_KERN_STARTADDR} \ -n "FreeBSD" -d /tftpboot/kernel.${KERNCONF}.lzma \ /tftpboot/kernel.${KERNCONF}.lzma.uImage \ || exit 1 Now, I had to install /usr/ports/devel/uboot-mkimage/ port to get "mkimage" binary referenced above. But as soon as I run "# ../build/build/bin/build ap91 uboot", the laptop deadlocks. I have to hard reboot the laptop. I tried it 2 times and it stops right when its trying to execute mkimage command listed above. I am not sure what is the reason behind that. And I see ray@ is the maintainer of that port so I am cc'ing him to get some insights too. But weirdly enough, it still created the kernel file out of this run: kernel.AP91.lzma.uImage And I've provided that instead of regular kernel.gz in generating final image but loading that did not yield any different results. It still fails pretty much the same way. ar7240> urescue Setting default IP 192.168.1.20 Starting TFTP server... Using eth0 (192.168.1.20), address: 0x81000000 Waiting for connection: \ Receiving file from 192.168.1.5:58512 Received 5811199 bytes Firmware Version: XS2.ar7240.FreeBSD Setting U-Boot environment variables Un-Protected 1 sectors Erasing Flash.... done Erased 1 sectors Writing to Flash... done Protected 1 sectors Copying partition 'kernel' to flash memory: erasing range 0x9F050000..0x9F12FFFF: .............. done Erased 14 sectors writing to address 0x9f050000, length 0x000e0000 ... Copying partition 'rootfs' to flash memory: erasing range 0x9F130000..0x9F5EFFFF: ............................................................................ done Erased 76 sectors writing to address 0x9f130000, length 0x004c0000 ... Firmware update complete. Resetting... U-Boot 1.1.4.2-s564 (Jul 19 2012 - 10:41:56) Board: Ubiquiti Networks XM board (rev 1.0 e302) DRAM: 32 MB Flash: 8 MB PCIe WLAN Module found (#1). Net: eth0, eth1 Hit any key to stop autoboot: 0 ## Booting image at 9f050000 ... Bad Magic Number ar7240> Thanks, Hiren From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 07:24:41 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 21802A3A; Thu, 22 Aug 2013 07:24:41 +0000 (UTC) (envelope-from ilya@bakulin.de) Received: from olymp.kibab.com (olymp6.kibab.com [IPv6:2a01:4f8:160:84c1::2]) by mx1.freebsd.org (Postfix) with ESMTP id D5EAF24B2; Thu, 22 Aug 2013 07:24:40 +0000 (UTC) X-DKIM: OpenDKIM Filter v2.5.2 olymp.kibab.com 7B14D3F438 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bakulin.de; s=default; t=1377156271; bh=ScYSA3RBOkasizG2bu6/kf0D8Z/BqFAPfnsgDVn3gtc=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=pzzoxvNmmWgZexq55EF41bIAv2I7RcpRmR+lDSMEfhYsDuizmFK76G5RF4OL/pjln diAL6i1t4Mcu1FJi2r1OKi+zW/UO4JrwLyNQF6RG48w+CkD0QFtwJo+jrNdd1iPWxl VtWizdksgq6HHr59WvLM3fXgpOjL+/3d5l9rVQ5w= Message-ID: <5215BCB1.4020308@bakulin.de> Date: Thu, 22 Aug 2013 09:24:33 +0200 From: Ilya Bakulin MIME-Version: 1.0 To: Warner Losh Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> <5215AD32.3080800@bakulin.de> <3C9989C8-BB72-4BD6-9246-4AD3790D4732@bsdimp.com> In-Reply-To: <3C9989C8-BB72-4BD6-9246-4AD3790D4732@bsdimp.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "freebsd-arm@freebsd.org" , Alexander Motin , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 07:24:41 -0000 On 22.08.13 09:12, Warner Losh wrote: > > On Aug 22, 2013, at 12:18 AM, Ilya Bakulin wrote: >> Furthermore, it's only partly SDIO-specific. The same driver should work >> for USB- and PCIe-based versions of Marvell Avastar 88W8787 and 88W8797. >> The Linux driver is split into several files, by the way, for PCIe, USB >> and SDIO, then for station and AP mode. > > We don't have any drivers in the tree that are this bus agnostic. Would be cool to grow some :) So I'll try at least :-) Especially if I manage to get those chips with non-SDIO interface. Otherwise it makes little sense :-) >> The code in Linux driver is clean and understandable, although I would >> prefer to get the documentation for the chipset and not use Linux as the >> single source of information. >> What's with the licensing in this case by the way? > > Copying ideas and facts: no problem. > Copying code: you must adhere to the license if you copied enough to be covered under copyright law.... It's complicated and best avoided. I don't copy any code, only ideas and constants that are nessesary for writing the code. If someone could assist me in getting docs from Marvell, that would be awesome :) -- Regards, Ilya Bakulin From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 07:42:16 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 44EFB1000 for ; Thu, 22 Aug 2013 07:42:16 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 06C5125AF for ; Thu, 22 Aug 2013 07:42:16 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:b92e:d4cd:a9c8:2922]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id 5F3B44AC31; Thu, 22 Aug 2013 11:42:14 +0400 (MSK) Date: Thu, 22 Aug 2013 11:42:10 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <361422452.20130822114210@serebryakov.spb.ru> To: Ilya Bakulin Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug In-Reply-To: <5215BCB1.4020308@bakulin.de> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> <5215AD32.3080800@bakulin.de> <3C9989C8-BB72-4BD6-9246-4AD3790D4732@bsdimp.com> <5215BCB1.4020308@bakulin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 07:42:16 -0000 Hello, Ilya. You wrote 22 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013 =D0=B3., 11:24= :33: IB> If someone could assist me in getting docs from Marvell, that would be IB> awesome :) Yep, it will be awesome on whole OSS community level. As far as I know, nobody was able to get any tech docs from Marvell, with or without NDA. Even small firms (whiich could do all paperwork, but will not buy 100K+ batches of their chips) wasn't able to do so, not to speak about private person. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-embedded@FreeBSD.ORG Thu Aug 22 21:25:46 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B244BA5E; Thu, 22 Aug 2013 21:25:46 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1CFEF241D; Thu, 22 Aug 2013 21:25:45 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id l18so754959wgh.31 for ; Thu, 22 Aug 2013 14:25:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=SK0gwmOkc4zUC0wznXR16AOwgZwPuxcQl0ha4cjUI1s=; b=gP5Ojauy19t7wl4iiFlY9V/Ul+0Ldou8/a/A09E2+icY35xqF75SpuoBlLDv7zSiFC aegEhtMshcKi/Y7wKQR+dk0jtp5Zkgic3lJfrkntXzvspP07J/xH0zfbxPUnHB/2YEbu tuuWOIF1oUZDMIK87ciDj/HJWdSPvi15VmJAlcB//5RQ/bwDA4NEkP5Zr8F3grlQ6jqQ 86bMMscTGtJ+AZwXUkJfVPyaVSxhTEDc2WeklF/lmXIdEcDj6HeZ7EU26mew79B9U2Oo 7AyDoUqdidouOZZr+LoO3OPqxUkxM4bwIJFkX+iXR0Z4Zw02NH8E0LPIzXWyngHsWSi9 W5aw== MIME-Version: 1.0 X-Received: by 10.194.94.37 with SMTP id cz5mr3562185wjb.55.1377206744442; Thu, 22 Aug 2013 14:25:44 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Thu, 22 Aug 2013 14:25:44 -0700 (PDT) In-Reply-To: <361422452.20130822114210@serebryakov.spb.ru> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> <5215AD32.3080800@bakulin.de> <3C9989C8-BB72-4BD6-9246-4AD3790D4732@bsdimp.com> <5215BCB1.4020308@bakulin.de> <361422452.20130822114210@serebryakov.spb.ru> Date: Thu, 22 Aug 2013 14:25:44 -0700 X-Google-Sender-Auth: NP04uGMfpl6M-IAL9AYnppg9cfY Message-ID: Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug From: Adrian Chadd To: Lev Serebryakov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Ilya Bakulin , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 21:25:46 -0000 ... just do a driver port from Linux. Make sure your new code is in different, BSD licenced source files. We can then either import it into contrib/, or use it as a reference to generate chipset documentation and then have someone else fill in the routines one BSD routine at a time. -adrian From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 23 05:57:17 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6CB42C1D for ; Fri, 23 Aug 2013 05:57:17 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm12-vm6.bullet.mail.ne1.yahoo.com (nm12-vm6.bullet.mail.ne1.yahoo.com [98.138.91.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2D1402E66 for ; Fri, 23 Aug 2013 05:57:16 +0000 (UTC) Received: from [98.138.90.53] by nm12.bullet.mail.ne1.yahoo.com with NNFMP; 23 Aug 2013 05:57:08 -0000 Received: from [98.138.226.127] by tm6.bullet.mail.ne1.yahoo.com with NNFMP; 23 Aug 2013 05:57:08 -0000 Received: from [127.0.0.1] by smtp206.mail.ne1.yahoo.com with NNFMP; 23 Aug 2013 05:57:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1377237428; bh=G84WBlJqxq6SU2tIHg5iHja2DEeH9pOcSnhmAPF94tc=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=Aar25/hTCl/AQRGIa2ekm+AIKn2XisNw7HERktXJFP6e3aXh9fTIN+Et8hacLX4OfuXWPPyLO3w5f+i/vdkttjXfTPdDkfyZWFdcuMxFLHdeJea9xE+c0s4H+4fNPXTwmGY4aeBLVcVe1rFvWuTj1yepxemwO9WoMTbTS+LeNXY= X-Yahoo-Newman-Id: 879862.91009.bm@smtp206.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _rRNJWoVM1kc871HyaSYDdcoe2fmF2GqHHB6QV5gVFu0_aw 0mPut5uoq_W3lm_FFRQg4rUFbRomW8WNb.c6YUyb_DaQziNX29yFshxGm_1H .h1bGgqiBmKCMeu2drN1zC5SNcmPwKDyKO6XQIAfuZZ1cLbFN0dR_rsKOaky x6z8kdmSyXLAG5soXXX5WZ9V4VOaWiXJbPbnYe2YpGMxCw2rcpcVxjCgkYXP BZKLGkswdN32babBssLQzHbjFz7lVhqmiQyINHbzsPfrmyef4lI_iiWPB2V9 0Uh6ckIbFOcwHLiIG7WU3.GermLl.5VHjyR6PKgvWJik0N5H9.NPNngRwhJp IJrRgFqPh_9avkXBOOwx_qjE1EVa4GtmVjs9PqyclvB52c4hCDPb7FDFtkH0 YQKm7wdjrqbE7PN0oc4zj5mLfd10SBAAqXi0YbKuQA27R1LFJqPiQo.HFp66 AAafOQqP7KHVbG2dMQVLzv76v8b3hx8FtM1b8upYe_roT0dQA8RJSmQH2AwK p9mg0rKBmCYKN09ferQre.CPekyUD4Bv82J1L4OineFR5eNM2AV7mdHqIav9 Epr53s5VOQYgPjt1iJzKrua4Up7090vWvwsvj2a8HPpo0huTGj76ShjIr5kC EGRBIS_zGwfGvzHJ1SWQ1Ri3fqirjoy0- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [192.168.1.228] (sean_bruno@71.202.40.63 with ) by smtp206.mail.ne1.yahoo.com with SMTP; 22 Aug 2013 22:57:08 -0700 PDT Subject: Re: Dlink DIR-825 B1 status [updated] [status 3 - MAC addrs PATCH] From: Sean Bruno To: freebsd-embedded In-Reply-To: <1377105408.1492.12.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845978.1460.126.camel@localhost> <1377105408.1492.12.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-CM1QDsKN4BzgIgKMn7kx" Date: Thu, 22 Aug 2013 22:57:07 -0700 Message-ID: <1377237427.2364.35.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 05:57:17 -0000 --=-CM1QDsKN4BzgIgKMn7kx Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > Huh ... it looks like the caldata and the mac addrs are at "special" > locations as the openwrt folks have special functions to read them in > their "mach-dir-825-b1.c" >=20 > I suspect that with this as a road map I can "do something" to try and > pull in their specific methods to do stuff tonight. Is this the right > path to go down? >=20 > Sean=20 >=20 This amused me a bit today. Turns out that the MAC addrs are stored as a literal string for arge(4) on this board. Took me a bit, but this patch and change to DIR-825.hints gets "real" MAC addrs setup for arge0 and arge1. I snickered a bit when I realized that they even left the ":" characters in the string. I also add the "magic" numbers for reading the mac's from the EEPROM and expose a "readascii" generalized hint for this supported class of boards. Looking over openwrt's solution, they don't get MAC addresses for the WLAN interfaces, then use the one's provided by arge(4) and simply add 1. I haven't reviewed the relevant ath(4) code to see how we can pass that in, so suggestions are welcome. http://people.freebsd.org/~sbruno/arge_ascii.txt Sean p.s. dmesg updated http://people.freebsd.org/~sbruno/dir_825_dmesg.txt --=-CM1QDsKN4BzgIgKMn7kx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJSFvmvAAoJEBkJRdwI6BaH7uQH/1D5tvBRG2n4TT4wI1uZ1Vz1 B0ApSk8cc9XjtrenafTOmwPNyqzK5MSvkLxGg/3PbEjR80Ltl1ixlD0QzdkLtKxu iSBP4rZ+9/heXdCR6Vi9vukVrtd5vbdQkZBk+xjL0ixmSn2fTakNOeKHDtXR33WH Ze8bWv624yHp+0MHkGSS+w3xhiZsKPdK95vEJLrcCGhp7Ef1iaYOEd7Es7xYAh6G JDxg4gejyfU0r4kzKls6b+PhaB9Y8HA9k6exotiY27fxJNGv7M9Asv5a+hjVzsXC cNunjv+L7lAZTYcT427ByHPnSAWhQ9JpDTCB6ulqmDNi6H0YXE5LMgMOxmHxeQk= =mGoq -----END PGP SIGNATURE----- --=-CM1QDsKN4BzgIgKMn7kx-- From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 23 06:23:40 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 51948169; Fri, 23 Aug 2013 06:23:40 +0000 (UTC) (envelope-from ilya@bakulin.de) Received: from olymp.kibab.com (olymp6.kibab.com [IPv6:2a01:4f8:160:84c1::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0FC092FB4; Fri, 23 Aug 2013 06:23:39 +0000 (UTC) X-DKIM: OpenDKIM Filter v2.5.2 olymp.kibab.com 4C5E23F432 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=bakulin.de; s=default; t=1377239018; bh=sISVILez+eapSk9w0BlUXBM/yVZz0exMBSWkE8mOHlQ=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=nOm6bqONRHT647DmP9ezAE4DvGBJedTHEcxdGZhM7D7m1DbypY6GEGZqR2xtS7nlL ciWW4ng4jBkZYdYbruKS64XRLy48+ovrnsaGPfAwb22iqguFPuNxLDDNV4fYK+cRGu IF/oUQpFpf52jIuCVBV380if9YUfLdgrn0OHE1zQ= Message-ID: <5216FFF0.9090403@bakulin.de> Date: Fri, 23 Aug 2013 08:23:44 +0200 From: Ilya Bakulin MIME-Version: 1.0 To: Adrian Chadd Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> <5215AD32.3080800@bakulin.de> <3C9989C8-BB72-4BD6-9246-4AD3790D4732@bsdimp.com> <5215BCB1.4020308@bakulin.de> <361422452.20130822114210@serebryakov.spb.ru> In-Reply-To: X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Lev Serebryakov , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 06:23:40 -0000 On 22.08.13 23:25, Adrian Chadd wrote: > ... just do a driver port from Linux. > > Make sure your new code is in different, BSD licenced source files. > > We can then either import it into contrib/, or use it as a reference to > generate chipset documentation and then have someone else fill in the > routines one BSD routine at a time. > > > > -adrian > OK, yeah it will be faster than waiting for docs that will never come :-) I think there is no need to import the code, after all we would probably prefer not to include GPL code in kernel, which would mean that the whole kernel gets infected. -- Regards, Ilya Bakulin From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 23 07:20:35 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A55CE8CA; Fri, 23 Aug 2013 07:20:35 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x22e.google.com (mail-we0-x22e.google.com [IPv6:2a00:1450:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 10C6B2224; Fri, 23 Aug 2013 07:20:34 +0000 (UTC) Received: by mail-we0-f174.google.com with SMTP id q54so200972wes.5 for ; Fri, 23 Aug 2013 00:20:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=AMzcTn8cEipx+8uIs0o7IOEWD0fVBbznvo8xlX9HV/c=; b=Omiao8NxLFPLNIVrxr9FaEJFMHji5JFq5sl4TWaqIjB9keYL4Mo/dlr2P0I+Ounj4c XP9VFlgTg10kD6XLE8c8brpRmVObJAX/LwST8RuCJa4XIH1ugpCScDHkbsLRR2OMzgcj RQD4L7U99VK8qlxQwozBA3r/tEUW90tMjyYZC6UbpeEpEyiEtzzNLx4gD2kpsZ2AEIEP XoxpfG10q4KZExp9QASXJwc0KprmrxJjpQ9vW7elSokWXwAsa7yBSQY0gue8G/oIALJU T4icbGWAu13x8uH58EJr55e+bj3L/dVqzgU+GrsMVPMWVVIQ9708DXPEtvyGRIqHFRdx vknQ== MIME-Version: 1.0 X-Received: by 10.180.37.164 with SMTP id z4mr1050255wij.30.1377242433276; Fri, 23 Aug 2013 00:20:33 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Fri, 23 Aug 2013 00:20:33 -0700 (PDT) In-Reply-To: <1377237427.2364.35.camel@localhost> References: <1374340359.1421.3.camel@localhost> <1376795552.1460.120.camel@localhost> <1376845978.1460.126.camel@localhost> <1377105408.1492.12.camel@localhost> <1377237427.2364.35.camel@localhost> Date: Fri, 23 Aug 2013 00:20:33 -0700 X-Google-Sender-Auth: yBHR0DSftBcWjtsnUR_CPHbvJMw Message-ID: Subject: Re: Dlink DIR-825 B1 status [updated] [status 3 - MAC addrs PATCH] From: Adrian Chadd To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 07:20:35 -0000 hah! cute. Yeah, for now let's just commit this. We can tidy it up in a later pass. -adrian On 22 August 2013 22:57, Sean Bruno wrote: > > > Huh ... it looks like the caldata and the mac addrs are at "special" > > locations as the openwrt folks have special functions to read them in > > their "mach-dir-825-b1.c" > > > > I suspect that with this as a road map I can "do something" to try and > > pull in their specific methods to do stuff tonight. Is this the right > > path to go down? > > > > Sean > > > > This amused me a bit today. Turns out that the MAC addrs are stored as > a literal string for arge(4) on this board. Took me a bit, but this > patch and change to DIR-825.hints gets "real" MAC addrs setup for arge0 > and arge1. I snickered a bit when I realized that they even left the > ":" characters in the string. > > I also add the "magic" numbers for reading the mac's from the EEPROM and > expose a "readascii" generalized hint for this supported class of > boards. > > Looking over openwrt's solution, they don't get MAC addresses for the > WLAN interfaces, then use the one's provided by arge(4) and simply add > 1. I haven't reviewed the relevant ath(4) code to see how we can pass > that in, so suggestions are welcome. > > http://people.freebsd.org/~sbruno/arge_ascii.txt > > Sean > > p.s. dmesg updated > http://people.freebsd.org/~sbruno/dir_825_dmesg.txt > From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 23 07:24:05 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EF8A29C0; Fri, 23 Aug 2013 07:24:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5937C224C; Fri, 23 Aug 2013 07:24:04 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id n12so211535wgh.24 for ; Fri, 23 Aug 2013 00:24:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mL0gNwNnZrPyQhjq7E/iHE9jnisyWA0J3Y3hLfstcR4=; b=kul63tQTPIL0Vy4OCvXb8stjHiGYlc1Ihs28F9nCmNLoDiY8mAauxq9vCtfGTzLaCu /zGEOdTSs76OEiAF9STkOpEqe7Zv8CfE1hxWlrg0QWfU893v7DOJa8Quhi+RI+XQnAbh StW/32KIV4CfWZ6t+BKhUFmrr0w94KhOqhQKN3pWQtWbP56J1zgBbepbGOLhg5PynfC+ +OdArz6jlU3ehHt94TwQBOYJ8xqh8fte9JOyUNE6qDyuEnUJVj3iIb84VORkT8zAX3vO GvHiHq7NXELGhMEkVpV9KjJIg2VQbyVvEF22iB3Phxu1JiXa4/5IA1sKNDcKQSAIdVYG w+lQ== MIME-Version: 1.0 X-Received: by 10.180.85.72 with SMTP id f8mr1196414wiz.0.1377242642780; Fri, 23 Aug 2013 00:24:02 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Fri, 23 Aug 2013 00:24:02 -0700 (PDT) In-Reply-To: <5216FFF0.9090403@bakulin.de> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> <5215AD32.3080800@bakulin.de> <3C9989C8-BB72-4BD6-9246-4AD3790D4732@bsdimp.com> <5215BCB1.4020308@bakulin.de> <361422452.20130822114210@serebryakov.spb.ru> <5216FFF0.9090403@bakulin.de> Date: Fri, 23 Aug 2013 00:24:02 -0700 X-Google-Sender-Auth: jqAsyHBhILimf76PgfUOxT4LIZk Message-ID: Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug From: Adrian Chadd To: Ilya Bakulin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Lev Serebryakov , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 07:24:05 -0000 It only infects the kernel if it's linked in. So, only have it build as a module for now! -adrian On 22 August 2013 23:23, Ilya Bakulin wrote: > On 22.08.13 23:25, Adrian Chadd wrote: > > ... just do a driver port from Linux. > > > > Make sure your new code is in different, BSD licenced source files. > > > > We can then either import it into contrib/, or use it as a reference to > > generate chipset documentation and then have someone else fill in the > > routines one BSD routine at a time. > > > > > > > > -adrian > > > > OK, yeah it will be faster than waiting for docs that will never come :-) > I think there is no need to import the code, after all we would probably > prefer not to include GPL code in kernel, which would mean that the > whole kernel gets infected. > -- > Regards, > Ilya Bakulin > From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 23 14:10:52 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EABB6568 for ; Fri, 23 Aug 2013 14:10:51 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B25FF2A6A for ; Fri, 23 Aug 2013 14:10:51 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id qd12so874446ieb.18 for ; Fri, 23 Aug 2013 07:10:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=QFlFfPPviu1+pl3BZeMnHKyt7hpF1B45JkW/9DmDgTc=; b=VRQXKo6IOvn2PbW/lCcYNlSlbO9ke7PSfqZsoxgKm5W+lrhiuwyhhYo3IGHhqjME+j onV2ddgF08Aq4nhWwJCrNB0lHMDYqLB77KIFeLFHCAmb1u9/yhunIBk/49xWi3zdCrZz yrA6SyWeNg7FJtJo8HS2BKaUPgL8BBAl2UbaLNdnm1Ak+JOcLR31+b37AqLzC/UxgdjY l7SBMbW21OuDo+vq5ppNX0XKCgxgkf4XkP2INiV0ycrJO+GH8EsrFtVSy+lr33ycC5z9 YszX3rOgtawS2sNX6IBUT8K/9esYPzWHA2HC3VvC7nsTODcsGijLEpdJvzXz4pqAYsBX vehQ== X-Gm-Message-State: ALoCoQljW2Q2ikPm/+trQs3ncAkcwzW+H6JQEE/sm8POiw4J4mhABI12EFJNxFRTcKheLaJKTAiW X-Received: by 10.50.87.74 with SMTP id v10mr1593344igz.27.1377265295421; Fri, 23 Aug 2013 06:41:35 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id q4sm3000452igp.6.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 06:41:34 -0700 (PDT) Sender: Warner Losh Subject: Re: [PATCH] SDIO support for Globalscale Dreamplug Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Fri, 23 Aug 2013 07:41:33 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <3E92A91E-2B00-47DF-9E14-35E8B9D4DF89@bsdimp.com> References: <20130702145905.GA1847@olymp.kibab.com> <51D3097A.8010601@FreeBSD.org> <51D3282C.1090701@bakulin.de> <20130703222002.GA60491@olymp.kibab.com> <51D50C55.1040300@myspectrum.nl> <51D531CB.3060300@bakulin.de> <51D5FE4C.9060102@bakulin.de> <20130821095849.GA7322@olymp.kibab.com> <5215AD32.3080800@bakulin.de> <3C9989C8-BB72-4BD6-9246-4AD3790D4732@bsdimp.com> <5215BCB1.4020308@bakulin.de> <361422452.20130822114210@serebryakov.spb.ru> <5216FFF0.9090403@bakulin.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1085) Cc: Ilya Bakulin , Lev Serebryakov , "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 14:10:52 -0000 On Aug 23, 2013, at 1:24 AM, Adrian Chadd wrote: > It only infects the kernel if it's linked in. And only for the people distributing it.... > So, only have it build as a module for now! We have several GPL'd bits of code that can be built into the kernel, = but that we don't have in GENERIC. So you kinda have to do both to = follow the established pattern. And the GPL stuff is built as part of = LINT.... Warner >=20 >=20 > -adrian >=20 >=20 > On 22 August 2013 23:23, Ilya Bakulin wrote: >=20 >> On 22.08.13 23:25, Adrian Chadd wrote: >>> ... just do a driver port from Linux. >>>=20 >>> Make sure your new code is in different, BSD licenced source files. >>>=20 >>> We can then either import it into contrib/, or use it as a reference = to >>> generate chipset documentation and then have someone else fill in = the >>> routines one BSD routine at a time. >>>=20 >>>=20 >>>=20 >>> -adrian >>>=20 >>=20 >> OK, yeah it will be faster than waiting for docs that will never come = :-) >> I think there is no need to import the code, after all we would = probably >> prefer not to include GPL code in kernel, which would mean that the >> whole kernel gets infected. >> -- >> Regards, >> Ilya Bakulin >>=20 > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to = "freebsd-embedded-unsubscribe@freebsd.org" From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 23 20:28:06 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2949B16F for ; Fri, 23 Aug 2013 20:28:06 +0000 (UTC) (envelope-from hapvbk@yahoo.co.uk) Received: from nm5-vm0.bullet.mail.ird.yahoo.com (nm5-vm0.bullet.mail.ird.yahoo.com [77.238.189.207]) by mx1.freebsd.org (Postfix) with SMTP id 1360421EA for ; Fri, 23 Aug 2013 20:28:04 +0000 (UTC) Received: from [77.238.189.236] by nm5.bullet.mail.ird.yahoo.com with NNFMP; 23 Aug 2013 20:28:03 -0000 Received: from [212.82.108.253] by tm17.bullet.mail.ird.yahoo.com with NNFMP; 23 Aug 2013 20:28:03 -0000 Received: from [127.0.0.1] by omp1018.mail.ird.yahoo.com with NNFMP; 23 Aug 2013 20:28:03 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 538960.43396.bm@omp1018.mail.ird.yahoo.com Received: (qmail 4475 invoked by uid 60001); 23 Aug 2013 20:28:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1377289683; bh=eRt+7nlQbSoJxRyP7SnTdIhwu/2PiZvj6wBZHvap15s=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=A/Qy7QcrG6l1AsS9idvBMh0ULobehiCeQwQgMTwcNOpPb5s6utSJc8gstTm/4IBD7tdbrlt/d0ssmU3dXISlCW7iRbktqvI2JR6Y9QnSWnuZ9mR09f5WuaYZsSIHNoBWbM5smlMc0MfgeFI6jea6SKcskMTkAGeV4LwAq3gJBnM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=Bvdv8kxwqE+QBT4ELHznjMswnW37uMc9GXtlo4OdfItVJYiYn7Le9EZX8NA/giZvo5T/AiYJr7UlK8O1OYCyMvmok2rYX009gp+A/gJxDrwYdqC9SsBl7S5HVCeSYWUhYfx/9VBSYRKmK6IY46gL5BOIvAFr/2w/dQDmbHgqo6M=; X-YMail-OSG: hpbFzAgVM1nyuwmDdWeKy6hDX7RQyLl.7WWwfD0fcLUW4L3 aS9y4pKqyvurtgjBdrfqF5ndQYJBda.ga23KctR0K8ni8WY08UFhEQhjUEpc toVwX4me.Zn3RKK2syRM5eC5A8kQarFJYAWnYamwkkFlOW1jaNY1vceP7gT1 qi1XZgOhspTof7.sj9AMCEOt9R.SIhoQLvEk1DGwjmY..ZmLli7SgtKLrVxl 0S.zLY3RrDSNggRYBoAovS.5PPivvDeD8qbUzEClXLRLx.K4lSU7kiBwA3.p yV_emUdXNvYBS8GKDNmPYjEfGSsrClu55flc11SN.CTit5xRFyfiVHDgnzXI HbrkXAiH1AuJPux04N2usNlzlt9CC8L2fwSZEsNfTn.L1L8QjMENby27p7gI dtfKZEabdSfxtVNoevMmTYgEs92ASl72R8hLQIWMN9CGs0pWyy2RwhFeb6ob AycDrHwUt8_t1x2umL1ynCifY0AHiVa8N0nn257IyCuQWXxjFtuYZN6jSLGA xKIqNUMhTNScYB5Ep.0Hd1WcIFEUqBBI1_wAFK.QqApdM15sVGgMIRfydqC9 OGTw2LcK6ZMA7dKfcVdENf81dQaMaGAL4_j70DYK5pAhVn.getyhRi2TQ5aU a06_ORdHGZuZTYQOeCPt6QX790XDhbIohZdc.6w48W2lpF2vQycHrWy99_lP K Received: from [204.138.59.246] by web171205.mail.ir2.yahoo.com via HTTP; Fri, 23 Aug 2013 21:28:03 BST X-Rocket-MIMEInfo: 002.001, SGkgdGhlcmUsCgpJIGFtIHJ1bm5pbmcgbmFub2JzZCBvbiBhIE1JUFMgcGxhdGZvcm0sIHdoaWNoIGlzIGFuIEFSNzE2MSBDUFUgd2l0aCBBUjgzMTYgc3dpdGNoLiBCb3RoIGFyZ2UgaW50ZXJmYWNlcyBzaG93IHVwIGhvd2V2ZXIgdGhlIGxpbmsgc3RhdHVzIGlzIG5vdCBjb3JyZWN0bHkgdXBkYXRlZC7CoAoKYXJnZTEgKHRoZSBXQU4gaW50ZXJmYWNlKSBhbHdheXMgc2hvdyBhY3RpdmUsIGV2ZW4gdGhlcmUgaXMgbm8gZXRoZXJuZXQgY2FibGUgcGx1Z2dlZCBpbi7CoAoKSW4gYSBwb3N0LCBBZHJpYW4gbWUBMAEBAQE- X-Mailer: YahooMailWebService/0.8.155.576 Message-ID: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> Date: Fri, 23 Aug 2013 21:28:03 +0100 (BST) From: Pham Viet Ha Subject: Arge1 link status is not updated To: freebsd-embedded MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Pham Viet Ha List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 20:28:06 -0000 Hi there,=0A=0AI am running nanobsd on a MIPS platform, which is an AR7161 = CPU with AR8316 switch. Both arge interfaces show up however the link statu= s is not correctly updated.=A0=0A=0Aarge1 (the WAN interface) always show a= ctive, even there is no ethernet cable plugged in.=A0=0A=0AIn a post, Adria= n mentioned this (http://lists.freebsd.org/pipermail/freebsd-embedded/2013-= July/001871.html):=0A=0AThen arge1 is glued to this "WAN" PHY. It's not own= ed by arswitch (but=0Ait could be!) as then arge1 couldn't link to it to ge= t notifications=0Aabout link, speed/duplex changes.=0A=0AMy question is how= can we make arge1 update its link status (no carrier/active) when the link= is disconnected/connected?=A0=0A=0AShould it be in arge driver or in the s= witch driver?=A0=0A=0AAt this time I compiled and load the switch in a sepa= rated module.=A0=0A=0A=0AThe log from boot:=A0=0Aargemdio0: at mem 0x19000000-0x19000fff= on nexus0=0Amdio0: on argemdio0=0Amdioproxy0: on mdio0=0Aarge0: at me= m 0x19000000-0x19000fff irq 2 on nexus0=0Aarge0: Overriding MAC from EEPROM= =0Aarge0: arge_attach: overriding MII mode to 'RGMII'=0Aarge0: sc->arge_mac= _unit 0 phymask 15=0Aarge0: finishing attachment, phymask 000f, proxy null= =0Amiibus0: on arge0=0Aukphy0: PHY 0 on miibus0=0Aukphy0: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 10= 0baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0Aukphy1: PHY 1 on miibus0=0Aukphy1: =A0none, 10baseT, 10= baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, a= uto=0Aukphy2: PHY 2 on miibus0=0Aukph= y2: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX,= 1000baseT-FDX-master, auto=0Aukphy3: = PHY 3 on miibus0=0Aukphy3: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100ba= seTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0Aarge0: Ethernet addre= ss: 00:03:7f:12:20:00=0Aarge1: = at mem 0x1a000000-0x1a000fff irq 3 on nexus0=0Aarge1: arge_attach: overrid= ing MII mode to 'RGMII'=0Aarge1: sc->arge_mac_unit 1 phymask 16=0Aarge1: fi= nishing attachment, phymask 0010, proxy null=0Aarge1: No PHY, use hard-code= d values: arge_multiphy_mediachange, arge_multiphy_mediastatus.=0Aarge1: Et= hernet address: 00:03:7f:12:20:01=0A=0A=0AThank you so much.=0A=0AViet-Ha P= ham From owner-freebsd-embedded@FreeBSD.ORG Fri Aug 23 21:21:10 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EE4F956C for ; Fri, 23 Aug 2013 21:21:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70EAF2514 for ; Fri, 23 Aug 2013 21:21:10 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id hj13so2453814wib.17 for ; Fri, 23 Aug 2013 14:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=3Ovus3EV9kQVwuyl3AQ+uNUkKY3INYYTNceY/2s+RHk=; b=cXMtlhcGGUff5TDf1pybD9qwqXwJD5xq6lmOj6v2LHRzOkNTEiZ1mjSZ8wdsmuPc19 kLbCkf8dHSglazAo/n7+4y07qLyGel/xVd9hd42huEsjT5jcMQML7NdFoMY4IID+Jumi XwmQQivkscb58Af6maoEqVyuG9PuBPQysi3+k7Al62FORew+KR2I1Mr+RiKX9VBNeZKs /sFivc+91ZTwYgMgvb+52fDc6NTC3uyIanXwrXpvlvL9q5dG5fpzVI3/CBSMrvB/FLjz tIJhKku9q9ZLLw28CjA1bgfDbSzw2rH1MZ2Z3W2nyO9H7phINBAqj09YRUvvEhu2ejit +5Gg== MIME-Version: 1.0 X-Received: by 10.194.201.202 with SMTP id kc10mr1322220wjc.1.1377292868178; Fri, 23 Aug 2013 14:21:08 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Fri, 23 Aug 2013 14:21:08 -0700 (PDT) In-Reply-To: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> Date: Fri, 23 Aug 2013 14:21:08 -0700 X-Google-Sender-Auth: 6EOR-sg9gpwuM_ApXo_rn3uRNNM Message-ID: Subject: Re: Arge1 link status is not updated From: Adrian Chadd To: Pham Viet Ha Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Aug 2013 21:21:11 -0000 The second port doesn't have a link status per se. It's connected to the AR8316 switch PHY. Use etherswitchcfg to see the link status of the child switch ports. -adrian On 23 August 2013 13:28, Pham Viet Ha wrote: > Hi there, > > I am running nanobsd on a MIPS platform, which is an AR7161 CPU with > AR8316 switch. Both arge interfaces show up however the link status is not > correctly updated. > > arge1 (the WAN interface) always show active, even there is no ethernet > cable plugged in. > > In a post, Adrian mentioned this ( > http://lists.freebsd.org/pipermail/freebsd-embedded/2013-July/001871.html > ): > > Then arge1 is glued to this "WAN" PHY. It's not owned by arswitch (but > it could be!) as then arge1 couldn't link to it to get notifications > about link, speed/duplex changes. > > My question is how can we make arge1 update its link status (no > carrier/active) when the link is disconnected/connected? > > Should it be in arge driver or in the switch driver? > > At this time I compiled and load the switch in a separated module. > > > The log from boot: > argemdio0: > at mem 0x19000000-0x19000fff on nexus0 > mdio0: on argemdio0 > mdioproxy0: on mdio0 > arge0: at mem > 0x19000000-0x19000fff irq 2 on nexus0 > arge0: Overriding MAC from EEPROM > arge0: arge_attach: overriding MII mode to 'RGMII' > arge0: sc->arge_mac_unit 0 phymask 15 > arge0: finishing attachment, phymask 000f, proxy null > miibus0: on arge0 > ukphy0: PHY 0 on miibus0 > ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy1: PHY 1 on miibus0 > ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy2: PHY 2 on miibus0 > ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy3: PHY 3 on miibus0 > ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > arge0: Ethernet address: 00:03:7f:12:20:00 > arge1: at mem > 0x1a000000-0x1a000fff irq 3 on nexus0 > arge1: arge_attach: overriding MII mode to 'RGMII' > arge1: sc->arge_mac_unit 1 phymask 16 > arge1: finishing attachment, phymask 0010, proxy null > arge1: No PHY, use hard-coded values: arge_multiphy_mediachange, > arge_multiphy_mediastatus. > arge1: Ethernet address: 00:03:7f:12:20:01 > > > Thank you so much. > > Viet-Ha Pham > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org > " > From owner-freebsd-embedded@FreeBSD.ORG Sat Aug 24 01:06:07 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D57EEF77 for ; Sat, 24 Aug 2013 01:06:07 +0000 (UTC) (envelope-from lists.br@gmail.com) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 57ECE208D for ; Sat, 24 Aug 2013 01:06:07 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id x54so1125041wes.18 for ; Fri, 23 Aug 2013 18:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fAfRPyNozbEqKGNtjctpwcyPP14YA5h1uy3a0hxg8w4=; b=C83TlHFEj7Pwg1kbxKi9l+tIGnDf8nWVrk4c9DhXasRnCrPF587n4MAf3csv8n+U6O 8haEC4XNZ+Yhpy5WWjgFKYbo8NyASQsxp2K+TEnMuuFcLfZw0Gj05uLcWC9mk+n/ZaNK lItzPl8VZkpa7nfBIl3GqeyqHoOyP4s0AcB74kRNpLY7ie0Rt83aP9WbjD4otbNCSQeO G1LIF3YPBkhNYLRBCD9tFc+b2rj6mithXFPaeNHj/QzbJcspsz6uXcSYfh6QAwMy6aZR Jek8IMsqGNDnVOugVAPLtKljCMsTWALvj2JDv2tNw+3930LWtiI5tt3oBW5Cz7zlV3x3 AM7g== MIME-Version: 1.0 X-Received: by 10.180.77.49 with SMTP id p17mr4028316wiw.36.1377306365682; Fri, 23 Aug 2013 18:06:05 -0700 (PDT) Received: by 10.216.75.140 with HTTP; Fri, 23 Aug 2013 18:06:05 -0700 (PDT) In-Reply-To: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> Date: Fri, 23 Aug 2013 22:06:05 -0300 Message-ID: Subject: Re: Arge1 link status is not updated From: Luiz Otavio O Souza To: Pham Viet Ha Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 01:06:07 -0000 On 23 August 2013 17:28, Pham Viet Ha wrote: > Hi there, > > I am running nanobsd on a MIPS platform, which is an AR7161 CPU with > AR8316 switch. Both arge interfaces show up however the link status is not > correctly updated. > > arge1 (the WAN interface) always show active, even there is no ethernet > cable plugged in. > > In a post, Adrian mentioned this ( > http://lists.freebsd.org/pipermail/freebsd-embedded/2013-July/001871.html > ): > > Then arge1 is glued to this "WAN" PHY. It's not owned by arswitch (but > it could be!) as then arge1 couldn't link to it to get notifications > about link, speed/duplex changes. > > My question is how can we make arge1 update its link status (no > carrier/active) when the link is disconnected/connected? > > Should it be in arge driver or in the switch driver? > > At this time I compiled and load the switch in a separated module. > > > The log from boot: > argemdio0: > at mem 0x19000000-0x19000fff on nexus0 > mdio0: on argemdio0 > mdioproxy0: on mdio0 > arge0: at mem > 0x19000000-0x19000fff irq 2 on nexus0 > arge0: Overriding MAC from EEPROM > arge0: arge_attach: overriding MII mode to 'RGMII' > arge0: sc->arge_mac_unit 0 phymask 15 > arge0: finishing attachment, phymask 000f, proxy null > miibus0: on arge0 > ukphy0: PHY 0 on miibus0 > ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy1: PHY 1 on miibus0 > ukphy1: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy2: PHY 2 on miibus0 > ukphy2: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > ukphy3: PHY 3 on miibus0 > ukphy3: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > 1000baseT-FDX, 1000baseT-FDX-master, auto > arge0: Ethernet address: 00:03:7f:12:20:00 > arge1: at mem > 0x1a000000-0x1a000fff irq 3 on nexus0 > arge1: arge_attach: overriding MII mode to 'RGMII' > arge1: sc->arge_mac_unit 1 phymask 16 > arge1: finishing attachment, phymask 0010, proxy null > arge1: No PHY, use hard-coded values: arge_multiphy_mediachange, > arge_multiphy_mediastatus. > arge1: Ethernet address: 00:03:7f:12:20:01 > Looks like your setup is somewhat different or misconfigured because you have 4 PHYs on arge0 (which is not common). Can you share your board model and you setup ? We maybe able to help you get it right. Regards, Luiz From owner-freebsd-embedded@FreeBSD.ORG Sat Aug 24 13:13:28 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A493AC98 for ; Sat, 24 Aug 2013 13:13:28 +0000 (UTC) (envelope-from hapvbk@yahoo.co.uk) Received: from nm12-vm0.bullet.mail.ird.yahoo.com (nm12-vm0.bullet.mail.ird.yahoo.com [77.238.189.196]) by mx1.freebsd.org (Postfix) with SMTP id AC0382DD9 for ; Sat, 24 Aug 2013 13:13:26 +0000 (UTC) Received: from [77.238.189.238] by nm12.bullet.mail.ird.yahoo.com with NNFMP; 24 Aug 2013 13:13:19 -0000 Received: from [212.82.98.105] by tm19.bullet.mail.ird.yahoo.com with NNFMP; 24 Aug 2013 13:13:19 -0000 Received: from [127.0.0.1] by omp1042.mail.ir2.yahoo.com with NNFMP; 24 Aug 2013 13:13:19 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 857537.10076.bm@omp1042.mail.ir2.yahoo.com Received: (qmail 57909 invoked by uid 60001); 24 Aug 2013 13:13:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1377349999; bh=gapNejoKg6zwu+cWtp7lFw7i8nnCuhfetLxxj+3YDOc=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=KrhmV1IooFOwgJAfqCkCy2gcPmRPVy5uaxYWTqzQrBkEPHBZmo7Sh4l+AJ5GxI8/sBegT1GIIlHEur9YR3i7OP1vhGhYxspoI3vdpGvbBX052WOIVjowVUoejeabmlhzwdHUvjIJpjERK9x4CaozK+MNn2yn36sOJaKTP7npHdI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=nH9DXayHvrpSW/VOn9GNu93y96DxUJ72ZBeBSct9SktK7m1Nfkdpx4ZH4fmc4PNe+ZUl7a50rbwj0DT0MA8u2y8aq1gcTA/PTvKsrF5lIeE2rMSU4LMl3+CgqhbEEG7yqjbstPkGKtdMWSjdF7sRd+LklBnJsiVMK/S1d3+x7bA=; X-YMail-OSG: 5PDZDRIVM1kJuOuksrUJiQTBv0Pyp2hYzYZJg8cM70CHx5B ifBKoSGyB6qjbGJ9gUZMoAXMhQkJV_sw7P1q7_UN56sy4CyI9ONFSyKaKZLf byLZq_TGnFu_KBw2JhZmnsMdX2f3Kuh6Y30ZTIMKAfCG7yoK5uviTsJQtiPh YgnZCcQWwYETQ7QHRSi1JPQU8eYMZa5tjv7dsgxKX52R9egA86i3kR_j.xfg CwdKBnAW1lTqAo.JXGjYFaMUVtiKDPjUId5gUm_xpnIcK9o0VgeQ3rA38ZM3 TPx3gyZ5uGLBAaVMxfiE2aAGVQHSd3Ay78ryq1dKy_vw05nht_7YVJXYO4dz acsffcxmeZkS6.9Jwk4kTMV7hEK.gnAnbrQ7aaGQb5bJ1aw5tioteYE2D5iv rPO1oEuCDvtAXfFpUTn__nwS1Fv24AXgIS9aQ6VWlhXQjP4f4ankMjcwfsvJ VooJwqHdkCZnW7oDOA_hNjLpLvnI_t27IdRSbt2WZmPz8vX4CrsiAFrMAX5g hnrc_NOJCL6QuYvkbfyCoiJdCUT.XBbmOMsFYTaAOPRqpS2K6TAYxRz3bQGv 3iXRaquhVWA-- Received: from [99.230.158.140] by web171203.mail.ir2.yahoo.com via HTTP; Sat, 24 Aug 2013 14:13:19 BST X-Rocket-MIMEInfo: 002.001, SGkgTG91aXosCgpZZXMsIHRoZSBMQU4gcG9ydHMgYXJlIG9uIGFyZ2UwIHdpdGggNCBQSFkgcG9ydHMgKDAtMykuIFRoZSBXQU4gcG9ydCBpcyBvbiBhcmdlMSB3aXRoIFBIWTQuIFRoaXMgaXMgYW4gQUczMDBIIGJvYXJkIGZyb20gQnVmZmFsby4KCkF0IHRoaXMgdGltZSBJIGFtIHVzaW5nIHBoeW1hc2sgMHgwZiBmb3IgYXJnZTAuIEl0IGxvb2tzIGxpa2UgdGhhdCB3ZSBzaG91bGQgdXNlIHBoeW1hc2sgMHgwMCBmb3IgdGhpcyBpbnRlcmZhY2UgYXMgd2hlbiB0aGUgZXRoZXJzd2l0Y2gvYXJzd2l0Y2ggaXMBMAEBAQE- X-Mailer: YahooMailWebService/0.8.155.576 References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> Message-ID: <1377349999.56818.YahooMailNeo@web171203.mail.ir2.yahoo.com> Date: Sat, 24 Aug 2013 14:13:19 +0100 (BST) From: Pham Viet Ha Subject: Re: Arge1 link status is not updated To: Luiz Otavio O Souza In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Pham Viet Ha List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 13:13:28 -0000 Hi Louiz,=0A=0AYes, the LAN ports are on arge0 with 4 PHY ports (0-3). The = WAN port is on arge1 with PHY4. This is an AG300H board from Buffalo.=0A=0A= At this time I am using phymask 0x0f for arge0. It looks like that we shoul= d use phymask 0x00 for this interface as when the etherswitch/arswitch is e= nabled, it will attach and manage the 4 LAN ports correctly.=A0=0A=0AIf I n= eed to update the arge1 link status from inside the switch driver, what sho= uld I do?=A0=0A=0AAlso, the ifnet interfaces are also created during the sw= itch init. How can I make these interfaces available for infconfig command?= =A0=0A=0A=0AThanks so much.=A0=0A=0A=0AViet-Ha=A0=0A=0A=0A_________________= _______________=0A From: Luiz Otavio O Souza =0ATo: Pha= m Viet Ha =0ACc: freebsd-embedded =0ASent: Friday, 23 August 2013, 21:06=0ASubject: Re: Arge1 link= status is not updated=0A =0A=0A=0AOn 23 August 2013 17:28, Pham Viet Ha wrote:=0A=0AHi there,=0A>=0A>I am running nanobsd on a M= IPS platform, which is an AR7161 CPU with AR8316 switch. Both arge interfac= es show up however the link status is not correctly updated.=A0=0A>=0A>arge= 1 (the WAN interface) always show active, even there is no ethernet cable p= lugged in.=A0=0A>=0A>In a post, Adrian mentioned this (http://lists.freebsd= .org/pipermail/freebsd-embedded/2013-July/001871.html):=0A>=0A>Then arge1 i= s glued to this "WAN" PHY. It's not owned by arswitch (but=0A>it could be!)= as then arge1 couldn't link to it to get notifications=0A>about link, spee= d/duplex changes.=0A>=0A>My question is how can we make arge1 update its li= nk status (no carrier/active) when the link is disconnected/connected?=A0= =0A>=0A>Should it be in arge driver or in the switch driver?=A0=0A>=0A>At t= his time I compiled and load the switch in a separated module.=A0=0A>=0A>= =0A>The log from boot:=A0=0A>argemdio0: at mem 0x19000000-0x19000fff on nexus0=0A>mdio0:= on argemdio0=0A>mdioproxy0: on mdio0=0A= >arge0: at mem 0x19000000-0x19= 000fff irq 2 on nexus0=0A>arge0: Overriding MAC from EEPROM=0A>arge0: arge_= attach: overriding MII mode to 'RGMII'=0A>arge0: sc->arge_mac_unit 0 phymas= k 15=0A>arge0: finishing attachment, phymask 000f, proxy null=0A>miibus0: <= MII bus> on arge0=0A>ukphy0: PHY 0 on= miibus0=0A>ukphy0: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX= , 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>ukphy1: PHY 1 on miibus0=0A>ukphy1: =A0none, 10baseT, 10baseT-FDX= , 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>uk= phy2: PHY 2 on miibus0=0A>ukphy2: =A0= none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000ba= seT-FDX-master, auto=0A>ukphy3: PHY 3= on miibus0=0A>ukphy3: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-= FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>arge0: Ethernet address: = 00:03:7f:12:20:00=0A>arge1: at= mem 0x1a000000-0x1a000fff irq 3 on nexus0=0A>arge1: arge_attach: overridin= g MII mode to 'RGMII'=0A>arge1: sc->arge_mac_unit 1 phymask 16=0A>arge1: fi= nishing attachment, phymask 0010, proxy null=0A>arge1: No PHY, use hard-cod= ed values: arge_multiphy_mediachange, arge_multiphy_mediastatus.=0A>arge1: = Ethernet address: 00:03:7f:12:20:01=0A>=0A=0ALooks like your setup is somew= hat different or misconfigured because you have 4 PHYs on arge0 (which is n= ot common).=0A=0ACan you share your board model and you setup ? We maybe ab= le to help you get it right.=0A=0ARegards,=0ALuiz=A0 From owner-freebsd-embedded@FreeBSD.ORG Sat Aug 24 13:15:25 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 72E6BCF7 for ; Sat, 24 Aug 2013 13:15:25 +0000 (UTC) (envelope-from hapvbk@yahoo.co.uk) Received: from nm3-vm0.bullet.mail.ird.yahoo.com (nm3-vm0.bullet.mail.ird.yahoo.com [77.238.189.213]) by mx1.freebsd.org (Postfix) with SMTP id 62AF12DE7 for ; Sat, 24 Aug 2013 13:15:23 +0000 (UTC) Received: from [77.238.189.50] by nm3.bullet.mail.ird.yahoo.com with NNFMP; 24 Aug 2013 13:15:16 -0000 Received: from [212.82.109.129] by tm3.bullet.mail.ird.yahoo.com with NNFMP; 24 Aug 2013 13:15:16 -0000 Received: from [127.0.0.1] by omp1036.mail.ird.yahoo.com with NNFMP; 24 Aug 2013 13:15:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 832572.19729.bm@omp1036.mail.ird.yahoo.com Received: (qmail 46861 invoked by uid 60001); 24 Aug 2013 13:15:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1377350116; bh=VyF5qAkwJ28nz25Z8ljVI9w02yJfgYlnMeqZbnh9ywQ=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=brAieOXFpgN7VYIA1me3k4ApZ3noPClF8NS85MZPhWy1Wr8yrgA6O0nVqJeBjNRiET9vKjdbSVZJFB/37aBuUTv9QQgMVVeBBwTH/t/0+8MVUCuHV8gd1g71e1MY79Nikjytbt3GOPIO/p5aggMF3URO9X3IX3mgA1dl4qV4NdQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=T05aToQNqjxruFqkh7UudGL9f9t4tNdYdyu/qZy/vObMTGW100ycPHZ89NfcRtlr3xPWO5/QL8OlPeovIze+m5Q7CcU/iSFQtB3bbRqmAAe7fR0+li9mK0UFTq4WKJoevCJYrUcLL3/k25i/PW4qmaQIxJOgFO+VaN6V3RTiqTM=; X-YMail-OSG: v6DGSOIVM1nq5C96EaOLGik4c2Af3uxfFh6cQ0B8UDKWUTk WQex9.v1tiwo.zJWlSNMZFYJFqcAeFbhTo6pvn_4svNZSEBUg9qy9IFY_fej _Ln1AM8WIKzfvIXcGTql4BT34GShLGBeDeHX.UDhji0XQaH0R18c7oe46KX6 U9maSfa7_sibtnEu0JQPIDG_Wutt4QaROPvpWgBe8q4vZhV1mfjjNm2oqnqc ck4hBvWz4eBcfj4xZA3pDucKSz26ZjfhRmhersiYHom.P80nLOnK18VOJeFm 0BYAfVoGQ1DOK5xsrLaE_OHLv8UO5IEEd._uSiIuRyNcYBa8hga9XtP8cglL GjVXxUeQLOxVp04.GJq1m3va.AlTgGAIGVLMsM3h1MiiZtqmaNdf0tI8U4zJ Ya3OUshIFfvKsP7Ss_6TqhUuvh6F6J6_nkDjoB3rAS2GfszhyBJyg4QwKN2r HbSuVJpA32y7s2TnOCg_m_S8JcWkHCdDTUG0Y5gY8LR3aGF2fThpzHk.dcDu mwatuwY0ERe7ZOM60T1t4zDyhkfkGKWW9cXVaT6O1QEDT7SnoXiJATsbbl7J TigDMBdh4bMxE Received: from [99.230.158.140] by web171206.mail.ir2.yahoo.com via HTTP; Sat, 24 Aug 2013 14:15:16 BST X-Rocket-MIMEInfo: 002.001, SGkgQWRyaWFuLAoKVGhhbmtzIGZvciB0aGUgcXVpY2sgYW5zd2VyLsKgCgpBcmUgeW91IHRhbGtpbmcgYWJvdXQgdGhlIFdBTiBwb3J0PyBPbiBteSBkZXZpY2UsIGFyZ2UxIGNvbm5lY3RzIHRvIFdBTiBwb3J0IGFuZCBhcmdlMCBjb25uZWN0IHRvIHRoZSBMQU4gcG9ydHMuwqAKCgpWaWV0LUhhwqAKClAvUzogSSByZXNlbnQgdGhpcyBlbWFpbCBzaW5jZSB0aGUgbGFzdCB0aW1lIEkgc2VudCBpdCB0byBBZHJpYW4gd2l0aG91dCBzZW5kaW5nIHRvIHRoZSBsaXN0IChJIGRpZCBub3QgaGl0IFJlcGx5IEFsbCkBMAEBAQE- X-Mailer: YahooMailWebService/0.8.155.576 References: <1377289683.3816.YahooMailNeo@web171205.mail.ir2.yahoo.com> Message-ID: <1377350116.46286.YahooMailNeo@web171206.mail.ir2.yahoo.com> Date: Sat, 24 Aug 2013 14:15:16 +0100 (BST) From: Pham Viet Ha Subject: Re: Arge1 link status is not updated To: Adrian Chadd In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Pham Viet Ha List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 13:15:25 -0000 Hi Adrian,=0A=0AThanks for the quick answer.=A0=0A=0AAre you talking about = the WAN port? On my device, arge1 connects to WAN port and arge0 connect to= the LAN ports.=A0=0A=0A=0AViet-Ha=A0=0A=0AP/S: I resent this email since t= he last time I sent it to Adrian without sending to the list (I did not hit= Reply All).=A0=0A=0A=0A________________________________=0A From: Adrian Ch= add =0ATo: Pham Viet Ha =0ACc: fre= ebsd-embedded =0ASent: Friday, 23 August 201= 3, 17:21=0ASubject: Re: Arge1 link status is not updated=0A =0A=0A=0AThe se= cond port doesn't have a link status per se. It's connected to the AR8316 s= witch PHY.=0A=0AUse etherswitchcfg to see the link status of the child swit= ch ports.=0A=0A=0A=0A-adrian=0A=0A=0A=0A=0AOn 23 August 2013 13:28, Pham Vi= et Ha wrote:=0A=0AHi there,=0A>=0A>I am running nanobs= d on a MIPS platform, which is an AR7161 CPU with AR8316 switch. Both arge = interfaces show up however the link status is not correctly updated.=A0=0A>= =0A>arge1 (the WAN interface) always show active, even there is no ethernet= cable plugged in.=A0=0A>=0A>In a post, Adrian mentioned this (http://lists= .freebsd.org/pipermail/freebsd-embedded/2013-July/001871.html):=0A>=0A>Then= arge1 is glued to this "WAN" PHY. It's not owned by arswitch (but=0A>it co= uld be!) as then arge1 couldn't link to it to get notifications=0A>about li= nk, speed/duplex changes.=0A>=0A>My question is how can we make arge1 updat= e its link status (no carrier/active) when the link is disconnected/connect= ed?=A0=0A>=0A>Should it be in arge driver or in the switch driver?=A0=0A>= =0A>At this time I compiled and load the switch in a separated module.=A0= =0A>=0A>=0A>The log from boot:=A0=0A>argemdio0: at mem 0x19000000-0x19000fff on nexus0= =0A>mdio0: on argemdio0=0A>mdioproxy0: o= n mdio0=0A>arge0: at mem 0x190= 00000-0x19000fff irq 2 on nexus0=0A>arge0: Overriding MAC from EEPROM=0A>ar= ge0: arge_attach: overriding MII mode to 'RGMII'=0A>arge0: sc->arge_mac_uni= t 0 phymask 15=0A>arge0: finishing attachment, phymask 000f, proxy null=0A>= miibus0: on arge0=0A>ukphy0: PHY 0 on miibus0=0A>ukphy0: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100= baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>ukphy1: PHY 1 on miibus0=0A>ukphy1: =A0none, 10baseT, 1= 0baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, = auto=0A>ukphy2: PHY 2 on miibus0=0A>u= kphy2: =A0none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT-F= DX, 1000baseT-FDX-master, auto=0A>ukphy3: PHY 3 on miibus0=0A>ukphy3: =A0none, 10baseT, 10baseT-FDX, 100baseTX, = 100baseTX-FDX, 1000baseT-FDX, 1000baseT-FDX-master, auto=0A>arge0: Ethernet= address: 00:03:7f:12:20:00=0A>arge1: at mem 0x1a000000-0x1a000fff irq 3 on nexus0=0A>arge1: arge_attach:= overriding MII mode to 'RGMII'=0A>arge1: sc->arge_mac_unit 1 phymask 16=0A= >arge1: finishing attachment, phymask 0010, proxy null=0A>arge1: No PHY, us= e hard-coded values: arge_multiphy_mediachange, arge_multiphy_mediastatus.= =0A>arge1: Ethernet address: 00:03:7f:12:20:01=0A>=0A>=0A>Thank you so much= .=0A>=0A>Viet-Ha Pham=0A>_______________________________________________=0A= >freebsd-embedded@freebsd.org mailing list=0A>http://lists.freebsd.org/mail= man/listinfo/freebsd-embedded=0A>To unsubscribe, send any mail to "freebsd-= embedded-unsubscribe@freebsd.org"=0A>