diff options
author | David S. Miller <davem@davemloft.net> | 2015-05-23 01:22:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-23 01:22:35 -0400 |
commit | 36583eb54d46c36a447afd6c379839f292397429 (patch) | |
tree | 70f5399529dc2135a986947b37c655194da60e9d /drivers/net/phy | |
parent | fa7912be967102cdbecd8ef172571b28eb22099e (diff) | |
parent | cf539cbd8a81e12880735a0912de8b99f46c84fd (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/cadence/macb.c
drivers/net/phy/phy.c
include/linux/skbuff.h
net/ipv4/tcp.c
net/switchdev/switchdev.c
Switchdev was a case of RTNH_H_{EXTERNAL --> OFFLOAD}
renaming overlapping with net-next changes of various
sorts.
phy.c was a case of two changes, one adding a local
variable to a function whilst the second was removing
one.
tcp.c overlapped a deadlock fix with the addition of new tcp_info
statistic values.
macb.c involved the addition of two zyncq device entries.
skbuff.h involved adding back ipv4_daddr to nf_bridge_info
whilst net-next changes put two other existing members of
that struct into a union.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 1457ecf75dcc..377d2db04d33 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -767,6 +767,9 @@ EXPORT_SYMBOL(phy_stop); | |||
767 | */ | 767 | */ |
768 | void phy_start(struct phy_device *phydev) | 768 | void phy_start(struct phy_device *phydev) |
769 | { | 769 | { |
770 | bool do_resume = false; | ||
771 | int err = 0; | ||
772 | |||
770 | mutex_lock(&phydev->lock); | 773 | mutex_lock(&phydev->lock); |
771 | 774 | ||
772 | switch (phydev->state) { | 775 | switch (phydev->state) { |
@@ -777,11 +780,22 @@ void phy_start(struct phy_device *phydev) | |||
777 | phydev->state = PHY_UP; | 780 | phydev->state = PHY_UP; |
778 | break; | 781 | break; |
779 | case PHY_HALTED: | 782 | case PHY_HALTED: |
783 | /* make sure interrupts are re-enabled for the PHY */ | ||
784 | err = phy_enable_interrupts(phydev); | ||
785 | if (err < 0) | ||
786 | break; | ||
787 | |||
780 | phydev->state = PHY_RESUMING; | 788 | phydev->state = PHY_RESUMING; |
789 | do_resume = true; | ||
790 | break; | ||
781 | default: | 791 | default: |
782 | break; | 792 | break; |
783 | } | 793 | } |
784 | mutex_unlock(&phydev->lock); | 794 | mutex_unlock(&phydev->lock); |
795 | |||
796 | /* if phy was suspended, bring the physical link up again */ | ||
797 | if (do_resume) | ||
798 | phy_resume(phydev); | ||
785 | } | 799 | } |
786 | EXPORT_SYMBOL(phy_start); | 800 | EXPORT_SYMBOL(phy_start); |
787 | 801 | ||
@@ -794,7 +808,7 @@ void phy_state_machine(struct work_struct *work) | |||
794 | struct delayed_work *dwork = to_delayed_work(work); | 808 | struct delayed_work *dwork = to_delayed_work(work); |
795 | struct phy_device *phydev = | 809 | struct phy_device *phydev = |
796 | container_of(dwork, struct phy_device, state_queue); | 810 | container_of(dwork, struct phy_device, state_queue); |
797 | bool needs_aneg = false, do_suspend = false, do_resume = false; | 811 | bool needs_aneg = false, do_suspend = false; |
798 | enum phy_state old_state; | 812 | enum phy_state old_state; |
799 | int err = 0; | 813 | int err = 0; |
800 | 814 | ||
@@ -916,14 +930,6 @@ void phy_state_machine(struct work_struct *work) | |||
916 | } | 930 | } |
917 | break; | 931 | break; |
918 | case PHY_RESUMING: | 932 | case PHY_RESUMING: |
919 | err = phy_clear_interrupt(phydev); | ||
920 | if (err) | ||
921 | break; | ||
922 | |||
923 | err = phy_config_interrupt(phydev, PHY_INTERRUPT_ENABLED); | ||
924 | if (err) | ||
925 | break; | ||
926 | |||
927 | if (AUTONEG_ENABLE == phydev->autoneg) { | 933 | if (AUTONEG_ENABLE == phydev->autoneg) { |
928 | err = phy_aneg_done(phydev); | 934 | err = phy_aneg_done(phydev); |
929 | if (err < 0) | 935 | if (err < 0) |
@@ -961,7 +967,6 @@ void phy_state_machine(struct work_struct *work) | |||
961 | } | 967 | } |
962 | phydev->adjust_link(phydev->attached_dev); | 968 | phydev->adjust_link(phydev->attached_dev); |
963 | } | 969 | } |
964 | do_resume = true; | ||
965 | break; | 970 | break; |
966 | } | 971 | } |
967 | 972 | ||
@@ -971,8 +976,6 @@ void phy_state_machine(struct work_struct *work) | |||
971 | err = phy_start_aneg(phydev); | 976 | err = phy_start_aneg(phydev); |
972 | else if (do_suspend) | 977 | else if (do_suspend) |
973 | phy_suspend(phydev); | 978 | phy_suspend(phydev); |
974 | else if (do_resume) | ||
975 | phy_resume(phydev); | ||
976 | 979 | ||
977 | if (err < 0) | 980 | if (err < 0) |
978 | phy_error(phydev); | 981 | phy_error(phydev); |
@@ -1084,13 +1087,14 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable) | |||
1084 | { | 1087 | { |
1085 | /* According to 802.3az,the EEE is supported only in full duplex-mode. | 1088 | /* According to 802.3az,the EEE is supported only in full duplex-mode. |
1086 | * Also EEE feature is active when core is operating with MII, GMII | 1089 | * Also EEE feature is active when core is operating with MII, GMII |
1087 | * or RGMII. Internal PHYs are also allowed to proceed and should | 1090 | * or RGMII (all kinds). Internal PHYs are also allowed to proceed and |
1088 | * return an error if they do not support EEE. | 1091 | * should return an error if they do not support EEE. |
1089 | */ | 1092 | */ |
1090 | if ((phydev->duplex == DUPLEX_FULL) && | 1093 | if ((phydev->duplex == DUPLEX_FULL) && |
1091 | ((phydev->interface == PHY_INTERFACE_MODE_MII) || | 1094 | ((phydev->interface == PHY_INTERFACE_MODE_MII) || |
1092 | (phydev->interface == PHY_INTERFACE_MODE_GMII) || | 1095 | (phydev->interface == PHY_INTERFACE_MODE_GMII) || |
1093 | (phydev->interface == PHY_INTERFACE_MODE_RGMII) || | 1096 | (phydev->interface >= PHY_INTERFACE_MODE_RGMII && |
1097 | phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID) || | ||
1094 | phy_is_internal(phydev))) { | 1098 | phy_is_internal(phydev))) { |
1095 | int eee_lp, eee_cap, eee_adv; | 1099 | int eee_lp, eee_cap, eee_adv; |
1096 | u32 lp, cap, adv; | 1100 | u32 lp, cap, adv; |