From: Baruch Siach <baruch@tkos.co.il>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, Shmuel Hazan <sh@tkos.co.il>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH] net: phy: marvell10g: add firmware load support
Date: Wed, 01 Apr 2020 22:08:18 +0300 [thread overview]
Message-ID: <87tv23ausd.fsf@tarshish> (raw)
In-Reply-To: <ad024231-40bd-c82f-e6d0-3b1b00c93e9a@gmail.com>
Hi Florian,
On Tue, Mar 31 2020, Florian Fainelli wrote:
> On 3/31/2020 10:47 AM, Baruch Siach wrote:
[snip]
>> + ret = request_firmware(&fw_entry, fw_file, &phydev->mdio.dev);
>> + if (ret < 0)
>> + return ret;
>> +
>> + /* Firmware size must be larger than header, and even */
>> + if (fw_entry->size <= MV_FIRMWARE_HEADER_SIZE ||
>> + (fw_entry->size % 2) != 0) {
>> + dev_err(&phydev->mdio.dev, "firmware file invalid");
>> + return -EINVAL;
>> + }
>
> You need to release the firmware file here.
Will fix.
> There is also possibly another case that you are not covering here,
> which is that the firmware on disk is newer than the firmware
> *already* loaded in the PHY, this should presumably update the running
> firmware to the latest copy.
Firmware is only loaded when the PHY boot state is MV_PMA_BOOT_WAITING
(see below). The code does not attempt to update existing PHY firmware.
> Without being able to publish the firmware in linux-firmware though, all
> of this may be moot.
I can't do much about that, unfortunately.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
next prev parent reply other threads:[~2020-04-01 19:08 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 17:47 [PATCH] net: phy: marvell10g: add firmware load support Baruch Siach
2020-03-31 18:03 ` Russell King - ARM Linux admin
2020-04-01 5:01 ` Baruch Siach
2020-04-01 5:07 ` Shmuel H.
2020-04-01 5:13 ` Shmuel H.
2020-04-01 9:27 ` Baruch Siach
2020-03-31 18:16 ` Heiner Kallweit
2020-03-31 19:30 ` Florian Fainelli
2020-04-01 5:18 ` Baruch Siach
2020-04-01 5:14 ` Baruch Siach
2020-03-31 19:37 ` Florian Fainelli
2020-04-01 19:08 ` Baruch Siach [this message]
2020-04-01 19:30 ` Andrew Lunn
2020-04-01 19:35 ` Baruch Siach
2020-04-01 10:30 ` Ioana Ciornei
2020-04-01 13:03 ` Andrew Lunn
2020-04-01 13:53 ` Russell King - ARM Linux admin
2020-04-01 16:09 ` Ioana Ciornei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tv23ausd.fsf@tarshish \
--to=baruch@tkos.co.il \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=sh@tkos.co.il \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.