Skip to contentSkip to conversation

ISDN patches for 2.6.36

PATCH Applied Tilman Schmidt 2 participants 6 messages Jul 6, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ISDN patches for 2.6.36

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(-)
#1 lore raw

PATCH 1/2 Documentation/isdn: CAPI controller interface amendment

Mention that the CAPI controller methods load_firmware() and reset_ctr() are asynchronous, and should signal completion.

Impact: documentation

---
 Documentation/isdn/INTERFACE.CAPI |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
Documentation/isdn/INTERFACE.CAPI +6 -2
index f172091..309eb5e 100644
@@ -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,
Signature · 1 line
1.6.5.3.298.g39add
maintainer Applied
#2 lore raw

Re: [PATCH 1/2] Documentation/isdn: CAPI controller interface amendment

From: Tilman Schmidt <[email protected]>
Date: Tue, 6 Jul 2010 02:18:22 +0200 (CEST)

Quoted 5 lines

Mention that the CAPI controller methods load_firmware() and reset_ctr() are asynchronous, and should signal completion.

Impact: documentation

Applied to net-next-2.6

Please stop using "Impact: " tags, I just edit them out when I add your changes.

#3 lore raw

Re: [PATCH 1/2] Documentation/isdn: CAPI controller interface amendment

Am 06.07.2010 04:24 schrieb David Miller:

Quoted 2 lines

Please stop using "Impact: " tags, I just edit them out when I add your changes.

Gladly.

Thanks,
Tilman

Signature · 4 lines
Tilman Schmidt                    E-Mail: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
#4 lore raw

PATCH 2/2 isdn: avoid calling tty_ldisc_flush() in atomic context

In reply to Tilman Schmidt

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

---
 drivers/isdn/i4l/isdn_tty.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
drivers/isdn/i4l/isdn_tty.c +0 -6
index fc8454d..51dc60d 100644
@@ -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)))) {
Signature · 1 line
1.6.5.3.298.g39add
maintainer Applied
#5 lore raw

Re: [PATCH 2/2] isdn: avoid calling tty_ldisc_flush() in atomic context

From: Tilman Schmidt <[email protected]>
Date: Tue, 6 Jul 2010 02:18:27 +0200 (CEST)

Quoted 11 lines

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

Applied to net-next-2.6, thanks.