From owner-freebsd-hackers@FreeBSD.ORG Sun May 8 08:25:18 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23167106564A for ; Sun, 8 May 2011 08:25:18 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id D53B68FC0A for ; Sun, 8 May 2011 08:25:17 +0000 (UTC) Received: by yie12 with SMTP id 12so1951582yie.13 for ; Sun, 08 May 2011 01:25:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=c+H0KUWm6NGJ2sBH1CoVSxqzQyB6gEstDpwzmkzRjH0=; b=B/QT4b6kUOgUvkF1qHNCos6Dyo/1KVg+dCeCChPQju6OSNlTRA9ofnfo4MuS4ClCib nTTNJZgSxZO6i5scl1raF6f4HD/mx0Y63cyEtcSNhfX3wTWa1scxRSRpKGT636/KjdZi 81At3v43A7MujG7eX+cEf6/JySPTcJ5/HHs4w= DomainKey-Signature: a=rsa-sha1; c=nofws; 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 :content-transfer-encoding; b=YoTAZXUwQqLjxvUdSCGgTTc8k5PM5hw6NNppQq0BeafpKYl+afP5lwue1JLRf2GRJf DaXfNBXBcQLZlNDvGnma2GIBwihrKegBYZ7fCqeDz16YQOdeRR7BLjT9bw9DkFtZLPG8 g8M4WU5yI6hLy26H8uTKFQL7C+t9ahYhFcxQM= MIME-Version: 1.0 Received: by 10.150.66.1 with SMTP id o1mr361589yba.125.1304841489654; Sun, 08 May 2011 00:58:09 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.136.8 with HTTP; Sun, 8 May 2011 00:58:09 -0700 (PDT) In-Reply-To: <34CF3ED0-52BC-4D0E-922A-FE26F624E77F@gmail.com> References: <34CF3ED0-52BC-4D0E-922A-FE26F624E77F@gmail.com> Date: Sun, 8 May 2011 15:58:09 +0800 X-Google-Sender-Auth: x28lPY4D612i9UK2PYp3JdMN2HA Message-ID: From: Adrian Chadd To: Damjan Marion Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: Embedded switch instead of stadard PHY X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2011 08:25:18 -0000 On 8 May 2011 01:22, Damjan Marion wrote: > I would like to implement support for embedded switch on WRT350Nv2 router= which is based on 88F5181L SoC (ARM). FreeBSD already have support for emb= edded gigabit card (if_mge) but in case if this router MAC is connected dir= ectly to 8-port ethernet chip (88E6131). If I use MII_PHY_ANY scan founds f= ollowing PHYs on miibus: There's been some discussions in the past about how to implement a switch PHY API for use by the variety of embedded switch devices out there. There's been a few attempts at it too. What I think may just be a good first step is to port over the Linux driver for it and instead of trying to make it appear as a multi-PHY device, just export a programming and status interface via sysctl. That at least gets the thing in the tree and functioning. Once we have a few devices in the tree and functioning, we'll be in a better position to have a discussion about how to represent it. There's a couple of dissenting views about how it should be implemented. I'd like to see some working code in the tree so some discussion can occur, rather than lots of dissent and no discussion. :) (The switch phy is the last remaining bit of the board support for a handful of boards too, so I'd really like to see it completed. :) Adrian