Karsten, David,
following are two patches to the ISDN subsystem I'd like to see
included in kernel release 2.6.36.
Thanks,
Tilman
Tilman Schmidt (2):
isdn: CAPI controller interface documentation amendment
isdn: avoid calling tty_ldisc_flush() in atomic context
Documentation/isdn/INTERFACE.CAPI | 8 ++++++--
drivers/isdn/i4l/isdn_tty.c | 6 ------
2 files changed, 6 insertions(+), 8 deletions(-)
Mention that the CAPI controller methods load_firmware() and
reset_ctr() are asynchronous, and should signal completion.
Impact: documentation
Signed-off-by: Tilman Schmidt <[email protected]>
---
Documentation/isdn/INTERFACE.CAPI | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/isdn/INTERFACE.CAPI b/Documentation/isdn/INTERFACE.CAPI
index f172091..309eb5e 100644
--- a/Documentation/isdn/INTERFACE.CAPI
+++ b/Documentation/isdn/INTERFACE.CAPI
@@ -113,12 +113,16 @@ char *driver_name
int (*load_firmware)(struct capi_ctr *ctrlr, capiloaddata *ldata)
(optional) pointer to a callback function for sending firmware and
configuration data to the device
+ The function may return before the operation has completed.
+ Completion must be signalled by a call to capi_ctr_ready().
Return value: 0 on success, error code on error
Called in process context.
void (*reset_ctr)(struct capi_ctr *ctrlr)
- (optional) pointer to a callback function for performing a reset on
- the device, releasing all registered applications
+ (optional) pointer to a callback function for stopping the device,
+ releasing all registered applications
+ The function may return before the operation has completed.
+ Completion must be signalled by a call to capi_ctr_down().
Called in process context.
void (*register_appl)(struct capi_ctr *ctrlr, u16 applid,
--
1.6.5.3.298.g39add
Remove the call to tty_ldisc_flush() from the RESULT_NO_CARRIER
branch of isdn_tty_modem_result(), as already proposed in commit
00409bb045887ec5e7b9e351bc080c38ab6bfd33.
This avoids a "sleeping function called from invalid context" BUG
when the hardware driver calls the statcallb() callback with
command==ISDN_STAT_DHUP in atomic context, which in turn calls
isdn_tty_modem_result(RESULT_NO_CARRIER, ~), and from there,
tty_ldisc_flush() which may sleep.
Impact: bugfix
Signed-off-by: Tilman Schmidt <[email protected]>
---
drivers/isdn/i4l/isdn_tty.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index fc8454d..51dc60d 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -2636,12 +2636,6 @@ isdn_tty_modem_result(int code, modem_info * info)
if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
return;
}
-#ifdef CONFIG_ISDN_AUDIO
- if ( !info->vonline )
- tty_ldisc_flush(info->tty);
-#else
- tty_ldisc_flush(info->tty);
-#endif
if ((info->flags & ISDN_ASYNC_CHECK_CD) &&
(!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) &&
(info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) {
--
1.6.5.3.298.g39add
From: Tilman Schmidt <[email protected]>
Date: Tue, 6 Jul 2010 02:18:22 +0200 (CEST)
> Mention that the CAPI controller methods load_firmware() and
> reset_ctr() are asynchronous, and should signal completion.
>
> Impact: documentation
> Signed-off-by: Tilman Schmidt <[email protected]>
Applied to net-next-2.6
Please stop using "Impact: " tags, I just edit them out when
I add your changes.
From: Tilman Schmidt <[email protected]>
Date: Tue, 6 Jul 2010 02:18:27 +0200 (CEST)
> Remove the call to tty_ldisc_flush() from the RESULT_NO_CARRIER
> branch of isdn_tty_modem_result(), as already proposed in commit
> 00409bb045887ec5e7b9e351bc080c38ab6bfd33.
> This avoids a "sleeping function called from invalid context" BUG
> when the hardware driver calls the statcallb() callback with
> command==ISDN_STAT_DHUP in atomic context, which in turn calls
> isdn_tty_modem_result(RESULT_NO_CARRIER, ~), and from there,
> tty_ldisc_flush() which may sleep.
>
> Impact: bugfix
> Signed-off-by: Tilman Schmidt <[email protected]>
Applied to net-next-2.6, thanks.
Am 06.07.2010 04:24 schrieb David Miller:
> Please stop using "Impact: " tags, I just edit them out when
> I add your changes.
Gladly.
Thanks,
Tilman
--
Tilman Schmidt E-Mail: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Unge?ffnet mindestens haltbar bis: (siehe R?ckseite)