lkml.org 
[lkml]   [2015]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/6] of: add API for changing parameters of fixed link
27.03.2015 18:41, Florian Fainelli пишет:
> 2015-03-27 6:37 GMT-07:00 Stas Sergeev <stsp@list.ru>:
>>
>> The following API is added:
>> - of_phy_fixed_link_set_link() allows to set link state (up/down)
>> - of_phy_fixed_link_set_speed() allows to set link speed
>> - of_phy_fixed_link_set_duplex() allows to enable/disable duplex
>>
>> This API is needed when the MDIO-less link have some other means
>> of a status passing to MAC, for example with in-band data (SGMII).
>> MAC driver can then use that API to update the PHY status.
>
> I do not think any of these changes are required, if you look at
> drivers/net/dsa/bcm_sf2.c, there is a fixed_link_update callback to
> re-act to link up/down interrupts (but this could easily be extended
> to speed/duplex as well), by directly modifying a fixed_phy_status
> structure.
>
> Can you try that approach in mvneta?
Just to make sure I properly understand what you want.
drivers/net/dsa/bcm_sf2.c registers the .fixed_link_update callback
of struct dsa_switch_driver, which is later called from net/dsa/slave.c's
dsa_slave_fixed_link_update().
Do you want mvneta to register a similar callback in of_mdio, instead
of adding an explicit state-updating functions? Something like
of_phy_fixed_link_set_update_callback()?
This will remove a few changes indeed, but perhaps not too much.
Please confirm if this is exactly what you want, and then I try.


\
 
 \ /
  Last update: 2015-03-27 17:21    [W:1.444 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site