Skip to content

Commit 899a3cb

Browse files
hkallweitdavem330
authored andcommitted
net: phy: remove states PHY_STARTING and PHY_PENDING
Both states aren't used. Most likely they result from an idea that never materialized. So remove them. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b08794a commit 899a3cb

File tree

2 files changed

+2
-27
lines changed

2 files changed

+2
-27
lines changed

drivers/net/phy/phy.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ static const char *phy_state_to_str(enum phy_state st)
4646
{
4747
switch (st) {
4848
PHY_STATE_STR(DOWN)
49-
PHY_STATE_STR(STARTING)
5049
PHY_STATE_STR(READY)
51-
PHY_STATE_STR(PENDING)
5250
PHY_STATE_STR(UP)
5351
PHY_STATE_STR(RUNNING)
5452
PHY_STATE_STR(NOLINK)
@@ -852,9 +850,6 @@ void phy_start(struct phy_device *phydev)
852850
mutex_lock(&phydev->lock);
853851

854852
switch (phydev->state) {
855-
case PHY_STARTING:
856-
phydev->state = PHY_PENDING;
857-
break;
858853
case PHY_READY:
859854
phydev->state = PHY_UP;
860855
break;
@@ -902,9 +897,7 @@ void phy_state_machine(struct work_struct *work)
902897

903898
switch (phydev->state) {
904899
case PHY_DOWN:
905-
case PHY_STARTING:
906900
case PHY_READY:
907-
case PHY_PENDING:
908901
break;
909902
case PHY_UP:
910903
needs_aneg = true;

include/linux/phy.h

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -270,29 +270,13 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr);
270270
* DOWN: PHY device and driver are not ready for anything. probe
271271
* should be called if and only if the PHY is in this state,
272272
* given that the PHY device exists.
273-
* - PHY driver probe function will, depending on the PHY, set
274-
* the state to STARTING or READY
275-
*
276-
* STARTING: PHY device is coming up, and the ethernet driver is
277-
* not ready. PHY drivers may set this in the probe function.
278-
* If they do, they are responsible for making sure the state is
279-
* eventually set to indicate whether the PHY is UP or READY,
280-
* depending on the state when the PHY is done starting up.
281-
* - PHY driver will set the state to READY
282-
* - start will set the state to PENDING
273+
* - PHY driver probe function will set the state to READY
283274
*
284275
* READY: PHY is ready to send and receive packets, but the
285276
* controller is not. By default, PHYs which do not implement
286-
* probe will be set to this state by phy_probe(). If the PHY
287-
* driver knows the PHY is ready, and the PHY state is STARTING,
288-
* then it sets this STATE.
277+
* probe will be set to this state by phy_probe().
289278
* - start will set the state to UP
290279
*
291-
* PENDING: PHY device is coming up, but the ethernet driver is
292-
* ready. phy_start will set this state if the PHY state is
293-
* STARTING.
294-
* - PHY driver will set the state to UP when the PHY is ready
295-
*
296280
* UP: The PHY and attached device are ready to do work.
297281
* Interrupts should be started here.
298282
* - timer moves to NOLINK or RUNNING
@@ -329,9 +313,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr);
329313
*/
330314
enum phy_state {
331315
PHY_DOWN = 0,
332-
PHY_STARTING,
333316
PHY_READY,
334-
PHY_PENDING,
335317
PHY_UP,
336318
PHY_RUNNING,
337319
PHY_NOLINK,

0 commit comments

Comments
 (0)