From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jon Mason <jon.mason@broadcom.com>, David Miller <davem@davemloft.net>
Cc: rafal@milecki.pl, bcm-kernel-feedback-list@broadcom.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Zac Schroff <zschroff@broadcom.com>
Subject: Re: [PATCH 1/2] net: ethernet: bgmac: init sequence bug
Date: Thu, 2 Feb 2017 12:47:28 +0300 [thread overview]
Message-ID: <65fcc617-bc30-26b2-40d0-ba6a00687c33@cogentembedded.com> (raw)
In-Reply-To: <1485988752-21030-2-git-send-email-jon.mason@broadcom.com>
Hello!
On 2/2/2017 1:39 AM, Jon Mason wrote:
> From: Zac Schroff <zschroff@broadcom.com>
>
> Fix a bug in the 'bgmac' driver init sequence that blind writes for init
> sequence where it should preserve most bits other than the ones it is
> deliberately manipulating.
>
> Signed-off-by: Zac Schroff <zschroff@broadcom.com>
> Signed-off-by: Jon Mason <jon.mason@broadcom.com>
> Fixes: f6a95a24957 ("net: ethernet: bgmac: Add platform device support")
> ---
> drivers/net/ethernet/broadcom/bgmac-platform.c | 10 +++++++---
> include/linux/bcma/bcma_regs.h | 1 +
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bgmac-platform.c b/drivers/net/ethernet/broadcom/bgmac-platform.c
> index 6f736c1..9bbe05c 100644
> --- a/drivers/net/ethernet/broadcom/bgmac-platform.c
> +++ b/drivers/net/ethernet/broadcom/bgmac-platform.c
> @@ -61,15 +61,19 @@ static bool platform_bgmac_clk_enabled(struct bgmac *bgmac)
>
> static void platform_bgmac_clk_enable(struct bgmac *bgmac, u32 flags)
> {
> - bgmac_idm_write(bgmac, BCMA_IOCTL,
> - (BCMA_IOCTL_CLK | BCMA_IOCTL_FGC | flags));
> + u32 regval;
> +
> + /* Some bits of BCMA_IOCTL set by HW/ATF & should not change */
> + regval = bgmac_idm_read(bgmac, BCMA_IOCTL) & BCMA_IOCTL_DO_NOT_MODIFY;
> + regval |= ((flags & (~BCMA_IOCTL_DO_NOT_MODIFY)) | BCMA_IOCTL_CLK);
The innermost parens aren't necessary. And the outermost as well.
[...]
MBR, Sergei
next prev parent reply other threads:[~2017-02-02 9:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-01 22:39 [PATCH 0/2] net: ethernet: bgmac: bug fixes Jon Mason
2017-02-01 22:39 ` [PATCH 1/2] net: ethernet: bgmac: init sequence bug Jon Mason
2017-02-01 23:06 ` Rafał Miłecki
2017-02-02 0:31 ` Zac Schroff
2017-02-02 20:15 ` Rafał Miłecki
2017-02-02 20:20 ` Jon Mason
2017-02-02 18:54 ` Jon Mason
2017-02-02 9:47 ` Sergei Shtylyov [this message]
2017-02-01 22:39 ` [PATCH 2/2] net: ethernet: bgmac: mac address change bug Jon Mason
2017-02-01 23:12 ` Rafał Miłecki
2017-02-02 18:13 ` Jon Mason
2017-02-02 9:49 ` Sergei Shtylyov
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=65fcc617-bc30-26b2-40d0-ba6a00687c33@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=jon.mason@broadcom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rafal@milecki.pl \
--cc=zschroff@broadcom.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).