netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: David Miller <davem@davemloft.net>,
	zambrano@broadcom.com, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/8] b44: rename B44_PHY_ADDR_NO_PHY to B44_PHY_ADDR_NO_LOCAL_PHY
Date: Thu, 19 Dec 2013 02:21:08 +0100	[thread overview]
Message-ID: <52B24A04.4000805@hauke-m.de> (raw)
In-Reply-To: <CAGVrzcb0gZxpyiRNAi48u8MnCRzwBDO3HwpTPPWYkuMdQe5q_w@mail.gmail.com>

On 12/16/2013 07:40 PM, Florian Fainelli wrote:
> 2013/12/15 Hauke Mehrtens <hauke@hauke-m.de>:
>> The PHY address 30 means there is no local PHY, but there could be an
>> external PHY like a switch connected via MII. This is the case on most
>> embedded home routers where this driver is used.
> 
> Looking at this some more, I do not think the b44 driver was always
> clear that (at least in  Broadcom terminology):
> 
> - address 0 is a "special" broadcast MDIO address to make Roboswitch
> devices act as standard PHYs such that you could read the MII_PHYSID1
> and MII_PHYSID2 registers and determine if that is a switch or a PHY
> - address 30 is the switch pseudo-PHY address through which all
> switch-specifc settings must be routed from/to
> 
> So saying that address 30 means no "external PHY" is sort of correct,
> although not quite. Hopefully the remaining patches try to remove that
> ambiguity.

After all these patches B44_PHY_ADDR_NO_LOACL_PHY is not used any more
by b44.

The external interface was only activated when the register which will
not be used indicated that there is no internal phy.

>>
>> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
>> ---
>>  drivers/net/ethernet/broadcom/b44.c |    2 +-
>>  drivers/net/ethernet/broadcom/b44.h |    6 +++---
>>  2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
>> index 3c7909e..fce36dd 100644
>> --- a/drivers/net/ethernet/broadcom/b44.c
>> +++ b/drivers/net/ethernet/broadcom/b44.c
>> @@ -2237,7 +2237,7 @@ static int b44_init_one(struct ssb_device *sdev,
>>
>>         /* do a phy reset to test if there is an active phy */
>>         if (b44_phy_reset(bp) < 0)
>> -               bp->phy_addr = B44_PHY_ADDR_NO_PHY;
>> +               bp->phy_addr = B44_PHY_ADDR_NO_LOACL_PHY;
>>
>>         netdev_info(dev, "%s %pM\n", DRV_DESCRIPTION, dev->dev_addr);
>>
>> diff --git a/drivers/net/ethernet/broadcom/b44.h b/drivers/net/ethernet/broadcom/b44.h
>> index 8ed7d6b..ade80d6 100644
>> --- a/drivers/net/ethernet/broadcom/b44.h
>> +++ b/drivers/net/ethernet/broadcom/b44.h
>> @@ -280,9 +280,9 @@ struct ring_info {
>>         dma_addr_t      mapping;
>>  };
>>
>> -#define B44_MCAST_TABLE_SIZE   32
>> -#define B44_PHY_ADDR_NO_PHY    30
>> -#define B44_MDC_RATIO          5000000
>> +#define B44_MCAST_TABLE_SIZE           32
>> +#define B44_PHY_ADDR_NO_LOACL_PHY      30 /* no local phy regs */
>> +#define B44_MDC_RATIO                  5000000
>>
>>  #define        B44_STAT_REG_DECLARE            \
>>         _B44(tx_good_octets)            \
>> --
>> 1.7.10.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 

  reply	other threads:[~2013-12-19  1:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15 18:41 [PATCH 0/8] b44: add support for external PHY Hauke Mehrtens
2013-12-15 18:41 ` [PATCH 1/8] b44: cheek register instead of PHY address to detect " Hauke Mehrtens
2013-12-15 20:04   ` Sergei Shtylyov
2013-12-15 18:41 ` [PATCH 2/8] b44: rename B44_PHY_ADDR_NO_PHY to B44_PHY_ADDR_NO_LOCAL_PHY Hauke Mehrtens
2013-12-16 15:51   ` Ben Hutchings
2013-12-16 18:40   ` Florian Fainelli
2013-12-19  1:21     ` Hauke Mehrtens [this message]
2013-12-15 18:42 ` [PATCH 3/8] b44: abort when no PHY is available at all Hauke Mehrtens
2013-12-15 18:42 ` [PATCH 4/8] b44: rename b44_mii_{read,write} to b44_mdio_{read,write}_mii Hauke Mehrtens
2013-12-15 18:42 ` [PATCH 5/8] b44: add phylib support Hauke Mehrtens
2013-12-15 18:42 ` [PATCH 6/8] b44: activate PHY when MAC is off Hauke Mehrtens
2013-12-15 18:42 ` [PATCH 7/8] b44: do not set PHY address to 30 for every ext PHY Hauke Mehrtens
2013-12-15 18:42 ` [PATCH 8/8] b44: add dummy PHY device if we do not find any Hauke Mehrtens
2013-12-15 21:26   ` Florian Fainelli
2013-12-15 23:31     ` Hauke Mehrtens
2013-12-16  3:42       ` Florian Fainelli
2013-12-15 21:26 ` [PATCH 0/8] b44: add support for external PHY Florian Fainelli

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=52B24A04.4000805@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=zambrano@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).