mpc85xx: remove linux 3.10 support
[openwrt/staging/chunkeey.git] / target / linux / lantiq / patches-3.10 / 0022-NET-multi-phy-support.patch
1 From 88837a59f8a84ced5ac6d64a5096fe129545d8e5 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Sat, 11 May 2013 23:40:19 +0200
4 Subject: [PATCH 22/34] NET: multi phy support
5
6 Signed-off-by: John Crispin <blogic@openwrt.org>
7 ---
8 drivers/net/phy/phy.c | 9 ++++++---
9 include/linux/phy.h | 2 +-
10 2 files changed, 7 insertions(+), 4 deletions(-)
11
12 --- a/drivers/net/phy/phy.c
13 +++ b/drivers/net/phy/phy.c
14 @@ -820,7 +820,8 @@ void phy_state_machine(struct work_struc
15 * negotiation for now */
16 if (!phydev->link) {
17 phydev->state = PHY_NOLINK;
18 - netif_carrier_off(phydev->attached_dev);
19 + if (!phydev->no_auto_carrier_off)
20 + netif_carrier_off(phydev->attached_dev);
21 phydev->adjust_link(phydev->attached_dev);
22 break;
23 }
24 @@ -890,7 +891,8 @@ void phy_state_machine(struct work_struc
25 netif_carrier_on(phydev->attached_dev);
26 } else {
27 phydev->state = PHY_NOLINK;
28 - netif_carrier_off(phydev->attached_dev);
29 + if (!phydev->no_auto_carrier_off)
30 + netif_carrier_off(phydev->attached_dev);
31 }
32
33 phydev->adjust_link(phydev->attached_dev);
34 @@ -902,7 +904,8 @@ void phy_state_machine(struct work_struc
35 case PHY_HALTED:
36 if (phydev->link) {
37 phydev->link = 0;
38 - netif_carrier_off(phydev->attached_dev);
39 + if (!phydev->no_auto_carrier_off)
40 + netif_carrier_off(phydev->attached_dev);
41 phydev->adjust_link(phydev->attached_dev);
42 }
43 break;
44 --- a/include/linux/phy.h
45 +++ b/include/linux/phy.h
46 @@ -298,7 +298,7 @@ struct phy_device {
47
48 struct phy_c45_device_ids c45_ids;
49 bool is_c45;
50 -
51 + bool no_auto_carrier_off;
52 enum phy_state state;
53
54 u32 dev_flags;