From: Beniamino Galvani <b.galvani@gmail.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: peter.maydell@linaro.org, nathan.rossi@xilinx.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH target-arm v1 1/1] net: cadence_gem: Make phy respond to broadcast
Date: Wed, 9 Apr 2014 22:01:17 +0200 [thread overview]
Message-ID: <20140409200007.GA794@gmail.com> (raw)
In-Reply-To: <6f4d53b04ddbfb19895bfb61a595e69f1c08859a.1396594056.git.peter.crosthwaite@xilinx.com>
On Thu, Apr 03, 2014 at 11:55:19PM -0700, Peter Crosthwaite wrote:
> Phys must respond to address 0 by specification. Implement.
>
> Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---
>
> hw/net/cadence_gem.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
> index 92dc2f2..e34b25e 100644
> --- a/hw/net/cadence_gem.c
> +++ b/hw/net/cadence_gem.c
> @@ -1093,7 +1093,7 @@ static uint64_t gem_read(void *opaque, hwaddr offset, unsigned size)
> uint32_t phy_addr, reg_num;
>
> phy_addr = (retval & GEM_PHYMNTNC_ADDR) >> GEM_PHYMNTNC_ADDR_SHFT;
> - if (phy_addr == BOARD_PHY_ADDRESS) {
> + if (phy_addr == BOARD_PHY_ADDRESS || phy_addr == 0) {
> reg_num = (retval & GEM_PHYMNTNC_REG) >> GEM_PHYMNTNC_REG_SHIFT;
> retval &= 0xFFFF0000;
> retval |= gem_phy_read(s, reg_num);
> @@ -1193,7 +1193,7 @@ static void gem_write(void *opaque, hwaddr offset, uint64_t val,
> uint32_t phy_addr, reg_num;
>
> phy_addr = (val & GEM_PHYMNTNC_ADDR) >> GEM_PHYMNTNC_ADDR_SHFT;
> - if (phy_addr == BOARD_PHY_ADDRESS) {
> + if (phy_addr == BOARD_PHY_ADDRESS || phy_addr == 0) {
> reg_num = (val & GEM_PHYMNTNC_REG) >> GEM_PHYMNTNC_REG_SHIFT;
> gem_phy_write(s, reg_num, val);
> }
Although 802.3 standard dictates that PHYs must always respond to
address 0, AFAIK not all PHYs do this.
In this case, if the Marvell PHY complies with standard:
Reviewed-by: Beniamino Galvani <b.galvani@gmail.com>
prev parent reply other threads:[~2014-04-09 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 6:55 [Qemu-devel] [PATCH target-arm v1 1/1] net: cadence_gem: Make phy respond to broadcast Peter Crosthwaite
2014-04-09 1:06 ` Peter Crosthwaite
2014-04-09 20:01 ` Beniamino Galvani [this message]
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=20140409200007.GA794@gmail.com \
--to=b.galvani@gmail.com \
--cc=nathan.rossi@xilinx.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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.