On Sun, Dec 04, 2016 at 09:22:34PM +0100, Andrew Lunn wrote:
> 3) We have a prefix for us humans to help us find the code. Now we
> have ops, i cannot simply do M-. and emacs will take me to the
> implementation. I have to search for it a bit. Having the hint g1_
> tells me to go look in global1.c.
Hi Andrew,
Andrew Lunn writes:
>> You can have several implementations in the same file (e.g. global1.c),
>> so again the only value is the function name, not the struct member.
>
> The structure member have g1_ has a lot of value.
>
> if (chip->info->ops->set_cpu_port) {
>
> You can have several implementations in the same file (e.g. global1.c),
> so again the only value is the function name, not the struct member.
The structure member have g1_ has a lot of value.
if (chip->info->ops->set_cpu_port) {
err = chip->info->ops->set_cpu_port(chip,
Hi Andrew,
Andrew Lunn writes:
>> The mv88e6xxx_ops actually implements the *features*. They can be
>> prefixed for clarity (e.g. .ppu_*, port_*, .atu_*, etc.). They don't
>> describe the register layout.
>>
>> But we can discuss two ways of seeing this structure implementation:
>
> or
>
> 3) W
> > +int mv88e6095_g2_mgmt_rsvd2cpu(struct mv88e6xxx_chip *chip)
> > +{
> > + int err;
> > +
> > + /* Consider the frames with reserved multicast destination
> > +* addresses matching 01:80:c2:00:00:2x as MGMT.
> > +*/
> > + if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_G2_MGMT_EN_2X)) {
>
Hi Andrew,
Andrew Lunn writes:
> + /* Some generations have the configuration of sending reserved
> + * management frames to the CPU in global2, others in
> + * global1. Hence it does not fit the two setup functions
> + * above.
> + */
> + if (chip->info->ops->mgmt_rs
Older devices have a couple of registers in global2. The mv88e6390
family has a single register in global1 behind which hides similar
configuration. Implement and op for this.
Signed-off-by: Andrew Lunn
---
drivers/net/dsa/mv88e6xxx/chip.c | 35
drivers/net/dsa/