Gabor, thanks for the feedback.

>> +        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
>> +        ar71xx_eth0_data.speed       = SPEED_100;
>> +        ar71xx_eth0_data.duplex      = DUPLEX_FULL;
>
> You don't have to specify the speed and duplex values if you are using a 
> phy_mask.

OK, fixed.


>
>> +        ar71xx_eth0_data.phy_mask = 0xffffffff;      /* I don't really
>> know the correct value here.
>> +                                              * This selects any present 
>> phy.
>> +                                              */
>
> You should be able to determine the correct value from dmesg.
>

Here's the relevant lines from dmesg:
ag71xx_mdio: probed
eth0: Atheros AG71xx at 0xb9000000, irq 4
eth0: connected to PHY at ag71xx-mdio:0c [uid=00008201, driver=Generic PHY]

I don't really understand the mask. I know it determines what phy is
selected, but I'm in the dark about the correct value.
I've tried using both b9000000 and 00008201.
both result in a 'no PHY found with phy_mask' message.


>>  set_preinit_iface() {
>>       ifname=eth0
>> +     [ $(ar71xx_board_name) = "tl-wa901nd-v2" ] && mii-tool -R
>> +     /* The TP-link WA901ND V2 requires a hardware reset of
>> +      * its ethernet port before it will connect.
>> +      */
>> +
>
> This looks strange. The phy core should reset the PHY automatically. Please 
> try
> to add this line into the machine setup code, somewhere before the
> 'ar71xx_add_device_eth(0)' call:
>
> ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC | RESET_MODULE_GE0_PHY;

That works perfectly. Thank you! Using mii-tool was really bugging me, as well.


Once the correct phy_mask value is determined, I'll resubmit the patch.

>
> Regards,
> Gabor
>

Cheers,
Jonathan
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to