* [PATCH 0/2] ISDN fixes for 2.6.35
@ 2010-05-23 11:01 Tilman Schmidt
2010-05-23 11:01 ` Karsten Keil
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Tilman Schmidt @ 2010-05-23 11:01 UTC (permalink / raw
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
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(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] ISDN fixes for 2.6.35
2010-05-23 11:01 [PATCH 0/2] ISDN fixes for 2.6.35 Tilman Schmidt
@ 2010-05-23 11:01 ` Karsten Keil
2010-05-24 6:52 ` David Miller
2010-05-23 11:02 ` [PATCH 1/2] isdn/capi: make reset_ctr op truly optional Tilman Schmidt
2010-05-23 11:02 ` [PATCH 2/2] isdn/gigaset: remove dummy CAPI method implementations Tilman Schmidt
2 siblings, 1 reply; 5+ messages in thread
From: Karsten Keil @ 2010-05-23 11:01 UTC (permalink / raw
To: Tilman Schmidt
Cc: David Miller, Hansjoerg Lipp, i4ldeveloper, netdev, linux-kernel,
Karsten Keil
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".
Acked-by: Karsten Keil <isdn@linux-pingi.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] isdn/capi: make reset_ctr op truly optional
2010-05-23 11:01 [PATCH 0/2] ISDN fixes for 2.6.35 Tilman Schmidt
2010-05-23 11:01 ` Karsten Keil
@ 2010-05-23 11:02 ` Tilman Schmidt
2010-05-23 11:02 ` [PATCH 2/2] isdn/gigaset: remove dummy CAPI method implementations Tilman Schmidt
2 siblings, 0 replies; 5+ messages in thread
From: Tilman Schmidt @ 2010-05-23 11:02 UTC (permalink / raw
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
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
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
drivers/isdn/capi/kcapi.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c
index bd00dce..bde3c88 100644
--- a/drivers/isdn/capi/kcapi.c
+++ b/drivers/isdn/capi/kcapi.c
@@ -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);
--
1.6.5.3.298.g39add
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] isdn/gigaset: remove dummy CAPI method implementations
2010-05-23 11:01 [PATCH 0/2] ISDN fixes for 2.6.35 Tilman Schmidt
2010-05-23 11:01 ` Karsten Keil
2010-05-23 11:02 ` [PATCH 1/2] isdn/capi: make reset_ctr op truly optional Tilman Schmidt
@ 2010-05-23 11:02 ` Tilman Schmidt
2 siblings, 0 replies; 5+ messages in thread
From: Tilman Schmidt @ 2010-05-23 11:02 UTC (permalink / raw
To: Karsten Keil, David Miller
Cc: Hansjoerg Lipp, Karsten Keil, i4ldeveloper, netdev, linux-kernel
Dummy 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
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
drivers/isdn/gigaset/capi.c | 28 ++--------------------------
1 files changed, 2 insertions(+), 26 deletions(-)
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
index 964a55f..e72f86b 100644
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -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;
--
1.6.5.3.298.g39add
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] ISDN fixes for 2.6.35
2010-05-23 11:01 ` Karsten Keil
@ 2010-05-24 6:52 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2010-05-24 6:52 UTC (permalink / raw
To: isdn; +Cc: tilman, hjlipp, i4ldeveloper, netdev, linux-kernel, keil
From: Karsten Keil <isdn@linux-pingi.de>
Date: Sun, 23 May 2010 13:01:50 +0200
> 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".
>
> Acked-by: Karsten Keil <isdn@linux-pingi.de>
All applied, thanks everyone.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-24 6:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-23 11:01 [PATCH 0/2] ISDN fixes for 2.6.35 Tilman Schmidt
2010-05-23 11:01 ` Karsten Keil
2010-05-24 6:52 ` David Miller
2010-05-23 11:02 ` [PATCH 1/2] isdn/capi: make reset_ctr op truly optional Tilman Schmidt
2010-05-23 11:02 ` [PATCH 2/2] isdn/gigaset: remove dummy CAPI method implementations Tilman Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).