hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/net/phy/uPD60620.c
....@@ -1,13 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Driver for the Renesas PHY uPD60620.
34 *
45 * 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
- *
116 */
127
138 #include <linux/kernel.h>
....@@ -47,7 +42,7 @@
4742 return phy_state;
4843
4944 phydev->link = 0;
50
- phydev->lp_advertising = 0;
45
+ linkmode_zero(phydev->lp_advertising);
5146 phydev->pause = 0;
5247 phydev->asym_pause = 0;
5348
....@@ -70,15 +65,10 @@
7065 if (phy_state < 0)
7166 return phy_state;
7267
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);
7570
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);
8272 }
8373 }
8474 return 0;
....@@ -92,7 +82,7 @@
9282 .phy_id = UPD60620_PHY_ID,
9383 .phy_id_mask = 0xfffffffe,
9484 .name = "Renesas uPD60620",
95
- .features = PHY_BASIC_FEATURES,
85
+ /* PHY_BASIC_FEATURES */
9686 .flags = 0,
9787 .config_init = upd60620_config_init,
9888 .read_status = upd60620_read_status,