developer | d6c38c2 | 2022-07-01 08:37:26 +0800 | [diff] [blame] | 1 | diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c |
| 2 | index 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) |
developer | d7641da | 2023-02-24 13:56:03 +0800 | [diff] [blame] | 13 | @@ -268,17 +268,6 @@ static int aqr_read_status(struct phy_device *phydev) |
| 14 | return genphy_c45_read_status(phydev); |
| 15 | } |
| 16 | |
| 17 | -static int aqr107_read_downshift_event(struct phy_device *phydev) |
| 18 | -{ |
| 19 | - int val; |
| 20 | - |
| 21 | - val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_AN_TX_VEND_INT_STATUS1); |
| 22 | - if (val < 0) |
| 23 | - return val; |
| 24 | - |
| 25 | - return !!(val & MDIO_AN_TX_VEND_INT_STATUS1_DOWNSHIFT); |
| 26 | -} |
| 27 | - |
| 28 | static int aqr107_read_rate(struct phy_device *phydev) |
| 29 | { |
| 30 | int val; |
| 31 | @@ -353,13 +342,7 @@ static int aqr107_read_status(struct phy_device *phydev) |
developer | c7f3c9a | 2022-11-30 09:13:46 +0800 | [diff] [blame] | 32 | break; |
| 33 | } |
| 34 | |
developer | d7641da | 2023-02-24 13:56:03 +0800 | [diff] [blame] | 35 | - val = aqr107_read_downshift_event(phydev); |
| 36 | - if (val <= 0) |
| 37 | - return val; |
| 38 | - |
| 39 | - phydev_warn(phydev, "Downshift occurred! Cabling may be defective.\n"); |
| 40 | - |
| 41 | - /* Read downshifted rate from vendor register */ |
| 42 | + /* Read possibly downshifted rate from vendor register */ |
| 43 | return aqr107_read_rate(phydev); |
| 44 | } |
| 45 | |
| 46 | @@ -500,9 +483,6 @@ static int aqr107_config_init(struct phy_device *phydev) |
| 47 | if (!ret) |
| 48 | aqr107_chip_info(phydev); |
| 49 | |
| 50 | - /* ensure that a latched downshift event is cleared */ |
| 51 | - aqr107_read_downshift_event(phydev); |
| 52 | - |
| 53 | return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT); |
| 54 | } |
| 55 | |
| 56 | @@ -527,9 +507,6 @@ static int aqcs109_config_init(struct phy_device *phydev) |
| 57 | if (ret) |
| 58 | return ret; |
| 59 | |
| 60 | - /* ensure that a latched downshift event is cleared */ |
| 61 | - aqr107_read_downshift_event(phydev); |
| 62 | - |
| 63 | return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT); |
| 64 | } |
| 65 | |
developer | d6c38c2 | 2022-07-01 08:37:26 +0800 | [diff] [blame] | 66 | @@ -695,6 +696,24 @@ static struct phy_driver aqr_driver[] = { |
| 67 | .ack_interrupt = aqr_ack_interrupt, |
| 68 | .read_status = aqr_read_status, |
| 69 | }, |
| 70 | +{ |
| 71 | + PHY_ID_MATCH_MODEL(PHY_ID_AQR113C), |
| 72 | + .name = "Aquantia AQR113C", |
| 73 | + .probe = aqr107_probe, |
| 74 | + .config_init = aqr107_config_init, |
| 75 | + .config_aneg = aqr_config_aneg, |
| 76 | + .config_intr = aqr_config_intr, |
| 77 | + .ack_interrupt = aqr_ack_interrupt, |
| 78 | + .read_status = aqr107_read_status, |
| 79 | + .get_tunable = aqr107_get_tunable, |
| 80 | + .set_tunable = aqr107_set_tunable, |
| 81 | + .suspend = aqr107_suspend, |
| 82 | + .resume = aqr107_resume, |
| 83 | + .get_sset_count = aqr107_get_sset_count, |
| 84 | + .get_strings = aqr107_get_strings, |
| 85 | + .get_stats = aqr107_get_stats, |
| 86 | + .link_change_notify = aqr107_link_change_notify, |
| 87 | +}, |
| 88 | }; |
| 89 | |
| 90 | module_phy_driver(aqr_driver); |
| 91 | @@ -707,6 +726,7 @@ static struct mdio_device_id __maybe_unused aqr_tbl[] = { |
| 92 | { PHY_ID_MATCH_MODEL(PHY_ID_AQR107) }, |
| 93 | { PHY_ID_MATCH_MODEL(PHY_ID_AQCS109) }, |
| 94 | { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) }, |
| 95 | + { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) }, |
| 96 | { } |
| 97 | }; |
| 98 | |