diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-08-10 02:55:25 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2006-08-10 02:55:25 +0000 |
commit | 4ab762499c932cb80394ec1ec6b93879004a5214 (patch) | |
tree | 282c6ff6ea1d36320e0591f5cd5c15602fb2aa97 | |
parent | 4c0e4bc08ae3bed75639e1ac173ea53f26b7634b (diff) |
xbus-core.c: documentation updates.
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@1284 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | xpp/xbus-core.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xpp/xbus-core.c b/xpp/xbus-core.c index 437ea5e..3b9d507 100644 --- a/xpp/xbus-core.c +++ b/xpp/xbus-core.c @@ -334,6 +334,9 @@ static int xbus_poll(void *data) 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 @@ static int xbus_poll(void *data) 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 @@ static int xbus_poll(void *data) } 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 @@ static int xbus_poll(void *data) 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 @@ static void xbus_core_cleanup(void) } #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; } |