.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* Applied Micro X-Gene SoC Ethernet Driver |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright (c) 2014, Applied Micro Circuits Corporation |
---|
4 | 5 | * Authors: Iyappan Subramanian <isubramanian@apm.com> |
---|
5 | 6 | * Ravi Patel <rapatel@apm.com> |
---|
6 | 7 | * Keyur Chudgar <kchudgar@apm.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify it |
---|
9 | | - * under the terms of the GNU General Public License as published by the |
---|
10 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
11 | | - * option) any later version. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | | - * |
---|
18 | | - * You should have received a copy of the GNU General Public License |
---|
19 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
20 | 8 | */ |
---|
21 | 9 | |
---|
22 | 10 | #include "xgene_enet_main.h" |
---|
.. | .. |
---|
724 | 712 | udelay(5); |
---|
725 | 713 | } else { |
---|
726 | 714 | #ifdef CONFIG_ACPI |
---|
727 | | - if (acpi_has_method(ACPI_HANDLE(&pdata->pdev->dev), "_RST")) { |
---|
728 | | - acpi_evaluate_object(ACPI_HANDLE(&pdata->pdev->dev), |
---|
729 | | - "_RST", NULL, NULL); |
---|
730 | | - } else if (acpi_has_method(ACPI_HANDLE(&pdata->pdev->dev), |
---|
731 | | - "_INI")) { |
---|
| 715 | + acpi_status status; |
---|
| 716 | + |
---|
| 717 | + status = acpi_evaluate_object(ACPI_HANDLE(&pdata->pdev->dev), |
---|
| 718 | + "_RST", NULL, NULL); |
---|
| 719 | + if (ACPI_FAILURE(status)) { |
---|
732 | 720 | acpi_evaluate_object(ACPI_HANDLE(&pdata->pdev->dev), |
---|
733 | 721 | "_INI", NULL, NULL); |
---|
734 | 722 | } |
---|
.. | .. |
---|
895 | 883 | } |
---|
896 | 884 | |
---|
897 | 885 | pdata->phy_speed = SPEED_UNKNOWN; |
---|
898 | | - phy_dev->supported &= ~SUPPORTED_10baseT_Half & |
---|
899 | | - ~SUPPORTED_100baseT_Half & |
---|
900 | | - ~SUPPORTED_1000baseT_Half; |
---|
901 | | - phy_dev->supported |= SUPPORTED_Pause | |
---|
902 | | - SUPPORTED_Asym_Pause; |
---|
903 | | - phy_dev->advertising = phy_dev->supported; |
---|
| 886 | + phy_remove_link_mode(phy_dev, ETHTOOL_LINK_MODE_10baseT_Half_BIT); |
---|
| 887 | + phy_remove_link_mode(phy_dev, ETHTOOL_LINK_MODE_100baseT_Half_BIT); |
---|
| 888 | + phy_remove_link_mode(phy_dev, ETHTOOL_LINK_MODE_1000baseT_Half_BIT); |
---|
| 889 | + phy_support_asym_pause(phy_dev); |
---|
904 | 890 | |
---|
905 | 891 | return 0; |
---|
906 | 892 | } |
---|