From owner-freebsd-embedded@FreeBSD.ORG Sun Nov 6 08:23:13 2011 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B1691065672 for ; Sun, 6 Nov 2011 08:23:13 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2329D8FC1E for ; Sun, 6 Nov 2011 08:23:12 +0000 (UTC) Received: by iabz21 with SMTP id z21so6915103iab.13 for ; Sun, 06 Nov 2011 01:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=dDcNtOkkiNsmBq6kXBgDJyAsjqTEHUEU9UfqkJgiw7Y=; b=IX3YrlApsLmlRkh7pS82o3Fqoc7OzbFpbxi2Z4MKMYJRTSfBngZRNQNQHkBShCGJ90 Hc2vxME+V5yRR8GCzOKVHD7BbLnFUUZSsMtEnyb2sKd9bXnI/scU7EMprZqrlkS1zSm0 CBmVjaL99VLwz9HMGyL6p7gCAEkwlMVd8m2OQ= Received: by 10.43.53.1 with SMTP id vo1mr34088563icb.2.1320567792388; Sun, 06 Nov 2011 01:23:12 -0700 (PDT) Received: from beastie.micom.mng.net ([202.179.15.131]) by mx.google.com with ESMTPS id g1sm25737366pbv.2.2011.11.06.01.23.09 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Nov 2011 01:23:10 -0700 (PDT) Message-ID: <4EB643E2.4040702@gmail.com> Date: Sun, 06 Nov 2011 16:22:58 +0800 From: Ganbold User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.12) Gecko/20101030 Thunderbird/3.1.6 MIME-Version: 1.0 To: Warren Block References: <4E9AEC39.7020801@gmail.com> <4EA04684.3070003@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: embedded@freebsd.org Subject: Re: Arduino-1.0-rc1 testing X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Nov 2011 08:23:13 -0000 On 10/21/11 12:52, Warren Block wrote: > On Fri, 21 Oct 2011, Ganbold wrote: > >> On 10/17/11 04:38, Warren Block wrote: >>> >>> Sorry, it's at http://files.arduino.cc/downloads/arduino-1.0-rc1.tgz >>> >>> Whether release files will be there, or will be moved to googlecode, >>> I don't know. For now, fetch manually. And thanks! >>> >> >> It doesn't go further after asking sketches folder. >> Do I need to plug arduino before running it or it requires jdk other >> than diablo one? > > Just set up a 9.0-RC1 test system. The Arduino IDE starts with either > jdk16 or diablo-jdk16. > >> beastie# work/arduino-1.0-rc1/arduino > > Did you have the earlier arduino port installed already? There are > some dependencies that would be missing otherwise, like comms/rxtx. Yes, that was the thing I was missing. thanks, Ganbold From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 7 11:07:08 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22DD01065674 for ; Mon, 7 Nov 2011 11:07:08 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EC1148FC0A for ; Mon, 7 Nov 2011 11:07:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id pA7B770i078638 for ; Mon, 7 Nov 2011 11:07:07 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id pA7B77QI078636 for freebsd-embedded@FreeBSD.org; Mon, 7 Nov 2011 11:07:07 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 7 Nov 2011 11:07:07 GMT Message-Id: <201111071107.pA7B77QI078636@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 Cc: Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2011 11:07:08 -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 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 2 problems total. From owner-freebsd-embedded@FreeBSD.ORG Thu Nov 10 00:13:57 2011 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A242106564A for ; Thu, 10 Nov 2011 00:13:57 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 11A158FC08 for ; Thu, 10 Nov 2011 00:13:56 +0000 (UTC) Received: by faar19 with SMTP id r19so3149747faa.13 for ; Wed, 09 Nov 2011 16:13:55 -0800 (PST) Received: by 10.223.64.70 with SMTP id d6mr8047835fai.16.1320882550454; Wed, 09 Nov 2011 15:49:10 -0800 (PST) Received: from rnote.ddteam.net (191-157-133-95.pool.ukrtel.net. [95.133.157.191]) by mx.google.com with ESMTPS id i3sm8735257faf.0.2011.11.09.15.49.08 (version=SSLv3 cipher=OTHER); Wed, 09 Nov 2011 15:49:09 -0800 (PST) Date: Thu, 10 Nov 2011 01:49:04 +0200 From: Aleksandr Rybalko To: embedded@freebsd.org Message-Id: <20111110014904.0e8caf2c.ray@ddteam.net> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Subject: Ethernet switch framework X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 00:13:57 -0000 Hi "embedded" hacker! one my good friend say it is good to have "public history of there being work" :) So I glad to introduce first patchset of the Ethernet switch framework, and want to know what I do wrong or good? And which way would be better? Now it able control only VLANS on Atheros AR8x16-like switches Broadcom BCM5325-like switches Realtek RTL8309-like switches and on Ralink RT305xF internal switch. Still with problems, but I care about it. :) I will wait for any opinion. Thanks! Switch framework itself: http://my.ddteam.net/files/2011-11-09_dev_switch.patch Switch control utility: (dumb a little yet :) ) http://my.ddteam.net/files/2011-11-09_sbin_switchctl.patch Patch that allow attach hinted PHY drivers: http://my.ddteam.net/files/2011-11-09_dev_mii_mii.c_attach_hinted.patch Add please by hands that into sys/conf/files +dev/switch/switch_if.m optional switch +dev/switch/switchb_if.m optional switch +dev/switch/switch.c optional switch +dev/switch/switch_mii.c optional switch mii | miibus +dev/switch/switch_obio.c optional switch obio +dev/switch/switch_obio.c optional switch_obio +dev/switch/ar8x16_switch.c optional switch switch_ar8x16 +dev/switch/bcm5325_switch.c optional switch switch_bcm5325 +dev/switch/rt305x_switch.c optional switch switch_rt305x +dev/switch/rtl830x_switch.c optional switch switch_rtl830x WBW -- Aleksandr Rybalko From owner-freebsd-embedded@FreeBSD.ORG Thu Nov 10 16:17:47 2011 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7CC21065676 for ; Thu, 10 Nov 2011 16:17:47 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8860C8FC1B for ; Thu, 10 Nov 2011 16:17:47 +0000 (UTC) Received: by vws11 with SMTP id 11so3734371vws.13 for ; Thu, 10 Nov 2011 08:17:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=TGf9PZcdGJSfWvjcjjiHirrt4n91uTtxF5Vr95Vj1jM=; b=PwnxWhraz7uQ/bIAwi7I+t6IMphEvX8WMmrU78CceZqNSNgS8utx2T3sgpV5LPwX5n 1q6e8AT0FYeB+dJwwDcgZJNwXHKr+txpjka9s2E0Cdmqzhe16NnuF62kBMjvIXU3lNkA C1AjRLdvdWYQWRsxTGNja16x+l8Oml/WnMv+U= MIME-Version: 1.0 Received: by 10.52.24.210 with SMTP id w18mr13913421vdf.21.1320941867011; Thu, 10 Nov 2011 08:17:47 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.29.198 with HTTP; Thu, 10 Nov 2011 08:17:46 -0800 (PST) In-Reply-To: <20111110014904.0e8caf2c.ray@ddteam.net> References: <20111110014904.0e8caf2c.ray@ddteam.net> Date: Thu, 10 Nov 2011 08:17:46 -0800 X-Google-Sender-Auth: 0-hQvxvgri0-vagWW7dfGd37zkU Message-ID: From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: embedded@freebsd.org Subject: Re: Ethernet switch framework X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 16:17:47 -0000 Hi! This is great. Between you, gonzo@ and loos, I think we finally will have something to throw into -HEAD. The miibus changes though - why did you need those? Can you run them by marius@ and see what he thinks? Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Nov 10 22:45:23 2011 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDD691065677; Thu, 10 Nov 2011 22:45:22 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 213378FC16; Thu, 10 Nov 2011 22:45:21 +0000 (UTC) Received: by faar19 with SMTP id r19so4821595faa.13 for ; Thu, 10 Nov 2011 14:45:21 -0800 (PST) Received: by 10.223.57.132 with SMTP id c4mr14871578fah.0.1320965121076; Thu, 10 Nov 2011 14:45:21 -0800 (PST) Received: from rnote.ddteam.net (168-24-133-95.pool.ukrtel.net. [95.133.24.168]) by mx.google.com with ESMTPS id y10sm13035110fal.10.2011.11.10.14.45.18 (version=SSLv3 cipher=OTHER); Thu, 10 Nov 2011 14:45:19 -0800 (PST) Date: Fri, 11 Nov 2011 00:45:14 +0200 From: Aleksandr Rybalko To: Adrian Chadd , Marius Strobl Message-Id: <20111111004514.04bc27be.ray@ddteam.net> In-Reply-To: References: <20111110014904.0e8caf2c.ray@ddteam.net> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: embedded@freebsd.org Subject: Re: Ethernet switch framework X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Nov 2011 22:45:23 -0000 Hi embedders, Invite Marius to discussion if Marius don't have objections :) On Thu, 10 Nov 2011 08:17:46 -0800 Adrian Chadd wrote: > Hi! > > This is great. Between you, gonzo@ and loos, I think we finally will > have something to throw into -HEAD. > > The miibus changes though - why did you need those? Can you run them > by marius@ and see what he thinks? > > > Adrian Copy miibus diff here to easily scope it Index: mii.c =================================================================== --- mii.c (revision 227410) +++ mii.c (working copy) @@ -310,7 +310,13 @@ struct mii_attach_args ma, *args; device_t *children, phy; int bmsr, first, i, nchildren, offset, phymax, phymin, rv; + uint32_t phymask; + const char *value; + char *key; + phymask = 0xfffffffful; + key = "phyXX"; + if (phyloc != MII_PHY_ANY && offloc != MII_OFFSET_ANY) { printf("%s: phyloc and offloc specified\n", __func__); return (EINVAL); @@ -366,6 +372,9 @@ ma.mii_capmask = capmask; + resource_int_value(device_get_name(*miibus), device_get_unit (*miibus), + "phymask", &phymask); + phy = NULL; offset = 0; for (ma.mii_phyno = phymin; ma.mii_phyno <= phymax; ma.mii_phyno++) { @@ -390,6 +399,26 @@ } /* + * If phymask don't have corresponding bit set, then this PHY + * id marked as muted, skip to next id. + */ + if (!(phymask & (1 << ma.mii_phyno))) + continue; + + /* + * Check if we have hinted driver. If so, attach it. + */ + value = NULL; + sprintf(key, "phy%d", ma.mii_phyno); + if (resource_string_value(device_get_name(*miibus), + device_get_unit(*miibus), key, &value) == 0) { + + ma.mii_id1 = 0; + ma.mii_id2 = 0; + goto attach_hinted; + } + + /* * Check to see if there is a PHY at this address. Note, * many braindead PHYs report 0/0 in their ID registers, * so we test for media in the BMSR. @@ -416,13 +445,14 @@ ma.mii_id1 = MIIBUS_READREG(dev, ma.mii_phyno,MII_PHYIDR1); ma.mii_id2 = MIIBUS_READREG(dev, ma.mii_phyno,MII_PHYIDR2); +attach_hinted: ma.mii_offset = offset; args = malloc(sizeof(struct mii_attach_args), M_DEVBUF, M_NOWAIT); if (args == NULL) goto skip; bcopy((char *)&ma, (char *)args, sizeof(ma)); - phy = device_add_child(*miibus, NULL, -1); + phy = device_add_child(*miibus, value, -1); if (phy == NULL) { free(args, M_DEVBUF); goto skip; =================================================================== So this diff have to parts: 1. cosmetic one - fetching and apply phymask from hints. Why I need it? Because switches like Atheros AR8x16 map their registers into MDIO space. So if we not filter it, we will have random set of PHYs on miibusX. Mostly ukphy, but even ukphy making read to PHY registers and this may corrupt switch driver data (registers which Read/Clear). 2. Second is easy and cheap way to pre-assign phy driver to some PHY ID on MDIO. I need it because a) some switches have no ID in MII_PHYIDR1 and MII_PHYIDR2 registers (BCM5325, AR8x16); b) in cases when AR8x16 on MDIO attached to many NIC's, after first instance of driver initialize switch, second miibus instance don't found any PHY's. c) D-Link DSR-500[1000] (Cavium Octeon CN5010 based), CN5010 have single MDIO bus for 3 Ethernet interfaces. First and second NICs attached to MII0 and MII1 ports of BCM53115, but third attached to real PHY :) Last case I configuring with following hints: hint.miibus.0.phymask="0x00000001" hint.miibus.0.phy0="switch" hint.miibus.2.phymask="0x00000020" hint.miibus.2.phy5="plumbphy" hint.miibus.3.phymask="0x00000100" Maybe we have better way? Will wait for any opinion. WBW -- Aleksandr Rybalko