>> +static inline void gem_mac_configure(struct macb *bp, int speed)
>> +    switch (speed) {
>> +    case SPEED_1000:
>> +            gem_writel(bp, NCFGR, GEM_BIT(GBE) |
>> +                       gem_readl(bp, NCFGR));
>> +            break;
>> +    case SPEED_100:
>> +            macb_writel(bp, NCFGR, MACB_BIT(SPD) |
>> +                        macb_readl(bp, NCFGR));
>What happens to the NCFGR register if we call mac_config() first for
>a 1G speed, then 100M and finally 10M - what value does the NCFGR
>register end up with?
>
>I suspect it ends up with both the GBE and SPD bits set, and that is
>probably not what you want.

No, In gem_mac_config GBE and SPD bits are always cleared
before setting appropriate bits as per requested speed, duplex mode.


Regards,
Parshuram Thombare

Reply via email to