]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
nfp: ignore signals when communicating with management FW
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 11 Apr 2018 23:47:35 +0000 (16:47 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:54:55 +0000 (14:54 +0200)
BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 5496295aefe86995e41398b0f76de601308fc3f5 ]

We currently allow signals to interrupt the wait for management FW
commands.  Exiting the wait should not cause trouble, the FW will
just finish executing the command in the background and new commands
will wait for the old one to finish.

However, this may not be what users expect (Ctrl-C not actually stopping
the command).  Moreover some systems routinely request link information
with signals pending (Ubuntu 14.04 runs a landscape-sysinfo python tool
from MOTD) worrying users with errors like these:

nfp 0000:04:00.0: nfp_nsp: Error -512 waiting for code 0x0007 to start
nfp 0000:04:00.0: nfp: reading port table failed -512

Make the wait for management FW responses non-interruptible.

Fixes: 1a64821c6af7 ("nfp: add support for service processor access")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c

index 54fe044ceef87e50a6079013733a2f0ff25a29f3..6dc9a09c0c06cba2f6ffa128f2393e5ae157831a 100644 (file)
@@ -277,8 +277,7 @@ nfp_nsp_wait_reg(struct nfp_cpp *cpp, u64 *reg,
                if ((*reg & mask) == val)
                        return 0;
 
-               if (msleep_interruptible(25))
-                       return -ERESTARTSYS;
+               msleep(25);
 
                if (time_after(start_time, wait_until))
                        return -ETIMEDOUT;