> static void ksz8_r_vlan_table(struct ksz_device *dev, u16 vid, u32 *vlan)
> {
> - int index;
> - u16 *data;
> - u16 addr;
> + u16 addr = vid / dev->phy_port_cnt;
> u64 buf;
>
> - data = (u16 *)&buf;
> - addr = vid / dev->phy_port_cnt;
> - index
> In order to get this driver used with other switches the functions need
> to use different offsets and register shifts. This patch changes the
> direct use of the register defines to register description structures,
> which can be set depending on the chips register layout.
>
> Signed-off-by: Mi
> Hi Microchip,
>
> as ACL based blocking of PTP traffic seems not to work, I tried to install MAC
> based static lookup rules on the switch I successfully managed to block other
> non-PTP traffic, but for PTP the lookup table entry (see below) seems not to
> work. Incoming SYNC messages on port a
> On Thursday, 19 November 2020, 00:40:18 CET, Vladimir Oltean wrote:
> > On Wed, Nov 18, 2020 at 09:30:01PM +0100, Christian Eggers wrote:
> > > This series adds support for PTP to the KSZ956x and KSZ9477 devices.
> > >
> > > There is only little documentation for PTP available on the data sheet
>
> On Wed, Nov 18, 2020 at 11:03:54PM +0100, Michael Grzeschik wrote:
> > The ksz8795 driver is using port_cnt differently to the other microchip
> > DSA drivers. It sets it to the external physical port count, than the
> > whole port count (including the cpu port). This patch is aligning the
> > va
> > static int ksz9477_phy_read16(struct dsa_switch *ds, int addr, int reg)
> > @@ -389,6 +399,10 @@ static int ksz9477_phy_write16(struct dsa_switch
> *ds, int addr, int reg,
> > /* No real PHY after this. */
> > if (addr >= dev->phy_port_cnt)
> > return 0;
> > +
> > + /* No
From: Tristram Ha
This series of patches is to modify the KSZ9477 DSA driver to support
running KSZ9893 switch.
The KSZ9893 switch is similar to KSZ9477 except the ingress tail tag has
1 byte instead of 2 bytes. The XMII register that governs the MAC
communication also has different register de
From: Tristram Ha
Add KSZ9893 switch support in KSZ9477 driver. This switch is similar to
KSZ9477 except the ingress tail tag has 1 byte instead of 2 bytes, so
KSZ9893 tagging will be used.
The XMII register that governs how the host port communicates with the
MAC also has different register de
From: Tristram Ha
KSZ9893 switch is similar to KSZ9477 switch except the ingress tail tag
has 1 byte instead of 2 bytes. The size of the portmap is smaller and
so the override and lookup bits are also moved.
Signed-off-by: Tristram Ha
---
include/net/dsa.h | 1 +
net/dsa/dsa.c | 2 ++
From: Tristram Ha
Document additional Microchip KSZ9477 family switches.
Show how KSZ8565 switch should be configured as the host port is port 7
instead of port 5.
Signed-off-by: Tristram Ha
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 43 +++
1 file changed, 43
From: Tristram Ha
Document additional Microchip KSZ9477 family switches.
Show how KSZ8565 switch should be configured as the host port is port 7
instead of port 5.
Signed-off-by: Tristram Ha
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 43 +++
1 file changed, 43
From: Tristram Ha
Add KSZ9893 switch support in KSZ9477 driver. This switch is similar to
KSZ9477 except the ingress tail tag has 1 byte instead of 2 bytes. The
XMII register that governs how the host port communicates with the MAC
also has different register definitions.
Signed-off-by: Tristr
From: Tristram Ha
Add other switches in KSZ9477 family.
KSZ9896 is a switch with 6 ports; the last one is typically used to
connect to MAC.
KSZ9567 is same as KSZ9897 but with 1588 PTP capability.
KSZ8567 is same as KSZ9567 but without gigabit capability.
KSZ9563 is same as KSZ9893 but with 1588
From: Tristram Ha
This series of patches is to modify the KSZ9477 DSA driver to support
running KSZ9893 and other switches in the KSZ9477 family.
The KSZ9893 switch is similar to KSZ9477 except the ingress tail tag has
1 byte instead of 2 bytes. The XMII register that governs the MAC
communicat
From: Tristram Ha
This series of patches is to modify the KSZ9477 DSA driver to read MIB
counters periodically to avoid overflow.
The MIB counters should be read only when there is link. Otherwise it is
a waste of time as hardware never increases the counters.
Functions are added to check the
From: Tristram Ha
Add port_cleanup function to reset some device variables when the port is
disabled. Add a mutex to make sure changing those variables is
thread-safe.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c| 6 ++
drivers/net/dsa/microchip/ksz_common.c | 2
From: Tristram Ha
Prepare PHY for proper advertisement as sometimes the PHY in the switch
has its own problems even though it may share the PHY id from regular PHY
but the fixes in the PHY driver do not apply.
Signed-off-by: Tristram Ha
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
-
From: Tristram Ha
Remove unnecessary header include.
Signed-off-by: Tristram Ha
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/microchip/ksz9477.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b/drivers/net/dsa/microchip/ksz9477.c
index 1b8267c..b1b
From: Tristram Ha
Get port link status to know whether to read MIB counters when the link
is going down.
Signed-off-by: Tristram Ha
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/microchip/ksz9477.c| 1 +
drivers/net/dsa/microchip/ksz_common.c | 14 ++
drivers/net/dsa/microchip
From: Tristram Ha
Add background MIB counter reading support.
Port MIB counters should only be read when there is link. Otherwise it is
a waste of time as hardware never increases those counters. There are
exceptions as some switches keep track of dropped counts no matter what.
Signed-off-by:
From: Tristram Ha
Get port link status to know whether to read MIB counters when the link
is going down. Add port_cleanup function to read MIB counters the last
time as when the port is disabled the PHY is also powered down.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c
From: Tristram Ha
Prepare PHY for proper advertisement as sometimes the PHY in the switch
has its own problems even though it may share the PHY id from regular PHY
but the fixes in the PHY driver do not apply.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c| 13 +
From: Tristram Ha
This series of patches is to modify the KSZ9477 DSA driver to read MIB
counters periodically to avoid overflow.
The MIB counters should be read only when there is link. Otherwise it is
a waste of time as hardware never increases the counters.
Functions are added to check the
From: Tristram Ha
Remove unnecessary header include.
Signed-off-by: Tristram Ha
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/microchip/ksz9477.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b/drivers/net/dsa/microchip/ksz9477.c
index 6ad28e2..a94
From: Tristram Ha
Add background MIB counter reading support.
Port MIB counters should only be read when there is link. Otherwise it is
a waste of time as hardware never increases those counters. There are
exceptions as some switches keep track of dropped counts no matter what.
Signed-off-by:
From: Tristram Ha
Add background MIB counter reading support.
Port MIB counters should only be read when there is link. Otherwise it is
a waste of time as hardware never increases those counters. There are
exceptions as some switches keep track of dropped counts no matter waht.
Signed-off-by:
From: Tristram Ha
Get port link status to know whether to read MIB counters when the link
is going down. Add port_cleanup function to read MIB counters the last
time as after the port is disabled the PHY is also powered down.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c
From: Tristram Ha
Prepare PHY for proper advertisement as sometimes the PHY in the switch
has its own problems even though it may share the PHY id from regular PHY
but the fixes in the PHY driver do not apply.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c| 13 +
From: Tristram Ha
Remove unnecessary header include.
Signed-off-by: Tristram Ha
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/microchip/ksz9477.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b/drivers/net/dsa/microchip/ksz9477.c
index 6ad28e2..a94
From: Tristram Ha
This series of patches is to modify the KSZ9477 DSA driver to read MIB
counters periodically to avoid overflow.
The MIB counters should be read only when there is link. Otherwise it is
a waste of time as hardware never increases the counters.
Functions are added to check the
> >> > +/* read only dropped counters when link is not up */
> >> > +if (p->link_just_down)
> >> > +p->link_just_down = 0;
> >> > +else if (!p->phydev.link)
> >> > +mib->cnt_ptr = dev->reg_mib_cnt;
> >>
> > -static int ksz9477_wait_vlan_ctrl_ready(struct ksz_device *dev, u32
> waiton,
> > - int timeout)
> > -{
> > - u8 data;
> > -
> > - do {
> > - ksz_read8(dev, REG_SW_VLAN_CTRL, &data);
> > - if (!(data & waiton))
> > - b
> > +static void ksz9477_freeze_mib(struct ksz_device *dev, int port, bool
> freeze)
> > +{
> > + struct ksz_port *p = &dev->ports[port];
> > + u32 val = freeze ? MIB_COUNTER_FLUSH_FREEZE : 0;
>
> Reverse Christmas tree.
There was a checkpatch.pl patch in 2016 that tried to check this, but it
From: Tristram Ha
Remove unnecessary header include lines.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b/drivers/net/dsa/microchip/ksz9477.c
index 8391b9e..7c51edd 100644
--- a/dr
From: Tristram Ha
Replace register polling functions using timeout with readx_poll_time call.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c | 91 +++--
1 file changed, 27 insertions(+), 64 deletions(-)
diff --git a/drivers/net/dsa/microchip
From: Tristram Ha
This series of patches is to modify the KSZ9477 DSA driver to read MIB
counters periodically to avoid overflow.
v1
- Use readx_poll_time
- Do not clear MIB counters when port is enabled
- Do not advertise 1000 half-duplex mode when port is enabled
- Do not use freeze function a
From: Tristram Ha
Add MIB counter reading support.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c| 139 +++--
drivers/net/dsa/microchip/ksz_common.c | 96 +++
drivers/net/dsa/microchip/ksz_common.h | 2 +
drivers/net/ds
From: Tristram Ha
Prepare PHY for proper advertisement and get link status for the port.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c| 17 -
drivers/net/dsa/microchip/ksz_common.c | 19 ++-
drivers/net/dsa/microchip/ksz_common.h | 4 ++
From: Tristram Ha
The flag offload_fwd_mark is set as the switch can forward frames by
itself.
This can be considered a fix to a problem introduced in commit
c2e866911e254067 where the port membership are not set in sync. The flag
offload_fwd_mark just needs to be set in tag_ksz.c to prevent th
> > These extremely patches look similar to what I posted here before:
> >
> > https://patchwork.ozlabs.org/cover/1017222/
> >
> > But the authorship has changed. Why ?
>
> There seems to be explanation in 0/4.
>
> Tristram: if you started from Marek's patches as you describe in 0/4,
> you should
> > +#define REG_SIZE 0x8000
> > +
> > +#define I2C_REGMAP_VAL 8
> > +#define I2C_REGMAP_REG 16
> > +
> > +#define KSZ_REGMAP_COMMON(n, width)
> \
> > +{ \
> > +
From: Tristram Ha
Add KSZ9477 I2C driver support. The code ksz9477.c and ksz_common.c are
used together to generate the I2C driver.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/Kconfig | 7 ++
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/ksz94
From: Tristram Ha
This patch adds KSZ9477 I2C driver support using regmap mechanism.
Previous patches converting KSZ9477 SPI driver to regmap have to be
applied first.
v1
- Regmap mechanism is used to simplify access code.
Tristram Ha (1):
net: dsa: microchip: add KSZ9477 I2C driver
drivers
From: Tristram Ha
Convert KSZ9477 SPI driver to use regmap mechanism so that an I2C
driver can be easily added.
Original regmap implementation was submitted by Marek Vasut. Modified
and verified the implementation on real hardware.
Tristram Ha (4):
net: dsa: microchip: convert KSZ9477 SPI dr
From: Tristram Ha
Convert KSZ9477 SPI driver to use regmap mechanism so that an I2C driver
can be easily added.
KSZ9477 SPI driver uses a 32-bit SPI command containing a 24-bit address
to access registers in 8-bit. The address is automatically increased to
next register. In theory all register
From: Tristram Ha
Use regmap_update_bits function for bit manipulation in 32-bit access.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c | 23 +++
1 file changed, 3 insertions(+), 20 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz9477.c
b/driver
From: Tristram Ha
Remove ksz9477_get_port_addr as it is considered too slow and the macro
PORT_CTRL_ADDR can be used directly.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c | 11 +--
drivers/net/dsa/microchip/ksz_priv.h | 1 -
2 files changed, 1 insertion(+), 11
From: Tristram Ha
Remove ksz_spi.h as it is not used anymore.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz_spi.h | 69 -
1 file changed, 69 deletions(-)
delete mode 100644 drivers/net/dsa/microchip/ksz_spi.h
diff --git a/drivers/net/dsa/mic
> OK, so there are clearly restrictions to what can be written and how.
>
It is hardware bug. You need to read those high PHY registers in 32-bit and
modify them and write them back even though they are 16-bit. The regular low
PHY registers are not affected.
Another hardware bug with I2C acce
> On 1/10/19 3:10 AM, tristram...@microchip.com wrote:
> >>> I just looked at your regmap code and you use 3 regmap pointers for
> >> specific 8-bit, 16-bit, and 32-bit accesses. The switch access is always
> >> 8-bit.
> It
> >> has automatic register increment so that you can access arbitrary le
> > I just looked at your regmap code and you use 3 regmap pointers for
> specific 8-bit, 16-bit, and 32-bit accesses. The switch access is always
> 8-bit. It
> has automatic register increment so that you can access arbitrary length of
> registers. The use of 16-bit and 32-bit accesses makes a
> This is the regmap_config I used in Linux 4.9:
>
> .reg_bits = SPI_REGMAP_REG,
> .val_bits = SPI_REGMAP_VAL,
> .pad_bits = SPI_REGMAP_PAD,
> .read_flag_mask = KS_SPIOP_RD << SPI_REGMAP_MASK_S,
> .write_flag_mask= KS_
> >>> + { \
> >>> + .val_bits = (width),\
> >>> + .reg_stride = (width) / 8, \
> >>> + .reg_bits = (regbits) + (regalign), \
> >
> + { \
> + .val_bits = (width),\
> + .reg_stride = (width) / 8, \
> + .reg_bits = (regbits) + (regalign), \
> +
> +static const struct regmap_config ksz9477_regmap_config = {
> + .reg_bits = 32,
> + .val_bits = 8,
> + .max_register = 0x100,
> + .cache_type = REGCACHE_RBTREE,
> + .read_flag_mask = KS_SPIOP_RD << SPI_ADDR_SHIFT,
> + .write_flag_mask = KS_SPIOP_WR << SPI_ADDR_SHIFT,
> +
> On 12/20/2018 10:41 AM, Andrew Lunn wrote:
> > On Wed, Dec 19, 2018 at 05:20:33PM -0800, Florian Fainelli wrote:
> >> On 12/19/18 5:06 PM, Marek Vasut wrote:
> >>> Previous patches unconver that ksz_spi_write() is always ever called
> >>> with len = 1, 2 or 4. We can thus drop the if (len > SPI_T
> >> Well, I just did 'git grep regmap_i2c drivers' and 'git grep regmap_spi
> >> drivers/' and found eg.
> >> drivers/iio/pressure/zpa2326_i2c.c
> >> drivers/iio/pressure/zpa2326_spi.c
> >>
> >> There's plenty of drivers using regmap in drivers/ to demonstrate how to
> >> use it. And there's alway
From: Tristram Ha
Port partitioning is done by enabling UNICAST_VLAN_BOUNDARY and changing
the default port membership of 0x7f to other values such that there is
no communication between ports. In KSZ9477 the member for port 1 is
0x41; port 2, 0x42; port 3, 0x44; port 4, 0x48; port 5, 0x50; and
> Is there any specific reason that ksz_i2c_read24 & ksz_i2c_write24 in
> ksz9477_i2c.c
> but, other functions are in ksz_i2c.h?
>
There are specific registers in KSZ9477 such that using 24-bit is more
efficient than
reading 32-bit first and writing 32-bit. The other older switches mostly use
> This header file makes no sense. Please move the functions into .c
> >>>
> >>> No, that would make code bigger & slower.
> >>>
> >>> It makes sense to me. But I'd add "inline" keyword to make the goal
> >>> explicit.
> >>
> >> 1) It makes no sense to have header files for things like this. T
> Can this use regmap instead ?
>
To tell the truth I do not know how.
Some customers, like Sergio, seem to be using KSZ9897 with I2C in their projects
and so cannot wait further.
From: Tristram Ha
Add KSZ9477 I2C driver support. The code ksz9477.c and ksz_common.c are
used together to generate the I2C driver.
Signed-off-by: Tristram Ha
---
v1
- Return error code from i2c_transfer
- Change GPL license
- Change author
drivers/net/dsa/microchip/Kconfig | 6 +
dr
Sorry about the patch. I know you were using the code from the new SPI and old
I2C drivers to come up with your patch. You can incorporate the changes and
test the driver and re-submit the patch if you want.
Your i2c_probe function displays an error message when ksz9477_switch_register
is not
From: Tristram Ha
Fix VLAN filtering operation in kernel 4.15 and later.
Fixes: b987e98e50ab90e5 ("dsa: add DSA switch driver for Microchip KSZ9477")
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c | 44 ++---
1 file changed, 36 insertions(+),
From: Tristram Ha
Add KSZ9477 I2C driver support. The code ksz9477.c and ksz_common.c are
used together to generate the I2C driver.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/Kconfig | 6 +
drivers/net/dsa/microchip/Makefile | 1 +
drivers/net/dsa/microchip/ksz947
From: Tristram Ha
This patch adds KSZ9477 I2C driver support.
I know a patch for KSZ9477 I2C driver was already submitted. There is a
minor problem though. The structure and code of the I2C driver should
match those in the SPI driver. The only difference is the register
access.
Accordingly t
> I'd be careful about locking. Seems like dsa was designed with "tag
> format is static", and you want to change it dynamically...
I see there is now a new overhead parameter in the dsa_device_ops structure
and dev_set_mtu is called in master.c. It does not prevent the tag size to
change dynamic
> I am not looking for a hack-around, I am looking for a proper solution.
>
As you have the hardware you can try something to correct the problem.
The change was introduced in commit 9421c9015047 on Nov 15. In the
net-next tree it is about -42 commits.
git log -42 cpsw.c
git diff f5b589488ea5
> On Fri, Dec 07, 2018 at 07:18:43PM +0100, Marek Vasut wrote:
> > From: Tristram Ha
> >
> > Factor out common code from the tag_ksz , so that the code can be used
> > with other KSZ family switches which use differenly sized tags.
>
> I prefer this implementation over what Tristram recently subm
> -padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len;
> +padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb-
> > len;
> > Oh so they add the internal VLAN at the end of the frame, not the
> > beginning? That is quite surprising but that would not be
> - padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len;
> + padlen = (skb->len >= VLAN_ETH_ZLEN) ? 0 : VLAN_ETH_ZLEN - skb-
> >len;
The requirement is the tail tag should be at the end of frame before FCS.
When the length is less than 60 the MAC controller will pad the frame to
lega
> Do you have a git tree with all the KSZ patches based on -next
> somewhere, so I don't have to look for them in random MLs ?
I just sent it this Monday and the subject for that patch is
"[PATCH RFC 6/6] net: dsa: microchip: Add switch offload forwarding support."
> > I think if you do this without setting offload_fwd_mark you will
> > receive duplicate frame.
>
> I don't think it will, at least not in the normal case. The hardware
> should know the egress port, so there is no need to forward a copy to
> the CPU. The only time it should forward to the CPU i
> >> If two ports are in the same bridge and in forwarding state, the packets
> >> must be able to pass between them in both directions. The current code
> >> only configures this bridge membership for a port newly added to the
> >> bridge, but does not update all the other ports. Thus, ingress pac
> If two ports are in the same bridge and in forwarding state, the packets
> must be able to pass between them in both directions. The current code
> only configures this bridge membership for a port newly added to the
> bridge, but does not update all the other ports. Thus, ingress packets
> on th
> > +static void ksz9477_phy_setup(struct ksz_device *dev, int port,
> > + struct phy_device *phy)
> > +{
> > + if (port < dev->phy_port_cnt) {
> > + /* SUPPORTED_Asym_Pause and SUPPORTED_Pause can be
> removed to
> > +* disable flow control when rate
> > +static void ksz9477_r_mib_cnt(struct ksz_device *dev, int port, u16 addr,
> > + u64 *cnt)
> > +{
> > + u32 data;
> > + int timeout;
> > + struct ksz_port *p = &dev->ports[port];
> > +
> > + /* retain the flush/freeze bit */
> > + data = p->freeze ? MIB_COUNTER
> >>> Update tag_ksz.c to access switch driver's tail tagging operations.
> >>
> >> Hi Tristram
> >>
> >> Humm, i'm not sure we want this, the tagging spit into two places. I
> >> need to take a closer look at the previous patch, to see why it cannot
> >> be done here.
> >
> > O.K, i think i get w
From: Tristram Ha
Add MIB counter reading support.
Signed-off-by: Tristram Ha
Reviewed-by: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c| 121 ++---
drivers/net/dsa/microchip/ksz_common.c | 101 +++
drivers/net/dsa/microchip/ksz_co
From: Tristram Ha
Update tag_ksz.c to access switch driver's tail tagging operations.
Signed-off-by: Tristram Ha
---
net/dsa/tag_ksz.c | 44
1 file changed, 20 insertions(+), 24 deletions(-)
diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c
index
From: Tristram Ha
The flag offload_fwd_mark is set as the switch can forward frames by
itself.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c | 7 ---
net/dsa/tag_ksz.c | 2 ++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/
From: Tristram Ha
Break ksz_priv.h into two files: private and public. The public one is
put in include/linux/dsa/ksz_dsa.h.
This allows the tail tagging code tag_ksz.c to access the switch driver
as the tail tag format can be different when certain switch functions are
enabled.
Signed-off-by:
From: Tristram Ha
The tail tagging operations are implemented in each switch driver so that
the main tail tagging code tag_ksz.c does not need to be changed after
modification to support that mechanism is made.
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz9477.c| 78
From: Tristram Ha
This series of patches is to modify the KSZ9477 DSA driver to support
different tail tag formats such that other new KSZ switch drivers can be
added without changing the base tail tagging code.
Tristram Ha (6):
net: dsa: microchip: Prepare PHY for proper advertisement
net:
From: Tristram Ha
Prepare PHY for proper advertisement and get link status for the port.
Signed-off-by: Tristram Ha
Reviewed-by: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c| 12
drivers/net/dsa/microchip/ksz_common.c | 17 +
drivers/net/dsa/microchip/k
> From: Sørensen, Stefan
> Sent: Monday, December 03, 2018 5:50 AM
> To: da...@davemloft.net; Tristram Ha - C24268
>
> Cc: netdev@vger.kernel.org; pa...@ucw.cz; f.faine...@gmail.com;
> UNGLinuxDriver ; and...@lunn.ch
> Subject: Re: [PATCH v4 net-next 5/6] net: dsa: microchip: break KSZ9477 DSA
>
Slightly out of topic I am not sure why NAPI is used on the transmit side.
Originally NAPI was designed to fix the receive interrupt happening on each
receive frame problem, so on transmit side it is to avoid the transmit
done interrupt on each transmit frame? Typically hardware has a way
to trigg
From: Tristram Ha
Break KSZ9477 DSA driver into two files in preparation to add more KSZ
switch drivers.
Add common functions in ksz_common.h so that other KSZ switch drivers
can access code in ksz_common.c.
Add ksz_spi.h for common functions used by KSZ switch SPI drivers.
Signed-off-by: Tristr
From: Tristram Ha
Clean up code according to patch check suggestions.
Signed-off-by: Tristram Ha
Reviewed-by: Woojung Huh
Reviewed-by: Pavel Machek
Reviewed-by: Florian Fainelli
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/microchip/ksz_common.c | 8
1 file changed, 4 insertions(+
From: Tristram Ha
Rename some functions with ksz9477 prefix to separate chip specific code
from common code.
Signed-off-by: Tristram Ha
Reviewed-by: Woojung Huh
Reviewed-by: Pavel Machek
Reviewed-by: Florian Fainelli
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/microchip/ksz_common.c | 116
From: Tristram Ha
This series of patches is to modify the original KSZ9477 DSA driver so
that other KSZ switch drivers can be added and use the common code.
There are several steps to accomplish this achievement. First is to
rename some function names with a prefix to indicate chip specific
fun
From: Tristram Ha
Rename ksz_spi.c to ksz9477_spi.c and update Kconfig in preparation to add
more KSZ switch drivers.
Signed-off-by: Tristram Ha
Reviewed-by: Woojung Huh
Reviewed-by: Pavel Machek
Reviewed-by: Florian Fainelli
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/microchip/Kconfig
From: Tristram Ha
Rename ksz_9477_reg.h to ksz9477_reg.h for consistency as the product
name is always KSZ.
Signed-off-by: Tristram Ha
Reviewed-by: Woojung Huh
Reviewed-by: Andrew Lunn
---
drivers/net/dsa/microchip/ksz9477.c | 2 +-
drivers/net/dsa/microchip/{ksz_
From: Tristram Ha
Replace license with GPL.
Signed-off-by: Tristram Ha
Reviewed-by: Woojung Huh
Reviewed-by: Andrew Lunn
Acked-by: Pavel Machek
---
drivers/net/dsa/microchip/ksz_9477_reg.h | 17 +++--
drivers/net/dsa/microchip/ksz_common.c | 15 ++-
drivers/net/dsa
From: Tristram Ha
Initialize mutex before use. Avoid kernel complaint when
CONFIG_DEBUG_LOCK_ALLOC is enabled.
Fixes: b987e98e50ab90e5 ("dsa: add DSA switch driver for Microchip KSZ9477")
Signed-off-by: Tristram Ha
Reviewed-by: Pavel Machek
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Faine
From: Tristram Ha
Initialize mutex before use. Avoid kernel complaint when
CONFIG_DEBUG_LOCK_ALLOC is enabled.
Fixes: b987e98e50ab90e5 ("dsa: add DSA switch driver for Microchip KSZ9477")
Signed-off-by: Tristram Ha
Reviewed-by: Pavel Machek
Reviewed-by: Andrew Lunn
---
v2
- Add endorsements
From: Tristram Ha
Initialize mutex before use. Avoid kernel complaint when
CONFIG_DEBUG_LOCK_ALLOC is enabled.
Fixes: b987e98e50ab90e5 ("dsa: add DSA switch driver for Microchip KSZ9477")
Signed-off-by: Tristram Ha
---
v1
- Remove comment
drivers/net/dsa/microchip/ksz_common.c | 10 +
From: Tristram Ha
Initialize mutex before use. Avoid kernel complaint when
CONFIG_DEBUG_LOCK_ALLOC is enabled.
Fixes: b987e98e50ab90e5 ("dsa: add DSA switch driver for Microchip KSZ9477")
Signed-off-by: Tristram Ha
---
drivers/net/dsa/microchip/ksz_common.c | 11 ++-
1 file changed, 6
> Could you check on your side that applying this on top of your patch, your
> scenario is still working?
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c
> b/drivers/net/ethernet/cadence/macb_main.c
> index 1d86b4d5645a..e1347d6d1b50 100644
> --- a/drivers/net/ethernet/cadence/macb_main.
> Could you, please, tell me if the above variable was false in your case?
>
> bool cloned = skb_cloned(*skb) || skb_header_cloned(*skb);
>
> If yes, then, the proper fix would be as follows:
>
> diff --git a/drivers/net/ethernet/cadence/macb_main.c
> b/drivers/net/ethernet/cadence/macb_main.c
>
1 - 100 of 204 matches
Mail list logo