On Mon, Dec 17, 2018 at 8:11 PM Dan Carpenter wrote:
>
> On Mon, Dec 17, 2018 at 07:22:51PM +0100, Sergio Paracuellos wrote:
> > > > +static int ksz_i2c_write(struct ksz_device *dev, u32 reg, u8 *val,
> > > > + unsigned int len)
> > > > +{
> > > > + struct i2c_client *clie
On Mon, Dec 17, 2018 at 07:22:51PM +0100, Sergio Paracuellos wrote:
> > > +static int ksz_i2c_write(struct ksz_device *dev, u32 reg, u8 *val,
> > > + unsigned int len)
> > > +{
> > > + struct i2c_client *client = dev->priv;
> > > + unsigned int cnt = len;
> > > + in
Hi Dan,
Thanks for the feedback.
On Mon, Dec 17, 2018 at 7:55 AM Dan Carpenter wrote:
>
> On Sun, Dec 16, 2018 at 08:57:40AM +0100, Sergio Paracuellos wrote:
> > +static int ksz_i2c_write(struct ksz_device *dev, u32 reg, u8 *val,
> > + unsigned int len)
> > +{
> > + stru
On Sun, Dec 16, 2018 at 08:57:40AM +0100, Sergio Paracuellos wrote:
> +static int ksz_i2c_write(struct ksz_device *dev, u32 reg, u8 *val,
> + unsigned int len)
> +{
> + struct i2c_client *client = dev->priv;
> + unsigned int cnt = len;
> + int i = 0;
> + u8 txb[
> I'll change these two to to get memory from kernel allocators instead
> of using the stack. Thanks for let me know this.
There appear to be other cases as well. Please review the whole
driver.
Thanks
Andrew
On Sun, Dec 16, 2018 at 9:15 AM Andrew Lunn wrote:
>
> On Sun, Dec 16, 2018 at 08:57:40AM +0100, Sergio Paracuellos wrote:
> > +static int ksz_i2c_read_reg(struct i2c_client *client, u32 reg, u8 *val,
> > + unsigned int len)
> > +{
> > + struct i2c_adapter *adapter = cl
On Sun, Dec 16, 2018 at 08:57:40AM +0100, Sergio Paracuellos wrote:
> +static int ksz_i2c_read_reg(struct i2c_client *client, u32 reg, u8 *val,
> + unsigned int len)
> +{
> + struct i2c_adapter *adapter = client->adapter;
> + struct i2c_msg msg[2];
> + u8 txd[2];
In this mode the switch device and the internal phys will be managed via
I2C interface.
Signed-off-by: Sergio Paracuellos
---
drivers/net/dsa/microchip/Kconfig | 6 +
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/ksz9477_i2c.c | 258