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

p54pci: add handling of signal case

if(!wait_for_completion_interruptible_timeout(...))
only handles the timeout case - this patch adds handling the
signal case the same as timeout.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Nicholas Mc Guire and committed by
Kalle Valo
961d1bbe 5b4c6b4f

+5 -2
+5 -2
drivers/net/wireless/p54/p54pci.c
··· 431 431 { 432 432 struct p54p_priv *priv = dev->priv; 433 433 int err; 434 + long timeout; 434 435 435 436 init_completion(&priv->boot_comp); 436 437 err = request_irq(priv->pdev->irq, p54p_interrupt, ··· 469 468 P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET)); 470 469 P54P_READ(dev_int); 471 470 472 - if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) { 471 + timeout = wait_for_completion_interruptible_timeout( 472 + &priv->boot_comp, HZ); 473 + if (timeout <= 0) { 473 474 wiphy_err(dev->wiphy, "Cannot boot firmware!\n"); 474 475 p54p_stop(dev); 475 - return -ETIMEDOUT; 476 + return timeout ? -ERESTARTSYS : -ETIMEDOUT; 476 477 } 477 478 478 479 P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));