fc23dc45aa71e6689854581ce79436052dc813dc
[openwrt/staging/ldir.git] /
1 From 74de99b0e1df634949c45df1c370d458e6a3c98a Mon Sep 17 00:00:00 2001
2 From: Jan Kiszka <jan.kiszka@siemens.com>
3 Date: Sun, 1 Jan 2017 15:54:55 +0100
4 Subject: [PATCH] ivshmem-net: Fix stuck state machine during setup
5
6 If the remote side is already in INIT state (or even higher) and has a
7 cached rstate of RESET, we won't make progress when signaling RESET
8 again because the remote side won't send a state update. Fix this by
9 enforcing a local check after probe completion.
10
11 Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
12 (cherry picked from commit fceed9d0ab2486589c57c0793fbfbca4832442b9)
13 ---
14 drivers/net/ivshmem-net.c | 1 +
15 1 file changed, 1 insertion(+)
16
17 --- a/drivers/net/ivshmem-net.c
18 +++ b/drivers/net/ivshmem-net.c
19 @@ -911,6 +911,7 @@ static int ivshm_net_probe(struct pci_de
20 writel(IVSHMEM_INTX_ENABLE, &in->ivshm_regs->intxctrl);
21
22 writel(IVSHM_NET_STATE_RESET, &in->ivshm_regs->lstate);
23 + ivshm_net_check_state(ndev);
24
25 return 0;
26