linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ha, Tristram" <Tristram.Ha@Micrel.Com>
To: "Felix Fietkau" <nbd@openwrt.org>
Cc: "Dave Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Michael Buesch" <mb@bu3sch.de>,
	"Michał Mirosław" <mirqus@gmail.com>
Subject: RE: [PATCH 2.6.33 1/3] net: Micrel KSZ8841/2 PCI Ethernet driver
Date: Tue, 19 Jan 2010 13:51:58 -0800	[thread overview]
Message-ID: <14385191E87B904DBD836449AA30269D580AA0@MORGANITE.micrel.com> (raw)
In-Reply-To: <4B51E64B.6010706@openwrt.org>

>> If my assumptions are correct, then I thing it would be better to have
>> a driver that presents this device as two: one - an ethernet device,
>> and second - a switch management interface like the one used in OpenWRT.
>> 
>> Here are some links for reference:
>> http://downloads.openwrt.org/kamikaze/8.09.2/kamikaze_8.09.2_source.ta r.bz2;
>> subdir: package/switch/src/
>>   -> switch management driver for ADMTEK Adm6996 and Broadcom
>> BCM5325E/536x
> Don't look at that ;)
> The code you're referring to is just a simple hack of mine that is a few years old now. It's
> going to be removed as soon as the drivers have been ported to a proper API. 
> 
> I've been working on a switch configuration API based on netlink, which is being used on some of
> the other platforms in OpenWrt. 
> 
> You can find the sources here:
> https://dev.openwrt.org/export/19173/trunk/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c
> https://dev.openwrt.org/export/19173/trunk/target/linux/generic-2.6/files/include/linux/switch.h
> 
> It's meant to be used with drivers that hook into the PHY abstraction layer.
> You can find an example of such a driver here:
> https://dev.openwrt.org/export/19173/trunk/target/linux/generic-2.6/files/drivers/net/phy/rtl8306.c
> 
> I'll do the final cleanups and submit it for review once I have time to do so.
> 
> - Felix

Your work looks interesting, but rtl8036 seems to use MDIO page registers to access its own internal registers.  Micrel switches do not have that feature and so cannot use that way.

I am looking at those PHY drivers and try to figure out how they work under mdio bus.  I am using Micrel's own KSZ8695P and KSZ9692P SoC to develop and debug the KSZ884X PCI driver.  KSZ9692P actually has two external PHYs so that the PHY driver can run on it.  But the driver does not load because I probably need to add some hooks to the mdio bus driver to do the actual hardware access.  Can somebody give me some pointers to this mdio bus support?  Does the PHY driver create a user interface like eth0 so that it can be accessed using some tools like ethtool?

Anyway I am afraid the phy driver model does not work on KSZ884X.  I cannot think of how the mdio bus accesses hardware registers located on a PCI device.

  reply	other threads:[~2010-01-19 21:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-16  2:57 [PATCH 2.6.33 1/3] net: Micrel KSZ8841/2 PCI Ethernet driver Ha, Tristram
2010-01-16  9:20 ` David Miller
2010-01-19 20:03   ` Ha, Tristram
2010-01-19 21:40     ` Stephen Hemminger
2010-01-19 23:48       ` Ha, Tristram
2010-01-20  0:11         ` Stephen Hemminger
2010-01-20  0:34           ` Ha, Tristram
2010-01-20  0:50             ` Stephen Hemminger
2010-01-16 14:50 ` Alan Cox
2010-01-19 21:22   ` Ha, Tristram
2010-01-19 21:32     ` Alan Cox
2010-01-20  0:12       ` Ha, Tristram
2010-01-16 16:00 ` Michał Mirosław
2010-01-16 16:16   ` Felix Fietkau
2010-01-19 21:51     ` Ha, Tristram [this message]
2010-01-19 22:11       ` Felix Fietkau
2010-02-08 21:36 Ha, Tristram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14385191E87B904DBD836449AA30269D580AA0@MORGANITE.micrel.com \
    --to=tristram.ha@micrel.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=mirqus@gmail.com \
    --cc=nbd@openwrt.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).