netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>, David Miller <davem@davemloft.net>
Cc: Heiner Kallweit <hkallweit1@gmail.com>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v2 net-next 1/2] net: phy: mdio-gpio: Add platform_data support for phy_mask
Date: Sat, 8 Dec 2018 08:57:50 -0800	[thread overview]
Message-ID: <5ecf6243-97fb-6316-e524-7d0705e9eccc@gmail.com> (raw)
In-Reply-To: <1544281933-21959-2-git-send-email-andrew@lunn.ch>

Le 12/8/18 à 7:12 AM, Andrew Lunn a écrit :
> It is sometimes necessary to instantiate a bit-banging MDIO bus as a
> platform device, without the aid of device tree.
> 
> When device tree is being used, the bus is not scanned for devices,
> only those devices which are in device tree are probed. Without device
> tree, by default, all addresses on the bus are scanned. This may then
> find a device which is not a PHY, e.g. a switch. And the switch may
> have registers containing values which look like a PHY. So during the
> scan, a PHY device is wrongly created.
> 
> After the bus has been registered, a search is made for
> mdio_board_info structures which indicates devices on the bus, and the
> driver which should be used for them. This is typically used to
> instantiate Ethernet switches from platform drivers.  However, if the
> scanning of the bus has created a PHY device at the same location as
> indicated into the board info for a switch, the switch device is not
> created, since the address is already busy.
> 
> This can be avoided by setting the phy_mask of the mdio bus. This mask
> prevents addresses on the bus being scanned.
> 
> v2
> --
> int -> u32 in platform data structure
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

  reply	other threads:[~2018-12-08 16:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-08 15:12 [PATCH v2 net-next 0/2] platform data controls for mdio-gpio Andrew Lunn
2018-12-08 15:12 ` [PATCH v2 net-next 1/2] net: phy: mdio-gpio: Add platform_data support for phy_mask Andrew Lunn
2018-12-08 16:57   ` Florian Fainelli [this message]
2018-12-08 15:12 ` [PATCH v2 net-next 2/2] net: phy: mdio-gpio: Add phy_ignore_ta_mask to platform data Andrew Lunn
2018-12-08 16:58   ` Florian Fainelli
2018-12-08 16:59 ` [PATCH v2 net-next 0/2] platform data controls for mdio-gpio Florian Fainelli
2018-12-09  5:33 ` David Miller

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=5ecf6243-97fb-6316-e524-7d0705e9eccc@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --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 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).