Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> I agree. Does the following snippet looks OK? >> >> >> #ifndef CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 >> if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_GLOBAL2)) { >> dev_err(chip->dev, "Missing support for Global 2 >>

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> I agree. Does the following snippet looks OK? >> >> >> #ifndef CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 >> if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_GLOBAL2)) { >> dev_err(chip->dev, "Missing support for Global 2 >> registers\n"); >

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Andrew Lunn
> I agree. Does the following snippet looks OK? > > > #ifndef CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 > if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_GLOBAL2)) { > dev_err(chip->dev, "Missing support for Global 2 > registers\n"); I would include the name of the option

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Andrew Lunn
> I agree. Does the following snippet looks OK? > > > #ifndef CONFIG_NET_DSA_MV88E6XXX_GLOBAL2 > if (mv88e6xxx_has(chip, MV88E6XXX_FLAG_GLOBAL2)) { > dev_err(chip->dev, "Missing support for Global 2 > registers\n"); I would include the name of the option

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> What do you think? > > I think the probe() needs to fail with a very obvious error message > saying you need to recompile your kernel with option XYZ enabled in > order to support this switch, when the optional stuff is not > optional... I

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: >> What do you think? > > I think the probe() needs to fail with a very obvious error message > saying you need to recompile your kernel with option XYZ enabled in > order to support this switch, when the optional stuff is not > optional... I agree. Does the

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Andrew Lunn
Hi Vivien > What do you think? I think the probe() needs to fail with a very obvious error message saying you need to recompile your kernel with option XYZ enabled in order to support this switch, when the optional stuff is not optional... Andrew

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Andrew Lunn
Hi Vivien > What do you think? I think the probe() needs to fail with a very obvious error message saying you need to recompile your kernel with option XYZ enabled in order to support this switch, when the optional stuff is not optional... Andrew

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Fri, Sep 02, 2016 at 08:08:19AM -0400, Vivien Didelot wrote: >> Since not every chip has a Global2 set of registers, make its support >> optional, in which case the related functions will return -EOPNOTSUPP. >> >> This also allows to reduce

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > On Fri, Sep 02, 2016 at 08:08:19AM -0400, Vivien Didelot wrote: >> Since not every chip has a Global2 set of registers, make its support >> optional, in which case the related functions will return -EOPNOTSUPP. >> >> This also allows to reduce the size of the

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Andrew Lunn
On Fri, Sep 02, 2016 at 08:08:19AM -0400, Vivien Didelot wrote: > Since not every chip has a Global2 set of registers, make its support > optional, in which case the related functions will return -EOPNOTSUPP. > > This also allows to reduce the size of the mv88e6xxx driver for devices > such as

Re: [PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Andrew Lunn
On Fri, Sep 02, 2016 at 08:08:19AM -0400, Vivien Didelot wrote: > Since not every chip has a Global2 set of registers, make its support > optional, in which case the related functions will return -EOPNOTSUPP. > > This also allows to reduce the size of the mv88e6xxx driver for devices > such as

[PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Vivien Didelot
Since not every chip has a Global2 set of registers, make its support optional, in which case the related functions will return -EOPNOTSUPP. This also allows to reduce the size of the mv88e6xxx driver for devices such as home routers embedding Ethernet chips without Global2 support. It is

[PATCH net-next 3/3] net: dsa: mv88e6xxx: make global2 code optional

2016-09-02 Thread Vivien Didelot
Since not every chip has a Global2 set of registers, make its support optional, in which case the related functions will return -EOPNOTSUPP. This also allows to reduce the size of the mv88e6xxx driver for devices such as home routers embedding Ethernet chips without Global2 support. It is