-/* $Id: divasfunc.c,v 1.22 2003/09/09 06:46:29 schindler Exp $
+/* $Id: divasfunc.c,v 1.23 2004/04/08 01:17:57 armin Exp $
*
* Low level driver for Eicon DIVA Server ISDN cards.
*
#define MAX_DESCRIPTORS 32
-extern void diva_run_trap_script(PISDN_ADAPTER IoAdapter, dword ANum);
extern char *DRIVERRELEASE_DIVAS;
static dword notify_handle;
DAdapter.request((ENTITY *) & req);
if (req.didd_add_adapter.e.Rc != 0xff) {
DBG_ERR(("DIDD register A(%d) failed !", card))
- } else {
- IoAdapters[card - 1]->os_trap_nfy_Fnc =
- diva_run_trap_script;
}
+ IoAdapters[card - 1]->os_trap_nfy_Fnc = NULL;
}
}
-/* $Id: divasmain.c,v 1.54 2004/04/02 18:59:22 armin Exp $
+/* $Id: divasmain.c,v 1.55 2004/04/08 01:17:58 armin Exp $
*
* Low level driver for Eicon DIVA Server ISDN cards.
*
#include "diva_dma.h"
#include "diva_pci.h"
-static char *main_revision = "$Revision: 1.54 $";
+static char *main_revision = "$Revision: 1.55 $";
static int major;
typedef struct _diva_os_thread_dpc {
struct tasklet_struct divas_task;
- struct work_struct trap_script_task;
diva_os_soft_isr_t *psoft_isr;
- int card_failed;
} diva_os_thread_dpc_t;
/* --------------------------------------------------------------------------
getrev(tmprev), diva_xdi_common_code_build, DIVA_BUILD, major);
}
-/* --------------------------------------------------------------------------
- Nonify user mode helper about card failure
- -------------------------------------------------------------------------- */
-#define TRAP_PROG "/usr/sbin/divas_trap.rc"
-
-static void diva_adapter_trapped(void *context)
-{
- diva_os_thread_dpc_t *pdpc = (diva_os_thread_dpc_t *) context;
-
- if (pdpc && pdpc->card_failed) {
- char *envp[] = { "HOME=/",
- "TERM=linux",
- "PATH=/usr/sbin:/sbin:/bin:/usr/bin", 0
- };
- char *argv[] = { TRAP_PROG, "trap", 0, 0 };
- char adapter[8];
- int ret;
-
- sprintf(adapter, "%d", pdpc->card_failed - 1);
- pdpc->card_failed = 0;
- argv[2] = &adapter[0];
-
- ret = call_usermodehelper(argv[0], argv, envp, 0);
-
- if (ret) {
- printk(KERN_ERR
- "%s: couldn't start trap script, errno %d\n",
- DRIVERLNAME, ret);
- }
- }
-}
-
-/*
- * run the trap script
- */
-void diva_run_trap_script(PISDN_ADAPTER IoAdapter, dword ANum)
-{
- diva_os_soft_isr_t *psoft_isr = &IoAdapter->isr_soft_isr;
- diva_os_thread_dpc_t *context =
- (diva_os_thread_dpc_t *) psoft_isr->object;
-
- if (context && !context->card_failed) {
- printk(KERN_ERR "%s: adapter %d trapped !\n", DRIVERLNAME, ANum + 1);
- context->card_failed = ANum + 1;
- schedule_work(&context->trap_script_task);
- }
-}
-
/* --------------------------------------------------------------------------
PCI Bus services
-------------------------------------------------------------------------- */
psoft_isr->callback = callback;
psoft_isr->callback_context = callback_context;
pdpc->psoft_isr = psoft_isr;
- INIT_WORK(&pdpc->trap_script_task, diva_adapter_trapped, pdpc);
tasklet_init(&pdpc->divas_task, diva_os_dpc_proc, (unsigned long)pdpc);
return (0);