lkml.org 
[lkml]   [2022]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC Patch net-next] net: dsa: ksz: added the generic port_stp_state_set function
Date
On Fri, 2022-04-22 at 20:01 +0300, Vladimir Oltean wrote:
Hi Vladimir,
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> On Wed, Apr 20, 2022 at 12:56:47PM +0530, Arun Ramadoss wrote:
> > The ksz8795 and ksz9477 uses the same algorithm for the
> > port_stp_state_set function except the register address is
> > different. So
> > moved the algorithm to the ksz_common.c and used the dev_ops for
> > register read and write. This function can also used for the
> > lan937x
> > part. Hence making it generic for all the parts.
> >
> > Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
> > ---
>
> If the entire port STP state change procedure is the same, just a
> register offset is different, can you not create a common STP state
> procedure that takes the register offset as argument, and gets called
> with different offset arguments from ksz8795.c and from ksz9477.c?
Thanks for comment.
I will update the Patch by adding the register address as function
argument and repost.
\
 
 \ /
  Last update: 2022-04-24 13:23    [W:0.136 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site