Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1422372
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add addressing mode to info |
| Date | 2016-06-15 00:10 +0200 |
| Message-ID | <rK4GZ-2lJ-1@gated-at.bofh.it> (permalink) |
| References | <rK1pL-88-3@gated-at.bofh.it> <rK1pM-88-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jun 14, 2016 at 02:31:53PM -0400, Vivien Didelot wrote:
> When the SMI address of the switch chip on the SMI master bus is not
> zero, some chips (e.g. 88E6352) use an indirect access through two SMI
> Command and Data registers, while others (e.g. 88E6060) still use a
> direct access.
>
> Add a capability flag to describe chips supporting the Multi-chip
> Addressing Mode.
>
> Use the SMI indirect access ops only for switches with this flag and
> change the direct SMI direct access ops to support non-zero chip
> address.
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
> ---
> drivers/net/dsa/mv88e6xxx.c | 6 +++---
> drivers/net/dsa/mv88e6xxx.h | 16 +++++++++++++++-
> 2 files changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
> index fc28a6c..8e12246 100644
> --- a/drivers/net/dsa/mv88e6xxx.c
> +++ b/drivers/net/dsa/mv88e6xxx.c
> @@ -52,7 +52,7 @@ static int mv88e6xxx_smi_direct_read(struct mii_bus *bus, int sw_addr,
> {
> int ret;
>
> - ret = mdiobus_read_nested(bus, addr, reg);
> + ret = mdiobus_read_nested(bus, sw_addr + addr, reg);
> if (ret < 0)
> return ret;
If we are doing direct access, doesn't it means sw_addr is 0?
So isn't this pointless?
Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add addressing mode to info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-14 20:40 +0200
Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add addressing mode to info Andrew Lunn <andrew@lunn.ch> - 2016-06-14 23:40 +0200
Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add addressing mode to info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-15 00:00 +0200
Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add addressing mode to info Andrew Lunn <andrew@lunn.ch> - 2016-06-15 00:10 +0200
Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add addressing mode to info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-15 00:30 +0200
Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add addressing mode to info Andrew Lunn <andrew@lunn.ch> - 2016-06-15 00:50 +0200
Re: [PATCH v2 net-next v2 12/12] net: dsa: mv88e6xxx: add addressing mode to info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-06-15 01:20 +0200
csiph-web