Re: [PATCH 4/6] of: add API for changing parameters of fixed link
From: Stas Sergeev
Date: Mon Mar 30 2015 - 13:04:21 EST
30.03.2015 19:06, Florian Fainelli ÐÐÑÐÑ:
> So yes, it is a bug in the sense that it is not transparently handled,
> but at the same time, the PHY library has no way to know whether a
> fixed_link_update callback is being invoked since it is not poking
> into the fixed PHY driver.
Maybe then it would be better to have an API in fixed_phy.c itself
to change the state? No one will then care about the callback at all.
For example, currently in my new patch, when I receive the interrupt
about phy status change, I can't do anything: I can't change the state
or force the phylib to do a callback right now. So, instead of changing
the state upon interrupt, I need instead to ask HW the current state on
every poll, which is likely not effective in some regards. By having the
API that would be solved, as well as the detached device problem.
>> @@ -304,6 +310,7 @@ struct mvneta_port {
>> unsigned int link;
>> unsigned int duplex;
>> unsigned int speed;
>> + int inband_status;
> Since you are essentially using this variable as a boolean to indicate
> whether in-band status should be queried or not, maybe you should name
> that "needs_inband_status" or "wants_inband_status", inband_status
That's fine, will go for "use_inband_status:1" tomorrow.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/