Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-28 Thread Andy Shevchenko
On Mon, Jan 25, 2021 at 7:00 AM Lorenzo Carletti wrote: > > In the rtl8366rb driver there are some jam tables which contain > undocumented values. > While trying to understand what these tables actually do, > I noticed a discrepancy in how one of those was treated. > Most of them were plain u16 ar

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-27 Thread Vladimir Oltean
On Tue, Jan 26, 2021 at 11:15:33PM +0100, Lorenzo Carletti wrote: > > And did you manage to find out what these tables actually do? > > I was unable to do so. I was looking for Intel 8051 instructions in them: > I created a small piece of code that generates an hypotetical > registers space in whic

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-27 Thread Vladimir Oltean
On Wed, Jan 27, 2021 at 12:28:05AM +0200, Vladimir Oltean wrote: > > So, allow me to explain. The kernel jams every "i + 1" value in the array > > tables into the registers at " i", and then increments "i" by 2. > > These can be seen as [n][2] matrixes, just like the ethernet one. > > Having the ar

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-26 Thread Linus Walleij
On Mon, Jan 25, 2021 at 5:56 AM Lorenzo Carletti wrote: > In the rtl8366rb driver there are some jam tables which contain > undocumented values. > While trying to understand what these tables actually do, > I noticed a discrepancy in how one of those was treated. > Most of them were plain u16 arr

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-26 Thread Linus Walleij
On Tue, Jan 26, 2021 at 10:08 PM Vladimir Oltean wrote: > On Mon, Jan 25, 2021 at 05:56:31AM +0100, Lorenzo Carletti wrote: > > In the rtl8366rb driver there are some jam tables which contain > > undocumented values. > > While trying to understand what these tables actually do, > > I noticed a di

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-26 Thread Vladimir Oltean
On Tue, Jan 26, 2021 at 11:08:37PM +0200, Vladimir Oltean wrote: > > and also makes it possible for a single function to handle all of them, > > removing some duplicated code. But at least I'll give you that, it is pretty straightforward refactoring. The register jamming routine for green Ethernet

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-26 Thread Vladimir Oltean
On Tue, Jan 26, 2021 at 11:08:37PM +0200, Vladimir Oltean wrote: > On another note, the patch doesn't apply cleanly to net-next/master. Sorry, it does, I should learn how to apply a patch some day.

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-26 Thread Vladimir Oltean
Hi Lorenzo, On Mon, Jan 25, 2021 at 05:56:31AM +0100, Lorenzo Carletti wrote: > In the rtl8366rb driver there are some jam tables which contain > undocumented values. > While trying to understand what these tables actually do, > I noticed a discrepancy in how one of those was treated. And did you

[PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-24 Thread Lorenzo Carletti
In the rtl8366rb driver there are some jam tables which contain undocumented values. While trying to understand what these tables actually do, I noticed a discrepancy in how one of those was treated. Most of them were plain u16 arrays, while the ethernet one was an u16 matrix. By looking at the ven