All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liang Xu <lxu@maxlinear.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"vee.khee.wong@linux.intel.com" <vee.khee.wong@linux.intel.com>,
	Hauke Mehrtens <hmehrtens@maxlinear.com>,
	Thomas Mohren <tmohren@maxlinear.com>
Subject: Re: [PATCH v2] net: phy: add Maxlinear GPY115/21x/24x driver
Date: Thu, 3 Jun 2021 15:32:38 +0000	[thread overview]
Message-ID: <1e580c98-3a0c-2e60-17e3-01ad8bfd69d9@maxlinear.com> (raw)
In-Reply-To: <YLjzeMpRDIUV9OAI@lunn.ch>

On 3/6/2021 11:21 pm, Andrew Lunn wrote:
> This email was sent from outside of MaxLinear.
>
>
> On Thu, Jun 03, 2021 at 03:10:31PM +0000, Liang Xu wrote:
>> On 3/6/2021 5:17 pm, Russell King (Oracle) wrote:
>>>> +static int gpy_config_init(struct phy_device *phydev)
>>>> +{
>>>> + int ret, fw_ver;
>>>> +
>>>> + /* Show GPY PHY FW version in dmesg */
>>>> + fw_ver = phy_read(phydev, PHY_FWV);
>>>> + if (fw_ver < 0)
>>>> + return fw_ver;
>>>> +
>>>> + phydev_info(phydev, "Firmware Version: 0x%04X (%s)\n", fw_ver,
>>>> + (fw_ver & PHY_FWV_REL_MASK) ? "release" : "test");
>>> Does this need to print the firmware version each time config_init()
>>> is called? Is it likely to change beyond? Would it be more sensible
>>> to print it in the probe() method?
>> The firmware version can change in device with different firmware
>> loading mechanism.
>>
>> I moved the print to probe and tested a few devices, found in some cases
>> it did not print the active version number.
> That actually sounds like a real problem. If it is still in the
> bootloader when the driver is probed, the driver should not be writing
> any configuration registers until the real image is running. So it
> sounds like you need a probe function which checks if the PHY has
> finished booting, and if not, wait for the real firmware to start
> running.
>
>          Andrew
>
I think my word was misleading.

The device always has valid firmware running.

The firmware version can change because of switch of the firmware during 
running time.



  reply	other threads:[~2021-06-03 15:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03  7:34 [PATCH v2] net: phy: add Maxlinear GPY115/21x/24x driver Xu Liang
2021-06-03  9:17 ` Russell King (Oracle)
2021-06-03 10:36   ` Liang Xu
2021-06-03 15:10   ` Liang Xu
2021-06-03 15:21     ` Andrew Lunn
2021-06-03 15:32       ` Liang Xu [this message]
2021-06-03 17:05         ` Andrew Lunn
2021-06-03 17:54           ` Liang Xu
2021-06-04 12:09             ` Andrew Lunn
2021-06-04 12:39               ` Liang Xu
2021-06-04 12:15 ` Andrew Lunn
2021-06-04 12:52   ` Liang Xu
2021-06-04 20:39     ` Andrew Lunn
2021-06-05  3:46       ` Liang Xu
2021-06-05 14:37         ` Andrew Lunn
2021-06-07  4:04           ` Liang Xu
2021-06-07 12:15             ` Andrew Lunn
2021-06-07 13:28               ` Liang Xu

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=1e580c98-3a0c-2e60-17e3-01ad8bfd69d9@maxlinear.com \
    --to=lxu@maxlinear.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=hmehrtens@maxlinear.com \
    --cc=kuba@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=tmohren@maxlinear.com \
    --cc=vee.khee.wong@linux.intel.com \
    /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.