lkml.org 
[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 4/7] net: stmmac: introducing support for DWC xPCS logics
Date
>-----Original Message-----
>From: Andrew Lunn [mailto:andrew@lunn.ch]
>Sent: Thursday, April 25, 2019 11:21 AM
>To: Ong, Boon Leong <boon.leong.ong@intel.com>
>Cc: David S. Miller <davem@davemloft.net>; netdev@vger.kernel.org; linux-
>kernel@vger.kernel.org; Kweh, Hock Leong <hock.leong.kweh@intel.com>;
>Voon, Weifeng <weifeng.voon@intel.com>
>Subject: Re: [PATCH 4/7] net: stmmac: introducing support for DWC xPCS
>logics
>
>> >> +/* MII MMD AN Status defines for C37 AN SGMII Status */
>> >> +#define AN_STAT_C37_AN_CMPLT BIT(0) /* AN
>Complete Intr */
>> >> +#define AN_STAT_C37_AN_FD BIT(1) /* Full Duplex */
>> >> +#define AN_STAT_C37_AN_SPEED_SHIFT 2 /* AN Speed shift */
>> >> +#define AN_STAT_C37_AN_SPEED GENMASK(3, 2) /* AN
>Speed */
>> >> +#define AN_STAT_C37_AN_10MBPS 0x0 /* 10 Mbps */
>> >> +#define AN_STAT_C37_AN_100MBPS 0x1 /* 100 Mbps
>> >*/
>> >> +#define AN_STAT_C37_AN_1000MBPS 0x2 /* 1000 Mbps
>> >*/
>> >> +#define AN_STAT_C37_AN_LNKSTS BIT(4) /* Link Status
>*/
>> >
>> >Is these are standardized, not proprietary, consider adding them to
>> >include/uapi/linux/mii.h so similar.
>>
>> Yeah, it does look very standardized. However, per DW spec, they are
>> vendor-specific register set which uses MDIO_MMD_VEND2 to access.
>
>Maybe you can go get the 802.3 standard and check section 37. If these
>registers are the same, they could still be placed in mii.h. What MMD
>you use is a different matter.
>
I cross-checked on 802.3 section 37.2.5.1 Management registers, the spec only
talks about BMSR and extended status. I also checked on 802.3 section 45.2
MDIO interface registers, section 45.2.7 AN registers, section 45.2.9 &
45.2.10 Vendor specific MMD1 & MMD2, there are no field format that
matches the above bit fields. So, it should be reasonable to park these #defines
in this local file for now.

Thanks.
Boon Leong

\
 
 \ /
  Last update: 2019-04-25 08:52    [W:0.079 / U:2.972 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site