Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-05 Thread Richard Cochran
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

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Vivien Didelot
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)

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Andrew Lunn
> 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 =

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Vivien Didelot
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

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Andrew Lunn
> > +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)) { >

Re: [PATCH v1 net-next 1/5] net: dsa: mv88e6xxx: Reserved Management frames to CPU

2016-12-04 Thread Vivien Didelot
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