[5/5] isdn: move capi drivers to staging

Message ID 20190423151143.464992-12-arnd@arndb.de
State Superseded
Headers show
Series
  • isdn: deprecate non-mISDN drivers
Related show

Commit Message

Arnd Bergmann April 23, 2019, 3:11 p.m.
I tried to find any indication of whether the capi drivers are
still in use, and have not found anything  from a long time ago.

With public ISDN networks almost completely shut down over the past 12
months, there is very little you can actually do with this hardware. The
main remaining use case would be to connect ISDN voice phones to an
in-house installation with Asterisk or LCR, but anyone trying this in
turn seems to be using either the mISDN driver stack, or out-of-tree
drivers from the hardware vendors.

I may of course have missed something, so I would suggest moving
these into drivers/staging/ just in case someone still uses one
of the three remaining in-kernel drivers (avm, hysdn, gigaset).

If nobody complains, we can remove them entirely in six months,
or otherwise move the core code and any drivers that are still
needed back into drivers/isdn.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 MAINTAINERS                                   | 16 +++++++----
 drivers/isdn/Kconfig                          | 27 ------------------
 drivers/isdn/Makefile                         |  3 --
 drivers/isdn/hardware/Makefile                |  1 -
 drivers/staging/Kconfig                       |  2 ++
 drivers/staging/Makefile                      |  1 +
 .../staging/isdn/Documentation}/CREDITS       |  0
 .../isdn/Documentation}/INTERFACE.CAPI        |  0
 .../staging/isdn/Documentation}/README.avmb1  |  0
 .../isdn/Documentation}/README.gigaset        |  0
 .../staging/isdn/Documentation}/README.hysdn  |  0
 drivers/staging/isdn/Kconfig                  | 28 +++++++++++++++++++
 drivers/staging/isdn/Makefile                 |  9 ++++++
 drivers/staging/isdn/TODO                     | 22 +++++++++++++++
 .../hardware => staging/isdn}/avm/Kconfig     |  0
 .../hardware => staging/isdn}/avm/Makefile    |  2 ++
 .../hardware => staging/isdn}/avm/avm_cs.c    |  0
 .../hardware => staging/isdn}/avm/avmcard.h   |  0
 .../{isdn/hardware => staging/isdn}/avm/b1.c  |  0
 .../hardware => staging/isdn}/avm/b1dma.c     |  0
 .../hardware => staging/isdn}/avm/b1isa.c     |  0
 .../hardware => staging/isdn}/avm/b1pci.c     |  0
 .../hardware => staging/isdn}/avm/b1pcmcia.c  |  0
 .../{isdn/hardware => staging/isdn}/avm/c4.c  |  0
 .../hardware => staging/isdn}/avm/t1isa.c     |  0
 .../hardware => staging/isdn}/avm/t1pci.c     |  0
 drivers/{ => staging}/isdn/capi/Kconfig       |  0
 drivers/{ => staging}/isdn/capi/Makefile      |  2 ++
 drivers/{ => staging}/isdn/capi/capi.c        |  0
 drivers/{ => staging}/isdn/capi/capilib.c     |  0
 drivers/{ => staging}/isdn/capi/capiutil.c    |  0
 drivers/{ => staging}/isdn/capi/kcapi.c       |  0
 drivers/{ => staging}/isdn/capi/kcapi.h       |  0
 drivers/{ => staging}/isdn/capi/kcapi_proc.c  |  0
 drivers/{ => staging}/isdn/gigaset/Kconfig    |  0
 drivers/{ => staging}/isdn/gigaset/Makefile   |  2 ++
 .../{ => staging}/isdn/gigaset/asyncdata.c    |  0
 .../{ => staging}/isdn/gigaset/bas-gigaset.c  |  0
 drivers/{ => staging}/isdn/gigaset/capi.c     |  0
 drivers/{ => staging}/isdn/gigaset/common.c   |  0
 drivers/{ => staging}/isdn/gigaset/ev-layer.c |  0
 drivers/{ => staging}/isdn/gigaset/gigaset.h  |  0
 .../{ => staging}/isdn/gigaset/interface.c    |  0
 drivers/{ => staging}/isdn/gigaset/isocdata.c |  0
 drivers/{ => staging}/isdn/gigaset/proc.c     |  0
 .../{ => staging}/isdn/gigaset/ser-gigaset.c  |  0
 .../{ => staging}/isdn/gigaset/usb-gigaset.c  |  0
 drivers/{ => staging}/isdn/hysdn/Kconfig      |  0
 drivers/{ => staging}/isdn/hysdn/Makefile     |  2 ++
 drivers/{ => staging}/isdn/hysdn/boardergo.c  |  0
 drivers/{ => staging}/isdn/hysdn/boardergo.h  |  0
 drivers/{ => staging}/isdn/hysdn/hycapi.c     |  0
 drivers/{ => staging}/isdn/hysdn/hysdn_boot.c |  0
 drivers/{ => staging}/isdn/hysdn/hysdn_defs.h |  0
 drivers/{ => staging}/isdn/hysdn/hysdn_init.c |  0
 drivers/{ => staging}/isdn/hysdn/hysdn_net.c  |  0
 drivers/{ => staging}/isdn/hysdn/hysdn_pof.h  |  0
 .../{ => staging}/isdn/hysdn/hysdn_procconf.c |  0
 .../{ => staging}/isdn/hysdn/hysdn_proclog.c  |  0
 .../{ => staging}/isdn/hysdn/hysdn_sched.c    |  0
 drivers/{ => staging}/isdn/hysdn/ince1pc.h    |  0
 .../staging/isdn/include}/linux/b1lli.h       |  0
 .../staging/isdn/include}/linux/gigaset_dev.h |  0
 .../isdn/include}/linux/isdn/capilli.h        |  0
 .../isdn/include}/linux/isdn/capiutil.h       |  0
 .../isdn/include}/uapi/linux/isdn/capicmd.h   |  0
 66 files changed, 81 insertions(+), 36 deletions(-)
 rename {Documentation/isdn => drivers/staging/isdn/Documentation}/CREDITS (100%)
 rename {Documentation/isdn => drivers/staging/isdn/Documentation}/INTERFACE.CAPI (100%)
 rename {Documentation/isdn => drivers/staging/isdn/Documentation}/README.avmb1 (100%)
 rename {Documentation/isdn => drivers/staging/isdn/Documentation}/README.gigaset (100%)
 rename {Documentation/isdn => drivers/staging/isdn/Documentation}/README.hysdn (100%)
 create mode 100644 drivers/staging/isdn/Kconfig
 create mode 100644 drivers/staging/isdn/Makefile
 create mode 100644 drivers/staging/isdn/TODO
 rename drivers/{isdn/hardware => staging/isdn}/avm/Kconfig (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/Makefile (86%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/avm_cs.c (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/avmcard.h (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/b1.c (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/b1dma.c (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/b1isa.c (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/b1pci.c (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/b1pcmcia.c (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/c4.c (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/t1isa.c (100%)
 rename drivers/{isdn/hardware => staging/isdn}/avm/t1pci.c (100%)
 rename drivers/{ => staging}/isdn/capi/Kconfig (100%)
 rename drivers/{ => staging}/isdn/capi/Makefile (83%)
 rename drivers/{ => staging}/isdn/capi/capi.c (100%)
 rename drivers/{ => staging}/isdn/capi/capilib.c (100%)
 rename drivers/{ => staging}/isdn/capi/capiutil.c (100%)
 rename drivers/{ => staging}/isdn/capi/kcapi.c (100%)
 rename drivers/{ => staging}/isdn/capi/kcapi.h (100%)
 rename drivers/{ => staging}/isdn/capi/kcapi_proc.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/Kconfig (100%)
 rename drivers/{ => staging}/isdn/gigaset/Makefile (82%)
 rename drivers/{ => staging}/isdn/gigaset/asyncdata.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/bas-gigaset.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/capi.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/common.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/ev-layer.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/gigaset.h (100%)
 rename drivers/{ => staging}/isdn/gigaset/interface.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/isocdata.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/proc.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/ser-gigaset.c (100%)
 rename drivers/{ => staging}/isdn/gigaset/usb-gigaset.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/Kconfig (100%)
 rename drivers/{ => staging}/isdn/hysdn/Makefile (79%)
 rename drivers/{ => staging}/isdn/hysdn/boardergo.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/boardergo.h (100%)
 rename drivers/{ => staging}/isdn/hysdn/hycapi.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/hysdn_boot.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/hysdn_defs.h (100%)
 rename drivers/{ => staging}/isdn/hysdn/hysdn_init.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/hysdn_net.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/hysdn_pof.h (100%)
 rename drivers/{ => staging}/isdn/hysdn/hysdn_procconf.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/hysdn_proclog.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/hysdn_sched.c (100%)
 rename drivers/{ => staging}/isdn/hysdn/ince1pc.h (100%)
 rename {include/uapi => drivers/staging/isdn/include}/linux/b1lli.h (100%)
 rename {include/uapi => drivers/staging/isdn/include}/linux/gigaset_dev.h (100%)
 rename {include => drivers/staging/isdn/include}/linux/isdn/capilli.h (100%)
 rename {include => drivers/staging/isdn/include}/linux/isdn/capiutil.h (100%)
 rename {include => drivers/staging/isdn/include}/uapi/linux/isdn/capicmd.h (100%)

-- 
2.20.0

Comments

Thomas Jarosch April 24, 2019, 9:24 a.m. | #1
Hello Arnd,

You wrote on Tue, Apr 23, 2019 at 05:11:43PM +0200:
> I tried to find any indication of whether the capi drivers are

> still in use, and have not found anything  from a long time ago.

> 

> With public ISDN networks almost completely shut down over the past 12

> months, there is very little you can actually do with this hardware. The

> main remaining use case would be to connect ISDN voice phones to an

> in-house installation with Asterisk or LCR, but anyone trying this in

> turn seems to be using either the mISDN driver stack, or out-of-tree

> drivers from the hardware vendors.

> 

> I may of course have missed something, so I would suggest moving

> these into drivers/staging/ just in case someone still uses one

> of the three remaining in-kernel drivers (avm, hysdn, gigaset).

> 

> If nobody complains, we can remove them entirely in six months,

> or otherwise move the core code and any drivers that are still

> needed back into drivers/isdn.


thanks for your isdn4linux cleanup work!

AFAIK the base capi drivers are still needed for mISDN, too.
I quickly checked a machine that uses mISDNcapid for receiving fax
and the modules "capi" and "kernelcapi" are loaded.

# lsmod |grep capi
capi                   10751  2
kernelcapi             33675  1 capi

# capiinfo
Number of Controllers : 1
Controller 1:
Manufacturer: mISDN
CAPI Version: 2.0
Manufacturer Version: 0.1
Serial Number: 0000001
BChannels: 2
Global Options: 0x00000001
   internal controller supported
B1 protocols support: 0x00000013
   64 kbit/s with HDLC framing
   64 kbit/s bit-transparent operation
   T.30 modem for fax group 3
B2 protocols support: 0x00000013
   ISO 7776 (X.75 SLP)
   Transparent
   T.30 for fax group 3
B3 protocols support: 0x00000031
   Transparent
   T.30 for fax group 3
   T.30 for fax group 3 with extensions

  0100
  0200
  01000000
  13000000
  13000000
  31000000
  00000000 00000000 00000000 00000000 00000000 00000000
  00000000 00000000 00000000 00000000 00000000

Supplementary services support: 0x00000000


-> I think the CAPI layer is still needed, but Karsten knows best.


The ISDN network of Deutsche Telekom in Germany is still
*in the process* of being shut down, business customers that use
"direct inward dialing" (DID / "Anlagenanschlu├č") often still use ISDN.
For example we use it here at the office, but preparations for
a SIP migration are being done.

Vodafone Germany guarantees business customers to support ISDN until 2022.

Quite a few people use a SIP -> ISDN converter like the Fritz!Box or LANCOM 
routers to keep their fax machines running. It's a bit crazy, but people seem
to love it. We deal with this on a weekly basis to support
our customers during the migration period.

Intra2net is currently in the process of upgrading to kernel 4.19.x
and Karsten recently did all the necessary adaptions for mISDN.
So the ISDN code is used with modern (LTS) kernels ^^

Best regards,
Thomas Jarosch
Arnd Bergmann April 24, 2019, 12:29 p.m. | #2
On Wed, Apr 24, 2019 at 11:24 AM Thomas Jarosch
<thomas.jarosch@intra2net.com> wrote:
> You wrote on Tue, Apr 23, 2019 at 05:11:43PM +0200:

> > I tried to find any indication of whether the capi drivers are

> > still in use, and have not found anything  from a long time ago.

> >

> > With public ISDN networks almost completely shut down over the past 12

> > months, there is very little you can actually do with this hardware. The

> > main remaining use case would be to connect ISDN voice phones to an

> > in-house installation with Asterisk or LCR, but anyone trying this in

> > turn seems to be using either the mISDN driver stack, or out-of-tree

> > drivers from the hardware vendors.

> >

> > I may of course have missed something, so I would suggest moving

> > these into drivers/staging/ just in case someone still uses one

> > of the three remaining in-kernel drivers (avm, hysdn, gigaset).

> >

> > If nobody complains, we can remove them entirely in six months,

> > or otherwise move the core code and any drivers that are still

> > needed back into drivers/isdn.

>

> thanks for your isdn4linux cleanup work!

>

> AFAIK the base capi drivers are still needed for mISDN, too.

> I quickly checked a machine that uses mISDNcapid for receiving fax

> and the modules "capi" and "kernelcapi" are loaded.


Ok, interesting. My understanding was that mISDN CAPI support
was done purely in user space, on top of the mISDN interface.

I don't see any interfaction between the two in the kernel code,
but if the capi module is required for mISDN, we clearly have to
keep it. We could still move the avm/gigaset/hysdn/cmtp drivers
to staging though, if there are no users for those.

> # lsmod |grep capi

> capi                   10751  2

> kernelcapi             33675  1 capi

>

> # capiinfo

> Number of Controllers : 1

> Controller 1:

> Manufacturer: mISDN

> CAPI Version: 2.0

> Manufacturer Version: 0.1

> Serial Number: 0000001

> BChannels: 2

> Global Options: 0x00000001

>    internal controller supported

> B1 protocols support: 0x00000013

>    64 kbit/s with HDLC framing

>    64 kbit/s bit-transparent operation

>    T.30 modem for fax group 3

> B2 protocols support: 0x00000013

>    ISO 7776 (X.75 SLP)

>    Transparent

>    T.30 for fax group 3

> B3 protocols support: 0x00000031

>    Transparent

>    T.30 for fax group 3

>    T.30 for fax group 3 with extensions

>

>   0100

>   0200

>   01000000

>   13000000

>   13000000

>   31000000

>   00000000 00000000 00000000 00000000 00000000 00000000

>   00000000 00000000 00000000 00000000 00000000

>

> Supplementary services support: 0x00000000

>

>

> -> I think the CAPI layer is still needed, but Karsten knows best.

>

>

> The ISDN network of Deutsche Telekom in Germany is still

> *in the process* of being shut down, business customers that use

> "direct inward dialing" (DID / "Anlagenanschlu├č") often still use ISDN.

> For example we use it here at the office, but preparations for

> a SIP migration are being done.


Right, this is what I'm trying to find out here. I realize that there
are (very few) remaining users of ISDN voice services, but this only
matters if someone uses them

1. with a modern Linux kernel, and planning to upgrade beyond linux-5.3
2. with a device driver that ships with the kernel
3. using the CAPI subsystem

I suspect that all three of the above are true in isolation, but onless
at least one person needs all three combined, that doesn't stop us
from staging them out.

> Vodafone Germany guarantees business customers to support ISDN until 2022.

>

> Quite a few people use a SIP -> ISDN converter like the Fritz!Box or LANCOM

> routers to keep their fax machines running. It's a bit crazy, but people seem

> to love it. We deal with this on a weekly basis to support

> our customers during the migration period.


This is certainly fine as well, as long as neither the router nor the
fax machine depend on the CAPI drivers remaining in future Linux
kernels. My understanding is that Fritz!Box routers are usually
on ancient kernels and do not use the mainline driver stack for ISDN,
so that's fine. I don't know about LANCOM, but looking at their
firmware images indicates that they are using NetBSD and are not
affected by Linux kernel changes either.

That leaves the question of whether there is anyone rolling their
own routers and/or fax machines based on future kernels with the
avm/gigaset/hysdn/cmtp CAPI drivers, and which drivers in particular
that would be.

> Intra2net is currently in the process of upgrading to kernel 4.19.x

> and Karsten recently did all the necessary adaptions for mISDN.

> So the ISDN code is used with modern (LTS) kernels ^^


Ok. If you are on 4.19 (or moving to that now), I would assume that
you probably upgrade to a future kernel later. Even if you don't
plan to, it's the safe bet.

      Arnd
Thomas Jarosch April 24, 2019, 1:06 p.m. | #3
Hi Arnd,

> Ok, interesting. My understanding was that mISDN CAPI support

> was done purely in user space, on top of the mISDN interface.

>

> I don't see any interfaction between the two in the kernel code,

> but if the capi module is required for mISDN, we clearly have to

> keep it. We could still move the avm/gigaset/hysdn/cmtp drivers

> to staging though, if there are no users for those.


AVM Fritz!PCI cards are supported by the mISDN subsystem anyway,
the new driver is "avmfritz" and used by us in production.

> Right, this is what I'm trying to find out here. I realize that there

> are (very few) remaining users of ISDN voice services, but this only

> matters if someone uses them

> 

> 1. with a modern Linux kernel, and planning to upgrade beyond linux-5.3

> 2. with a device driver that ships with the kernel

> 3. using the CAPI subsystem

> 

> I suspect that all three of the above are true in isolation, but onless

> at least one person needs all three combined, that doesn't stop us

> from staging them out.


1. + 3. applies to us. The mISDN drivers are based on the kernel ones,
but maintained in an extra git tree on top of the kernel. The situation
is not ideal but that's what it currently is. git repo:
https://github.com/ISDN4Linux/mISDN

> That leaves the question of whether there is anyone rolling their

> own routers and/or fax machines based on future kernels with the

> avm/gigaset/hysdn/cmtp CAPI drivers, and which drivers in particular

> that would be.


I would guess that isdn4linux is mostly dead and the drivers
can be moved to staging. I didn't encounter cmtp (ISDN over Bluetooth)
in real life yet.

Intra2net uses mISDN v2 only and software fax support in mISDNcapid was 
developed because of us, so I guess we are the main user, too.

[funny side note: I use a 4 port Eicon diva card at home for my SIP
-> ISDN gateway. The eicon driver just got removed, too, but it still works
fine on Centos 7.x 3.10 kernels. Though this is an exotic use case and I would not
NAK the removal of the driver since the kernel maintenance costs
don't justify it. If it stops getting supported, I'll either set up
something based on mISDNv2 + LCR or get a used Fritz!Box for this task.]

> > Intra2net is currently in the process of upgrading to kernel 4.19.x

> > and Karsten recently did all the necessary adaptions for mISDN.

> > So the ISDN code is used with modern (LTS) kernels ^^

> 

> Ok. If you are on 4.19 (or moving to that now), I would assume that

> you probably upgrade to a future kernel later. Even if you don't

> plan to, it's the safe bet.


Correct. Intra2net usually moves to LTS kernels and skips a few versions since 
the migration work takes a few months to verify everything still works. We have 
an "avocado"[1] automated test framework for the whole distribution but there's 
always some userspace API compatibility issue, a small patch needed here or a 
crash there. For example my colleague tries to figure out right now why the 
Microsoft Hyper-V network driver hangs on module load with kernel 4.19.35
while downgrading to the previous kernel works instantly.
Sounds like git bisect "fun" for her...

[1] https://avocado-framework.github.io/
    https://github.com/intra2net/avocado-i2n


Best regards,
Thomas Jarosch
Arnd Bergmann April 25, 2019, 11:24 a.m. | #4
On Wed, Apr 24, 2019 at 3:06 PM Thomas Jarosch
<thomas.jarosch@intra2net.com> wrote:
>

> Hi Arnd,

>

> > Ok, interesting. My understanding was that mISDN CAPI support

> > was done purely in user space, on top of the mISDN interface.

> >

> > I don't see any interfaction between the two in the kernel code,

> > but if the capi module is required for mISDN, we clearly have to

> > keep it. We could still move the avm/gigaset/hysdn/cmtp drivers

> > to staging though, if there are no users for those.

>

> AVM Fritz!PCI cards are supported by the mISDN subsystem anyway,

> the new driver is "avmfritz" and used by us in production.

>

> > Right, this is what I'm trying to find out here. I realize that there

> > are (very few) remaining users of ISDN voice services, but this only

> > matters if someone uses them

> >

> > 1. with a modern Linux kernel, and planning to upgrade beyond linux-5.3

> > 2. with a device driver that ships with the kernel

> > 3. using the CAPI subsystem

> >

> > I suspect that all three of the above are true in isolation, but onless

> > at least one person needs all three combined, that doesn't stop us

> > from staging them out.

>

> 1. + 3. applies to us. The mISDN drivers are based on the kernel ones,

> but maintained in an extra git tree on top of the kernel. The situation

> is not ideal but that's what it currently is. git repo:

> https://github.com/ISDN4Linux/mISDN


I'm still confused by this: You say here that you use the CAPI
subsystem from the mainline kernel (i.e. /dev/capi20 rather
than mISDNcapid), but this does not appear to interact at all with
mISDN, neither the in-kernel variant nor the one you link to.

> > That leaves the question of whether there is anyone rolling their

> > own routers and/or fax machines based on future kernels with the

> > avm/gigaset/hysdn/cmtp CAPI drivers, and which drivers in particular

> > that would be.

>

> I would guess that isdn4linux is mostly dead and the drivers

> can be moved to staging.


I'd still prefer to remove isdn4linux+hisax completely and
only take CAPI+avm/gigaset/hysdn into staging.
My original suggestion was to move all of it to staging, but if we
keep cmtp in the tree, then at least the CAPI core has to stay
as well.

> I didn't encounter cmtp (ISDN over Bluetooth) in real life yet.

> Intra2net uses mISDN v2 only and software fax support in mISDNcapid was

> developed because of us, so I guess we are the main user, too.


> [funny side note: I use a 4 port Eicon diva card at home for my SIP

> -> ISDN gateway. The eicon driver just got removed, too, but it still works

> fine on Centos 7.x 3.10 kernels. Though this is an exotic use case and I would not

> NAK the removal of the driver since the kernel maintenance costs

> don't justify it. If it stops getting supported, I'll either set up

> something based on mISDNv2 + LCR or get a used Fritz!Box for this task.]


There seems to also be a third-party driver for the Divas:
https://www.dialogic.com/downloads/diva/diva%20sr%20linux

I think this is what most others that still have such hardware use,
and has been the case for a while.

        Arnd
Thomas Jarosch April 29, 2019, 9:58 a.m. | #5
Hi Arnd,

You wrote on Thu, Apr 25, 2019 at 01:24:09PM +0200:
> > > Right, this is what I'm trying to find out here. I realize that there

> > > are (very few) remaining users of ISDN voice services, but this only

> > > matters if someone uses them

> > >

> > > 1. with a modern Linux kernel, and planning to upgrade beyond linux-5.3

> > > 2. with a device driver that ships with the kernel

> > > 3. using the CAPI subsystem

> > >

> > > I suspect that all three of the above are true in isolation, but onless

> > > at least one person needs all three combined, that doesn't stop us

> > > from staging them out.

> >

> > 1. + 3. applies to us. The mISDN drivers are based on the kernel ones,

> > but maintained in an extra git tree on top of the kernel. The situation

> > is not ideal but that's what it currently is. git repo:

> > https://github.com/ISDN4Linux/mISDN

> 

> I'm still confused by this: You say here that you use the CAPI

> subsystem from the mainline kernel (i.e. /dev/capi20 rather

> than mISDNcapid), but this does not appear to interact at all with

> mISDN, neither the in-kernel variant nor the one you link to.


my working theory was that a userspace capi application
talks to mISDNcapid via the kernel's CAPI layer as a proxy.

Karsten's original announcement mentioned
mISDN v2 CAPI support is userspace only:
https://isdn4linux.listserv.isdn4linux.narkive.com/bRkOUkZG/announcement-misdn-fax-capi-2-0-support


I did some preliminary research by removing the /dev/capi20 device node
and checked if "capiinfo" still works via strace -> it does.

# strace -e open,connect capiinfo
open("/usr/lib/libcapi20.so.3", O_RDONLY|O_CLOEXEC) = 3
open("/dev/shm/sem.CAPI20_shared_sem.v01000010", O_RDWR|O_NOFOLLOW) = 3
open("/dev/shm/CAPI20_shared_memory.v01000010", O_RDWR|O_CREAT|O_NOFOLLOW|O_CLOEXEC, 0666) = 3
open("/usr/lib/capi/lib_capi_mod_misdn.so.2", O_RDONLY|O_CLOEXEC) = 5
open("/usr/lib/capi/lib_capi_mod_std.so.2", O_RDONLY|O_CLOEXEC) = 5
open("/root/.capi20rc", O_RDONLY)       = -1 ENOENT (No such file or directory)
open("/etc/capi20.conf", O_RDONLY)      = 4
open("/dev/capi20", O_RDWR)             = -1 ENOENT (No such file or directory)
open("/dev/isdn/capi20", O_RDWR)        = -1 ENOENT (No such file or directory)
connect(4, {sa_family=AF_UNIX, sun_path="/var/run/mISDNcapid/sock"}, 110) = 0
Number of Controllers : 1
connect(5, {sa_family=AF_UNIX, sun_path="/var/run/mISDNcapid/sock"}, 110) = 0
Controller 1:
Manufacturer: mISDN
CAPI Version: 2.0
Manufacturer Version: 0.1
Serial Number: 0000001
..

The trick is the lib_capi_mod_misdn.so library.
It's a plugin for the CAPI tools to directly talk to mISDNcapid.

I will do more thorough research next week if the CAPI userspace stuff runs with 
 the kernel CAPI layer disabled. It could be that the userspace tools like 
"capiinit" check for the presence of the kernel CAPI interface but don't really 
need it. We'll find out.

Intra2net officially supports AVM b1 and c4 cards for fax but we didn't
encounter these cards for years in customer support and I'm also 
willing to officially cancel support for those.

-> it's good to move the drivers to staging.

Best regards,
Thomas
Arnd Bergmann April 29, 2019, 11:57 a.m. | #6
On Mon, Apr 29, 2019 at 11:59 AM Thomas Jarosch
<thomas.jarosch@intra2net.com> wrote:
> You wrote on Thu, Apr 25, 2019 at 01:24:09PM +0200:

> > I'm still confused by this: You say here that you use the CAPI

> > subsystem from the mainline kernel (i.e. /dev/capi20 rather

> > than mISDNcapid), but this does not appear to interact at all with

> > mISDN, neither the in-kernel variant nor the one you link to.

>

> my working theory was that a userspace capi application

> talks to mISDNcapid via the kernel's CAPI layer as a proxy.

>

> Karsten's original announcement mentioned

> mISDN v2 CAPI support is userspace only:

> https://isdn4linux.listserv.isdn4linux.narkive.com/bRkOUkZG/announcement-misdn-fax-capi-2-0-support

>

>

> I did some preliminary research by removing the /dev/capi20 device node

> and checked if "capiinfo" still works via strace -> it does.

>

> # strace -e open,connect capiinfo

> open("/usr/lib/libcapi20.so.3", O_RDONLY|O_CLOEXEC) = 3

> open("/dev/shm/sem.CAPI20_shared_sem.v01000010", O_RDWR|O_NOFOLLOW) = 3

> open("/dev/shm/CAPI20_shared_memory.v01000010", O_RDWR|O_CREAT|O_NOFOLLOW|O_CLOEXEC, 0666) = 3

> open("/usr/lib/capi/lib_capi_mod_misdn.so.2", O_RDONLY|O_CLOEXEC) = 5

> open("/usr/lib/capi/lib_capi_mod_std.so.2", O_RDONLY|O_CLOEXEC) = 5

> open("/root/.capi20rc", O_RDONLY)       = -1 ENOENT (No such file or directory)

> open("/etc/capi20.conf", O_RDONLY)      = 4

> open("/dev/capi20", O_RDWR)             = -1 ENOENT (No such file or directory)

> open("/dev/isdn/capi20", O_RDWR)        = -1 ENOENT (No such file or directory)

> connect(4, {sa_family=AF_UNIX, sun_path="/var/run/mISDNcapid/sock"}, 110) = 0

> Number of Controllers : 1

> connect(5, {sa_family=AF_UNIX, sun_path="/var/run/mISDNcapid/sock"}, 110) = 0

> Controller 1:

> Manufacturer: mISDN

> CAPI Version: 2.0

> Manufacturer Version: 0.1

> Serial Number: 0000001

> ..

>

> The trick is the lib_capi_mod_misdn.so library.

> It's a plugin for the CAPI tools to directly talk to mISDNcapid.


Ok, that's also what I guessed from taking a brief look at the
library: it just tries all possible backends to find hardware, which
will open /dev/capi20 if it exists, but it still continues without it.

> Intra2net officially supports AVM b1 and c4 cards for fax but we didn't

> encounter these cards for years in customer support and I'm also

> willing to officially cancel support for those.

>

> -> it's good to move the drivers to staging.


Ok, thanks a lot for researching this! Since you are currently moving
to 4.19 which still has CAPI, you also don't have to cancel support
for those quite yet, and we may also have yet another stable release
(5.3 or 5.4?) that you can upgrade to before it gets thrown out of
staging.

       Arnd

Patch

diff --git a/MAINTAINERS b/MAINTAINERS
index 1e3a739f0145..c090207ab4fa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6556,9 +6556,7 @@  M:	Paul Bolle <pebolle@tiscali.nl>
 L:	gigaset307x-common@lists.sourceforge.net
 W:	http://gigaset307x.sourceforge.net/
 S:	Odd Fixes
-F:	Documentation/isdn/README.gigaset
-F:	drivers/isdn/gigaset/
-F:	include/uapi/linux/gigaset_dev.h
+F:	drivers/staging/isdn/gigaset/
 
 GNSS SUBSYSTEM
 M:	Johan Hovold <johan@kernel.org>
@@ -8236,18 +8234,26 @@  S:	Supported
 W:	http://www.linux-iscsi.org
 F:	drivers/infiniband/ulp/isert
 
-ISDN SUBSYSTEM
+ISDN/mISDN SUBSYSTEM
 M:	Karsten Keil <isdn@linux-pingi.de>
 L:	isdn4linux@listserv.isdn4linux.de (subscribers-only)
 L:	netdev@vger.kernel.org
 W:	http://www.isdn4linux.de
-T:	git git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/isdn-2.6.git
 S:	Maintained
 F:	Documentation/isdn/
+F:	drivers/staging/isdn/
 F:	drivers/isdn/
 F:	include/linux/isdn/
 F:	include/uapi/linux/isdn/
 
+ISDN/CAPI SUBSYSTEM
+M:	Karsten Keil <isdn@linux-pingi.de>
+L:	isdn4linux@listserv.isdn4linux.de (subscribers-only)
+L:	netdev@vger.kernel.org
+W:	http://www.isdn4linux.de
+S:	Odd Fixes
+F:	drivers/staging/isdn/
+
 IT87 HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon@vger.kernel.org
diff --git a/drivers/isdn/Kconfig b/drivers/isdn/Kconfig
index 161f7527df70..7e21b5c4b9b0 100644
--- a/drivers/isdn/Kconfig
+++ b/drivers/isdn/Kconfig
@@ -20,33 +20,6 @@  menuconfig ISDN
 
 if ISDN
 
-menuconfig ISDN_CAPI
-	tristate "CAPI 2.0 subsystem"
-	help
-	  This provides CAPI (the Common ISDN Application Programming
-	  Interface) Version 2.0, a standard making it easy for programs to
-	  access ISDN hardware in a device independent way. (For details see
-	  <http://www.capi.org/>.)  CAPI supports making and accepting voice
-	  and data connections, controlling call options and protocols,
-	  as well as ISDN supplementary services like call forwarding or
-	  three-party conferences (if supported by the specific hardware
-	  driver).
-
-	  Select this option and the appropriate hardware driver below if
-	  you have an ISDN adapter supported by the CAPI subsystem.
-
-if ISDN_CAPI
-
-source "drivers/isdn/capi/Kconfig"
-
-source "drivers/isdn/hardware/Kconfig"
-
-endif # ISDN_CAPI
-
-source "drivers/isdn/gigaset/Kconfig"
-
-source "drivers/isdn/hysdn/Kconfig"
-
 source "drivers/isdn/mISDN/Kconfig"
 
 endif # ISDN
diff --git a/drivers/isdn/Makefile b/drivers/isdn/Makefile
index f2a529c5a511..0bdadffeb939 100644
--- a/drivers/isdn/Makefile
+++ b/drivers/isdn/Makefile
@@ -3,8 +3,5 @@ 
 
 # Object files in subdirectories
 
-obj-$(CONFIG_ISDN_CAPI)			+= capi/
 obj-$(CONFIG_MISDN)			+= mISDN/
 obj-$(CONFIG_ISDN)			+= hardware/
-obj-$(CONFIG_HYSDN)			+= hysdn/
-obj-$(CONFIG_ISDN_DRV_GIGASET)		+= gigaset/
diff --git a/drivers/isdn/hardware/Makefile b/drivers/isdn/hardware/Makefile
index e503032b05a0..da55c4a285f6 100644
--- a/drivers/isdn/hardware/Makefile
+++ b/drivers/isdn/hardware/Makefile
@@ -2,5 +2,4 @@ 
 
 # Object files in subdirectories
 
-obj-$(CONFIG_CAPI_AVM)		+= avm/
 obj-$(CONFIG_MISDN)		+= mISDN/
diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index 62951e836cbc..53e748b90c2c 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -122,4 +122,6 @@  source "drivers/staging/axis-fifo/Kconfig"
 
 source "drivers/staging/erofs/Kconfig"
 
+source "drivers/staging/isdn/Kconfig"
+
 endif # STAGING
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index d1b17ddcd354..dab0be5ae2ec 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -51,3 +51,4 @@  obj-$(CONFIG_SOC_MT7621)	+= mt7621-dts/
 obj-$(CONFIG_STAGING_GASKET_FRAMEWORK)	+= gasket/
 obj-$(CONFIG_XIL_AXIS_FIFO)	+= axis-fifo/
 obj-$(CONFIG_EROFS_FS)		+= erofs/
+obj-$(CONFIG_ISDN_CAPI)		+= isdn/
diff --git a/Documentation/isdn/CREDITS b/drivers/staging/isdn/Documentation/CREDITS
similarity index 100%
rename from Documentation/isdn/CREDITS
rename to drivers/staging/isdn/Documentation/CREDITS
diff --git a/Documentation/isdn/INTERFACE.CAPI b/drivers/staging/isdn/Documentation/INTERFACE.CAPI
similarity index 100%
rename from Documentation/isdn/INTERFACE.CAPI
rename to drivers/staging/isdn/Documentation/INTERFACE.CAPI
diff --git a/Documentation/isdn/README.avmb1 b/drivers/staging/isdn/Documentation/README.avmb1
similarity index 100%
rename from Documentation/isdn/README.avmb1
rename to drivers/staging/isdn/Documentation/README.avmb1
diff --git a/Documentation/isdn/README.gigaset b/drivers/staging/isdn/Documentation/README.gigaset
similarity index 100%
rename from Documentation/isdn/README.gigaset
rename to drivers/staging/isdn/Documentation/README.gigaset
diff --git a/Documentation/isdn/README.hysdn b/drivers/staging/isdn/Documentation/README.hysdn
similarity index 100%
rename from Documentation/isdn/README.hysdn
rename to drivers/staging/isdn/Documentation/README.hysdn
diff --git a/drivers/staging/isdn/Kconfig b/drivers/staging/isdn/Kconfig
new file mode 100644
index 000000000000..77e1b80af716
--- /dev/null
+++ b/drivers/staging/isdn/Kconfig
@@ -0,0 +1,28 @@ 
+menuconfig ISDN_CAPI
+	tristate "CAPI 2.0 subsystem"
+	help
+	  This provides CAPI (the Common ISDN Application Programming
+	  Interface) Version 2.0, a standard making it easy for programs to
+	  access ISDN hardware in a device independent way. (For details see
+	  <http://www.capi.org/>.)  CAPI supports making and accepting voice
+	  and data connections, controlling call options and protocols,
+	  as well as ISDN supplementary services like call forwarding or
+	  three-party conferences (if supported by the specific hardware
+	  driver).
+
+	  Select this option and the appropriate hardware driver below if
+	  you have an ISDN adapter supported by the CAPI subsystem.
+
+if ISDN_CAPI
+
+source "drivers/staging/isdn/capi/Kconfig"
+
+source "drivers/staging/isdn/avm/Kconfig"
+
+source "drivers/staging/isdn/gigaset/Kconfig"
+
+source "drivers/staging/isdn/hysdn/Kconfig"
+
+
+endif # ISDN_CAPI
+
diff --git a/drivers/staging/isdn/Makefile b/drivers/staging/isdn/Makefile
new file mode 100644
index 000000000000..c5e8b8004f65
--- /dev/null
+++ b/drivers/staging/isdn/Makefile
@@ -0,0 +1,9 @@ 
+# SPDX-License-Identifier: GPL-2.0
+# Makefile for the kernel ISDN subsystem and device drivers.
+
+# Object files in subdirectories
+
+obj-$(CONFIG_ISDN_CAPI)			+= capi/
+obj-$(CONFIG_CAPI_AVM)			+= avm/
+obj-$(CONFIG_HYSDN)			+= hysdn/
+obj-$(CONFIG_ISDN_DRV_GIGASET)		+= gigaset/
diff --git a/drivers/staging/isdn/TODO b/drivers/staging/isdn/TODO
new file mode 100644
index 000000000000..9210d11eb68b
--- /dev/null
+++ b/drivers/staging/isdn/TODO
@@ -0,0 +1,22 @@ 
+TODO: Remove in late 2019 unless there are users
+
+
+I tried to find any indication of whether the capi drivers are
+still in use, and have not found anything  from a long time ago.
+
+With public ISDN networks almost completely shut down over the past 12
+months, there is very little you can actually do with this hardware. The
+main remaining use case would be to connect ISDN voice phones to an
+in-house installation with Asterisk or LCR, but anyone trying this in
+turn seems to be using either the mISDN driver stack, or out-of-tree
+drivers from the hardware vendors.
+
+I may of course have missed something, so I would suggest moving
+these into drivers/staging/ just in case someone still uses one
+of the three remaining in-kernel drivers (avm, hysdn, gigaset).
+
+If nobody complains, we can remove them entirely in six months,
+or otherwise move the core code and any drivers that are still
+needed back into drivers/isdn.
+
+  Arnd Bergmann <arnd@arndb.de>
diff --git a/drivers/isdn/hardware/avm/Kconfig b/drivers/staging/isdn/avm/Kconfig
similarity index 100%
rename from drivers/isdn/hardware/avm/Kconfig
rename to drivers/staging/isdn/avm/Kconfig
diff --git a/drivers/isdn/hardware/avm/Makefile b/drivers/staging/isdn/avm/Makefile
similarity index 86%
rename from drivers/isdn/hardware/avm/Makefile
rename to drivers/staging/isdn/avm/Makefile
index 3830a0573fcc..fa59f7e38e8a 100644
--- a/drivers/isdn/hardware/avm/Makefile
+++ b/drivers/staging/isdn/avm/Makefile
@@ -10,3 +10,5 @@  obj-$(CONFIG_ISDN_DRV_AVMB1_AVM_CS)	+= avm_cs.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_T1ISA)	+= t1isa.o b1.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_T1PCI)	+= t1pci.o b1.o b1dma.o
 obj-$(CONFIG_ISDN_DRV_AVMB1_C4)		+= c4.o b1.o
+
+ccflags-y += -I$(srctree)/$(src)/../include -I$(srctree)/$(src)/../include/uapi
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/staging/isdn/avm/avm_cs.c
similarity index 100%
rename from drivers/isdn/hardware/avm/avm_cs.c
rename to drivers/staging/isdn/avm/avm_cs.c
diff --git a/drivers/isdn/hardware/avm/avmcard.h b/drivers/staging/isdn/avm/avmcard.h
similarity index 100%
rename from drivers/isdn/hardware/avm/avmcard.h
rename to drivers/staging/isdn/avm/avmcard.h
diff --git a/drivers/isdn/hardware/avm/b1.c b/drivers/staging/isdn/avm/b1.c
similarity index 100%
rename from drivers/isdn/hardware/avm/b1.c
rename to drivers/staging/isdn/avm/b1.c
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/staging/isdn/avm/b1dma.c
similarity index 100%
rename from drivers/isdn/hardware/avm/b1dma.c
rename to drivers/staging/isdn/avm/b1dma.c
diff --git a/drivers/isdn/hardware/avm/b1isa.c b/drivers/staging/isdn/avm/b1isa.c
similarity index 100%
rename from drivers/isdn/hardware/avm/b1isa.c
rename to drivers/staging/isdn/avm/b1isa.c
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/staging/isdn/avm/b1pci.c
similarity index 100%
rename from drivers/isdn/hardware/avm/b1pci.c
rename to drivers/staging/isdn/avm/b1pci.c
diff --git a/drivers/isdn/hardware/avm/b1pcmcia.c b/drivers/staging/isdn/avm/b1pcmcia.c
similarity index 100%
rename from drivers/isdn/hardware/avm/b1pcmcia.c
rename to drivers/staging/isdn/avm/b1pcmcia.c
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/staging/isdn/avm/c4.c
similarity index 100%
rename from drivers/isdn/hardware/avm/c4.c
rename to drivers/staging/isdn/avm/c4.c
diff --git a/drivers/isdn/hardware/avm/t1isa.c b/drivers/staging/isdn/avm/t1isa.c
similarity index 100%
rename from drivers/isdn/hardware/avm/t1isa.c
rename to drivers/staging/isdn/avm/t1isa.c
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/staging/isdn/avm/t1pci.c
similarity index 100%
rename from drivers/isdn/hardware/avm/t1pci.c
rename to drivers/staging/isdn/avm/t1pci.c
diff --git a/drivers/isdn/capi/Kconfig b/drivers/staging/isdn/capi/Kconfig
similarity index 100%
rename from drivers/isdn/capi/Kconfig
rename to drivers/staging/isdn/capi/Kconfig
diff --git a/drivers/isdn/capi/Makefile b/drivers/staging/isdn/capi/Makefile
similarity index 83%
rename from drivers/isdn/capi/Makefile
rename to drivers/staging/isdn/capi/Makefile
index 06da3ed2c40a..d299f3e75f89 100644
--- a/drivers/isdn/capi/Makefile
+++ b/drivers/staging/isdn/capi/Makefile
@@ -13,3 +13,5 @@  obj-$(CONFIG_ISDN_CAPI_CAPIDRV)		+= capidrv.o
 
 kernelcapi-y				:= kcapi.o capiutil.o capilib.o
 kernelcapi-$(CONFIG_PROC_FS)		+= kcapi_proc.o
+
+ccflags-y += -I$(srctree)/$(src)/../include -I$(srctree)/$(src)/../include/uapi
diff --git a/drivers/isdn/capi/capi.c b/drivers/staging/isdn/capi/capi.c
similarity index 100%
rename from drivers/isdn/capi/capi.c
rename to drivers/staging/isdn/capi/capi.c
diff --git a/drivers/isdn/capi/capilib.c b/drivers/staging/isdn/capi/capilib.c
similarity index 100%
rename from drivers/isdn/capi/capilib.c
rename to drivers/staging/isdn/capi/capilib.c
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/staging/isdn/capi/capiutil.c
similarity index 100%
rename from drivers/isdn/capi/capiutil.c
rename to drivers/staging/isdn/capi/capiutil.c
diff --git a/drivers/isdn/capi/kcapi.c b/drivers/staging/isdn/capi/kcapi.c
similarity index 100%
rename from drivers/isdn/capi/kcapi.c
rename to drivers/staging/isdn/capi/kcapi.c
diff --git a/drivers/isdn/capi/kcapi.h b/drivers/staging/isdn/capi/kcapi.h
similarity index 100%
rename from drivers/isdn/capi/kcapi.h
rename to drivers/staging/isdn/capi/kcapi.h
diff --git a/drivers/isdn/capi/kcapi_proc.c b/drivers/staging/isdn/capi/kcapi_proc.c
similarity index 100%
rename from drivers/isdn/capi/kcapi_proc.c
rename to drivers/staging/isdn/capi/kcapi_proc.c
diff --git a/drivers/isdn/gigaset/Kconfig b/drivers/staging/isdn/gigaset/Kconfig
similarity index 100%
rename from drivers/isdn/gigaset/Kconfig
rename to drivers/staging/isdn/gigaset/Kconfig
diff --git a/drivers/isdn/gigaset/Makefile b/drivers/staging/isdn/gigaset/Makefile
similarity index 82%
rename from drivers/isdn/gigaset/Makefile
rename to drivers/staging/isdn/gigaset/Makefile
index f8ba14735bf1..bb180ca27fdb 100644
--- a/drivers/isdn/gigaset/Makefile
+++ b/drivers/staging/isdn/gigaset/Makefile
@@ -8,3 +8,5 @@  obj-$(CONFIG_ISDN_DRV_GIGASET) += gigaset.o
 obj-$(CONFIG_GIGASET_M105) += usb_gigaset.o
 obj-$(CONFIG_GIGASET_BASE) += bas_gigaset.o
 obj-$(CONFIG_GIGASET_M101) += ser_gigaset.o
+
+ccflags-y += -I$(srctree)/$(src)/../include -I$(srctree)/$(src)/../include/uapi
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/staging/isdn/gigaset/asyncdata.c
similarity index 100%
rename from drivers/isdn/gigaset/asyncdata.c
rename to drivers/staging/isdn/gigaset/asyncdata.c
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/staging/isdn/gigaset/bas-gigaset.c
similarity index 100%
rename from drivers/isdn/gigaset/bas-gigaset.c
rename to drivers/staging/isdn/gigaset/bas-gigaset.c
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/staging/isdn/gigaset/capi.c
similarity index 100%
rename from drivers/isdn/gigaset/capi.c
rename to drivers/staging/isdn/gigaset/capi.c
diff --git a/drivers/isdn/gigaset/common.c b/drivers/staging/isdn/gigaset/common.c
similarity index 100%
rename from drivers/isdn/gigaset/common.c
rename to drivers/staging/isdn/gigaset/common.c
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/staging/isdn/gigaset/ev-layer.c
similarity index 100%
rename from drivers/isdn/gigaset/ev-layer.c
rename to drivers/staging/isdn/gigaset/ev-layer.c
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/staging/isdn/gigaset/gigaset.h
similarity index 100%
rename from drivers/isdn/gigaset/gigaset.h
rename to drivers/staging/isdn/gigaset/gigaset.h
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/staging/isdn/gigaset/interface.c
similarity index 100%
rename from drivers/isdn/gigaset/interface.c
rename to drivers/staging/isdn/gigaset/interface.c
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/staging/isdn/gigaset/isocdata.c
similarity index 100%
rename from drivers/isdn/gigaset/isocdata.c
rename to drivers/staging/isdn/gigaset/isocdata.c
diff --git a/drivers/isdn/gigaset/proc.c b/drivers/staging/isdn/gigaset/proc.c
similarity index 100%
rename from drivers/isdn/gigaset/proc.c
rename to drivers/staging/isdn/gigaset/proc.c
diff --git a/drivers/isdn/gigaset/ser-gigaset.c b/drivers/staging/isdn/gigaset/ser-gigaset.c
similarity index 100%
rename from drivers/isdn/gigaset/ser-gigaset.c
rename to drivers/staging/isdn/gigaset/ser-gigaset.c
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/staging/isdn/gigaset/usb-gigaset.c
similarity index 100%
rename from drivers/isdn/gigaset/usb-gigaset.c
rename to drivers/staging/isdn/gigaset/usb-gigaset.c
diff --git a/drivers/isdn/hysdn/Kconfig b/drivers/staging/isdn/hysdn/Kconfig
similarity index 100%
rename from drivers/isdn/hysdn/Kconfig
rename to drivers/staging/isdn/hysdn/Kconfig
diff --git a/drivers/isdn/hysdn/Makefile b/drivers/staging/isdn/hysdn/Makefile
similarity index 79%
rename from drivers/isdn/hysdn/Makefile
rename to drivers/staging/isdn/hysdn/Makefile
index da63b636267d..23c6159513a8 100644
--- a/drivers/isdn/hysdn/Makefile
+++ b/drivers/staging/isdn/hysdn/Makefile
@@ -9,3 +9,5 @@  obj-$(CONFIG_HYSDN)		+= hysdn.o
 hysdn-y				:= hysdn_procconf.o hysdn_proclog.o boardergo.o \
 				   hysdn_boot.o hysdn_sched.o hysdn_net.o hysdn_init.o
 hysdn-$(CONFIG_HYSDN_CAPI)	+= hycapi.o
+
+ccflags-y += -I$(srctree)/$(src)/../include -I$(srctree)/$(src)/../include/uapi
diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/staging/isdn/hysdn/boardergo.c
similarity index 100%
rename from drivers/isdn/hysdn/boardergo.c
rename to drivers/staging/isdn/hysdn/boardergo.c
diff --git a/drivers/isdn/hysdn/boardergo.h b/drivers/staging/isdn/hysdn/boardergo.h
similarity index 100%
rename from drivers/isdn/hysdn/boardergo.h
rename to drivers/staging/isdn/hysdn/boardergo.h
diff --git a/drivers/isdn/hysdn/hycapi.c b/drivers/staging/isdn/hysdn/hycapi.c
similarity index 100%
rename from drivers/isdn/hysdn/hycapi.c
rename to drivers/staging/isdn/hysdn/hycapi.c
diff --git a/drivers/isdn/hysdn/hysdn_boot.c b/drivers/staging/isdn/hysdn/hysdn_boot.c
similarity index 100%
rename from drivers/isdn/hysdn/hysdn_boot.c
rename to drivers/staging/isdn/hysdn/hysdn_boot.c
diff --git a/drivers/isdn/hysdn/hysdn_defs.h b/drivers/staging/isdn/hysdn/hysdn_defs.h
similarity index 100%
rename from drivers/isdn/hysdn/hysdn_defs.h
rename to drivers/staging/isdn/hysdn/hysdn_defs.h
diff --git a/drivers/isdn/hysdn/hysdn_init.c b/drivers/staging/isdn/hysdn/hysdn_init.c
similarity index 100%
rename from drivers/isdn/hysdn/hysdn_init.c
rename to drivers/staging/isdn/hysdn/hysdn_init.c
diff --git a/drivers/isdn/hysdn/hysdn_net.c b/drivers/staging/isdn/hysdn/hysdn_net.c
similarity index 100%
rename from drivers/isdn/hysdn/hysdn_net.c
rename to drivers/staging/isdn/hysdn/hysdn_net.c
diff --git a/drivers/isdn/hysdn/hysdn_pof.h b/drivers/staging/isdn/hysdn/hysdn_pof.h
similarity index 100%
rename from drivers/isdn/hysdn/hysdn_pof.h
rename to drivers/staging/isdn/hysdn/hysdn_pof.h
diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/staging/isdn/hysdn/hysdn_procconf.c
similarity index 100%
rename from drivers/isdn/hysdn/hysdn_procconf.c
rename to drivers/staging/isdn/hysdn/hysdn_procconf.c
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/staging/isdn/hysdn/hysdn_proclog.c
similarity index 100%
rename from drivers/isdn/hysdn/hysdn_proclog.c
rename to drivers/staging/isdn/hysdn/hysdn_proclog.c
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/staging/isdn/hysdn/hysdn_sched.c
similarity index 100%
rename from drivers/isdn/hysdn/hysdn_sched.c
rename to drivers/staging/isdn/hysdn/hysdn_sched.c
diff --git a/drivers/isdn/hysdn/ince1pc.h b/drivers/staging/isdn/hysdn/ince1pc.h
similarity index 100%
rename from drivers/isdn/hysdn/ince1pc.h
rename to drivers/staging/isdn/hysdn/ince1pc.h
diff --git a/include/uapi/linux/b1lli.h b/drivers/staging/isdn/include/linux/b1lli.h
similarity index 100%
rename from include/uapi/linux/b1lli.h
rename to drivers/staging/isdn/include/linux/b1lli.h
diff --git a/include/uapi/linux/gigaset_dev.h b/drivers/staging/isdn/include/linux/gigaset_dev.h
similarity index 100%
rename from include/uapi/linux/gigaset_dev.h
rename to drivers/staging/isdn/include/linux/gigaset_dev.h
diff --git a/include/linux/isdn/capilli.h b/drivers/staging/isdn/include/linux/isdn/capilli.h
similarity index 100%
rename from include/linux/isdn/capilli.h
rename to drivers/staging/isdn/include/linux/isdn/capilli.h
diff --git a/include/linux/isdn/capiutil.h b/drivers/staging/isdn/include/linux/isdn/capiutil.h
similarity index 100%
rename from include/linux/isdn/capiutil.h
rename to drivers/staging/isdn/include/linux/isdn/capiutil.h
diff --git a/include/uapi/linux/isdn/capicmd.h b/drivers/staging/isdn/include/uapi/linux/isdn/capicmd.h
similarity index 100%
rename from include/uapi/linux/isdn/capicmd.h
rename to drivers/staging/isdn/include/uapi/linux/isdn/capicmd.h