Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1633892
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.4 19/43] net: phy: handle state correctly in phy_stop_machine |
| Date | 2017-05-01 23:40 +0200 |
| Message-ID | <tCrd0-5UI-31@gated-at.bofh.it> (permalink) |
| References | <tCr3j-5Nl-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nathan Sullivan <nathan.sullivan@ni.com>
[ Upstream commit 49d52e8108a21749dc2114b924c907db43358984 ]
If the PHY is halted on stop, then do not set the state to PHY_UP. This
ensures the phy will be restarted later in phy_start when the machine is
started again.
Fixes: 00db8189d984 ("This patch adds a PHY Abstraction Layer to the Linux Kernel, enabling ethernet drivers to remain as ignorant as is reasonable of the connected PHY's design and operation details.")
Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Signed-off-by: Brad Mouring <brad.mouring@ni.com>
Acked-by: Xander Huff <xander.huff@ni.com>
Acked-by: Kyle Roeschley <kyle.roeschley@ni.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/net/phy/phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -538,7 +538,7 @@ void phy_stop_machine(struct phy_device
cancel_delayed_work_sync(&phydev->state_queue);
mutex_lock(&phydev->lock);
- if (phydev->state > PHY_UP)
+ if (phydev->state > PHY_UP && phydev->state != PHY_HALTED)
phydev->state = PHY_UP;
mutex_unlock(&phydev->lock);
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.4 00/43] 4.4.66-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-01 23:30 +0200
[PATCH 4.4 07/43] ext4: check if in-inode xattr is corrupted in ext4_expand_extra_isize_ea() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-01 23:30 +0200
[PATCH 4.4 23/43] l2tp: take reference on sessions being dumped Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-01 23:30 +0200
[PATCH 4.4 31/43] ip6mr: fix notification device destruction Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-01 23:40 +0200
[PATCH 4.4 19/43] net: phy: handle state correctly in phy_stop_machine Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-01 23:40 +0200
[PATCH 4.4 37/43] MIPS: KGDB: Use kernel context for sleeping threads Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-01 23:40 +0200
[PATCH 4.4 24/43] l2tp: fix PPP pseudo-wire auto-loading Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 02/43] [media] xc2028: unlock on error in xc2028_set_config() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 04/43] clk: sunxi: Add apb0 gates for H3 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 03/43] ARM: OMAP2+: timer: add probe for clocksources Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 13/43] regulator: core: Clear the supply pointer if enabling fails Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 36/43] ALSA: seq: Dont break snd_use_lock_sync() loop by timeout Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 27/43] tcp: clear saved_syn in tcp_disconnect() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 05/43] crypto: testmgr - fix out of bound read in __test_aead() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 21/43] net/packet: fix overflow in check for tp_frame_nr Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 16/43] sparc64: kern_addr_valid regression Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 15/43] xen/x86: dont lose event interrupts Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 08/43] md:raid1: fix a dead loop when read from a WriteMostly disk Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 11/43] net_sched: close another race condition in tcf_mirred_release() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 38/43] MIPS: Avoid BUG warning in arch_check_elf Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 39/43] p9_client_readdir() fix Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 12/43] RDS: Fix the atomicity for congestion map update Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 18/43] net: neigh: guard against NULL solicit() method Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 35/43] ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 43/43] ftrace/x86: Fix triple fault with graph tracing and suspend-to-ram Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 14/43] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 17/43] sparc64: Fix kernel panic due to erroneous #ifdef surrounding pmd_write() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 09/43] MIPS: Fix crash registers on non-crashing CPUs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 10/43] net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
Re: [PATCH 4.4 10/43] net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata Ben Hutchings <ben.hutchings@codethink.co.uk> - 2017-05-10 17:40 +0200
[PATCH 4.4 22/43] net/packet: fix overflow in check for tp_reserve Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
[PATCH 4.4 26/43] sctp: listen on the sock only when its state is listening or closed Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-02 00:10 +0200
Re: [PATCH 4.4 00/43] 4.4.66-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-05-02 16:00 +0200
Re: [PATCH 4.4 00/43] 4.4.66-stable review Guenter Roeck <linux@roeck-us.net> - 2017-05-02 19:40 +0200
csiph-web