netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ISDN patches for net-next
@ 2014-05-18 21:26 Tilman Schmidt
  2014-05-19  1:36 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Tilman Schmidt @ 2014-05-18 21:26 UTC (permalink / raw)
  To: netdev; +Cc: Paul Bolle, isdn4linux, Keil, Karsten

Here's a series of patches for the ISDN CAPI subsystem and an auxiliary
patch to the tty driver, prepared by Paul Bolle over the last couple of
weeks. I would appreciate if you could merge these via net-next.

Paul Bolle (4):
  isdn/capi: move capi_info2str to capidrv.c
  isdn/capi: Make verbose reporting depend on capidrv
  tty: allow tty drivers to rename their device nodes
  isdn/capi: fix (middleware) device nodes

 drivers/isdn/capi/Kconfig     |  18 ++--
 drivers/isdn/capi/capi.c      |   8 +-
 drivers/isdn/capi/capidrv.c   | 195 ++++++++++++++++++++++++++++++++++++++++
 drivers/isdn/capi/capiutil.c  | 200 ------------------------------------------
 drivers/tty/tty_io.c          |  16 +++-
 include/linux/isdn/capiutil.h |   5 --
 include/linux/tty_driver.h    |   1 +
 7 files changed, 226 insertions(+), 217 deletions(-)

-- 
1.9.2.459.g68773ac

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/4] ISDN patches for net-next
  2014-05-18 21:26 Tilman Schmidt
@ 2014-05-19  1:36 ` David Miller
  2014-05-19 21:36   ` Tilman Schmidt
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2014-05-19  1:36 UTC (permalink / raw)
  To: tilman; +Cc: netdev, pebolle, isdn4linux, isdn

From: Tilman Schmidt <tilman@imap.cc>
Date: Sun, 18 May 2014 23:26:08 +0200

> Here's a series of patches for the ISDN CAPI subsystem and an auxiliary
> patch to the tty driver, prepared by Paul Bolle over the last couple of
> weeks. I would appreciate if you could merge these via net-next.

Since this has been broken for several years, you might be doing more
harm than good by trying to change things back again.

Why not just have capiplugin able to search for and use the names
generated now?

That way it will work on any kernel version and/or combination with
udev.

I'm not really excited to apply this series, I genuinely think it
makes things worse, sorry.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/4] ISDN patches for net-next
  2014-05-19  1:36 ` David Miller
@ 2014-05-19 21:36   ` Tilman Schmidt
  2014-05-21 21:02     ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Tilman Schmidt @ 2014-05-19 21:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, pebolle, isdn4linux, isdn

David,

thanks for your reply. I understand your concerns but I don't agree
with them and hope I'll be able to convince you otherwise.

On 19.05.2014 03:36, you wrote:
> Since this has been broken for several years, you might be doing more
> harm than good by trying to change things back again.

You appear to assume that there is a currently working configuration
which might be broken by the patch series. That is not the case.
The (very few) remaining users of PPP over ISDN cope with the
current situation in one of these ways:

a) staying with a pre-3.0 kernel that still provides capifs

b) staying with (or reverting to) the deprecated ISDN4Linux subsystem

c) patching the kernel locally to fix the breakage

d) staying with an old udev version that can still rename device nodes

e) explicitly running commands like
    mv /dev/capi /dev/capi20
    mkdir /dev/capi
    ln -s /dev/capi0 /dev/capi/0
    ln -s /dev/capi1 /dev/capi/1
   on every boot, typically via /etc/boot.local or similar mechanisms.

f) giving up on Linux ISDN support and buying a separate router.

None of these will be broken by fixing the problem in the kernel:

- a), b) and f) won't notice anything unless they read the changelog
  and find they can at last use ISDN over CAPI with a current kernel
  again if they want to.

- c) will notice that the local kernel patch doesn't apply anymore
  and happily drop it.

- d) and e) may or may not notice that renaming the CAPI nodes fails
  because the nodes are already named correctly, but apart from a
  couple of log messages everything will work as before.

> Why not just have capiplugin able to search for and use the names
> generated now?

For one, capiplugin is a pretty old piece of software. The risk of
breaking it in the attempt to adapt it to the Kernel CAPI interface
change is far bigger than the risk associated with reverting that
change in the kernel. What's more, capiplugin is not the only
software affected. /dev/capi20 is the documented standard device
for CAPI 2.0 on Linux. Userspace relies on that. We would have to
adapt at least libcapi20 too, and possibly an unknown number of
other applications.

In sum, I'm convinced the proposed patch series is the minimally
invasive way of sorting out the current mess surrounding the
CAPI device files.

Regards,
Tilman

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/4] ISDN patches for net-next
  2014-05-19 21:36   ` Tilman Schmidt
@ 2014-05-21 21:02     ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2014-05-21 21:02 UTC (permalink / raw)
  To: tilman; +Cc: netdev, pebolle, isdn4linux, isdn

From: Tilman Schmidt <tilman@imap.cc>
Date: Mon, 19 May 2014 23:36:37 +0200

> In sum, I'm convinced the proposed patch series is the minimally
> invasive way of sorting out the current mess surrounding the
> CAPI device files.

Ok, fair enough, please resubmit.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 0/4] ISDN patches for net-next
@ 2014-10-03 15:03 Tilman Schmidt
  2014-10-03 15:03 ` [PATCH 1/4] isdn/gigaset: improve error handling when leaving DLE mode Tilman Schmidt
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Tilman Schmidt @ 2014-10-03 15:03 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Hansjoerg Lipp, Karsten Keil, isdn4linux

Here's a series of patches for the ISDN CAPI subsystem and the
Gigaset ISDN driver.  Please merge via net-next.

Tilman Schmidt (4):
  isdn/gigaset: improve error handling when leaving DLE mode
  isdn/gigaset: drop unused cardstate structure member
  isdn/gigaset: use USB API function usb_endpoint_num()
  isdn/capi: drop two dead if branches

 drivers/isdn/capi/capiutil.c       |    3 ---
 drivers/isdn/gigaset/ev-layer.c    |    3 ++-
 drivers/isdn/gigaset/usb-gigaset.c |   14 +++++---------
 3 files changed, 7 insertions(+), 13 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 4/4] isdn/capi: drop two dead if branches
  2014-10-03 15:03 [PATCH 0/4] ISDN patches for net-next Tilman Schmidt
  2014-10-03 15:03 ` [PATCH 1/4] isdn/gigaset: improve error handling when leaving DLE mode Tilman Schmidt
@ 2014-10-03 15:03 ` Tilman Schmidt
  2014-10-03 15:03 ` [PATCH 2/4] isdn/gigaset: drop unused cardstate structure member Tilman Schmidt
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Tilman Schmidt @ 2014-10-03 15:03 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Hansjoerg Lipp, Karsten Keil, isdn4linux

The last branch in command_2_index() cannot be reached since
c==0xff is already caught by the first "if".
The empty second branch makes no difference since no other branch
will be taken for c<0x0f.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
 drivers/isdn/capi/capiutil.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
index 6e797e5..4073d16 100644
--- a/drivers/isdn/capi/capiutil.c
+++ b/drivers/isdn/capi/capiutil.c
@@ -205,11 +205,8 @@ static unsigned command_2_index(unsigned c, unsigned sc)
 {
 	if (c & 0x80)
 		c = 0x9 + (c & 0x0f);
-	else if (c <= 0x0f);
 	else if (c == 0x41)
 		c = 0x9 + 0x1;
-	else if (c == 0xff)
-		c = 0x00;
 	return (sc & 3) * (0x9 + 0x9) + c;
 }
 
-- 
1.9.2.459.g68773ac

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 1/4] isdn/gigaset: improve error handling when leaving DLE mode
  2014-10-03 15:03 [PATCH 0/4] ISDN patches for net-next Tilman Schmidt
@ 2014-10-03 15:03 ` Tilman Schmidt
  2014-10-03 15:03 ` [PATCH 4/4] isdn/capi: drop two dead if branches Tilman Schmidt
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: Tilman Schmidt @ 2014-10-03 15:03 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Hansjoerg Lipp, Karsten Keil, isdn4linux

Avoid cascading warnings when leaving DLE mode fails by clearing
the DLE flag before entering recovery.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>

---
 drivers/isdn/gigaset/ev-layer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index 7459b12..dcae14a 100644
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -1243,7 +1243,8 @@ static void do_action(int action, struct cardstate *cs,
 		break;
 	case ACT_FAILDLE0:
 		cs->cur_at_seq = SEQ_NONE;
-		dev_warn(cs->dev, "Could not leave DLE mode.\n");
+		dev_warn(cs->dev, "Error leaving DLE mode.\n");
+		cs->dle = 0;
 		at_state2 = &cs->bcs[cs->curchannel].at_state;
 		disconnect(&at_state2);
 		schedule_init(cs, MS_RECOVER);
-- 
1.9.2.459.g68773ac

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/4] isdn/gigaset: use USB API function usb_endpoint_num()
  2014-10-03 15:03 [PATCH 0/4] ISDN patches for net-next Tilman Schmidt
                   ` (2 preceding siblings ...)
  2014-10-03 15:03 ` [PATCH 2/4] isdn/gigaset: drop unused cardstate structure member Tilman Schmidt
@ 2014-10-03 15:03 ` Tilman Schmidt
  2014-10-06  1:18 ` [PATCH 0/4] ISDN patches for net-next David Miller
  4 siblings, 0 replies; 10+ messages in thread
From: Tilman Schmidt @ 2014-10-03 15:03 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Hansjoerg Lipp, Karsten Keil, isdn4linux

Use function usb_endpoint_num() for the bulk endpoint and store
the endpoint number in the cardstate structure instead of the raw
endpoint address value.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
 drivers/isdn/gigaset/usb-gigaset.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c
index 8bda5c8..82e91ba 100644
--- a/drivers/isdn/gigaset/usb-gigaset.c
+++ b/drivers/isdn/gigaset/usb-gigaset.c
@@ -135,7 +135,7 @@ struct usb_cardstate {
 	/* Output buffer */
 	unsigned char		*bulk_out_buffer;
 	int			bulk_out_size;
-	__u8			bulk_out_endpointAddr;
+	int			bulk_out_epnum;
 	struct urb		*bulk_out_urb;
 
 	/* Input buffer */
@@ -465,7 +465,7 @@ static int send_cb(struct cardstate *cs, struct cmdbuf_t *cb)
 
 			usb_fill_bulk_urb(ucs->bulk_out_urb, ucs->udev,
 					  usb_sndbulkpipe(ucs->udev,
-							  ucs->bulk_out_endpointAddr & 0x0f),
+							  ucs->bulk_out_epnum),
 					  cb->buf + cb->offset, count,
 					  gigaset_write_bulk_callback, cs);
 
@@ -627,8 +627,7 @@ static int write_modem(struct cardstate *cs)
 	if (cs->connected) {
 		usb_fill_bulk_urb(ucs->bulk_out_urb, ucs->udev,
 				  usb_sndbulkpipe(ucs->udev,
-						  ucs->bulk_out_endpointAddr &
-						  0x0f),
+						  ucs->bulk_out_epnum),
 				  ucs->bulk_out_buffer, count,
 				  gigaset_write_bulk_callback, cs);
 		ret = usb_submit_urb(ucs->bulk_out_urb, GFP_ATOMIC);
@@ -713,7 +712,7 @@ static int gigaset_probe(struct usb_interface *interface,
 
 	buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 	ucs->bulk_out_size = buffer_size;
-	ucs->bulk_out_endpointAddr = endpoint->bEndpointAddress;
+	ucs->bulk_out_epnum = usb_endpoint_num(endpoint);
 	ucs->bulk_out_buffer = kmalloc(buffer_size, GFP_KERNEL);
 	if (!ucs->bulk_out_buffer) {
 		dev_err(cs->dev, "Couldn't allocate bulk_out_buffer\n");
@@ -748,8 +747,7 @@ static int gigaset_probe(struct usb_interface *interface,
 	}
 	/* Fill the interrupt urb and send it to the core */
 	usb_fill_int_urb(ucs->read_urb, udev,
-			 usb_rcvintpipe(udev,
-					usb_endpoint_num(endpoint)),
+			 usb_rcvintpipe(udev, usb_endpoint_num(endpoint)),
 			 ucs->rcvbuf, buffer_size,
 			 gigaset_read_int_callback,
 			 cs, endpoint->bInterval);
-- 
1.9.2.459.g68773ac

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/4] isdn/gigaset: drop unused cardstate structure member
  2014-10-03 15:03 [PATCH 0/4] ISDN patches for net-next Tilman Schmidt
  2014-10-03 15:03 ` [PATCH 1/4] isdn/gigaset: improve error handling when leaving DLE mode Tilman Schmidt
  2014-10-03 15:03 ` [PATCH 4/4] isdn/capi: drop two dead if branches Tilman Schmidt
@ 2014-10-03 15:03 ` Tilman Schmidt
  2014-10-03 15:03 ` [PATCH 3/4] isdn/gigaset: use USB API function usb_endpoint_num() Tilman Schmidt
  2014-10-06  1:18 ` [PATCH 0/4] ISDN patches for net-next David Miller
  4 siblings, 0 replies; 10+ messages in thread
From: Tilman Schmidt @ 2014-10-03 15:03 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, Hansjoerg Lipp, Karsten Keil, isdn4linux

Field int_in_endpointAddr was set but never used. Drop it.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
---
 drivers/isdn/gigaset/usb-gigaset.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c
index 00d4077..8bda5c8 100644
--- a/drivers/isdn/gigaset/usb-gigaset.c
+++ b/drivers/isdn/gigaset/usb-gigaset.c
@@ -142,7 +142,6 @@ struct usb_cardstate {
 	unsigned char		*rcvbuf;
 	int			rcvbuf_size;
 	struct urb		*read_urb;
-	__u8			int_in_endpointAddr;
 
 	char			bchars[6];		/* for request 0x19 */
 };
@@ -741,7 +740,6 @@ static int gigaset_probe(struct usb_interface *interface,
 	}
 	buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
 	ucs->rcvbuf_size = buffer_size;
-	ucs->int_in_endpointAddr = endpoint->bEndpointAddress;
 	ucs->rcvbuf = kmalloc(buffer_size, GFP_KERNEL);
 	if (!ucs->rcvbuf) {
 		dev_err(cs->dev, "Couldn't allocate rcvbuf\n");
-- 
1.9.2.459.g68773ac

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/4] ISDN patches for net-next
  2014-10-03 15:03 [PATCH 0/4] ISDN patches for net-next Tilman Schmidt
                   ` (3 preceding siblings ...)
  2014-10-03 15:03 ` [PATCH 3/4] isdn/gigaset: use USB API function usb_endpoint_num() Tilman Schmidt
@ 2014-10-06  1:18 ` David Miller
  4 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2014-10-06  1:18 UTC (permalink / raw)
  To: tilman; +Cc: netdev, hjlipp, isdn, isdn4linux

From: Tilman Schmidt <tilman@imap.cc>
Date: Fri, 3 Oct 2014 17:03:32 +0200

> Here's a series of patches for the ISDN CAPI subsystem and the
> Gigaset ISDN driver.  Please merge via net-next.

Series applied, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-10-06  1:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-03 15:03 [PATCH 0/4] ISDN patches for net-next Tilman Schmidt
2014-10-03 15:03 ` [PATCH 1/4] isdn/gigaset: improve error handling when leaving DLE mode Tilman Schmidt
2014-10-03 15:03 ` [PATCH 4/4] isdn/capi: drop two dead if branches Tilman Schmidt
2014-10-03 15:03 ` [PATCH 2/4] isdn/gigaset: drop unused cardstate structure member Tilman Schmidt
2014-10-03 15:03 ` [PATCH 3/4] isdn/gigaset: use USB API function usb_endpoint_num() Tilman Schmidt
2014-10-06  1:18 ` [PATCH 0/4] ISDN patches for net-next David Miller
  -- strict thread matches above, loose matches on Subject: below --
2014-05-18 21:26 Tilman Schmidt
2014-05-19  1:36 ` David Miller
2014-05-19 21:36   ` Tilman Schmidt
2014-05-21 21:02     ` David Miller

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 NNTP newsgroup(s).