[dahdi-commits] dahdi/linux.git branch "master" updated.
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Thu Aug 1 13:25:57 CDT 2013
branch "master" has been updated
via 2ad4dc555f220aca8a2fa22eed88bb0f8b94865c (commit)
from 0469efb733fc3e18b0014cdfc963c103d6d21579 (commit)
Summary of changes:
drivers/dahdi/xpp/xbus-core.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
- Log -----------------------------------------------------------------
commit 2ad4dc555f220aca8a2fa22eed88bb0f8b94865c
Author: Oron Peled <oron.peled at xorcom.com>
Date: Sun Jul 28 16:12:00 2013 +0300
xpp: fix waitfor_xpds race at startup
* If userspace would run
modprobe xpp_usb && cat /sys/bus/astribanks/devices/xbus-00/waitfor_xpds
it would return immediately rather than wait for the Astribank to
initialize.
* We sometimes managed to read before getting the reply from the
astribank.
* Now we don't trust unit count at such an early stage.
* Instread we wait for the Astribank to reach a stable state (READY or FAIL)
before finish waiting for this astribank.
Internal-Issue-ID: Xorcom-1502
Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c
index ed589be..c2fb00f 100644
--- a/drivers/dahdi/xpp/xbus-core.c
+++ b/drivers/dahdi/xpp/xbus-core.c
@@ -1592,8 +1592,6 @@ static bool xpds_done(xbus_t *xbus)
{
if (XBUS_IS(xbus, FAIL))
return 1; /* Nothing to wait for */
- if (!XBUS_IS(xbus, RECVD_DESC))
- return 1; /* We are not in the initialization phase */
if (xbus->worker.xpds_init_done)
return 1; /* All good */
/* Keep waiting */
@@ -1622,14 +1620,9 @@ int waitfor_xpds(xbus_t *xbus, char *buf)
len = -ENODEV;
goto out;
}
- if (worker->num_units == 0) {
- XBUS_ERR(xbus, "No cards. Skipping.\n");
- goto out;
- }
XBUS_DBG(DEVICES, xbus,
- "Waiting for card init of %d XPD's max %d seconds (%p)\n",
- worker->num_units, INITIALIZATION_TIMEOUT / HZ,
- &worker->wait_for_xpd_initialization);
+ "Waiting for card init of XPDs max %d seconds\n",
+ INITIALIZATION_TIMEOUT / HZ);
ret =
wait_event_interruptible_timeout(worker->
wait_for_xpd_initialization,
-----------------------------------------------------------------------
--
dahdi/linux.git
More information about the dahdi-commits
mailing list