netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, Shmuel Hazan <sh@tkos.co.il>,
	Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH] net: phy: marvell10g: add firmware load support
Date: Wed, 01 Apr 2020 08:14:11 +0300	[thread overview]
Message-ID: <87369ndbz0.fsf@tarshish> (raw)
In-Reply-To: <8f4ecf61-ed50-9de6-f20a-0ade5f3dcb9a@gmail.com>

Hi Heiner,

On Tue, Mar 31 2020, Heiner Kallweit wrote:
> On 31.03.2020 19:47, Baruch Siach wrote:
>> When Marvell 88X3310 and 88E2110 hardware configuration SPI_CONFIG strap
>> bit is pulled up, the host must load firmware to the PHY after reset.
>> Add support for loading firmware.
>>
>> Firmware files are available from Marvell under NDA.
>>
>
> Loading firmware files that are available under NDA only in GPL-licensed
> code may be problematic. I'd expect firmware files to be available in
> linux-firmware at least.
> I'd be interested in how the other phylib maintainers see this.

The inside-secure crypto acceleration driver
(drivers/crypto/inside-secure/) original had only NDA firmware.

> Two more remarks inline.
>
> Last but not least:
> The patch should have been annotated "net-next", and net-next is closed currently.
>
>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

[...]

>> +	if ((ret & MV_PMA_BOOT_PROGRESS_MASK) == MV_PMA_BOOT_WAITING) {
>> +		ret = mv3310_load_firmware(phydev);
>> +		if (ret < 0)
>> +			return ret;
>
> You bail out from probe if a firmware file can't be loaded that is
> available under NDA only. That doesn't seem to be too nice.

The code verifies that the PHY is in MV_PMA_BOOT_WAITING state. The PHY
is not usable in this state unless the firmware is loaded. This is just
like the MV_PMA_BOOT_FATAL error in the code above.

In the common case of firmware loaded from SPI flash, the code will not
try to load the firmware.

baruch

>
>> +	}
>> +
>>  	priv = devm_kzalloc(&phydev->mdio.dev, sizeof(*priv), GFP_KERNEL);
>>  	if (!priv)
>>  		return -ENOMEM;
>>

--
     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 -

  parent reply	other threads:[~2020-04-01  5:14 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 [this message]
2020-03-31 19:37 ` Florian Fainelli
2020-04-01 19:08   ` Baruch Siach
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=87369ndbz0.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).