lkml.org 
[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v4 2/5] net: macb: add support for sgmii MAC-PHY interface
Date
>> >Sorry, this reply doesn't answer my question.  I'm not asking about
>> >bp->speed and bp->duplex. I'm asking:
>> >1) why you are initialising bp->phy_interface here
>> >2) you to consider the impact that has on the mac_config() implementation
>> > you are proposing
>> > because I think it's buggy.
>> bp->phy_interface is to store phy mode value from device tree. This is used
>later
>> to know what phy interface user has selected for PHY-MAC. Same is used
>> to configure MAC correctly and based on your suggestion code is
>> added to handle PHY dynamically changing phy interface, in which
>> case bp->phy_interface is also updated. Though it may not be what user
>> want,
>> if phy interface is totally decided by PHY and is anyway going to be different
>> from what user has selected in DT, initializing it here doesn't make sense.
>> But in case of PHY not changing phy_interface dynamically bp-
>>phy_interface need to be initialized with value from DT.
>When phylink_start() is called, you will receive a mac_config() call to
>configure the MAC for the initial operating settings, which will include
>the current PHY interface mode. This will initially be whatever
>interface mode was passed in to phylink_create().
Yes, and same bp->phy_interface is passed to phylink_create().
We need this to know what phy interface is selected by user.

Regards,
Parshuram Thombare

\
 
 \ /
  Last update: 2019-06-24 12:33    [W:0.055 / U:33.312 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site