Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1610345
| From | Sean Wang <sean.wang@mediatek.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch |
| Date | 2017-03-28 08:10 +0200 |
| Message-ID | <tpSum-3pJ-17@gated-at.bofh.it> (permalink) |
| References | <tnoqJ-1qQ-3@gated-at.bofh.it> <tnoqJ-1qQ-1@gated-at.bofh.it> <toy4G-2Fu-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Andrew,
Add comment as below inline
On Fri, 2017-03-24 at 15:02 +0100, Andrew Lunn wrote:
> Hi Sean
>
> > + regmap = devm_regmap_init(ds->dev, NULL, priv,
> > + &mt7530_regmap_config);
> > + if (IS_ERR(regmap))
> > + dev_warn(priv->dev, "phy regmap initialization failed");
> > +
>
> Shouldn't this be a fatal error? If you keep going when there is an
> error, what happens when you actually try to use the regmap?
>
Initial thought is that it is just for debugging purpose so if it fails,
it should break any functionality of switch and only have implication as
a warning message.
Anyway, i will remove it in the next one since it seems better being
kept in private place as you suggested in the previous mail.
> > + phy_mode = of_get_phy_mode(ds->ports[ds->dst->cpu_port].dn);
> > + if (phy_mode < 0) {
> > + dev_err(priv->dev, "Can't find phy-mode for master device\n");
> > + return phy_mode;
> > + }
> > + dev_info(priv->dev, "phy-mode for master device = %x\n", phy_mode);
>
> dev_dbg?
>
Sorry. i forgot turned it into dev_dbg
> > +
> > + id = mt7530_read(priv, MT7530_CREV);
> > + id >>= CHIP_NAME_SHIFT;
> > + if (id != MT7530_ID)
> > + return -ENODEV;
>
> It might be helpful to say what ID has been found, if it is not the
> supported ID.
I will fix it up to make users know what was going on
thanks for taking your time on those reviewing again!
> Andrew
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next v2 0/5] net-next: dsa: add Mediatek MT7530 support <sean.wang@mediatek.com> - 2017-03-21 10:40 +0100
[PATCH net-next v2 1/5] dt-bindings: net: dsa: add Mediatek MT7530 binding <sean.wang@mediatek.com> - 2017-03-21 10:40 +0100
Re: [PATCH net-next v2 1/5] dt-bindings: net: dsa: add Mediatek MT7530 binding Rob Herring <robh@kernel.org> - 2017-03-24 17:20 +0100
[PATCH net-next v2 3/5] net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA <sean.wang@mediatek.com> - 2017-03-21 10:50 +0100
Re: [PATCH net-next v2 3/5] net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA Andrew Lunn <andrew@lunn.ch> - 2017-03-22 18:50 +0100
Re: [PATCH net-next v2 3/5] net-next: ethernet: mediatek: add CDM able to recognize the tag for DSA Florian Fainelli <f.fainelli@gmail.com> - 2017-03-22 19:30 +0100
[PATCH net-next v2 4/5] net-next: ethernet: mediatek: add device_node of GMAC pointing into the netdev instance <sean.wang@mediatek.com> - 2017-03-21 10:50 +0100
Re: [PATCH net-next v2 4/5] net-next: ethernet: mediatek: add device_node of GMAC pointing into the netdev instance Andrew Lunn <andrew@lunn.ch> - 2017-03-22 19:20 +0100
Re: [PATCH net-next v2 4/5] net-next: ethernet: mediatek: add device_node of GMAC pointing into the netdev instance Florian Fainelli <f.fainelli@gmail.com> - 2017-03-22 19:30 +0100
[PATCH net-next v2 2/5] net-next: dsa: add Mediatek tag RX/TX handler <sean.wang@mediatek.com> - 2017-03-21 10:50 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Florian Fainelli <f.fainelli@gmail.com> - 2017-03-22 19:40 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Sean Wang <sean.wang@mediatek.com> - 2017-03-28 08:00 +0200
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Andrew Lunn <andrew@lunn.ch> - 2017-03-22 19:40 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Andrew Lunn <andrew@lunn.ch> - 2017-03-23 08:50 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Sean Wang <sean.wang@mediatek.com> - 2017-03-23 09:10 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Felix Fietkau <nbd@nbd.name> - 2017-03-23 15:10 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch John Crispin <john@phrozen.org> - 2017-03-23 15:30 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Felix Fietkau <nbd@nbd.name> - 2017-03-23 15:40 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Andrew Lunn <andrew@lunn.ch> - 2017-03-24 09:00 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Andrew Lunn <andrew@lunn.ch> - 2017-03-24 15:10 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Sean Wang <sean.wang@mediatek.com> - 2017-03-28 08:10 +0200
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Andrew Lunn <andrew@lunn.ch> - 2017-03-24 15:30 +0100
Re: [PATCH net-next v2 5/5] net-next: dsa: add dsa support for Mediatek MT7530 switch Sean Wang <sean.wang@mediatek.com> - 2017-03-28 09:00 +0200
csiph-web