From: Florian Fainelli <f.fainelli@gmail.com>
To: Jose Abreu <Jose.Abreu@synopsys.com>,
Thierry Reding <thierry.reding@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Jon Hunter <jonathanh@nvidia.com>,
Bitan Biswas <bbiswas@nvidia.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH net-next v2 2/2] net: stmmac: Support enhanced addressing mode for DWMAC 4.10
Date: Tue, 10 Sep 2019 12:01:01 -0700 [thread overview]
Message-ID: <c8d419d3-6cf6-e260-a2e2-6a339c6c321b@gmail.com> (raw)
In-Reply-To: <BN8PR12MB3266F021DFC2C61CDEC83418D3B60@BN8PR12MB3266.namprd12.prod.outlook.com>
On 9/10/19 1:35 AM, Jose Abreu wrote:
> From: Thierry Reding <thierry.reding@gmail.com>
> Date: Sep/09/2019, 20:13:29 (UTC+00:00)
>
>> On Mon, Sep 09, 2019 at 04:05:52PM +0000, Jose Abreu wrote:
>>> From: Thierry Reding <thierry.reding@gmail.com>
>>> Date: Sep/09/2019, 16:25:46 (UTC+00:00)
>>>
>>>> @@ -79,6 +79,10 @@ static void dwmac4_dma_init_rx_chan(void __iomem *ioaddr,
>>>> value = value | (rxpbl << DMA_BUS_MODE_RPBL_SHIFT);
>>>> writel(value, ioaddr + DMA_CHAN_RX_CONTROL(chan));
>>>>
>>>> + if (dma_cfg->eame)
>>>
>>> There is no need for this check. If EAME is not enabled then upper 32
>>> bits will be zero.
>>
>> The idea here was to potentially guard against this register not being
>> available on some revisions. Having the check here would avoid access to
>> the register if the device doesn't support enhanced addressing.
>
> I see your point but I don't think there will be any problems unless you
> have some strange system that doesn't handle the write accesses to
> unimplemented features properly ...
Is not it then just safer to not do the write to a register that you do
not know how the implementation is going to respond to with one of a
target abort, timeout, decoding error, just dead lock?
Also, would it make sense to consider adding an #ifdef
CONFIG_PHYS_ADDR_T_64BIT plus the conditional check so that you can be
slightly more optimal in the hot-path here?
--
Florian
next prev parent reply other threads:[~2019-09-10 19:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 15:25 [PATCH net-next v2 1/2] net: stmmac: Only enable enhanced addressing mode when needed Thierry Reding
2019-09-09 15:25 ` [PATCH net-next v2 2/2] net: stmmac: Support enhanced addressing mode for DWMAC 4.10 Thierry Reding
2019-09-09 16:05 ` Jose Abreu
2019-09-09 19:13 ` Thierry Reding
2019-09-10 8:35 ` Jose Abreu
2019-09-10 19:01 ` Florian Fainelli [this message]
2019-09-11 9:15 ` Jose Abreu
2019-09-09 16:07 ` [PATCH net-next v2 1/2] net: stmmac: Only enable enhanced addressing mode when needed Jose Abreu
2019-09-09 19:11 ` Thierry Reding
2019-09-10 8:32 ` Jose Abreu
2019-09-10 13:54 ` Thierry Reding
2019-09-10 17:25 ` Jose Abreu
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=c8d419d3-6cf6-e260-a2e2-6a339c6c321b@gmail.com \
--to=f.fainelli@gmail.com \
--cc=Jose.Abreu@synopsys.com \
--cc=alexandre.torgue@st.com \
--cc=bbiswas@nvidia.com \
--cc=davem@davemloft.net \
--cc=jonathanh@nvidia.com \
--cc=linux-tegra@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=thierry.reding@gmail.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 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).