Hi,
Andrew Lunn writes:
> On Tue, Jun 14, 2016 at 06:24:17PM -0400, Vivien Didelot wrote:
>> Hi Andrew,
>>
>> Andrew Lunn writes:
>>
>> >> - ret = mdiobus_read_nested(bus, addr, reg);
>> >> + ret = mdiobus_read_nested(bus, sw_addr + addr, reg);
>> >> if (ret < 0)
>> >> return ret;
On Tue, Jun 14, 2016 at 06:24:17PM -0400, Vivien Didelot wrote:
> Hi Andrew,
>
> Andrew Lunn writes:
>
> >> - ret = mdiobus_read_nested(bus, addr, reg);
> >> + ret = mdiobus_read_nested(bus, sw_addr + addr, reg);
> >>if (ret < 0)
> >>return ret;
> >
> > If we are doing direct a
Hi Andrew,
Andrew Lunn writes:
>> -ret = mdiobus_read_nested(bus, addr, reg);
>> +ret = mdiobus_read_nested(bus, sw_addr + addr, reg);
>> if (ret < 0)
>> return ret;
>
> If we are doing direct access, doesn't it means sw_addr is 0?
>
> So isn't this pointless?
6060 has
On Tue, Jun 14, 2016 at 02:31:53PM -0400, Vivien Didelot wrote:
> When the SMI address of the switch chip on the SMI master bus is not
> zero, some chips (e.g. 88E6352) use an indirect access through two SMI
> Command and Data registers, while others (e.g. 88E6060) still use a
> direct access.
>
>
Hi Andrew,
Andrew Lunn writes:
>> @@ -3681,7 +3681,7 @@ mv88e6xxx_smi_detect(struct device *dev, struct
>> mii_bus *bus, int sw_addr,
>> u16 id;
>>
>> ops = &mv88e6xxx_smi_direct_ops;
>> -if (sw_addr > 0)
>> +if (sw_addr > 0 && info->flags & MV88E6XXX_FLAG_MULTI_CHIP)
>>
> @@ -3681,7 +3681,7 @@ mv88e6xxx_smi_detect(struct device *dev, struct mii_bus
> *bus, int sw_addr,
> u16 id;
>
> ops = &mv88e6xxx_smi_direct_ops;
> - if (sw_addr > 0)
> + if (sw_addr > 0 && info->flags & MV88E6XXX_FLAG_MULTI_CHIP)
> ops = &mv88e6xxx_smi_indire
When the SMI address of the switch chip on the SMI master bus is not
zero, some chips (e.g. 88E6352) use an indirect access through two SMI
Command and Data registers, while others (e.g. 88E6060) still use a
direct access.
Add a capability flag to describe chips supporting the Multi-chip
Addressin