[OpenWrt-Devel] AR8334 switch support
Heiner Kallweit
hkallweit1 at gmail.com
Mon Apr 27 09:06:06 EDT 2015
Here comes a slight modification / extension to display the return
value of the BMSR read command.
Maybe the read command returns an error instead of 0 for non-existent PHY's.
There is no AR8XXX chip with a PHY 5 or PHY 6.
Could you please provide te dmesg output of this patch version?
Thanks.
for (i = 0; i < AR8327_NUM_PORTS; i++) {
int bmsr = mdiobus_read(priv->mii_bus, i, MII_BMSR);
/* certain bits are always set if the PHY exists */
if (!bmsr) {
priv->unavailable_phys[i] = true;
priv->num_unavailable_phys++;
dev_info(&priv->phy->dev, "PHY %d not available\n", i);
} else {
dev_info(&priv->phy->dev, "PHY %d available, BMSR =
0x%x\n", i, bmsr);
}
On Mon, Apr 27, 2015 at 2:20 PM, Christian Mehlis <christian at m3hlis.de> wrote:
> Am 24.04.2015 um 20:05 schrieb Heiner Kallweit:
>>
>> Could you please test this patch and provide the dmesg output?
>
>
> I tried your patch - dmesg is attached.
>
> After the first run without success:
> [ 0.890000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Detected
> AR8337 switch
>
> I tweaked your patch a bit to print out more (attached).
>
> ############################################################
>
> I also changed:
> + for (i = 0; i < AR8XXX_NUM_PHYS; i++) {
> to
> + for (i = 0; i < AR8327_NUM_PORTS; i++) {
>
> with this change we get:
>
> [ 0.850000] switch0: Atheros AR833X rev. 2 switch registered on
> ag71xx-mdio.0
> [ 0.860000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 0
> available
> [ 0.860000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 1
> available
> [ 0.870000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 2
> available
> [ 0.880000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 3
> available
> [ 0.890000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 4
> available
> [ 0.890000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 5
> available
> [ 0.900000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: PHY 6
> available
> [ 0.910000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Detected
> AR8337 switch
>
> #############################################################
>
> It seems, that your phy based test is not working on ar8334...
>
> Can we test other registers? I'll give it a try.
>
> Best
> Christian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list