2021-01-25 19:57:45

by Rasmus Villemoes

[permalink] [raw]
Subject: Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

On 25/01/2021 19.39, Greg Kroah-Hartman wrote:
> From: Rasmus Villemoes <[email protected]>
>
> commit 87fe04367d842c4d97a77303242d4dd4ac351e46 upstream.
>

Greg, please drop this from 4.19-stable. Details:

>
> --- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c
> +++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c
> @@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88
> if (err)
> return err;
>
> + err = mv88e6185_g1_stu_data_read(chip, entry);
> + if (err)
> + return err;
> +

The function that this patch applied to in mainline did not exist in
v4.19. It seems that this hunk has been applied in the similar
mv88e6185_g1_vtu_getnext(), and indeed, in current 4.19.y, just one more
line of context shows this:

353 err = mv88e6185_g1_stu_data_read(chip, entry);
354 if (err)
355 return err;
356
357 /* VTU DBNum[3:0] are located in VTU Operation 3:0
358 * VTU DBNum[7:4] are located in VTU Operation 11:8
359 */
360 err = mv88e6xxx_g1_read(chip,
MV88E6XXX_G1_VTU_OP, &val);
361 if (err)
362 return err;


IOW, it would be a pointless noop adding the same call again.

Rasmus


2021-01-25 20:07:42

by Rasmus Villemoes

[permalink] [raw]
Subject: Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

On 25/01/2021 20.40, Rasmus Villemoes wrote:
> On 25/01/2021 19.39, Greg Kroah-Hartman wrote:
>> From: Rasmus Villemoes <[email protected]>
>>
>> commit 87fe04367d842c4d97a77303242d4dd4ac351e46 upstream.
>>
>
> Greg, please drop this from 4.19-stable. Details:
>
>>
>> --- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c
>> +++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c
>> @@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88
>> if (err)
>> return err;
>>
>> + err = mv88e6185_g1_stu_data_read(chip, entry);
>> + if (err)
>> + return err;
>> +
>
> The function that this patch applied to in mainline did not exist in
> v4.19. It seems that this hunk has been applied in the similar
> mv88e6185_g1_vtu_getnext(), and indeed, in current 4.19.y, just one more
> line of context shows this:

Bah, that was from 4.14, so the line numbers are a bit off, but I see
you've also added it to the 4.14 queue. Same comment for that one: Drop
this from both 4.19.y and 4.14.y.

Rasmus

2021-01-26 11:25:10

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

On Mon, Jan 25, 2021 at 08:59:54PM +0100, Rasmus Villemoes wrote:
> On 25/01/2021 20.40, Rasmus Villemoes wrote:
> > On 25/01/2021 19.39, Greg Kroah-Hartman wrote:
> >> From: Rasmus Villemoes <[email protected]>
> >>
> >> commit 87fe04367d842c4d97a77303242d4dd4ac351e46 upstream.
> >>
> >
> > Greg, please drop this from 4.19-stable. Details:
> >
> >>
> >> --- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c
> >> +++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c
> >> @@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88
> >> if (err)
> >> return err;
> >>
> >> + err = mv88e6185_g1_stu_data_read(chip, entry);
> >> + if (err)
> >> + return err;
> >> +
> >
> > The function that this patch applied to in mainline did not exist in
> > v4.19. It seems that this hunk has been applied in the similar
> > mv88e6185_g1_vtu_getnext(), and indeed, in current 4.19.y, just one more
> > line of context shows this:
>
> Bah, that was from 4.14, so the line numbers are a bit off, but I see
> you've also added it to the 4.14 queue. Same comment for that one: Drop
> this from both 4.19.y and 4.14.y.

Odd, but ok, the Fixes: line lied :)

I'll go drop this from both trees now, thanks.

greg k-h

2021-01-26 11:34:38

by Rasmus Villemoes

[permalink] [raw]
Subject: Re: [PATCH 4.19 46/58] net: dsa: mv88e6xxx: also read STU state in mv88e6250_g1_vtu_getnext

On 26/01/2021 09.50, Greg Kroah-Hartman wrote:
> On Mon, Jan 25, 2021 at 08:59:54PM +0100, Rasmus Villemoes wrote:
>> On 25/01/2021 20.40, Rasmus Villemoes wrote:
>>> On 25/01/2021 19.39, Greg Kroah-Hartman wrote:
>>>> From: Rasmus Villemoes <[email protected]>
>>>>
>>>> commit 87fe04367d842c4d97a77303242d4dd4ac351e46 upstream.
>>>>
>>>
>>> Greg, please drop this from 4.19-stable. Details:
>>>
>>>>
>>>> --- a/drivers/net/dsa/mv88e6xxx/global1_vtu.c
>>>> +++ b/drivers/net/dsa/mv88e6xxx/global1_vtu.c
>>>> @@ -357,6 +357,10 @@ int mv88e6185_g1_vtu_getnext(struct mv88
>>>> if (err)
>>>> return err;
>>>>
>>>> + err = mv88e6185_g1_stu_data_read(chip, entry);
>>>> + if (err)
>>>> + return err;
>>>> +
>>>
>>> The function that this patch applied to in mainline did not exist in
>>> v4.19. It seems that this hunk has been applied in the similar
>>> mv88e6185_g1_vtu_getnext(), and indeed, in current 4.19.y, just one more
>>> line of context shows this:
>>
>> Bah, that was from 4.14, so the line numbers are a bit off, but I see
>> you've also added it to the 4.14 queue. Same comment for that one: Drop
>> this from both 4.19.y and 4.14.y.
>
> Odd, but ok, the Fixes: line lied :)

Sorry, but no, it did not.

The commit 92307069a96c mentioned in Fixes changed the semantics of the
helper mv88e6185_g1_vtu_data_read(), splitting half its functionality to
a new helper mv88e6185_g1_stu_data_read(), and it also added a call of
that new helper in mv88e6185_g1_vtu_getnext().

But the other user of mv88e6185_g1_vtu_data_read(), namely
mv88e6250_g1_vtu_getnext(), was not updated, which is precisely what
87fe04367d842c4d97a77303242d4dd4ac351e46 fixes. However, that other user
of mv88e6185_g1_vtu_data_read() did not exist in 4.19, so the backports
of 92307069a96c to those earlier stable trees didn't introduce that bug.

Rasmus