blob: 8d01cab9c6561ba16122a83b3565f885ccb7aa7e [file] [log] [blame]
developerd6c38c22022-07-01 08:37:26 +08001diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c
2index 75d8351..ac8dd8e 100644
3--- a/drivers/net/phy/aquantia_main.c
4+++ b/drivers/net/phy/aquantia_main.c
5@@ -22,6 +22,7 @@
6 #define PHY_ID_AQR107 0x03a1b4e0
7 #define PHY_ID_AQCS109 0x03a1b5c2
8 #define PHY_ID_AQR405 0x03a1b4b0
9+#define PHY_ID_AQR113C 0x31c31c12
10
11 #define MDIO_PHYXS_VEND_IF_STATUS 0xe812
12 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
developerc7f3c9a2022-11-30 09:13:46 +080013@@ -352,6 +352,13 @@ static int aqr107_read_status(struct phy_device *phydev)
14 break;
15 }
16
17+ /* Handle the case when the link speed is unknown */
18+ if (phydev->speed == SPEED_UNKNOWN) {
19+ val = aqr107_read_rate(phydev);
20+ if (val < 0)
21+ return val;
22+ }
23+
24 val = aqr107_read_downshift_event(phydev);
25 if (val <= 0)
26 return val;
developerd6c38c22022-07-01 08:37:26 +080027@@ -695,6 +696,24 @@ static struct phy_driver aqr_driver[] = {
28 .ack_interrupt = aqr_ack_interrupt,
29 .read_status = aqr_read_status,
30 },
31+{
32+ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C),
33+ .name = "Aquantia AQR113C",
34+ .probe = aqr107_probe,
35+ .config_init = aqr107_config_init,
36+ .config_aneg = aqr_config_aneg,
37+ .config_intr = aqr_config_intr,
38+ .ack_interrupt = aqr_ack_interrupt,
39+ .read_status = aqr107_read_status,
40+ .get_tunable = aqr107_get_tunable,
41+ .set_tunable = aqr107_set_tunable,
42+ .suspend = aqr107_suspend,
43+ .resume = aqr107_resume,
44+ .get_sset_count = aqr107_get_sset_count,
45+ .get_strings = aqr107_get_strings,
46+ .get_stats = aqr107_get_stats,
47+ .link_change_notify = aqr107_link_change_notify,
48+},
49 };
50
51 module_phy_driver(aqr_driver);
52@@ -707,6 +726,7 @@ static struct mdio_device_id __maybe_unused aqr_tbl[] = {
53 { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) },
54 { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) },
55 { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
56+ { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
57 { }
58 };
59