ISDN fixes for 2.6.35
Subsystems (2)
cover ISDN fixes for 2.6.35
Karsten, David,
following are two patches to the CAPI subsystem and the Gigaset driver I'd like to see included in kernel release 2.6.35. Together they fix a reported hang of the userspace command "capiinit stop".
Thanks,
Tilman
Tilman Schmidt (3):
isdn/capi: make reset_ctr op truly optional isdn/gigaset: remove dummy CAPI method implementations
drivers/isdn/capi/kcapi.c | 6 ++++++ drivers/isdn/gigaset/capi.c | 28 ++-------------------------- 2 files changed, 8 insertions(+), 26 deletions(-)
PATCH 1/2 isdn/capi: make reset_ctr op truly optional
The CAPI controller operation reset_ctr is marked as optional, and not all drivers do implement it. Add a check to the kernel CAPI whether it exists before trying to call it.
Impact: oops prevention
--- drivers/isdn/capi/kcapi.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
drivers/isdn/capi/kcapi.c +6 -0
@@ -1147,6 +1147,12 @@ load_unlock_out:if (ctr->state ==CAPI_CTR_DETECTED ) goto reset_unlock_out; +if (ctr->reset_ctr ==NULL ) { +printk (KERN_DEBUG "kcapi: reset: no reset function\n" ); + retval = -ESRCH ; + goto reset_unlock_out; + } + ctr->reset_ctr (ctr); retval =wait_on_ctr_state (ctr,CAPI_CTR_DETECTED );
Signature · 1 line
1.6.5.3.298.g39add
PATCH 2/2 isdn/gigaset: remove dummy CAPI method implementations
In reply to Tilman SchmidtDummy implementations for the optional CAPI controller operations load_firmware and reset_ctr can cause userspace callers to hang indefinitely. It's better not to implement them at all.
Impact: bugfix
--- drivers/isdn/gigaset/capi.c | 28 ++-------------------------- 1 files changed, 2 insertions(+), 26 deletions(-)
drivers/isdn/gigaset/capi.c +2 -26
@@ -933,30 +933,6 @@ void gigaset_isdn_stop(struct cardstate *cs)*/ /* -* load firmware -*/ -static int gigaset_load_firmware (struct capi_ctr *ctr,capiloaddata *data) -{ -struct cardstate *cs = ctr->driverdata; - -/* AVM specific operation, not needed for Gigaset -- ignore */ -dev_notice (cs->dev,"load_firmware ignored\n" ); - -return 0 ; -} - -/* -* reset (deactivate) controller -*/ -static void gigaset_reset_ctr (struct capi_ctr *ctr) -{ -struct cardstate *cs = ctr->driverdata; - -/* AVM specific operation, not needed for Gigaset -- ignore */ -dev_notice (cs->dev,"reset_ctr ignored\n" ); -} - -/* * register CAPI application */ static void gigaset_register_appl(struct capi_ctr *ctr, u16 appl,
@@ -2213,8 +2189,8 @@ int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid) iif->ctr.driverdata = cs;strncpy (iif->ctr.name, isdnid,sizeof (iif->ctr.name)); iif->ctr.driver_name ="gigaset" ; - iif->ctr.load_firmware = gigaset_load_firmware; - iif->ctr.reset_ctr = gigaset_reset_ctr; + iif->ctr.load_firmware =NULL ; + iif->ctr.reset_ctr =NULL ; iif->ctr.register_appl = gigaset_register_appl; iif->ctr.release_appl = gigaset_release_appl; iif->ctr.send_message = gigaset_send_message;
Signature · 1 line
1.6.5.3.298.g39add
Quoted 6 lines · On Sonntag, 23. Mai 2010 03:14:43 Tilman Schmidt wrote:
Karsten, David,
following are two patches to the CAPI subsystem and the Gigaset driver I'd like to see included in kernel release 2.6.35. Together they fix a reported hang of the userspace command "capiinit stop".
David Miller
maintainerFrom: Karsten Keil <[email protected]>
Date: Sun, 23 May 2010 13:01:50 +0200
Quoted 9 lines · On Sonntag, 23. Mai 2010 03:14:43 Tilman Schmidt wrote:
Quoted 6 lines
Karsten, David,
following are two patches to the CAPI subsystem and the Gigaset driver I'd like to see included in kernel release 2.6.35. Together they fix a reported hang of the userspace command "capiinit stop".
Acked-by Karsten Keil <[email protected]>
All applied, thanks everyone.