In the early days of phylib we had a functionality that changed to the next lower speed in fixed mode if no link was established after a certain period of time. This functionality has been removed years ago, and state PHY_FORCING isn't needed any longer. Instead we can go from UP to RUNNING or NOLINK directly (same as in autoneg mode).
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -297,12 +297,6 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr); · 296 unmodified lines | ||
| 297 | 297 | * - irq or timer will set RUNNING if link comes back |
| 298 | 298 | * - phy_stop moves to HALTED |
| 299 | 299 | * |
| 300 | − * FORCING: PHY is being configured with forced settings | |
| 301 | − * - if link is up, move to RUNNING | |
| 302 | − * - If link is down, we drop to the next highest setting, and | |
| 303 | − * retry (FORCING) after a timeout | |
| 304 | − * - phy_stop moves to HALTED | |
| 305 | − * | |
| 306 | 300 | * RUNNING: PHY is currently up, running, and possibly sending |
| 307 | 301 | * and/or receiving packets |
| 308 | 302 | * - irq or timer will set NOLINK if link goes down |
| @@ -319,7 +313,6 @@ enum phy_state { · 10 unmodified lines | ||
| 319 | 313 | PHY_UP, |
| 320 | 314 | PHY_RUNNING, |
| 321 | 315 | PHY_NOLINK, |
| 322 | − PHY_FORCING, | |
| 323 | 316 | }; |
| 324 | 317 | |
| 325 | 318 | /** |
| @@ -347,8 +340,6 @@ struct phy_c45_device_ids { · 21 unmodified lines | ||
| 347 | 340 | * loopback_enabled: Set true if this phy has been loopbacked successfully. |
| 348 | 341 | * state: state of the PHY for management purposes |
| 349 | 342 | * dev_flags: Device-specific flags used by the PHY driver. |
| 350 | − * link_timeout: The number of timer firings to wait before the | |
| 351 | − * giving up on the current attempt at acquiring a link | |
| 352 | 343 | * irq: IRQ number of the PHY's interrupt (-1 if none) |
| 353 | 344 | * phy_timer: The timer for handling the state machine |
| 354 | 345 | * attached_dev: The attached enet driver's device instance ptr |
| @@ -416,8 +407,6 @@ struct phy_device { · 61 unmodified lines | ||
| 416 | 407 | /* Energy efficient ethernet modes which should be prohibited */ |
| 417 | 408 | u32 eee_broken_modes; |
| 418 | 409 | |
| 419 | − int link_timeout; | |
| 420 | − | |
| 421 | 410 | #ifdef CONFIG_LED_TRIGGER_PHY |
| 422 | 411 | struct phy_led_trigger *phy_led_triggers; |
| 423 | 412 | unsigned int phy_num_led_triggers; |