[svn-commits] tzafrir: trunk r1284 - /trunk/xpp/xbus-core.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed Aug 9 19:55:26 MST 2006
Author: tzafrir
Date: Wed Aug 9 21:55:25 2006
New Revision: 1284
URL: http://svn.digium.com/view/zaptel?rev=1284&view=rev
Log:
xbus-core.c: documentation updates.
Modified:
trunk/xpp/xbus-core.c
Modified: trunk/xpp/xbus-core.c
URL: http://svn.digium.com/view/zaptel/trunk/xpp/xbus-core.c?rev=1284&r1=1283&r2=1284&view=diff
==============================================================================
--- trunk/xpp/xbus-core.c (original)
+++ trunk/xpp/xbus-core.c Wed Aug 9 21:55:25 2006
@@ -334,6 +334,9 @@
mdelay(1); /* FIXME: debugging for Dima */
}
spin_unlock_irqrestore(&xbus->lock, flags);
+ /*
+ * Wait for replies
+ */
DBG("%s: Polled %d XPD's. Waiting for replies\n", xbus->busname, MAX_XPDS);
ret = wait_event_timeout(xbus->wait_for_polls, atomic_read(&xbus->count_poll_answers) >= MAX_XPDS, POLL_TIMEOUT);
if(ret < 0) {
@@ -341,6 +344,9 @@
return ret;
}
DBG("%s: Poll finished. Start processing.\n", xbus->busname);
+ /*
+ * Build removals/additions lists
+ */
spin_lock_irqsave(&xbus->lock, flags);
INIT_LIST_HEAD(&removal_list);
INIT_LIST_HEAD(&additions_list);
@@ -368,6 +374,9 @@
}
spin_unlock_irqrestore(&xbus->lock, flags);
INFO("%s: Poll results: removals=%d additions=%d\n", xbus->busname, count_removed, count_added);
+ /*
+ * Process removals first
+ */
list_for_each_safe(card, next_card, &removal_list) {
struct card_desc_struct *card_desc = list_entry(card, struct card_desc_struct, card_list);
xpd_t *xpd;
@@ -379,6 +388,9 @@
xpd_disconnect(xpd);
kfree(card);
}
+ /*
+ * Now process additions
+ */
list_for_each_safe(card, next_card, &additions_list) {
struct card_desc_struct *card_desc = list_entry(card, struct card_desc_struct, card_list);
@@ -810,6 +822,7 @@
}
#ifdef CONFIG_PROC_FS
if(proc_xbuses) {
+ DBG("Removing " PROC_XBUSES " from proc\n");
remove_proc_entry(PROC_XBUSES, xpp_proc_toplevel);
proc_xbuses = NULL;
}
More information about the svn-commits
mailing list