Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fpga: stratix10-soc: make FPGA task un-interruptible

When CTRL+C occurs during the process of FPGA reconfiguration, the FPGA
reconfiguration process stops and the user can't perform a new FPGA
reconfiguration properly.

Set FPGA task to be not interruptible so that the user can properly
perform FPGA reconfiguration after CTRL+C event.

Signed-off-by: Richard Gong <richard.gong@intel.com>
Reviewed-by: Tom Rix <trix@redhat.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>

authored by

Richard Gong and committed by
Moritz Fischer
7fbc2bc2 9123e3a7

+3 -20
+3 -20
drivers/fpga/stratix10-soc.c
··· 196 196 if (ret < 0) 197 197 goto init_done; 198 198 199 - ret = wait_for_completion_interruptible_timeout( 199 + ret = wait_for_completion_timeout( 200 200 &priv->status_return_completion, S10_RECONFIG_TIMEOUT); 201 201 if (!ret) { 202 202 dev_err(dev, "timeout waiting for RECONFIG_REQUEST\n"); 203 203 ret = -ETIMEDOUT; 204 - goto init_done; 205 - } 206 - if (ret < 0) { 207 - dev_err(dev, "error (%d) waiting for RECONFIG_REQUEST\n", ret); 208 204 goto init_done; 209 205 } 210 206 ··· 314 318 */ 315 319 wait_status = 1; /* not timed out */ 316 320 if (!priv->status) 317 - wait_status = wait_for_completion_interruptible_timeout( 321 + wait_status = wait_for_completion_timeout( 318 322 &priv->status_return_completion, 319 323 S10_BUFFER_TIMEOUT); 320 324 ··· 334 338 if (!wait_status) { 335 339 dev_err(dev, "timeout waiting for svc layer buffers\n"); 336 340 ret = -ETIMEDOUT; 337 - break; 338 - } 339 - if (wait_status < 0) { 340 - ret = wait_status; 341 - dev_err(dev, 342 - "error (%d) waiting for svc layer buffers\n", 343 - ret); 344 341 break; 345 342 } 346 343 } ··· 361 372 if (ret < 0) 362 373 break; 363 374 364 - ret = wait_for_completion_interruptible_timeout( 375 + ret = wait_for_completion_timeout( 365 376 &priv->status_return_completion, timeout); 366 377 if (!ret) { 367 378 dev_err(dev, 368 379 "timeout waiting for RECONFIG_COMPLETED\n"); 369 380 ret = -ETIMEDOUT; 370 - break; 371 - } 372 - if (ret < 0) { 373 - dev_err(dev, 374 - "error (%d) waiting for RECONFIG_COMPLETED\n", 375 - ret); 376 381 break; 377 382 } 378 383 /* Not error or timeout, so ret is # of jiffies until timeout */