On Thu, Jan 17, 2019 at 10:36 AM Sergio Paracuellos
wrote:
>
> On Thu, Jan 17, 2019 at 4:24 AM wrote:
> >
> > From: Tristram Ha
> >
> > Add KSZ9477 I2C driver support. The code ksz9477.c and ksz_common.c are
> > used together to generate the I2C driver
> + .driver = {
> + .name = "ksz9477-switch",
> + .owner = THIS_MODULE,
> + .of_match_table = of_match_ptr(ksz9477_dt_ids),
> + },
> + .probe = ksz9477_i2c_probe,
> + .remove = ksz9477_i2c_remov
Switch bindings for spi managed mode are using spaces instead of tabs.
Fix them to get a file with a proper kernel indentation style.
Reviewed-by: Florian Fainelli
Signed-off-by: Sergio Paracuellos
---
Changes in v2:
- Rebase onto net-next
- Collect previous Reviewed-by tags
ksz_i2c_read32(struct ksz_device *dev, u32 reg, u32 *val)
> +{
> + int ret = ksz_i2c_read(dev, reg, (u8 *)val, 4);
> +
> + if (!ret)
> + *val = be32_to_cpu(*val);
> +
> + return ret;
> +}
> +
> +static int ksz_i2c_write8(struct ksz_device *dev, u32 reg, u8 value)
> +{
> + return ksz_i2c_write(dev, reg, &value, 1);
> +}
> +
> +static int ksz_i2c_write16(struct ksz_device *dev, u32 reg, u16 value)
> +{
> + value = cpu_to_be16(value);
> + return ksz_i2c_write(dev, reg, &value, 2);
> +}
> +
> +static int ksz_i2c_write32(struct ksz_device *dev, u32 reg, u32 value)
> +{
> + value = cpu_to_be32(value);
> + return ksz_i2c_write(dev, reg, &value, 4);
> +}
> +
> +static int ksz_i2c_get(struct ksz_device *dev, u32 reg, void *data, size_t
> len)
> +{
> + return ksz_i2c_read(dev, reg, data, len);
> +}
> +
> +static int ksz_i2c_set(struct ksz_device *dev, u32 reg, void *data, size_t
> len)
> +{
> + return ksz_i2c_write(dev, reg, data, len);
> +}
> +
> +#endif
> --
> 1.9.1
>
I don't know if at the end this is going to be changed together with
spi etc to use regmap API but I tested this code as it is and it
works. So you can add my Tested-by if you want:
Tested-by: Sergio Paracuellos
Best regards,
Sergio Paracuellos
On Sat, Dec 29, 2018 at 1:03 AM Rob Herring wrote:
>
> On Wed, Dec 19, 2018 at 08:46:26PM +0100, Sergio Paracuellos wrote:
> > Add device-tree binding example of the ksz9477 switch managed in i2c mode.
> >
> > Cc: devicet...@vger.kernel.org
> > Sig
On Tue, Dec 25, 2018 at 1:39 PM Andrew Lunn wrote:
>
> On Tue, Dec 25, 2018 at 12:45:11PM +0100, Sergio Paracuellos wrote:
> > Hi David,
> >
> > On Mon, Dec 24, 2018 at 11:15 PM David Miller wrote:
> > >
> > > From: Sergio Paracuellos
&
Hi David,
On Mon, Dec 24, 2018 at 11:15 PM David Miller wrote:
>
> From: Sergio Paracuellos
> Date: Sat, 22 Dec 2018 08:39:09 +0100
>
> > Switch bindings for spi managed mode are using spaces instead of tabs.
> > Fix them to get a file with a proper kernel indentation s
Switch bindings for spi managed mode are using spaces instead of tabs.
Fix them to get a file with a proper kernel indentation style.
Signed-off-by: Sergio Paracuellos
---
.../devicetree/bindings/net/dsa/ksz.txt | 110 +-
1 file changed, 55 insertions(+), 55 deletions
On Wed, Dec 19, 2018 at 7:26 PM Florian Fainelli wrote:
>
> On 12/18/18 10:23 PM, Sergio Paracuellos wrote:
> > Hi Rob,
> >
> > On Tue, Dec 18, 2018 at 4:10 PM Rob Herring wrote:
> >>
> >> On Mon, Dec 17, 2018 at 09:44:23PM +0100, Sergio Paracuellos wr
Add device-tree binding example of the ksz9477 switch managed in i2c mode.
Cc: devicet...@vger.kernel.org
Signed-off-by: Sergio Paracuellos
---
Changes v4:
- Use one tab formatting properly the binding sample.
Changes v3:
- No changes. Just resent patches together.
Changes v2
Hi Rob,
On Tue, Dec 18, 2018 at 4:10 PM Rob Herring wrote:
>
> On Mon, Dec 17, 2018 at 09:44:23PM +0100, Sergio Paracuellos wrote:
> > Add device-tree binding example of the ksz9477 switch managed in i2c mode.
> >
> > Cc: devicet...@vger.kernel.org
> > Sig
On Tue, Dec 18, 2018 at 9:06 AM Dan Carpenter wrote:
>
> Do we still need Sergio's device tree patch?
I think is useful. If not at least add a clarification that the reg
"5f" for the i2c is the one to use.
>
> regards,
> dan carpenter
>
Thanks,
Sergio Paracuellos
Hi Florian,
On Mon, Dec 17, 2018 at 11:22 PM Florian Fainelli wrote:
>
> On 12/17/18 12:44 PM, Sergio Paracuellos wrote:
> > Add device-tree binding example of the ksz9477 switch managed in i2c mode.
> >
> > Cc: devicet...@vger.kernel.org
> > Signed-off-by: Serg
> A little out-of-topic is the modalias now returns a different string rather
> than "i2c:ksz9477." This is done with the "cat
> /sys/bus/i2c/devices/0-005f/modalias" command. The string looks legit but it
> is difficult for regular users to get anything from it.
>
Thanks for clarification.
Best regards,
Sergio Paracuellos
; +static int ksz_i2c_read16(struct ksz_device *dev, u32 reg, u16 *val)
> +{
> + int ret = ksz_i2c_read(dev, reg, (u8 *)val, 2);
> +
> + if (!ret)
> + *val = be16_to_cpu(*val);
> +
> + return ret;
> +}
> +
> +static int ksz_i2c_read32(struct ksz_device *dev, u32 reg, u32 *val)
> +{
> + int ret = ksz_i2c_read(dev, reg, (u8 *)val, 4);
> +
> + if (!ret)
> + *val = be32_to_cpu(*val);
> +
> + return ret;
> +}
> +
> +static int ksz_i2c_write8(struct ksz_device *dev, u32 reg, u8 value)
> +{
> + return ksz_i2c_write(dev, reg, &value, 1);
> +}
> +
> +static int ksz_i2c_write16(struct ksz_device *dev, u32 reg, u16 value)
> +{
> + value = cpu_to_be16(value);
> + return ksz_i2c_write(dev, reg, &value, 2);
> +}
> +
> +static int ksz_i2c_write32(struct ksz_device *dev, u32 reg, u32 value)
> +{
> + value = cpu_to_be32(value);
> + return ksz_i2c_write(dev, reg, &value, 4);
> +}
> +
> +static int ksz_i2c_get(struct ksz_device *dev, u32 reg, void *data, size_t
> len)
> +{
> + return ksz_i2c_read(dev, reg, data, len);
> +}
> +
> +static int ksz_i2c_set(struct ksz_device *dev, u32 reg, void *data, size_t
> len)
> +{
> + return ksz_i2c_write(dev, reg, data, len);
> +}
> +
> +#endif
> --
> 1.9.1
>
Best regards,
Sergio Paracuellos
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)
> > &g
Add device-tree binding example of the ksz9477 switch managed in i2c mode.
Cc: devicet...@vger.kernel.org
Signed-off-by: Sergio Paracuellos
---
Changes v3:
- No changes. Just resent patches together.
Changes v2:
- Use generic name for label of the switch and make sure reg and @X
In this mode the switch device and the internal phys will be managed via
I2C interface.
Signed-off-by: Sergio Paracuellos
---
Changes v3:
- return -EINVAL if 'ksz_i2c_write' is called with len 0 to
avoid a possible memory corruption.
Changes v2:
- Use dev->txbuf a
On Mon, Dec 17, 2018 at 8:38 AM Andrew Lunn wrote:
>
> On Sun, Dec 16, 2018 at 10:49:52AM +0100, Sergio Paracuellos wrote:
> > In this mode the switch device and the internal phys will be managed via
> > I2C interface.
> >
> > Signed-off-by: Sergio Parac
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,
> > +
Add device-tree binding example of the ksz9477 switch managed in i2c mode.
Cc: devicet...@vger.kernel.org
Signed-off-by: Sergio Paracuellos
---
Changes v2:
- Use generic name for label of the switch and make sure reg and @X
have the same value.
.../devicetree/bindings/net/dsa/ksz.txt
In this mode the switch device and the internal phys will be managed via
I2C interface.
Signed-off-by: Sergio Paracuellos
---
Changes v2:
- Use dev->txbuf as transmition buffer which is allocated using
kernel allocators avoiding some possible DMA issues using the
stack.
driv
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)
> > +{
> > +
On Sun, Dec 16, 2018 at 9:18 AM Andrew Lunn wrote:
>
> On Sun, Dec 16, 2018 at 08:57:41AM +0100, Sergio Paracuellos wrote:
> > Add device-tree binding example of the ksz9477 switch managed in i2c mode.
> >
> > Cc: devicet...@vger.kernel.org
> > Sig
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
Add device-tree binding example of the ksz9477 switch managed in i2c mode.
Cc: devicet...@vger.kernel.org
Signed-off-by: Sergio Paracuellos
---
.../devicetree/bindings/net/dsa/ksz.txt | 50 +++
1 file changed, 50 insertions(+)
diff --git a/Documentation/devicetree
Hi,
This is because if you change the skb you must calcutale checksum for
tcp and ip headers changes again. For example:
struct iphdr *new_iph = NULL;
struct tcphdr *new_th = NULL;
/* copy skb to another skb with skb_copy */
new_skb = skb_copy_expand(skb, skb_headroom(skb), MY_SIZE, GFP_ATOMIC);
27 matches
Mail list logo