All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@codeaurora.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/3] net: qcom/emac: do not reset the EMAC during initialization
Date: Fri, 23 Jun 2017 13:37:58 -0500	[thread overview]
Message-ID: <b0bbdab5-7c3d-b02e-3e69-a0cb4e214ef2@codeaurora.org> (raw)
In-Reply-To: <20170623.140031.865751442887165393.davem@davemloft.net>

On 06/23/2017 01:00 PM, David Miller wrote:
> What if the boot loader or something else left the chip in
> a weird state?

We depend on the boot loader leaving the NIC in a very specific state 
already, otherwise the driver can't initialize the hardware.  The 
firmware has to pre-initialize the EMAC for us.

Not only that, but the driver was resetting the MAC *after* programming 
the clocks (on non-ACPI systems) and initializing both PHYs.

> I'm not applying this.
> 
> If it's correct, the explanation in this commit message need
> to be imporved.  The change must be better justified.

Since this is for ACPI systems, I could do this:

	if (!has_acpi_companion(&pdev->dev))
		emac_mac_reset(adpt);

But at the very least, the call should be moved to earlier in the function.

-- 
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm
Technologies, Inc.  Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

  reply	other threads:[~2017-06-23 18:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 18:05 [PATCH 0/3] net: qcom/emac: various minor improvements Timur Tabi
2017-06-22 18:05 ` [PATCH 1/3] net: qcom/emac: add shutdown function Timur Tabi
2017-06-22 18:05 ` [PATCH 2/3] net: qcom/emac: do not reset the EMAC during initialization Timur Tabi
2017-06-23 18:00   ` David Miller
2017-06-23 18:37     ` Timur Tabi [this message]
2017-06-23 18:54       ` David Miller
2017-06-22 18:05 ` [PATCH 3/3] net: qcom/emac: add support for emulation systems Timur Tabi

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=b0bbdab5-7c3d-b02e-3e69-a0cb4e214ef2@codeaurora.org \
    --to=timur@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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.