| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for the Renesas PHY uPD60620. |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2015 Softing Industrial Automation GmbH |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 8 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | | - * (at your option) any later version. |
|---|
| 10 | | - * |
|---|
| 11 | 6 | */ |
|---|
| 12 | 7 | |
|---|
| 13 | 8 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 47 | 42 | return phy_state; |
|---|
| 48 | 43 | |
|---|
| 49 | 44 | phydev->link = 0; |
|---|
| 50 | | - phydev->lp_advertising = 0; |
|---|
| 45 | + linkmode_zero(phydev->lp_advertising); |
|---|
| 51 | 46 | phydev->pause = 0; |
|---|
| 52 | 47 | phydev->asym_pause = 0; |
|---|
| 53 | 48 | |
|---|
| .. | .. |
|---|
| 70 | 65 | if (phy_state < 0) |
|---|
| 71 | 66 | return phy_state; |
|---|
| 72 | 67 | |
|---|
| 73 | | - phydev->lp_advertising |
|---|
| 74 | | - = mii_lpa_to_ethtool_lpa_t(phy_state); |
|---|
| 68 | + mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising, |
|---|
| 69 | + phy_state); |
|---|
| 75 | 70 | |
|---|
| 76 | | - if (phydev->duplex == DUPLEX_FULL) { |
|---|
| 77 | | - if (phy_state & LPA_PAUSE_CAP) |
|---|
| 78 | | - phydev->pause = 1; |
|---|
| 79 | | - if (phy_state & LPA_PAUSE_ASYM) |
|---|
| 80 | | - phydev->asym_pause = 1; |
|---|
| 81 | | - } |
|---|
| 71 | + phy_resolve_aneg_pause(phydev); |
|---|
| 82 | 72 | } |
|---|
| 83 | 73 | } |
|---|
| 84 | 74 | return 0; |
|---|
| .. | .. |
|---|
| 92 | 82 | .phy_id = UPD60620_PHY_ID, |
|---|
| 93 | 83 | .phy_id_mask = 0xfffffffe, |
|---|
| 94 | 84 | .name = "Renesas uPD60620", |
|---|
| 95 | | - .features = PHY_BASIC_FEATURES, |
|---|
| 85 | + /* PHY_BASIC_FEATURES */ |
|---|
| 96 | 86 | .flags = 0, |
|---|
| 97 | 87 | .config_init = upd60620_config_init, |
|---|
| 98 | 88 | .read_status = upd60620_read_status, |
|---|