Re: [EXTERNAL] Re: [PATCH net v2] net: ti: icssg-prueth: Fix r30 CMDs bitmasks

From: Anwar, Md Danish
Date: Wed Oct 18 2023 - 10:37:14 EST


On 10/17/2023 12:09 AM, Andrew Lunn wrote:
>>> How many different versions of REL.PRU-ICSS-ETHERNET-SWITCH have been
>>> released? They don't appear to be part of linux-firmware.git :-(
>>>
>>
>> The firmwares are currently not posted to linux-firmware.git. They are
>> maintained internally as of now. Different version of firmware is
>> released for every SDK release (3-4 times a year)
>
> Clearly, mainline works differently. Ideally you do want to get the
> firmware in linux-firmware.git. The kernel and firmware are then more
> likely to by upgraded at the same time. However, you should not assume

Definitely, we are having discussions on this and soon we'll start
pushing the ICSSG firmware to linux-firmware.git. Till then, we will
maintain firmware internally only.

> so. Maybe in mainline you can then support the last 4 firmware
> versions, and issue an error if a version older than that is found.
>
> However, until the firmware is easily available via linux-firmware,
> you probably should be backwards compatible for a longer period.
>

I understand that. I had discussion with the firmware team and this is
actually not breaking backwards compatibility.

The commands EMAC_PORT_DISABLE and EMAC_PORT_FORWARDING are actually
wrong in the driver.

Firmware is using below bitmasks since the beginning and they were wrong
in the driver. This patch actually fixes this.
{{0xffff0004, 0xffff0100, 0xffff0004, EMAC_NONE}},/* EMAC_PORT_DISABLE */

{{0xffbb0000, 0xfcff0000, 0xdcfb0000, EMAC_NONE}},/* EMAC_PORT_FORWARD */

I tested this patch with older firmware (Version
REL.PRU-ICSS-ETHERNET-SWITCH_02.02.12.04) as well as newer firmware
(Version REL.PRU-ICSS-ETHERNET-SWITCH_02.02.12.05). With this patch both
EMAC_PORT_DISABLE and EMAC_PORT_FORWARD commands are working with both
older and newer firmwares.

Apologies for wrong commit message. I will send next version with proper
commit message mentioning that this patch is backwards compatible

> Andrew

--
Thanks and Regards,
Md Danish Anwar