Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1489926
| From | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next v2 1/3] net: ethernet: mediatek: add extension of phy-mode for TRGMII |
| Date | 2016-09-23 12:30 +0200 |
| Message-ID | <skvTY-2pQ-13@gated-at.bofh.it> (permalink) |
| References | <skawa-5IH-15@gated-at.bofh.it> <skpvb-6MX-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hello.
On 9/23/2016 6:32 AM, Sean Wang wrote:
>>> From: Sean Wang <sean.wang@mediatek.com>
>>>
>>> adds PHY-mode "trgmii" as an extension for the operation mode of the
>>> PHY interface for PHY_INTERFACE_MODE_TRGMII.
>
> .. deleted
What? Why?
>>> switch (of_get_phy_mode(np)) {
>>> + case PHY_INTERFACE_MODE_TRGMII:
>>> + mac->trgmii = true;
>>> case PHY_INTERFACE_MODE_RGMII_TXID:
>>> case PHY_INTERFACE_MODE_RGMII_RXID:
>>> case PHY_INTERFACE_MODE_RGMII_ID:
>>> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
>>> b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
>>> index 7c5e534..e3b9525 100644
>>> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
>>> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
>>> @@ -529,6 +529,8 @@ struct mtk_eth {
>>> * @hw: Backpointer to our main datastruture
>>> * @hw_stats: Packet statistics counter
>>> * @phy_dev: The attached PHY if available
>>> + * @trgmii Indicate if the MAC uses TRGMII connected to internal
>>> + switch
>>> */
>>> struct mtk_mac {
>>> int id;
>>> @@ -539,6 +541,7 @@ struct mtk_mac {
>>> struct phy_device *phy_dev;
>>> __be32 hwlro_ip[MTK_MAX_LRO_IP_CNT];
>>> int hwlro_ip_cnt;
>>> + bool trgmii;
>>
>> I don't see where this is used.
>
> I set trgmii as below
> switch (of_get_phy_mode(np)) {
> case PHY_INTERFACE_MODE_TRGMII:
> mac->trgmii = true;
> case PHY_INTERFACE_MODE_RGMII_TXID:
You only set it in this patch but don't check it, so this is essentially a
NOP. It only gets checked in another patch...
>> [...]
>>> diff --git a/include/linux/phy.h b/include/linux/phy.h index
>>> 2d24b28..e25f183 100644
>>> --- a/include/linux/phy.h
>>> +++ b/include/linux/phy.h
>>> @@ -80,6 +80,7 @@ typedef enum {
>>> PHY_INTERFACE_MODE_XGMII,
>>> PHY_INTERFACE_MODE_MOCA,
>>> PHY_INTERFACE_MODE_QSGMII,
>>> + PHY_INTERFACE_MODE_TRGMII,
>>> PHY_INTERFACE_MODE_MAX,
>>> } phy_interface_t;
>>>
>>> @@ -123,6 +124,8 @@ static inline const char *phy_modes(phy_interface_t interface)
>>> return "moca";
>>> case PHY_INTERFACE_MODE_QSGMII:
>>> return "qsgmii";
>>> + case PHY_INTERFACE_MODE_TRGMII:
>>> + return "trgmii";
>>> default:
>>> return "unknown";
>>> }
>>
>> I think this should be done in a separate phylib patch.
>
> this patch is applied, so I am so little confused how to do this.
Right, it's too late now.
MBR, Sergei
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next v2 0/3] add support for RGMII on GMAC0 through TRGMII hardware module <sean.wang@mediatek.com> - 2016-09-22 04:40 +0200
[PATCH net-next v2 1/3] net: ethernet: mediatek: add extension of phy-mode for TRGMII <sean.wang@mediatek.com> - 2016-09-22 04:40 +0200
Re: [PATCH net-next v2 1/3] net: ethernet: mediatek: add extension of phy-mode for TRGMII Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-09-22 13:40 +0200
Re: [PATCH net-next v2 1/3] net: ethernet: mediatek: add extension of phy-mode for TRGMII Sean Wang <sean.wang@mediatek.com> - 2016-09-23 05:40 +0200
Re: [PATCH net-next v2 1/3] net: ethernet: mediatek: add extension of phy-mode for TRGMII Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-09-23 12:30 +0200
[PATCH net-next v2 3/3] net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0 <sean.wang@mediatek.com> - 2016-09-22 04:40 +0200
Re: [PATCH net-next v2 3/3] net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0 Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-09-22 13:30 +0200
Re: [PATCH net-next v2 3/3] net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0 Sean Wang <sean.wang@mediatek.com> - 2016-09-22 17:30 +0200
[PATCH net-next v2 2/3] net: ethernet: mediatek: add support for GMAC0 connecting with external PHY through TRGMII <sean.wang@mediatek.com> - 2016-09-22 04:40 +0200
Re: [PATCH net-next v2 0/3] add support for RGMII on GMAC0 through TRGMII hardware module Florian Fainelli <f.fainelli@gmail.com> - 2016-09-22 05:20 +0200
Re: [PATCH net-next v2 0/3] add support for RGMII on GMAC0 through TRGMII hardware module David Miller <davem@davemloft.net> - 2016-09-22 14:30 +0200
Re: [PATCH net-next v2 0/3] add support for RGMII on GMAC0 through TRGMII hardware module Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-09-22 19:10 +0200
Re: [PATCH net-next v2 0/3] add support for RGMII on GMAC0 through TRGMII hardware module David Miller <davem@davemloft.net> - 2016-09-23 02:20 +0200
Re: [PATCH net-next v2 0/3] add support for RGMII on GMAC0 through TRGMII hardware module Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-09-23 12:30 +0200
csiph-web