Re: [PATCH] [v6] net: emac: emac gigabit ethernet controller driver
From: David Miller <davem@davemloft.net>
Date: 2016-06-29 07:55:52
Also in:
linux-arm-msm, linux-devicetree
From: David Miller <davem@davemloft.net>
Date: 2016-06-29 07:55:52
Also in:
linux-arm-msm, linux-devicetree
From: Timur Tabi <redacted> Date: Fri, 24 Jun 2016 18:46:48 -0500
+ while (test_and_set_bit(EMAC_STATUS_RESETTING, &adpt->status)) + msleep(20); /* Reset might take few 10s of ms */
...
+ while (test_and_set_bit(EMAC_STATUS_RESETTING, &adpt->status)) + msleep(20); /* Reset might take few 10s of ms */
You cannot spin in the kernel potentially forever if the tested condition is never met. Instead you must have some limit for the loop, and signal a failure if it is reached.