Commit ce84b36d authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.27pre1

parent 473e3e9d
...@@ -63,6 +63,7 @@ running, the suggested command should tell you. ...@@ -63,6 +63,7 @@ running, the suggested command should tell you.
- Pcmcia-cs 3.1.2 ; cardmgr -V - Pcmcia-cs 3.1.2 ; cardmgr -V
- PPP 2.3.9 ; pppd --version - PPP 2.3.9 ; pppd --version
- Util-linux 2.9i ; chsh -v - Util-linux 2.9i ; chsh -v
- isdn4k-utils v3.1beta7 ; isdnctrl 2>&1|grep version
Upgrade notes Upgrade notes
************* *************
...@@ -245,9 +246,6 @@ modules) are currently distributed separately: see ...@@ -245,9 +246,6 @@ modules) are currently distributed separately: see
DHCP clients for 2.0 do not work with the new networking code in the DHCP clients for 2.0 do not work with the new networking code in the
2.2 kernel. You will need to upgrade your dhcpcd / dhcpclient. 2.2 kernel. You will need to upgrade your dhcpcd / dhcpclient.
The ISDN code in the stock 2.2 kernel may not work for you. If it
doesn't, look in ftp://ftp.suse.com/pub/isdn4linux for updated versions.
In 2.0.x the kernel could be configured to drop source routed IP In 2.0.x the kernel could be configured to drop source routed IP
packets via a compile time configuration option. In 2.2.x, this has packets via a compile time configuration option. In 2.2.x, this has
been replaced by a sysctl. See Documentation/networking/ip-sysctl.txt been replaced by a sysctl. See Documentation/networking/ip-sysctl.txt
...@@ -494,6 +492,15 @@ config.h file needs to ...@@ -494,6 +492,15 @@ config.h file needs to
so be sure to check that when you recompile. so be sure to check that when you recompile.
ISDN4Linux
==========
Since 2.3.27 here is a new length of the phonenumber field, old utils
have to recompile, a upgrade to isdn4k-utils.v3.1beta7 or later is
recomented.
Older isdn4k-utils versions don't support EXTRAVERSION into kernel version
string.
Where to get the files Where to get the files
********************** **********************
...@@ -775,6 +782,11 @@ Patch ...@@ -775,6 +782,11 @@ Patch
The 2.5 release: The 2.5 release:
ftp://ftp.gnu.org/gnu/patch/patch-2.5.tar.gz ftp://ftp.gnu.org/gnu/patch/patch-2.5.tar.gz
ISDN4Linux
==========
The v3.1beta7 release:
ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/testing/isdn4k-utils.v3.1beta7.tar.gz
Other Info Other Info
========== ==========
......
...@@ -6,12 +6,18 @@ INTERFACE ...@@ -6,12 +6,18 @@ INTERFACE
- description of Linklevel and Hardwarelevel ISDN interface. - description of Linklevel and Hardwarelevel ISDN interface.
README README
- general info on what you need and what to do for Linux ISDN. - general info on what you need and what to do for Linux ISDN.
README.FAQ
- general info for FAQ.
README.audio README.audio
- info for running audio over ISDN. - info for running audio over ISDN.
README.fax
- info for using Fax over ISDN.
README.icn README.icn
- info on the ICN-ISDN-card and its driver. - info on the ICN-ISDN-card and its driver.
README.HiSax README.HiSax
- info on the HiSax driver which replaces the old teles. - info on the HiSax driver which replaces the old teles.
README.hfc-pci
- info on hfc-pci based cards.
README.pcbit README.pcbit
- info on the PCBIT-D ISDN adapter and driver. - info on the PCBIT-D ISDN adapter and driver.
README.syncppp README.syncppp
...@@ -22,8 +28,12 @@ README.avmb1 ...@@ -22,8 +28,12 @@ README.avmb1
- info on driver for AVM-B1 ISDN card. - info on driver for AVM-B1 ISDN card.
README.act2000 README.act2000
- info on driver for IBM ACT-2000 card. - info on driver for IBM ACT-2000 card.
README.eicon
- info on driver for Eicon active cards.
README.concap README.concap
- info on "CONCAP" ecapsulation protocol interface used for X.25. - info on "CONCAP" ecapsulation protocol interface used for X.25.
README.diversion
- info on module for isdn diversion services.
README.sc README.sc
- info on driver for Spellcaster cards. - info on driver for Spellcaster cards.
README.x25 README.x25
......
...@@ -15,8 +15,11 @@ Volker G ...@@ -15,8 +15,11 @@ Volker G
For contribution of man-pages, the imontty-tool and a perfect For contribution of man-pages, the imontty-tool and a perfect
maintaining of the mailing-list at hub-wue. maintaining of the mailing-list at hub-wue.
Matthias Hessler (hessler@isdn4linux.de)
For creating and maintaining the FAQ.
Bernhard Hailer (Bernhard.Hailer@lrz.uni-muenchen.de) Bernhard Hailer (Bernhard.Hailer@lrz.uni-muenchen.de)
For maintaining the FAQ. For creating the FAQ, and the leafsite HOWTO.
Michael 'Ghandi' Herold (michael@abadonna.franken.de) Michael 'Ghandi' Herold (michael@abadonna.franken.de)
For contribution of the vbox answering machine. For contribution of the vbox answering machine.
......
...@@ -11,7 +11,7 @@ README for the ISDN-subsystem ...@@ -11,7 +11,7 @@ README for the ISDN-subsystem
necessary. Those programs and some contributed utilities are available necessary. Those programs and some contributed utilities are available
at at
ftp.franken.de ftp.isdn4linux.de
/pub/isdn4linux/isdn4k-utils-<VersionNumber>.tar.gz /pub/isdn4linux/isdn4k-utils-<VersionNumber>.tar.gz
...@@ -22,19 +22,23 @@ README for the ISDN-subsystem ...@@ -22,19 +22,23 @@ README for the ISDN-subsystem
reasons, the mailing-list's primary language is german. However mails reasons, the mailing-list's primary language is german. However mails
written in english have been welcome all the time. written in english have been welcome all the time.
to subscribe: write a email to majordomo@hub-wue.franken.de, to subscribe: write a email to majordomo@listserv.isdn4linux.de,
Subject irrelevant, in the message body: Subject irrelevant, in the message body:
subscribe isdn4linux <your_email_address> subscribe isdn4linux <your_email_address>
To write to the mailing-list, write to isdn4linux@hub-wue.franken.de To write to the mailing-list, write to isdn4linux@listserv.isdn4linux.de
This mailinglist is bidirectionally gated to the newsgroup This mailinglist is bidirectionally gated to the newsgroup
de.alt.comm.isdn4linux de.alt.comm.isdn4linux
There is also a well maintained FAQ (both english and german) available There is also a well maintained FAQ in English available at
at ftp.franken.de in /pub/isdn4linux/FAQ/ http://www.mhessler.de/i4lfaq/
This FAQ is also available at http://www.lrz-muenchen.de/~ui161ab/www/isdn/ It can be viewed online, or downloaded in sgml/text/html format.
The FAQ can also be viewed online at
http://www.isdn4inux.de/faq/
or downloaded from
ftp://ftp.isdn4linux.de/pub/isdn4linux/FAQ/
1.1 Technical details 1.1 Technical details
...@@ -266,6 +270,8 @@ README for the ISDN-subsystem ...@@ -266,6 +270,8 @@ README for the ISDN-subsystem
23 0 Bit coded register: 23 0 Bit coded register:
Bit 0: 0 = Add CPN to RING message off Bit 0: 0 = Add CPN to RING message off
1 = Add CPN to RING message on 1 = Add CPN to RING message on
Bit 1: 0 = Add CPN to FCON message off
1 = Add CPN to FCON message on
Last but not least a (at the moment fairly primitive) device to request Last but not least a (at the moment fairly primitive) device to request
the line-status (/dev/isdninfo) is made available. the line-status (/dev/isdninfo) is made available.
...@@ -581,7 +587,7 @@ README for the ISDN-subsystem ...@@ -581,7 +587,7 @@ README for the ISDN-subsystem
If other drivers will not be affected, I will include the changes If other drivers will not be affected, I will include the changes
in the next release. in the next release.
For developers only, there is a second mailing-list. Write to me For developers only, there is a second mailing-list. Write to me
(fritz@wuemaus.franken.de), if you want to join that list. (fritz@isdn4linux.de), if you want to join that list.
Have fun! Have fun!
......
The FAQ for isdn4linux
======================
Please note that there is a big FAQ available in the isdn4k-utils.
You find it in:
isdn4k-utils/FAQ/i4lfaq.sgml
In case you just want to see the FAQ online, or download the newest version,
you can have a look at my website:
http://www.mhessler.de/i4lfaq/ (view + download)
or:
http://www.isdn4linux.de/faq/ (view)
As the extension tells, the FAQ is in SGML format, and you can convert it
into text/html/... format by using the sgml2txt/sgml2html/... tools.
Alternatively, you can also do a 'configure; make all' in the FAQ directory.
Please have a look at the FAQ before posting anything in the Mailinglist,
or the newsgroup!
Matthias Hessler
hessler@isdn4linux.de
...@@ -63,6 +63,7 @@ Berkom Telekom A4T ...@@ -63,6 +63,7 @@ Berkom Telekom A4T
Scitel Quadro Scitel Quadro
Gazel ISDN cards Gazel ISDN cards
HFC-PCI based cards HFC-PCI based cards
Winbond W6692 based cards
Note: PCF, PCF-Pro: up to now, only the ISDN part is supported Note: PCF, PCF-Pro: up to now, only the ISDN part is supported
PCC-8: not tested yet PCC-8: not tested yet
...@@ -182,6 +183,7 @@ Card types: ...@@ -182,6 +183,7 @@ Card types:
34 Gazel ISDN cards (ISA) irq,io 34 Gazel ISDN cards (ISA) irq,io
34 Gazel ISDN cards (PCI) none 34 Gazel ISDN cards (PCI) none
35 HFC 2BDS0 PCI none 35 HFC 2BDS0 PCI none
36 W6692 based PCI cards none
At the moment IRQ sharing is only possible with PCI cards. Please make sure At the moment IRQ sharing is only possible with PCI cards. Please make sure
...@@ -285,6 +287,7 @@ type ...@@ -285,6 +287,7 @@ type
34 Gazel ISDN cards (ISA) pa=irq, pb=io 34 Gazel ISDN cards (ISA) pa=irq, pb=io
34 Gazel ISDN cards (PCI) no parameter 34 Gazel ISDN cards (PCI) no parameter
35 HFC 2BDS0 PCI no parameter 35 HFC 2BDS0 PCI no parameter
36 W6692 based PCI cards none
Running the driver Running the driver
------------------ ------------------
...@@ -425,6 +428,7 @@ Special thanks to: ...@@ -425,6 +428,7 @@ Special thanks to:
Klaus Lichtenwalder (Klaus.Lichtenwalder@WebForum.DE), for ELSA PCMCIA support Klaus Lichtenwalder (Klaus.Lichtenwalder@WebForum.DE), for ELSA PCMCIA support
Enrik Berkhan (enrik@starfleet.inka.de) for S0BOX specific stuff Enrik Berkhan (enrik@starfleet.inka.de) for S0BOX specific stuff
Ton van Rosmalen for Teles PCI Ton van Rosmalen for Teles PCI
Petr Novak <petr.novak@i.cz> for Winbond W6692 support
and more people who are hunting bugs. (If I forgot somebody, please and more people who are hunting bugs. (If I forgot somebody, please
send me a mail). send me a mail).
......
...@@ -169,7 +169,7 @@ capi20 ...@@ -169,7 +169,7 @@ capi20
Questions Questions
--------- ---------
Check out the FAQ (ftp.franken.de) or subscribe to the Check out the FAQ (ftp.isdn4linux.de) or subscribe to the
linux-avmb1@calle.in-berlin.de mailing list by sending linux-avmb1@calle.in-berlin.de mailing list by sending
a mail to majordomo@calle.in-berlin.de with a mail to majordomo@calle.in-berlin.de with
subscribe linux-avmb1 subscribe linux-avmb1
......
$Id: README.eicon,v 1.4 1999/07/11 17:17:30 armin Exp $ $Id: README.eicon,v 1.5 1999/10/11 18:13:25 armin Exp $
(c) 1999 Cytronics & Melware (c) 1999 Cytronics & Melware (info@melware.de)
This document describes the eicon driver for the This document describes the eicon driver for the
Eicon.Diehl active ISDN cards. Eicon.Diehl active ISDN cards.
...@@ -24,17 +24,26 @@ It is meant to be used with isdn4linux, an ISDN link-level module for Linux. ...@@ -24,17 +24,26 @@ It is meant to be used with isdn4linux, an ISDN link-level module for Linux.
Supported Cards Supported Cards
--------------- ===============
Old ISA type
------------
- S-Card ISA - S-Card ISA
- SX-Card ISA - SX-Card ISA
- SXn-Card ISA - SXn-Card ISA
- SCOM-Card ISA - SCOM-Card ISA
- Quadro-Card ISA - Quadro-Card ISA
- S2M-Card ISA - S2M-Card ISA
DIVA Server family
------------------
- DIVA Server BRI/PCI 2M - DIVA Server BRI/PCI 2M
- DIVA Server PRI/PCI 2M (9M 23M 30M) - DIVA Server PRI/PCI 2M (9M 23M 30M)
(Only analog modem functions of the DSPs are currently implemented) supported functions of onboard DSPs:
- analog modem
- fax group 2/3 (Fax Class 2 commands)
- DTMF detection
ISDN D-Channel Protocols ISDN D-Channel Protocols
------------------------ ------------------------
...@@ -76,6 +85,10 @@ Example for loading and starting a PRI card with E-DSS1 Protocol. ...@@ -76,6 +85,10 @@ Example for loading and starting a PRI card with E-DSS1 Protocol.
Details about using the eiconctrl utility are in 'man eiconctrl' Details about using the eiconctrl utility are in 'man eiconctrl'
or will be printed by starting eiconctrl without any parameters. or will be printed by starting eiconctrl without any parameters.
Thanks to
Deutsche Mailbox Saar-Lor-Lux GmbH
for sponsoring and testing fax
capabilities with Diva Server cards.
Any reports about bugs, errors and even wishes are welcome. Any reports about bugs, errors and even wishes are welcome.
......
...@@ -9,7 +9,7 @@ This only makes sense under the following conditions : ...@@ -9,7 +9,7 @@ This only makes sense under the following conditions :
- You need the commands as dummy, because you are using - You need the commands as dummy, because you are using
hylafax (with patch) for AVM capi. hylafax (with patch) for AVM capi.
- You want to use the fax capabillities of your isdn-card. - You want to use the fax capabilities of your isdn-card.
(supported cards are listed below) (supported cards are listed below)
...@@ -21,8 +21,12 @@ NOTE: This implementation does *not* support fax with passive ...@@ -21,8 +21,12 @@ NOTE: This implementation does *not* support fax with passive
Supported ISDN-Cards Supported ISDN-Cards
-------------------- --------------------
Eicon DIVA Server BRI/PCI (will be ready soon) Eicon DIVA Server BRI/PCI
Eicon DIVA Server PRI/PCI (will be ready soon) - full support with both B-channels.
Eicon DIVA Server PRI/PCI
- full support on amount of B-channels
depending on DSPs on board.
......
...@@ -20,6 +20,21 @@ This enables the echo mode. If Hex logging is activated the isdnctrlx ...@@ -20,6 +20,21 @@ This enables the echo mode. If Hex logging is activated the isdnctrlx
devices show a output with a line beginning of HEX: for the providers devices show a output with a line beginning of HEX: for the providers
exchange and ECHO: for isdn devices sending to the provider. exchange and ECHO: for isdn devices sending to the provider.
If more than one HFC-PCI cards are installed, a specific card may be selected
at the hisax module load command line. Supply the load command with the desired
IO-address of the desired card.
Example:
There tree cards installed in your machine at IO-base addresses 0xd000, 0xd400
and 0xdc00
If you want to use the card at 0xd400 standalone you should supply the insmod
or depmod with type=35 io=0xd400.
If you want to use all three cards, but the order needs to be at 0xdc00,0xd400,
0xd000 you may give the parameters type=35,35,35 io=0xdc00,0xd400,0xd00
Then the desired card will be the initialised in the desired order.
If the io parameter is used the io addresses of all used cards should be
supplied else the parameter is assumed 0 and a auto search for a free card is
invoked which may not give the wanted result.
Comments and reports to werner@isdn4linux.de or werner@titro.de . Comments and reports to werner@isdn4linux.de or werner@titro.de .
......
...@@ -32,7 +32,7 @@ allow normal operation. Plans for the future include cooperation with ...@@ -32,7 +32,7 @@ allow normal operation. Plans for the future include cooperation with
the manufacturer in order to solve this problem. the manufacturer in order to solve this problem.
Information/hints/help can be obtained in the linux isdn Information/hints/help can be obtained in the linux isdn
mailing list (isdn4linux@hub-wue.franken.de) or directly from me. mailing list (isdn4linux@listserv.isdn4linux.de) or directly from me.
regards, regards,
Pedro. Pedro.
......
...@@ -16,6 +16,37 @@ If you are totally stumped as to whom to send the report, send it to ...@@ -16,6 +16,37 @@ If you are totally stumped as to whom to send the report, send it to
linux-kernel@vger.rutgers.edu. Thanks for your help in making Linux as linux-kernel@vger.rutgers.edu. Thanks for your help in making Linux as
stable as humanly possible. stable as humanly possible.
Where is the_oops.txt?
----------------------
Normally the Oops text is read from the kernel buffers by klogd and
handed to syslogd which writes it to a syslog file, typically
/var/log/messages (depends on /etc/syslog.conf). Sometimes klogd dies,
in which case you can run dmesg > file to read the data from the kernel
buffers and save it. Or you can cat /proc/kmsg > file, however you
have to break in to stop the transfer, kmsg is a "never ending file".
If the machine has crashed so badly that you cannot enter commands or
the disk is not available then you have three options :-
(1) Hand copy the text from the screen and type it in after the machine
has restarted. Messy but it is the only option if you have not
planned for a crash.
(2) Boot with a serial console (see Documentation/serial-console.txt),
run a null modem to a second machine and capture the output there
using your favourite communication program. Minicom works well.
(3) Patch the kernel with one of the crash dump patches. These save
data to a floppy disk or video rom or a swap partition. None of
these are standard kernel patches so you have to find and apply
them yourself. Search kernel archives for kmsgdump, lkcd and
oops+smram.
No matter how you capture the log output, feed the resulting file to
ksymoops along with /proc/ksyms and /proc/modules that applied at the
time of the crash. /var/log/ksymoops can be useful to capture the
latter, man ksymoops for details.
Full Information Full Information
---------------- ----------------
......
...@@ -482,10 +482,18 @@ P: Jaroslav Kysela ...@@ -482,10 +482,18 @@ P: Jaroslav Kysela
M: perex@suse.cz M: perex@suse.cz
S: Maintained S: Maintained
ISDN SUBSYSTEM ISDN SUBSYSTEM (general)
P: Fritz Elfert P: Fritz Elfert
M: fritz@wuemaus.franken.de M: fritz@isdn4linux.de
L: isdn4linux@hub-wue.franken.de L: isdn4linux@listserv.isdn4linux.de
W: http://www.isdn4linux.de
S: Maintained
ISDN SUBSYSTEM (card drivers)
P: Karsten Keil
M: kkeil@suse.de
L: isdn4linux@listserv.isdn4linux.de
W: http://www.isdn4linux.de
S: Maintained S: Maintained
JOYSTICK DRIVER JOYSTICK DRIVER
......
...@@ -390,6 +390,7 @@ clean: archclean ...@@ -390,6 +390,7 @@ clean: archclean
rm -f .tmp* rm -f .tmp*
rm -f drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c rm -f drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c
rm -f drivers/char/conmakehash rm -f drivers/char/conmakehash
rm -f drivers/pci/devlist.h drivers/pci/gen-devlist
rm -f drivers/sound/bin2hex drivers/sound/hex2hex rm -f drivers/sound/bin2hex drivers/sound/hex2hex
rm -f net/khttpd/make_times_h rm -f net/khttpd/make_times_h
rm -f net/khttpd/times.h rm -f net/khttpd/times.h
......
...@@ -1367,8 +1367,10 @@ static int apm(void *unused) ...@@ -1367,8 +1367,10 @@ static int apm(void *unused)
/* Install our power off handler.. */ /* Install our power off handler.. */
if (power_off_enabled) if (power_off_enabled)
acpi_power_off = apm_power_off; acpi_power_off = apm_power_off;
sysrq_power_off = apm_power_off;
#ifdef CONFIG_MAGIC_SYSRQ
sysrq_power_off = apm_power_off;
#endif
apm_mainloop(); apm_mainloop();
return 0; return 0;
} }
......
...@@ -129,3 +129,4 @@ EXPORT_SYMBOL(mca_is_adapter_used); ...@@ -129,3 +129,4 @@ EXPORT_SYMBOL(mca_is_adapter_used);
EXPORT_SYMBOL(screen_info); EXPORT_SYMBOL(screen_info);
#endif #endif
EXPORT_SYMBOL(get_wchan);
...@@ -650,6 +650,19 @@ int request_irq(unsigned int irq, ...@@ -650,6 +650,19 @@ int request_irq(unsigned int irq,
int retval; int retval;
struct irqaction * action; struct irqaction * action;
#if 1
/*
* Sanity-check: shared interrupts should REALLY pass in
* a real dev-ID, otherwise we'll have trouble later trying
* to figure out which interrupt is which (messes up the
* interrupt freeing logic etc).
*/
if (irqflags & SA_SHIRQ) {
if (!dev_id)
printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", devname, (&irq)[-1]);
}
#endif
if (irq >= NR_IRQS) if (irq >= NR_IRQS)
return -EINVAL; return -EINVAL;
if (!handler) if (!handler)
......
...@@ -685,3 +685,37 @@ asmlinkage int sys_execve(struct pt_regs regs) ...@@ -685,3 +685,37 @@ asmlinkage int sys_execve(struct pt_regs regs)
unlock_kernel(); unlock_kernel();
return error; return error;
} }
/*
* These bracket the sleeping functions..
*/
extern void scheduling_functions_start_here(void);
extern void scheduling_functions_end_here(void);
#define first_sched ((unsigned long) scheduling_functions_start_here)
#define last_sched ((unsigned long) scheduling_functions_end_here)
unsigned long get_wchan(struct task_struct *p)
{
unsigned long ebp, esp, eip;
unsigned long stack_page;
int count = 0;
if (!p || p == current || p->state == TASK_RUNNING)
return 0;
stack_page = (unsigned long)p;
esp = p->thread.esp;
if (!stack_page || esp < stack_page || esp > 8188+stack_page)
return 0;
/* include/asm-i386/system.h:switch_to() pushes ebp last. */
ebp = *(unsigned long *) esp;
do {
if (ebp < stack_page || ebp > 8184+stack_page)
return 0;
eip = *(unsigned long *) (ebp+4);
if (eip < first_sched || eip >= last_sched)
return eip;
ebp = *(unsigned long *) ebp;
} while (count++ < 16);
return 0;
}
#undef last_sched
#undef first_sched
...@@ -1821,13 +1821,13 @@ int __init amiga_floppy_init(void) ...@@ -1821,13 +1821,13 @@ int __init amiga_floppy_init(void)
return -ENOMEM; return -ENOMEM;
} }
if (!request_irq(IRQ_AMIGA_DSKBLK, fd_block_done, 0, "floppy_dma", NULL)) { if (request_irq(IRQ_AMIGA_DSKBLK, fd_block_done, 0, "floppy_dma", NULL)) {
printk("fd: cannot get irq for dma\n"); printk("fd: cannot get irq for dma\n");
amiga_chip_free(raw_buf); amiga_chip_free(raw_buf);
unregister_blkdev(MAJOR_NR,"fd"); unregister_blkdev(MAJOR_NR,"fd");
return -EBUSY; return -EBUSY;
} }
if (!request_irq(IRQ_AMIGA_CIAA_TB, ms_isr, 0, "floppy_timer", NULL)) { if (request_irq(IRQ_AMIGA_CIAA_TB, ms_isr, 0, "floppy_timer", NULL)) {
printk("fd: cannot get irq for timer\n"); printk("fd: cannot get irq for timer\n");
free_irq(IRQ_AMIGA_DSKBLK, NULL); free_irq(IRQ_AMIGA_DSKBLK, NULL);
amiga_chip_free(raw_buf); amiga_chip_free(raw_buf);
......
#include <linux/types.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -18,8 +17,9 @@ ...@@ -18,8 +17,9 @@
#include <asm/apollohw.h> #include <asm/apollohw.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include "busmouse.h"
extern void handle_scancode(unsigned char); /* extern void handle_scancode(unsigned char,int ); */
#define DNKEY_CAPS 0x7e #define DNKEY_CAPS 0x7e
#define BREAK_FLAG 0x80 #define BREAK_FLAG 0x80
...@@ -37,18 +37,12 @@ extern void handle_scancode(unsigned char); ...@@ -37,18 +37,12 @@ extern void handle_scancode(unsigned char);
#define APOLLO_KBD_MODE_MOUSE 0x02 #define APOLLO_KBD_MODE_MOUSE 0x02
#define APOLLO_KBD_MODE_CHANGE 0xff #define APOLLO_KBD_MODE_CHANGE 0xff
#define MSE_UPDATE_ON() mouse_update_allowed=1
#define MSE_UPDATE_OFF() mouse_update_allowed=0
static u_char keyb_cmds[APOLLO_KEYB_CMD_ENTRIES]; static u_char keyb_cmds[APOLLO_KEYB_CMD_ENTRIES];
static short keyb_cmd_read=0, keyb_cmd_write=0; static short keyb_cmd_read=0, keyb_cmd_write=0;
static int keyb_cmd_transmit=0; static int keyb_cmd_transmit=0;
static int msedev;
static unsigned int kbd_mode=APOLLO_KBD_MODE_KEYB; static unsigned int kbd_mode=APOLLO_KBD_MODE_KEYB;
static short mouse_dx,mouse_dy,mouse_buttons;
static int mouse_ready=0,mouse_update_allowed=0,mouse_active=0;
static DECLARE_WAIT_QUEUE_HEAD(mouse_wait);
static struct fasync_struct *mouse_fasyncptr=NULL;
#if 0 #if 0
static void debug_keyb_timer_handler(unsigned long ignored); static void debug_keyb_timer_handler(unsigned long ignored);
...@@ -302,103 +296,6 @@ static void debug_keyb_timer_handler(unsigned long ignored) { ...@@ -302,103 +296,6 @@ static void debug_keyb_timer_handler(unsigned long ignored) {
} }
#endif #endif
static unsigned int mouse_poll(struct file *file, poll_table * wait)
{
poll_wait(&mouse_wait, wait);
if (mouse_ready)
return POLLIN | POLLRDNORM;
return 0;
}
static ssize_t write_mouse(struct file * file, const char * buffer,
size_t count, loff_t *ppos)
{
return -EINVAL;
}
static ssize_t read_mouse(struct file * file, char * buffer,
size_t count, loff_t *ppos)
{
int dx,dy,r;
unsigned char buttons;
if (count < 3)
return -EINVAL;
if ((r = verify_area(VERIFY_WRITE, buffer, count)))
return r;
if (!mouse_ready)
return -EAGAIN;
MSE_UPDATE_OFF();
dx=mouse_dx;
dy=mouse_dy;
if (dx < -127)
dx = -127;
else
if (dx > 127)
dx = 127;
if (dy < -127)
dy = -127;
else
if (dy > 127)
dy = 127;
buttons=(mouse_buttons & 1 ? 4 : 0) |
(mouse_buttons & 2 ? 1 : 0) |
(mouse_buttons & 4 ? 2 : 0);
mouse_dx-=dx;
mouse_dy-=dy;
MSE_UPDATE_ON();
if (put_user(buttons | 0x80, buffer++) ||
put_user((char)dx, buffer++) ||
put_user((char)dy, buffer++))
return -EINVAL;
if (count > 3)
if (clear_user(buffer, count - 3))
return -EFAULT;
return count;
}
static int fasync_mouse(int fd, struct file *filp, int on)
{
int retval;
retval = fasync_helper(fd, filp, on, &mouse_fasyncptr);
if (retval < 0)
return retval;
return 0;
}
static int release_mouse(struct inode * inode, struct file * file)
{
fasync_mouse(-1, file, 0);
if (--mouse_active)
return 0;
MSE_UPDATE_OFF();
MOD_DEC_USE_COUNT;
return 0;
}
static int open_mouse(struct inode * inode, struct file * file)
{
if (mouse_active++)
return 0;
/*
* use VBL to poll mouse deltas
*/
mouse_dx = 0;
mouse_dy = 0;
mouse_buttons = 0;
mouse_active = 1;
MOD_INC_USE_COUNT;
MSE_UPDATE_ON();
return 0;
}
static void dn_keyb_process_key_event(unsigned char scancode) { static void dn_keyb_process_key_event(unsigned char scancode) {
static unsigned char lastscancode; static unsigned char lastscancode;
...@@ -411,7 +308,7 @@ static void dn_keyb_process_key_event(unsigned char scancode) { ...@@ -411,7 +308,7 @@ static void dn_keyb_process_key_event(unsigned char scancode) {
if(prev_scancode==APOLLO_KBD_MODE_CHANGE) { if(prev_scancode==APOLLO_KBD_MODE_CHANGE) {
kbd_mode=scancode; kbd_mode=scancode;
/* printk("modechange: %d\n",scancode);*/ /* printk("modechange: %d\n",scancode); */
} }
else if((scancode & (~BREAK_FLAG)) == DNKEY_CAPS) { else if((scancode & (~BREAK_FLAG)) == DNKEY_CAPS) {
/* printk("handle_scancode: %02x\n",DNKEY_CAPS); */ /* printk("handle_scancode: %02x\n",DNKEY_CAPS); */
...@@ -440,7 +337,8 @@ static void dn_keyb_process_mouse_event(unsigned char mouse_data) { ...@@ -440,7 +337,8 @@ static void dn_keyb_process_mouse_event(unsigned char mouse_data) {
static short mouse_byte_count=0; static short mouse_byte_count=0;
static u_char mouse_packet[3]; static u_char mouse_packet[3];
short mouse_buttons;
mouse_packet[mouse_byte_count++]=mouse_data; mouse_packet[mouse_byte_count++]=mouse_data;
if(mouse_byte_count==3) { if(mouse_byte_count==3) {
...@@ -552,23 +450,20 @@ void write_keyb_cmd(u_short length, u_char *cmd) { ...@@ -552,23 +450,20 @@ void write_keyb_cmd(u_short length, u_char *cmd) {
} }
struct file_operations apollo_mouse_fops = { static int release_mouse(struct inode * inode, struct file * file)
NULL, /* mouse_seek */ {
read_mouse, MOD_DEC_USE_COUNT;
write_mouse, return 0;
NULL, /* mouse_readdir */ }
mouse_poll, /* mouse_poll */
NULL, /* mouse_ioctl */ static int open_mouse(struct inode * inode, struct file * file)
NULL, /* mouse_mmap */ {
open_mouse, MOD_INC_USE_COUNT;
NULL, /* flush */ return 0;
release_mouse, }
NULL,
fasync_mouse,
};
static struct miscdevice apollo_mouse = { static struct busmouse apollo_mouse = {
APOLLO_MOUSE_MINOR, "apollomouse", &apollo_mouse_fops APOLLO_MOUSE_MINOR, "apollomouse", open_mouse, release_mouse,7
}; };
int __init dn_keyb_init(void){ int __init dn_keyb_init(void){
...@@ -583,12 +478,12 @@ int __init dn_keyb_init(void){ ...@@ -583,12 +478,12 @@ int __init dn_keyb_init(void){
memcpy(key_maps[8], dnalt_map, sizeof(plain_map)); memcpy(key_maps[8], dnalt_map, sizeof(plain_map));
memcpy(key_maps[12], dnctrl_alt_map, sizeof(plain_map)); memcpy(key_maps[12], dnctrl_alt_map, sizeof(plain_map));
mouse_dx=0;
mouse_dy=0;
mouse_buttons=0;
mouse_wait=NULL;
misc_register(&apollo_mouse); msedev=register_busmouse(&apollo_mouse);
if (msedev < 0)
printk(KERN_WARNING "Unable to install Apollo mouse driver.\n");
else
printk(KERN_INFO "Apollo mouse installed.\n");
/* program UpDownMode */ /* program UpDownMode */
......
...@@ -73,13 +73,13 @@ ...@@ -73,13 +73,13 @@
m = min(count, maxio); \ m = min(count, maxio); \
for (i = 0; i < m; i++) { \ for (i = 0; i < m; i++) { \
for (t = 0; t < timeout && !ENABLE; t++) \ for (t = 0; t < timeout && !ENABLE; t++) \
wait_some(2); \ wait_some(HZ/50); \
if(!ENABLE) \ if(!ENABLE) \
return -EIO; \ return -EIO; \
f; \ f; \
} \ } \
count -= m; \ count -= m; \
if (m == maxio) wait_some(2); \ if (m == maxio) wait_some(HZ/50); \
} \ } \
} }
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
{ \ { \
int t; \ int t; \
for(t = 0; t < n && !DSP56K_TRANSMIT; t++) \ for(t = 0; t < n && !DSP56K_TRANSMIT; t++) \
wait_some(1); \ wait_some(HZ/100); \
if(!DSP56K_TRANSMIT) { \ if(!DSP56K_TRANSMIT) { \
return -EIO; \ return -EIO; \
} \ } \
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
{ \ { \
int t; \ int t; \
for(t = 0; t < n && !DSP56K_RECEIVE; t++) \ for(t = 0; t < n && !DSP56K_RECEIVE; t++) \
wait_some(1); \ wait_some(HZ/100); \
if(!DSP56K_RECEIVE) { \ if(!DSP56K_RECEIVE) { \
return -EIO; \ return -EIO; \
} \ } \
......
...@@ -509,10 +509,10 @@ static int pp_open (struct inode * inode, struct file * file) ...@@ -509,10 +509,10 @@ static int pp_open (struct inode * inode, struct file * file)
if (!pp) if (!pp)
return -ENOMEM; return -ENOMEM;
memset (pp, 0, sizeof (struct pp_struct));
pp->state.mode = IEEE1284_MODE_COMPAT; pp->state.mode = IEEE1284_MODE_COMPAT;
pp->state.phase = init_phase (pp->state.mode); pp->state.phase = init_phase (pp->state.mode);
pp->flags = 0; pp->flags = 0;
pp->irqresponse = 0;
atomic_set (&pp->irqc, 0); atomic_set (&pp->irqc, 0);
init_waitqueue_head (&pp->irq_wait); init_waitqueue_head (&pp->irq_wait);
...@@ -539,8 +539,9 @@ static int pp_release (struct inode * inode, struct file * file) ...@@ -539,8 +539,9 @@ static int pp_release (struct inode * inode, struct file * file)
} }
if (pp->pdev) { if (pp->pdev) {
const char *name = pp->pdev->name;
parport_unregister_device (pp->pdev); parport_unregister_device (pp->pdev);
kfree (pp->pdev->name); kfree (name);
pp->pdev = NULL; pp->pdev = NULL;
printk (KERN_DEBUG CHRDEV "%x: unregistered pardevice\n", printk (KERN_DEBUG CHRDEV "%x: unregistered pardevice\n",
minor); minor);
......
...@@ -2,76 +2,78 @@ ...@@ -2,76 +2,78 @@
# ISDN device configuration # ISDN device configuration
# #
if [ "$CONFIG_INET" != "n" ]; then if [ "$CONFIG_INET" != "n" ]; then
bool ' Support synchronous PPP' CONFIG_ISDN_PPP bool 'Support synchronous PPP' CONFIG_ISDN_PPP
if [ "$CONFIG_ISDN_PPP" != "n" ]; then if [ "$CONFIG_ISDN_PPP" != "n" ]; then
bool ' Use VJ-compression with synchronous PPP' CONFIG_ISDN_PPP_VJ bool 'Use VJ-compression with synchronous PPP' CONFIG_ISDN_PPP_VJ
bool ' Support generic MP (RFC 1717)' CONFIG_ISDN_MPP bool 'Support generic MP (RFC 1717)' CONFIG_ISDN_MPP
fi fi
fi fi
bool ' Support audio via ISDN' CONFIG_ISDN_AUDIO bool 'Support audio via ISDN' CONFIG_ISDN_AUDIO
if [ "$CONFIG_ISDN_AUDIO" != "n" ]; then if [ "$CONFIG_ISDN_AUDIO" != "n" ]; then
bool ' Support AT-Fax Class 2 commands' CONFIG_ISDN_TTY_FAX bool 'Support AT-Fax Class 2 commands' CONFIG_ISDN_TTY_FAX
fi fi
bool ' Support isdn diversion services' CONFIG_ISDN_DIVERSION bool 'Support isdn diversion services' CONFIG_ISDN_DIVERSION
if [ "$CONFIG_X25" != "n" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then if [ "$CONFIG_X25" != "n" ]; then
bool ' X.25 PLP on top of ISDN (EXPERIMENTAL)' CONFIG_ISDN_X25 bool 'X.25 PLP on top of ISDN (EXPERIMENTAL)' CONFIG_ISDN_X25
fi fi
dep_tristate ' ICN 2B and 4B support' CONFIG_ISDN_DRV_ICN $CONFIG_ISDN dep_tristate 'ICN 2B and 4B support' CONFIG_ISDN_DRV_ICN $CONFIG_ISDN
dep_tristate ' isdnloop support' CONFIG_ISDN_DRV_LOOP $CONFIG_ISDN dep_tristate 'isdnloop support' CONFIG_ISDN_DRV_LOOP $CONFIG_ISDN
dep_tristate ' PCBIT-D support' CONFIG_ISDN_DRV_PCBIT $CONFIG_ISDN dep_tristate 'PCBIT-D support' CONFIG_ISDN_DRV_PCBIT $CONFIG_ISDN
dep_tristate ' HiSax SiemensChipSet driver support' CONFIG_ISDN_DRV_HISAX $CONFIG_ISDN dep_tristate 'HiSax SiemensChipSet driver support' CONFIG_ISDN_DRV_HISAX $CONFIG_ISDN
if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then if [ "$CONFIG_ISDN_DRV_HISAX" != "n" ]; then
bool ' HiSax Support for EURO/DSS1' CONFIG_HISAX_EURO bool 'HiSax Support for EURO/DSS1' CONFIG_HISAX_EURO
if [ "$CONFIG_HISAX_EURO" != "n" ]; then if [ "$CONFIG_HISAX_EURO" != "n" ]; then
bool ' Support for german chargeinfo' CONFIG_DE_AOC bool 'Support for german chargeinfo' CONFIG_DE_AOC
bool ' Disable sending complete' CONFIG_HISAX_NO_SENDCOMPLETE bool 'Disable sending complete' CONFIG_HISAX_NO_SENDCOMPLETE
bool ' Disable sending low layer compatibility' CONFIG_HISAX_NO_LLC bool 'Disable sending low layer compatibility' CONFIG_HISAX_NO_LLC
fi fi
bool ' HiSax Support for german 1TR6' CONFIG_HISAX_1TR6 bool 'HiSax Support for german 1TR6' CONFIG_HISAX_1TR6
bool ' HiSax Support for Teles 16.0/8.0' CONFIG_HISAX_16_0 bool 'HiSax Support for Teles 16.0/8.0' CONFIG_HISAX_16_0
bool ' HiSax Support for Teles 16.3 or PNP or PCMCIA' CONFIG_HISAX_16_3 bool 'HiSax Support for Teles 16.3 or PNP or PCMCIA' CONFIG_HISAX_16_3
bool ' HiSax Support for Teles PCI' CONFIG_HISAX_TELESPCI bool 'HiSax Support for Teles PCI' CONFIG_HISAX_TELESPCI
bool ' HiSax Support for Teles S0Box' CONFIG_HISAX_S0BOX bool 'HiSax Support for Teles S0Box' CONFIG_HISAX_S0BOX
bool ' HiSax Support for AVM A1 (Fritz)' CONFIG_HISAX_AVM_A1 bool 'HiSax Support for AVM A1 (Fritz)' CONFIG_HISAX_AVM_A1
bool ' HiSax Support for AVM PnP/PCI (Fritz!PnP/PCI)' CONFIG_HISAX_FRITZPCI bool 'HiSax Support for AVM PnP/PCI (Fritz!PnP/PCI)' CONFIG_HISAX_FRITZPCI
bool ' HiSax Support for AVM A1 PCMCIA (Fritz)' CONFIG_HISAX_AVM_A1_PCMCIA bool 'HiSax Support for AVM A1 PCMCIA (Fritz)' CONFIG_HISAX_AVM_A1_PCMCIA
bool ' HiSax Support for Elsa cards' CONFIG_HISAX_ELSA bool 'HiSax Support for Elsa cards' CONFIG_HISAX_ELSA
bool ' HiSax Support for ITK ix1-micro Revision 2' CONFIG_HISAX_IX1MICROR2 bool 'HiSax Support for ITK ix1-micro Revision 2' CONFIG_HISAX_IX1MICROR2
bool ' HiSax Support for Eicon.Diehl Diva cards' CONFIG_HISAX_DIEHLDIVA bool 'HiSax Support for Eicon.Diehl Diva cards' CONFIG_HISAX_DIEHLDIVA
bool ' HiSax Support for ASUSCOM cards' CONFIG_HISAX_ASUSCOM bool 'HiSax Support for ASUSCOM cards' CONFIG_HISAX_ASUSCOM
bool ' HiSax Support for TELEINT cards' CONFIG_HISAX_TELEINT bool 'HiSax Support for TELEINT cards' CONFIG_HISAX_TELEINT
bool ' HiSax Support for HFC-S based cards' CONFIG_HISAX_HFCS bool 'HiSax Support for HFC-S based cards' CONFIG_HISAX_HFCS
bool ' HiSax Support for Sedlbauer cards' CONFIG_HISAX_SEDLBAUER bool 'HiSax Support for Sedlbauer cards' CONFIG_HISAX_SEDLBAUER
bool ' HiSax Support for USR Sportster internal TA' CONFIG_HISAX_SPORTSTER bool 'HiSax Support for USR Sportster internal TA' CONFIG_HISAX_SPORTSTER
bool ' HiSax Support for MIC card' CONFIG_HISAX_MIC bool 'HiSax Support for MIC card' CONFIG_HISAX_MIC
bool ' HiSax Support for NETjet card' CONFIG_HISAX_NETJET bool 'HiSax Support for NETjet card' CONFIG_HISAX_NETJET
bool ' HiSax Support for Niccy PnP/PCI card' CONFIG_HISAX_NICCY bool 'HiSax Support for Niccy PnP/PCI card' CONFIG_HISAX_NICCY
bool ' HiSax Support for Siemens I-Surf card' CONFIG_HISAX_ISURF bool 'HiSax Support for Siemens I-Surf card' CONFIG_HISAX_ISURF
bool ' HiSax Support for HST Saphir card' CONFIG_HISAX_HSTSAPHIR bool 'HiSax Support for HST Saphir card' CONFIG_HISAX_HSTSAPHIR
bool ' HiSax Support for Telekom A4T card' CONFIG_HISAX_BKM_A4T bool 'HiSax Support for Telekom A4T card' CONFIG_HISAX_BKM_A4T
bool ' HiSax Support for Scitel Quadro card' CONFIG_HISAX_SCT_QUADRO bool 'HiSax Support for Scitel Quadro card' CONFIG_HISAX_SCT_QUADRO
bool ' HiSax Support for Gazel cards' CONFIG_HISAX_GAZEL bool 'HiSax Support for Gazel cards' CONFIG_HISAX_GAZEL
bool ' HiSax Support for HFC PCI-Bus cards' CONFIG_HISAX_HFC_PCI bool 'HiSax Support for HFC PCI-Bus cards' CONFIG_HISAX_HFC_PCI
if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
# bool ' HiSax Support for TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU bool 'HiSax Support for Winbond W6692 based cards (EXPERIMENTAL)' CONFIG_HISAX_W6692
if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then # bool 'HiSax Support for TESTEMULATOR (EXPERIMENTAL)' CONFIG_HISAX_TESTEMU
bool ' HiSax Support for Am7930' CONFIG_HISAX_AMD7930 if [ "$ARCH" = "sparc" -o "$ARCH" = "sparc64" ]; then
fi bool 'HiSax Support for Am7930' CONFIG_HISAX_AMD7930
fi fi
fi
fi fi
if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then if [ "$CONFIG_EXPERIMENTAL" != "n" ]; then
dep_tristate ' Spellcaster support (EXPERIMENTAL)' CONFIG_ISDN_DRV_SC $CONFIG_ISDN dep_tristate 'Spellcaster support (EXPERIMENTAL)' CONFIG_ISDN_DRV_SC $CONFIG_ISDN
dep_tristate ' IBM Active 2000 support (EXPERIMENTAL)' CONFIG_ISDN_DRV_ACT2000 $CONFIG_ISDN dep_tristate 'IBM Active 2000 support (EXPERIMENTAL)' CONFIG_ISDN_DRV_ACT2000 $CONFIG_ISDN
fi fi
dep_tristate ' Eicon.Diehl active card support' CONFIG_ISDN_DRV_EICON $CONFIG_ISDN dep_tristate 'Eicon.Diehl active card support' CONFIG_ISDN_DRV_EICON $CONFIG_ISDN
if [ "$CONFIG_ISDN_DRV_EICON" != "n" ]; then if [ "$CONFIG_ISDN_DRV_EICON" != "n" ]; then
bool ' Eicon S, SX, SCOM, Quadro, S2M support' CONFIG_ISDN_DRV_EICON_ISA bool 'Eicon S,SX,SCOM,Quadro,S2M support' CONFIG_ISDN_DRV_EICON_ISA
fi fi
dep_tristate ' AVM CAPI2.0 support' CONFIG_ISDN_DRV_AVMB1 $CONFIG_ISDN dep_tristate 'AVM CAPI2.0 support' CONFIG_ISDN_DRV_AVMB1 $CONFIG_ISDN
if [ "$CONFIG_ISDN_DRV_AVMB1" != "n" ]; then if [ "$CONFIG_ISDN_DRV_AVMB1" != "n" ]; then
bool ' AVM B1 ISA support' CONFIG_ISDN_DRV_AVMB1_B1ISA bool 'AVM B1 ISA support' CONFIG_ISDN_DRV_AVMB1_B1ISA
bool ' AVM B1 PCI support' CONFIG_ISDN_DRV_AVMB1_B1PCI bool 'AVM B1 PCI support' CONFIG_ISDN_DRV_AVMB1_B1PCI
bool ' AVM T1/T1B ISA support' CONFIG_ISDN_DRV_AVMB1_T1ISA bool 'AVM T1/T1-B ISA support' CONFIG_ISDN_DRV_AVMB1_T1ISA
bool ' AVM B1/M1/M2 PCMCIA support' CONFIG_ISDN_DRV_AVMB1_B1PCMCIA bool 'AVM B1/M1/M2 PCMCIA support' CONFIG_ISDN_DRV_AVMB1_B1PCMCIA
bool ' Verbose reason code reporting (kernel size +=7K)' CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON bool 'AVM T1/T1-B PCI support' CONFIG_ISDN_DRV_AVMB1_T1PCI
bool 'Verbose reason code reporting (kernel size +=7K)' CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON
fi fi
/* $Id: act2000_isa.c,v 1.8 1999/01/05 18:29:25 he Exp $ /* $Id: act2000_isa.c,v 1.10 1999/10/24 18:46:05 fritz Exp $
* *
* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version). * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version).
* *
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: act2000_isa.c,v $ * $Log: act2000_isa.c,v $
* Revision 1.10 1999/10/24 18:46:05 fritz
* Changed isa_ prefix to act2000_isa_ to prevent name-clash in latest
* kernels.
*
* Revision 1.9 1999/09/04 06:20:04 keil
* Changes from kernel set_current_state()
*
* Revision 1.8 1999/01/05 18:29:25 he * Revision 1.8 1999/01/05 18:29:25 he
* merged remaining schedule_timeout() changes from 2.1.127 * merged remaining schedule_timeout() changes from 2.1.127
* *
...@@ -61,17 +68,17 @@ static act2000_card *irq2card_map[16] = ...@@ -61,17 +68,17 @@ static act2000_card *irq2card_map[16] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
}; };
static int isa_irqs[] = static int act2000_isa_irqs[] =
{ {
3, 5, 7, 10, 11, 12, 15 3, 5, 7, 10, 11, 12, 15
}; };
#define ISA_NRIRQS (sizeof(isa_irqs)/sizeof(int)) #define ISA_NRIRQS (sizeof(act2000_isa_irqs)/sizeof(int))
static void static void
isa_delay(long t) act2000_isa_delay(long t)
{ {
sti(); sti();
current->state = TASK_INTERRUPTIBLE; set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(t); schedule_timeout(t);
sti(); sti();
} }
...@@ -83,7 +90,7 @@ isa_delay(long t) ...@@ -83,7 +90,7 @@ isa_delay(long t)
* 0 = Signature not found. * 0 = Signature not found.
*/ */
static int static int
isa_reset(unsigned short portbase) act2000_isa_reset(unsigned short portbase)
{ {
unsigned char reg; unsigned char reg;
int i; int i;
...@@ -109,7 +116,7 @@ isa_reset(unsigned short portbase) ...@@ -109,7 +116,7 @@ isa_reset(unsigned short portbase)
} }
int int
isa_detect(unsigned short portbase) act2000_isa_detect(unsigned short portbase)
{ {
int ret = 0; int ret = 0;
unsigned long flags; unsigned long flags;
...@@ -117,13 +124,13 @@ isa_detect(unsigned short portbase) ...@@ -117,13 +124,13 @@ isa_detect(unsigned short portbase)
save_flags(flags); save_flags(flags);
cli(); cli();
if (!check_region(portbase, ISA_REGION)) if (!check_region(portbase, ISA_REGION))
ret = isa_reset(portbase); ret = act2000_isa_reset(portbase);
restore_flags(flags); restore_flags(flags);
return ret; return ret;
} }
static void static void
isa_interrupt(int irq, void *dev_id, struct pt_regs *regs) act2000_isa_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{ {
act2000_card *card = irq2card_map[irq]; act2000_card *card = irq2card_map[irq];
u_char istatus; u_char istatus;
...@@ -138,7 +145,7 @@ isa_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -138,7 +145,7 @@ isa_interrupt(int irq, void *dev_id, struct pt_regs *regs)
/* RX fifo has data */ /* RX fifo has data */
istatus &= ISA_ISR_OUT_MASK; istatus &= ISA_ISR_OUT_MASK;
outb(0, ISA_PORT_SIS); outb(0, ISA_PORT_SIS);
isa_receive(card); act2000_isa_receive(card);
outb(ISA_SIS_INT, ISA_PORT_SIS); outb(ISA_SIS_INT, ISA_PORT_SIS);
} }
if (istatus & ISA_ISR_ERR) { if (istatus & ISA_ISR_ERR) {
...@@ -151,7 +158,7 @@ isa_interrupt(int irq, void *dev_id, struct pt_regs *regs) ...@@ -151,7 +158,7 @@ isa_interrupt(int irq, void *dev_id, struct pt_regs *regs)
} }
static void static void
isa_select_irq(act2000_card * card) act2000_isa_select_irq(act2000_card * card)
{ {
unsigned char reg; unsigned char reg;
...@@ -183,9 +190,9 @@ isa_select_irq(act2000_card * card) ...@@ -183,9 +190,9 @@ isa_select_irq(act2000_card * card)
} }
static void static void
isa_enable_irq(act2000_card * card) act2000_isa_enable_irq(act2000_card * card)
{ {
isa_select_irq(card); act2000_isa_select_irq(card);
/* Enable READ irq */ /* Enable READ irq */
outb(ISA_SIS_INT, ISA_PORT_SIS); outb(ISA_SIS_INT, ISA_PORT_SIS);
} }
...@@ -195,7 +202,7 @@ isa_enable_irq(act2000_card * card) ...@@ -195,7 +202,7 @@ isa_enable_irq(act2000_card * card)
* If irq is -1, choose next free irq, else irq is given explicitely. * If irq is -1, choose next free irq, else irq is given explicitely.
*/ */
int int
isa_config_irq(act2000_card * card, short irq) act2000_isa_config_irq(act2000_card * card, short irq)
{ {
int i; int i;
unsigned long flags; unsigned long flags;
...@@ -213,8 +220,8 @@ isa_config_irq(act2000_card * card, short irq) ...@@ -213,8 +220,8 @@ isa_config_irq(act2000_card * card, short irq)
if (irq == -1) { if (irq == -1) {
/* Auto select */ /* Auto select */
for (i = 0; i < ISA_NRIRQS; i++) { for (i = 0; i < ISA_NRIRQS; i++) {
if (!request_irq(isa_irqs[i], &isa_interrupt, 0, card->regname, NULL)) { if (!request_irq(act2000_isa_irqs[i], &act2000_isa_interrupt, 0, card->regname, NULL)) {
card->irq = isa_irqs[i]; card->irq = act2000_isa_irqs[i];
irq2card_map[card->irq] = card; irq2card_map[card->irq] = card;
card->flags |= ACT2000_FLAGS_IVALID; card->flags |= ACT2000_FLAGS_IVALID;
break; break;
...@@ -222,7 +229,7 @@ isa_config_irq(act2000_card * card, short irq) ...@@ -222,7 +229,7 @@ isa_config_irq(act2000_card * card, short irq)
} }
} else { } else {
/* Fixed irq */ /* Fixed irq */
if (!request_irq(irq, &isa_interrupt, 0, card->regname, NULL)) { if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, NULL)) {
card->irq = irq; card->irq = irq;
irq2card_map[card->irq] = card; irq2card_map[card->irq] = card;
card->flags |= ACT2000_FLAGS_IVALID; card->flags |= ACT2000_FLAGS_IVALID;
...@@ -234,7 +241,7 @@ isa_config_irq(act2000_card * card, short irq) ...@@ -234,7 +241,7 @@ isa_config_irq(act2000_card * card, short irq)
"act2000: Could not request irq\n"); "act2000: Could not request irq\n");
return -EBUSY; return -EBUSY;
} else { } else {
isa_select_irq(card); act2000_isa_select_irq(card);
/* Disable READ and WRITE irq */ /* Disable READ and WRITE irq */
outb(0, ISA_PORT_SIS); outb(0, ISA_PORT_SIS);
outb(0, ISA_PORT_SOS); outb(0, ISA_PORT_SOS);
...@@ -243,7 +250,7 @@ isa_config_irq(act2000_card * card, short irq) ...@@ -243,7 +250,7 @@ isa_config_irq(act2000_card * card, short irq)
} }
int int
isa_config_port(act2000_card * card, unsigned short portbase) act2000_isa_config_port(act2000_card * card, unsigned short portbase)
{ {
if (card->flags & ACT2000_FLAGS_PVALID) { if (card->flags & ACT2000_FLAGS_PVALID) {
release_region(card->port, ISA_REGION); release_region(card->port, ISA_REGION);
...@@ -262,7 +269,7 @@ isa_config_port(act2000_card * card, unsigned short portbase) ...@@ -262,7 +269,7 @@ isa_config_port(act2000_card * card, unsigned short portbase)
* Release ressources, used by an adaptor. * Release ressources, used by an adaptor.
*/ */
void void
isa_release(act2000_card * card) act2000_isa_release(act2000_card * card)
{ {
unsigned long flags; unsigned long flags;
...@@ -280,7 +287,7 @@ isa_release(act2000_card * card) ...@@ -280,7 +287,7 @@ isa_release(act2000_card * card)
} }
static int static int
isa_writeb(act2000_card * card, u_char data) act2000_isa_writeb(act2000_card * card, u_char data)
{ {
u_char timeout = 40; u_char timeout = 40;
...@@ -297,7 +304,7 @@ isa_writeb(act2000_card * card, u_char data) ...@@ -297,7 +304,7 @@ isa_writeb(act2000_card * card, u_char data)
} }
static int static int
isa_readb(act2000_card * card, u_char * data) act2000_isa_readb(act2000_card * card, u_char * data)
{ {
u_char timeout = 40; u_char timeout = 40;
...@@ -314,13 +321,13 @@ isa_readb(act2000_card * card, u_char * data) ...@@ -314,13 +321,13 @@ isa_readb(act2000_card * card, u_char * data)
} }
void void
isa_receive(act2000_card *card) act2000_isa_receive(act2000_card *card)
{ {
u_char c; u_char c;
if (test_and_set_bit(ACT2000_LOCK_RX, (void *) &card->ilock) != 0) if (test_and_set_bit(ACT2000_LOCK_RX, (void *) &card->ilock) != 0)
return; return;
while (!isa_readb(card, &c)) { while (!act2000_isa_readb(card, &c)) {
if (card->idat.isa.rcvidx < 8) { if (card->idat.isa.rcvidx < 8) {
card->idat.isa.rcvhdr[card->idat.isa.rcvidx++] = c; card->idat.isa.rcvhdr[card->idat.isa.rcvidx++] = c;
if (card->idat.isa.rcvidx == 8) { if (card->idat.isa.rcvidx == 8) {
...@@ -332,7 +339,7 @@ isa_receive(act2000_card *card) ...@@ -332,7 +339,7 @@ isa_receive(act2000_card *card)
if (card->idat.isa.rcvskb == NULL) { if (card->idat.isa.rcvskb == NULL) {
card->idat.isa.rcvignore = 1; card->idat.isa.rcvignore = 1;
printk(KERN_WARNING printk(KERN_WARNING
"isa_receive: no memory\n"); "act2000_isa_receive: no memory\n");
test_and_clear_bit(ACT2000_LOCK_RX, (void *) &card->ilock); test_and_clear_bit(ACT2000_LOCK_RX, (void *) &card->ilock);
return; return;
} }
...@@ -341,12 +348,12 @@ isa_receive(act2000_card *card) ...@@ -341,12 +348,12 @@ isa_receive(act2000_card *card)
} else { } else {
card->idat.isa.rcvidx = 0; card->idat.isa.rcvidx = 0;
printk(KERN_WARNING printk(KERN_WARNING
"isa_receive: Invalid CAPI msg\n"); "act2000_isa_receive: Invalid CAPI msg\n");
{ {
int i; __u8 *p; __u8 *c; __u8 tmp[30]; int i; __u8 *p; __u8 *c; __u8 tmp[30];
for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, c = tmp; i < 8; i++) for (i = 0, p = (__u8 *)&card->idat.isa.rcvhdr, c = tmp; i < 8; i++)
c += sprintf(c, "%02x ", *(p++)); c += sprintf(c, "%02x ", *(p++));
printk(KERN_WARNING "isa_receive: %s\n", tmp); printk(KERN_WARNING "act2000_isa_receive: %s\n", tmp);
} }
} }
} }
...@@ -377,7 +384,7 @@ isa_receive(act2000_card *card) ...@@ -377,7 +384,7 @@ isa_receive(act2000_card *card)
} }
void void
isa_send(act2000_card * card) act2000_isa_send(act2000_card * card)
{ {
unsigned long flags; unsigned long flags;
struct sk_buff *skb; struct sk_buff *skb;
...@@ -410,11 +417,8 @@ isa_send(act2000_card * card) ...@@ -410,11 +417,8 @@ isa_send(act2000_card * card)
skb = card->sbuf; skb = card->sbuf;
l = 0; l = 0;
while (skb->len) { while (skb->len) {
if (isa_writeb(card, *(skb->data))) { if (act2000_isa_writeb(card, *(skb->data))) {
/* Fifo is full, but more data to send */ /* Fifo is full, but more data to send */
#if 0
printk(KERN_DEBUG "isa_send: %d bytes\n", l);
#endif
test_and_clear_bit(ACT2000_LOCK_TX, (void *) &card->ilock); test_and_clear_bit(ACT2000_LOCK_TX, (void *) &card->ilock);
/* Schedule myself */ /* Schedule myself */
act2000_schedule_tx(card); act2000_schedule_tx(card);
...@@ -437,9 +441,6 @@ isa_send(act2000_card * card) ...@@ -437,9 +441,6 @@ isa_send(act2000_card * card)
} else } else
dev_kfree_skb(skb); dev_kfree_skb(skb);
card->sbuf = NULL; card->sbuf = NULL;
#if 0
printk(KERN_DEBUG "isa_send: %d bytes\n", l);
#endif
} }
} }
...@@ -447,7 +448,7 @@ isa_send(act2000_card * card) ...@@ -447,7 +448,7 @@ isa_send(act2000_card * card)
* Get firmware ID, check for 'ISDN' signature. * Get firmware ID, check for 'ISDN' signature.
*/ */
static int static int
isa_getid(act2000_card * card) act2000_isa_getid(act2000_card * card)
{ {
act2000_fwid fid; act2000_fwid fid;
...@@ -457,7 +458,7 @@ isa_getid(act2000_card * card) ...@@ -457,7 +458,7 @@ isa_getid(act2000_card * card)
while (1) { while (1) {
if (count > 510) if (count > 510)
return -EPROTO; return -EPROTO;
if (isa_readb(card, p++)) if (act2000_isa_readb(card, p++))
break; break;
count++; count++;
} }
...@@ -476,7 +477,7 @@ isa_getid(act2000_card * card) ...@@ -476,7 +477,7 @@ isa_getid(act2000_card * card)
printk(KERN_INFO "act2000: Firmware-ID: %s\n", fid.revision); printk(KERN_INFO "act2000: Firmware-ID: %s\n", fid.revision);
if (card->flags & ACT2000_FLAGS_IVALID) { if (card->flags & ACT2000_FLAGS_IVALID) {
printk(KERN_DEBUG "Enabling Interrupts ...\n"); printk(KERN_DEBUG "Enabling Interrupts ...\n");
isa_enable_irq(card); act2000_isa_enable_irq(card);
} }
return 0; return 0;
} }
...@@ -485,7 +486,7 @@ isa_getid(act2000_card * card) ...@@ -485,7 +486,7 @@ isa_getid(act2000_card * card)
* Download microcode into card, check Firmware signature. * Download microcode into card, check Firmware signature.
*/ */
int int
isa_download(act2000_card * card, act2000_ddef * cb) act2000_isa_download(act2000_card * card, act2000_ddef * cb)
{ {
int length; int length;
int ret; int ret;
...@@ -497,9 +498,9 @@ isa_download(act2000_card * card, act2000_ddef * cb) ...@@ -497,9 +498,9 @@ isa_download(act2000_card * card, act2000_ddef * cb)
u_char *buf; u_char *buf;
act2000_ddef cblock; act2000_ddef cblock;
if (!isa_reset(card->port)) if (!act2000_isa_reset(card->port))
return -ENXIO; return -ENXIO;
isa_delay(HZ / 2); act2000_isa_delay(HZ / 2);
if ((ret = verify_area(VERIFY_READ, (void *) cb, sizeof(cblock)))) if ((ret = verify_area(VERIFY_READ, (void *) cb, sizeof(cblock))))
return ret; return ret;
copy_from_user(&cblock, (char *) cb, sizeof(cblock)); copy_from_user(&cblock, (char *) cb, sizeof(cblock));
...@@ -517,7 +518,7 @@ isa_download(act2000_card * card, act2000_ddef * cb) ...@@ -517,7 +518,7 @@ isa_download(act2000_card * card, act2000_ddef * cb)
b = buf; b = buf;
copy_from_user(buf, p, l); copy_from_user(buf, p, l);
while (c < l) { while (c < l) {
if (isa_writeb(card, *b++)) { if (act2000_isa_writeb(card, *b++)) {
printk(KERN_WARNING printk(KERN_WARNING
"act2000: loader timed out" "act2000: loader timed out"
" len=%d c=%d\n", length, c); " len=%d c=%d\n", length, c);
...@@ -530,6 +531,6 @@ isa_download(act2000_card * card, act2000_ddef * cb) ...@@ -530,6 +531,6 @@ isa_download(act2000_card * card, act2000_ddef * cb)
p += l; p += l;
} }
kfree(buf); kfree(buf);
isa_delay(HZ / 2); act2000_isa_delay(HZ / 2);
return (isa_getid(card)); return (act2000_isa_getid(card));
} }
/* $Id: act2000_isa.h,v 1.2 1998/11/05 22:12:43 fritz Exp $ /* $Id: act2000_isa.h,v 1.3 1999/10/24 18:46:05 fritz Exp $
* *
* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version). * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000 (ISA-Version).
* *
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: act2000_isa.h,v $ * $Log: act2000_isa.h,v $
* Revision 1.3 1999/10/24 18:46:05 fritz
* Changed isa_ prefix to act2000_isa_ to prevent name-clash in latest
* kernels.
*
* Revision 1.2 1998/11/05 22:12:43 fritz * Revision 1.2 1998/11/05 22:12:43 fritz
* Changed mail-address. * Changed mail-address.
* *
...@@ -141,12 +145,12 @@ typedef enum { ...@@ -141,12 +145,12 @@ typedef enum {
/* Prototypes */ /* Prototypes */
extern int isa_detect(unsigned short portbase); extern int act2000_isa_detect(unsigned short portbase);
extern int isa_config_irq(act2000_card * card, short irq); extern int act2000_isa_config_irq(act2000_card * card, short irq);
extern int isa_config_port(act2000_card * card, unsigned short portbase); extern int act2000_isa_config_port(act2000_card * card, unsigned short portbase);
extern int isa_download(act2000_card * card, act2000_ddef * cb); extern int act2000_isa_download(act2000_card * card, act2000_ddef * cb);
extern void isa_release(act2000_card * card); extern void act2000_isa_release(act2000_card * card);
extern void isa_receive(act2000_card *card); extern void act2000_isa_receive(act2000_card *card);
extern void isa_send(act2000_card *card); extern void act2000_isa_send(act2000_card *card);
#endif /* act2000_isa_h */ #endif /* act2000_isa_h */
...@@ -113,10 +113,6 @@ static actcapi_msgdsc valid_msg[] = { ...@@ -113,10 +113,6 @@ static actcapi_msgdsc valid_msg[] = {
{{ 0x84, 0x03}, "DISCONNECT_B3_RESP"}, {{ 0x84, 0x03}, "DISCONNECT_B3_RESP"},
{{ 0x86, 0x03}, "DATA_B3_RESP"}, {{ 0x86, 0x03}, "DATA_B3_RESP"},
{{ 0xff, 0x03}, "MANUFACTURER_RESP"}, {{ 0xff, 0x03}, "MANUFACTURER_RESP"},
#if 0
/* CAPI 2.0 */
{{ 0x05, 0x80}, "LISTEN_REQ (CAPI 2.0)"},
#endif
#endif #endif
{{ 0x00, 0x00}, NULL}, {{ 0x00, 0x00}, NULL},
}; };
......
...@@ -322,19 +322,6 @@ typedef struct actcapi_msg { ...@@ -322,19 +322,6 @@ typedef struct actcapi_msg {
__u16 plci; __u16 plci;
__u16 info; __u16 info;
} select_b3_protocol_conf; } select_b3_protocol_conf;
#if 0
struct listen_req {
__u32 controller;
__u32 infomask;
__u32 cipmask;
__u32 cipmask2;
__u16 dummy; /* 2 Length-bytes of 2 Structs MUST always be 0!!! */
} listen_req;
struct listen_conf {
__u32 controller;
__u16 info;
} listen_conf;
#else
struct listen_req { struct listen_req {
__u8 controller; __u8 controller;
__u32 infomask __attribute__ ((packed)); __u32 infomask __attribute__ ((packed));
...@@ -345,7 +332,6 @@ typedef struct actcapi_msg { ...@@ -345,7 +332,6 @@ typedef struct actcapi_msg {
__u8 controller; __u8 controller;
__u16 info __attribute__ ((packed)); __u16 info __attribute__ ((packed));
} listen_conf; } listen_conf;
#endif
struct data_b3_req { struct data_b3_req {
__u16 fakencci; __u16 fakencci;
__u16 datalen; __u16 datalen;
......
/* $Id: module.c,v 1.9 1999/04/12 13:13:56 fritz Exp $ /* $Id: module.c,v 1.11 1999/10/30 09:48:04 keil Exp $
* *
* ISDN lowlevel-module for the IBM ISDN-S0 Active 2000. * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000.
* *
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: module.c,v $ * $Log: module.c,v $
* Revision 1.11 1999/10/30 09:48:04 keil
* miss one prefix act2000
*
* Revision 1.10 1999/10/24 18:46:05 fritz
* Changed isa_ prefix to act2000_isa_ to prevent name-clash in latest
* kernels.
*
* Revision 1.9 1999/04/12 13:13:56 fritz * Revision 1.9 1999/04/12 13:13:56 fritz
* Made cards pointer static to avoid name-clash. * Made cards pointer static to avoid name-clash.
* *
...@@ -56,12 +63,12 @@ ...@@ -56,12 +63,12 @@
#include "act2000_isa.h" #include "act2000_isa.h"
#include "capi.h" #include "capi.h"
static unsigned short isa_ports[] = static unsigned short act2000_isa_ports[] =
{ {
0x0200, 0x0240, 0x0280, 0x02c0, 0x0300, 0x0340, 0x0380, 0x0200, 0x0240, 0x0280, 0x02c0, 0x0300, 0x0340, 0x0380,
0xcfe0, 0xcfa0, 0xcf60, 0xcf20, 0xcee0, 0xcea0, 0xce60, 0xcfe0, 0xcfa0, 0xcf60, 0xcf20, 0xcee0, 0xcea0, 0xce60,
}; };
#define ISA_NRPORTS (sizeof(isa_ports)/sizeof(unsigned short)) #define ISA_NRPORTS (sizeof(act2000_isa_ports)/sizeof(unsigned short))
static act2000_card *cards = (act2000_card *) NULL; static act2000_card *cards = (act2000_card *) NULL;
...@@ -238,7 +245,7 @@ act2000_transmit(struct act2000_card *card) ...@@ -238,7 +245,7 @@ act2000_transmit(struct act2000_card *card)
{ {
switch (card->bus) { switch (card->bus) {
case ACT2000_BUS_ISA: case ACT2000_BUS_ISA:
isa_send(card); act2000_isa_send(card);
break; break;
case ACT2000_BUS_PCMCIA: case ACT2000_BUS_PCMCIA:
case ACT2000_BUS_MCA: case ACT2000_BUS_MCA:
...@@ -253,7 +260,7 @@ act2000_receive(struct act2000_card *card) ...@@ -253,7 +260,7 @@ act2000_receive(struct act2000_card *card)
{ {
switch (card->bus) { switch (card->bus) {
case ACT2000_BUS_ISA: case ACT2000_BUS_ISA:
isa_receive(card); act2000_isa_receive(card);
break; break;
case ACT2000_BUS_PCMCIA: case ACT2000_BUS_PCMCIA:
case ACT2000_BUS_MCA: case ACT2000_BUS_MCA:
...@@ -296,7 +303,7 @@ act2000_command(act2000_card * card, isdn_ctrl * c) ...@@ -296,7 +303,7 @@ act2000_command(act2000_card * card, isdn_ctrl * c)
case ACT2000_IOCTL_LOADBOOT: case ACT2000_IOCTL_LOADBOOT:
switch (card->bus) { switch (card->bus) {
case ACT2000_BUS_ISA: case ACT2000_BUS_ISA:
ret = isa_download(card, ret = act2000_isa_download(card,
(act2000_ddef *)a); (act2000_ddef *)a);
if (!ret) { if (!ret) {
card->flags |= ACT2000_FLAGS_LOADED; card->flags |= ACT2000_FLAGS_LOADED;
...@@ -701,10 +708,6 @@ act2000_alloccard(int bus, int port, int irq, char *id) ...@@ -701,10 +708,6 @@ act2000_alloccard(int bus, int port, int irq, char *id)
card->interface.features = card->interface.features =
ISDN_FEATURE_L2_X75I | ISDN_FEATURE_L2_X75I |
ISDN_FEATURE_L2_HDLC | ISDN_FEATURE_L2_HDLC |
#if 0
/* Not yet! New Firmware is on the way ... */
ISDN_FEATURE_L2_TRANS |
#endif
ISDN_FEATURE_L3_TRANS | ISDN_FEATURE_L3_TRANS |
ISDN_FEATURE_P_UNKNOWN; ISDN_FEATURE_P_UNKNOWN;
card->interface.hl_hdrlen = 20; card->interface.hl_hdrlen = 20;
...@@ -762,7 +765,7 @@ unregister_card(act2000_card * card) ...@@ -762,7 +765,7 @@ unregister_card(act2000_card * card)
card->interface.statcallb(&cmd); card->interface.statcallb(&cmd);
switch (card->bus) { switch (card->bus) {
case ACT2000_BUS_ISA: case ACT2000_BUS_ISA:
isa_release(card); act2000_isa_release(card);
break; break;
case ACT2000_BUS_MCA: case ACT2000_BUS_MCA:
case ACT2000_BUS_PCMCIA: case ACT2000_BUS_PCMCIA:
...@@ -796,11 +799,11 @@ act2000_addcard(int bus, int port, int irq, char *id) ...@@ -796,11 +799,11 @@ act2000_addcard(int bus, int port, int irq, char *id)
switch (bus) { switch (bus) {
case ACT2000_BUS_ISA: case ACT2000_BUS_ISA:
for (i = 0; i < ISA_NRPORTS; i++) for (i = 0; i < ISA_NRPORTS; i++)
if (isa_detect(isa_ports[i])) { if (act2000_isa_detect(act2000_isa_ports[i])) {
printk(KERN_INFO printk(KERN_INFO
"act2000: Detected ISA card at port 0x%x\n", "act2000: Detected ISA card at port 0x%x\n",
isa_ports[i]); act2000_isa_ports[i]);
act2000_alloccard(bus, isa_ports[i], irq, id); act2000_alloccard(bus, act2000_isa_ports[i], irq, id);
} }
break; break;
case ACT2000_BUS_MCA: case ACT2000_BUS_MCA:
...@@ -823,10 +826,10 @@ act2000_addcard(int bus, int port, int irq, char *id) ...@@ -823,10 +826,10 @@ act2000_addcard(int bus, int port, int irq, char *id)
added++; added++;
switch (p->bus) { switch (p->bus) {
case ACT2000_BUS_ISA: case ACT2000_BUS_ISA:
if (isa_detect(p->port)) { if (act2000_isa_detect(p->port)) {
if (act2000_registercard(p)) if (act2000_registercard(p))
break; break;
if (isa_config_port(p, p->port)) { if (act2000_isa_config_port(p, p->port)) {
printk(KERN_WARNING printk(KERN_WARNING
"act2000: Could not request port 0x%04x\n", "act2000: Could not request port 0x%04x\n",
p->port); p->port);
...@@ -834,7 +837,7 @@ act2000_addcard(int bus, int port, int irq, char *id) ...@@ -834,7 +837,7 @@ act2000_addcard(int bus, int port, int irq, char *id)
p->interface.statcallb = NULL; p->interface.statcallb = NULL;
break; break;
} }
if (isa_config_irq(p, p->irq)) { if (act2000_isa_config_irq(p, p->irq)) {
printk(KERN_INFO printk(KERN_INFO
"act2000: No IRQ available, fallback to polling\n"); "act2000: No IRQ available, fallback to polling\n");
/* Fall back to polled operation */ /* Fall back to polled operation */
......
# #
# $Id: Makefile,v 1.6 1999/07/20 06:41:44 calle Exp $ # $Id: Makefile,v 1.7 1999/09/15 08:16:03 calle Exp $
# #
# Makefile for the CAPI and AVM-B1 device drivers. # Makefile for the CAPI and AVM-B1 device drivers.
# #
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
# parent makes.. # parent makes..
# #
# $Log: Makefile,v $ # $Log: Makefile,v $
# Revision 1.7 1999/09/15 08:16:03 calle
# Implementation of 64Bit extention complete.
#
# Revision 1.6 1999/07/20 06:41:44 calle # Revision 1.6 1999/07/20 06:41:44 calle
# Bugfix: After the redesign of the AVM B1 driver, the driver didn't even # Bugfix: After the redesign of the AVM B1 driver, the driver didn't even
# compile, if not selected as modules. # compile, if not selected as modules.
...@@ -90,6 +93,12 @@ ifeq ($(CONFIG_ISDN_DRV_AVMB1),y) ...@@ -90,6 +93,12 @@ ifeq ($(CONFIG_ISDN_DRV_AVMB1),y)
ifdef CONFIG_ISDN_DRV_AVMB1_B1PCMCIA ifdef CONFIG_ISDN_DRV_AVMB1_B1PCMCIA
OX_OBJS += b1pcmcia.o OX_OBJS += b1pcmcia.o
endif endif
ifdef CONFIG_ISDN_DRV_AVMB1_T1PCI
O_OBJS += t1pci.o
endif
ifdef CONFIG_ISDN_DRV_AVMB1_C4
O_OBJS += c4.o
endif
OX_OBJS += capiutil.o capidrv.o b1.o OX_OBJS += capiutil.o capidrv.o b1.o
else else
ifeq ($(CONFIG_ISDN_DRV_AVMB1),m) ifeq ($(CONFIG_ISDN_DRV_AVMB1),m)
...@@ -105,10 +114,16 @@ else ...@@ -105,10 +114,16 @@ else
ifdef CONFIG_ISDN_DRV_AVMB1_T1ISA ifdef CONFIG_ISDN_DRV_AVMB1_T1ISA
M_OBJS += t1isa.o M_OBJS += t1isa.o
endif endif
MX_OBJS += capiutil.o capidrv.o b1.o
ifdef CONFIG_ISDN_DRV_AVMB1_B1PCMCIA ifdef CONFIG_ISDN_DRV_AVMB1_B1PCMCIA
MX_OBJS += b1pcmcia.o MX_OBJS += b1pcmcia.o
endif endif
ifdef CONFIG_ISDN_DRV_AVMB1_T1PCI
M_OBJS += t1pci.o
endif
ifdef CONFIG_ISDN_DRV_AVMB1_C4
M_OBJS += c4.o
endif
MX_OBJS += capiutil.o capidrv.o b1.o
endif endif
endif endif
......
/* /*
* $Id: avmcard.h,v 1.4 1999/08/04 10:10:08 calle Exp $ * $Id: avmcard.h,v 1.6 1999/11/05 16:38:01 calle Exp $
* *
* Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: avmcard.h,v $ * $Log: avmcard.h,v $
* Revision 1.6 1999/11/05 16:38:01 calle
* Cleanups before kernel 2.4:
* - Changed all messages to use card->name or driver->name instead of
* constant string.
* - Moved some data from struct avmcard into new struct avmctrl_info.
* Changed all lowlevel capi driver to match the new structur.
*
* Revision 1.5 1999/09/07 09:02:53 calle
* SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and
* DATA_B3_IND is always directly after the CAPI message. The "Data" member
* ist never used inside the kernel.
*
* Revision 1.4 1999/08/04 10:10:08 calle * Revision 1.4 1999/08/04 10:10:08 calle
* Bugfix: corrected /proc functions, added structure for new AVM cards. * Bugfix: corrected /proc functions, added structure for new AVM cards.
* *
...@@ -73,6 +85,7 @@ typedef struct avmcard_dmainfo { ...@@ -73,6 +85,7 @@ typedef struct avmcard_dmainfo {
__u8 sendbuf[128+2048]; __u8 sendbuf[128+2048];
} avmcard_dmainfo; } avmcard_dmainfo;
typedef struct avmcard { typedef struct avmcard {
char name[32]; char name[32];
unsigned int port; unsigned int port;
...@@ -81,25 +94,34 @@ typedef struct avmcard { ...@@ -81,25 +94,34 @@ typedef struct avmcard {
enum avmcardtype cardtype; enum avmcardtype cardtype;
int cardnr; /* for t1isa */ int cardnr; /* for t1isa */
int versionlen;
char versionbuf[1024];
char *version[AVM_MAXVERSION];
char cardname[32];
char infobuf[128]; /* for function procinfo */
char msgbuf[128]; /* capimsg msg part */ char msgbuf[128]; /* capimsg msg part */
char databuf[2048]; /* capimsg data part */ char databuf[2048]; /* capimsg data part */
int interrupt; int interrupt;
void *mbase; void *mbase;
__u32 csr; volatile __u32 csr;
avmcard_dmainfo *dma; avmcard_dmainfo *dma;
struct capi_ctr *ctrl; struct avmctrl_info {
char cardname[32];
int versionlen;
char versionbuf[1024];
char *version[AVM_MAXVERSION];
char infobuf[128]; /* for function procinfo */
struct avmcard *card;
struct capi_ctr *capi_ctrl;
} *ctrlinfo;
int nlogcontr;
} avmcard; } avmcard;
typedef struct avmctrl_info avmctrl_info;
extern int b1_irq_table[16]; extern int b1_irq_table[16];
/* /*
...@@ -540,16 +562,16 @@ static inline void b1_setinterrupt(unsigned int base, unsigned irq, ...@@ -540,16 +562,16 @@ static inline void b1_setinterrupt(unsigned int base, unsigned irq,
} }
int b1_detect(unsigned int base, enum avmcardtype cardtype); int b1_detect(unsigned int base, enum avmcardtype cardtype);
int b1_load_t4file(unsigned int base, capiloaddatapart * t4file); int b1_load_t4file(avmcard *card, capiloaddatapart * t4file);
int b1_load_config(unsigned int base, capiloaddatapart * config); int b1_load_config(avmcard *card, capiloaddatapart * config);
int b1_loaded(unsigned int base); int b1_loaded(avmcard *card);
int b1_load_firmware(struct capi_ctr *ctrl, capiloaddata *data); int b1_load_firmware(struct capi_ctr *ctrl, capiloaddata *data);
void b1_reset_ctr(struct capi_ctr *ctrl); void b1_reset_ctr(struct capi_ctr *ctrl);
void b1_register_appl(struct capi_ctr *ctrl, __u16 appl, void b1_register_appl(struct capi_ctr *ctrl, __u16 appl,
capi_register_params *rp); capi_register_params *rp);
void b1_release_appl(struct capi_ctr *ctrl, __u16 appl); void b1_release_appl(struct capi_ctr *ctrl, __u16 appl);
void b1_send_message(struct capi_ctr *ctrl, struct sk_buff *skb); void b1_send_message(struct capi_ctr *ctrl, struct sk_buff *skb);
void b1_parse_version(avmcard *card); void b1_parse_version(avmctrl_info *card);
void b1_handle_interrupt(avmcard * card); void b1_handle_interrupt(avmcard * card);
int b1ctl_read_proc(char *page, char **start, off_t off, int b1ctl_read_proc(char *page, char **start, off_t off,
......
This diff is collapsed.
/* /*
* $Id: b1isa.c,v 1.4 1999/08/22 20:26:24 calle Exp $ * $Id: b1isa.c,v 1.5 1999/11/05 16:38:01 calle Exp $
* *
* Module for AVM B1 ISA-card. * Module for AVM B1 ISA-card.
* *
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: b1isa.c,v $ * $Log: b1isa.c,v $
* Revision 1.5 1999/11/05 16:38:01 calle
* Cleanups before kernel 2.4:
* - Changed all messages to use card->name or driver->name instead of
* constant string.
* - Moved some data from struct avmcard into new struct avmctrl_info.
* Changed all lowlevel capi driver to match the new structur.
*
* Revision 1.4 1999/08/22 20:26:24 calle * Revision 1.4 1999/08/22 20:26:24 calle
* backported changes from kernel 2.3.14: * backported changes from kernel 2.3.14:
* - several #include "config.h" gone, others come. * - several #include "config.h" gone, others come.
...@@ -49,13 +56,12 @@ ...@@ -49,13 +56,12 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/capi.h> #include <linux/capi.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/isdn_compat.h>
#include "capicmd.h" #include "capicmd.h"
#include "capiutil.h" #include "capiutil.h"
#include "capilli.h" #include "capilli.h"
#include "avmcard.h" #include "avmcard.h"
static char *revision = "$Revision: 1.4 $"; static char *revision = "$Revision: 1.5 $";
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
...@@ -92,7 +98,8 @@ static void b1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs) ...@@ -92,7 +98,8 @@ static void b1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
static void b1isa_remove_ctr(struct capi_ctr *ctrl) static void b1isa_remove_ctr(struct capi_ctr *ctrl)
{ {
avmcard *card = (avmcard *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card;
unsigned int port = card->port; unsigned int port = card->port;
b1_reset(port); b1_reset(port);
...@@ -101,6 +108,7 @@ static void b1isa_remove_ctr(struct capi_ctr *ctrl) ...@@ -101,6 +108,7 @@ static void b1isa_remove_ctr(struct capi_ctr *ctrl)
di->detach_ctr(ctrl); di->detach_ctr(ctrl);
free_irq(card->irq, card); free_irq(card->irq, card);
release_region(card->port, AVMB1_PORTLEN); release_region(card->port, AVMB1_PORTLEN);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
...@@ -110,6 +118,7 @@ static void b1isa_remove_ctr(struct capi_ctr *ctrl) ...@@ -110,6 +118,7 @@ static void b1isa_remove_ctr(struct capi_ctr *ctrl)
static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p) static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p)
{ {
avmctrl_info *cinfo;
avmcard *card; avmcard *card;
int retval; int retval;
...@@ -120,6 +129,15 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p) ...@@ -120,6 +129,15 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p)
return -ENOMEM; return -ENOMEM;
} }
memset(card, 0, sizeof(avmcard)); memset(card, 0, sizeof(avmcard));
cinfo = (avmctrl_info *) kmalloc(sizeof(avmctrl_info), GFP_ATOMIC);
if (!cinfo) {
printk(KERN_WARNING "b1isa: no memory.\n");
kfree(card);
return -ENOMEM;
}
memset(cinfo, 0, sizeof(avmctrl_info));
card->ctrlinfo = cinfo;
cinfo->card = card;
sprintf(card->name, "b1isa-%x", p->port); sprintf(card->name, "b1isa-%x", p->port);
card->port = p->port; card->port = p->port;
card->irq = p->irq; card->irq = p->irq;
...@@ -129,17 +147,20 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p) ...@@ -129,17 +147,20 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p)
printk(KERN_WARNING printk(KERN_WARNING
"b1isa: ports 0x%03x-0x%03x in use.\n", "b1isa: ports 0x%03x-0x%03x in use.\n",
card->port, card->port + AVMB1_PORTLEN); card->port, card->port + AVMB1_PORTLEN);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EBUSY; return -EBUSY;
} }
if (b1_irq_table[card->irq & 0xf] == 0) { if (b1_irq_table[card->irq & 0xf] == 0) {
printk(KERN_WARNING "b1isa: irq %d not valid.\n", card->irq); printk(KERN_WARNING "b1isa: irq %d not valid.\n", card->irq);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EINVAL; return -EINVAL;
} }
if ( card->port != 0x150 && card->port != 0x250 if ( card->port != 0x150 && card->port != 0x250
&& card->port != 0x300 && card->port != 0x340) { && card->port != 0x300 && card->port != 0x340) {
printk(KERN_WARNING "b1isa: illegal port 0x%x.\n", card->port); printk(KERN_WARNING "b1isa: illegal port 0x%x.\n", card->port);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EINVAL; return -EINVAL;
} }
...@@ -147,6 +168,7 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p) ...@@ -147,6 +168,7 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p)
if ((retval = b1_detect(card->port, card->cardtype)) != 0) { if ((retval = b1_detect(card->port, card->cardtype)) != 0) {
printk(KERN_NOTICE "b1isa: NO card at 0x%x (%d)\n", printk(KERN_NOTICE "b1isa: NO card at 0x%x (%d)\n",
card->port, retval); card->port, retval);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EIO; return -EIO;
} }
...@@ -158,15 +180,17 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p) ...@@ -158,15 +180,17 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p)
if (retval) { if (retval) {
printk(KERN_ERR "b1isa: unable to get IRQ %d.\n", card->irq); printk(KERN_ERR "b1isa: unable to get IRQ %d.\n", card->irq);
release_region(card->port, AVMB1_PORTLEN); release_region(card->port, AVMB1_PORTLEN);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EBUSY; return -EBUSY;
} }
card->ctrl = di->attach_ctr(driver, card->name, card); cinfo->capi_ctrl = di->attach_ctr(driver, card->name, cinfo);
if (!card->ctrl) { if (!cinfo->capi_ctrl) {
printk(KERN_ERR "b1isa: attach controller failed.\n"); printk(KERN_ERR "b1isa: attach controller failed.\n");
free_irq(card->irq, card); free_irq(card->irq, card);
release_region(card->port, AVMB1_PORTLEN); release_region(card->port, AVMB1_PORTLEN);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EBUSY; return -EBUSY;
} }
...@@ -177,15 +201,17 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p) ...@@ -177,15 +201,17 @@ static int b1isa_add_card(struct capi_driver *driver, struct capicardparams *p)
static char *b1isa_procinfo(struct capi_ctr *ctrl) static char *b1isa_procinfo(struct capi_ctr *ctrl)
{ {
avmcard *card = (avmcard *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
if (!card)
if (!cinfo)
return ""; return "";
sprintf(card->infobuf, "%s %s 0x%x %d", sprintf(cinfo->infobuf, "%s %s 0x%x %d",
card->cardname[0] ? card->cardname : "-", cinfo->cardname[0] ? cinfo->cardname : "-",
card->version[VER_DRIVER] ? card->version[VER_DRIVER] : "-", cinfo->version[VER_DRIVER] ? cinfo->version[VER_DRIVER] : "-",
card->port, card->irq cinfo->card ? cinfo->card->port : 0x0,
cinfo->card ? cinfo->card->irq : 0
); );
return card->infobuf; return cinfo->infobuf;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
......
/* /*
* $Id: b1pci.c,v 1.16 1999/08/11 21:01:07 keil Exp $ * $Id: b1pci.c,v 1.18 1999/11/05 16:38:01 calle Exp $
* *
* Module for AVM B1 PCI-card. * Module for AVM B1 PCI-card.
* *
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: b1pci.c,v $ * $Log: b1pci.c,v $
* Revision 1.18 1999/11/05 16:38:01 calle
* Cleanups before kernel 2.4:
* - Changed all messages to use card->name or driver->name instead of
* constant string.
* - Moved some data from struct avmcard into new struct avmctrl_info.
* Changed all lowlevel capi driver to match the new structur.
*
* Revision 1.17 1999/10/05 06:50:07 calle
* Forgot SA_SHIRQ as argument to request_irq.
*
* Revision 1.16 1999/08/11 21:01:07 keil * Revision 1.16 1999/08/11 21:01:07 keil
* new PCI codefix * new PCI codefix
* *
...@@ -51,13 +61,12 @@ ...@@ -51,13 +61,12 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/capi.h> #include <linux/capi.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/isdn_compat.h>
#include "capicmd.h" #include "capicmd.h"
#include "capiutil.h" #include "capiutil.h"
#include "capilli.h" #include "capilli.h"
#include "avmcard.h" #include "avmcard.h"
static char *revision = "$Revision: 1.16 $"; static char *revision = "$Revision: 1.18 $";
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
...@@ -86,11 +95,11 @@ static void b1pci_interrupt(int interrupt, void *devptr, struct pt_regs *regs) ...@@ -86,11 +95,11 @@ static void b1pci_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
card = (avmcard *) devptr; card = (avmcard *) devptr;
if (!card) { if (!card) {
printk(KERN_WARNING "b1_interrupt: wrong device\n"); printk(KERN_WARNING "b1pci: interrupt: wrong device\n");
return; return;
} }
if (card->interrupt) { if (card->interrupt) {
printk(KERN_ERR "b1_interrupt: reentering interrupt hander (%s)\n", card->name); printk(KERN_ERR "%s: reentering interrupt hander.\n", card->name);
return; return;
} }
...@@ -104,7 +113,8 @@ static void b1pci_interrupt(int interrupt, void *devptr, struct pt_regs *regs) ...@@ -104,7 +113,8 @@ static void b1pci_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
static void b1pci_remove_ctr(struct capi_ctr *ctrl) static void b1pci_remove_ctr(struct capi_ctr *ctrl)
{ {
avmcard *card = (avmcard *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card;
unsigned int port = card->port; unsigned int port = card->port;
b1_reset(port); b1_reset(port);
...@@ -114,6 +124,7 @@ static void b1pci_remove_ctr(struct capi_ctr *ctrl) ...@@ -114,6 +124,7 @@ static void b1pci_remove_ctr(struct capi_ctr *ctrl)
free_irq(card->irq, card); free_irq(card->irq, card);
release_region(card->port, AVMB1_PORTLEN); release_region(card->port, AVMB1_PORTLEN);
ctrl->driverdata = 0; ctrl->driverdata = 0;
kfree(card->ctrlinfo);
kfree(card); kfree(card);
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
...@@ -123,15 +134,17 @@ static void b1pci_remove_ctr(struct capi_ctr *ctrl) ...@@ -123,15 +134,17 @@ static void b1pci_remove_ctr(struct capi_ctr *ctrl)
static char *b1pci_procinfo(struct capi_ctr *ctrl) static char *b1pci_procinfo(struct capi_ctr *ctrl)
{ {
avmcard *card = (avmcard *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
if (!card)
if (!cinfo)
return ""; return "";
sprintf(card->infobuf, "%s %s 0x%x %d", sprintf(cinfo->infobuf, "%s %s 0x%x %d",
card->cardname[0] ? card->cardname : "-", cinfo->cardname[0] ? cinfo->cardname : "-",
card->version[VER_DRIVER] ? card->version[VER_DRIVER] : "-", cinfo->version[VER_DRIVER] ? cinfo->version[VER_DRIVER] : "-",
card->port, card->irq cinfo->card ? cinfo->card->port : 0x0,
cinfo->card ? cinfo->card->irq : 0
); );
return card->infobuf; return cinfo->infobuf;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
...@@ -139,15 +152,25 @@ static char *b1pci_procinfo(struct capi_ctr *ctrl) ...@@ -139,15 +152,25 @@ static char *b1pci_procinfo(struct capi_ctr *ctrl)
static int b1pci_add_card(struct capi_driver *driver, struct capicardparams *p) static int b1pci_add_card(struct capi_driver *driver, struct capicardparams *p)
{ {
avmcard *card; avmcard *card;
avmctrl_info *cinfo;
int retval; int retval;
card = (avmcard *) kmalloc(sizeof(avmcard), GFP_ATOMIC); card = (avmcard *) kmalloc(sizeof(avmcard), GFP_ATOMIC);
if (!card) { if (!card) {
printk(KERN_WARNING "b1pci: no memory.\n"); printk(KERN_WARNING "%s: no memory.\n", driver->name);
return -ENOMEM; return -ENOMEM;
} }
memset(card, 0, sizeof(avmcard)); memset(card, 0, sizeof(avmcard));
cinfo = (avmctrl_info *) kmalloc(sizeof(avmctrl_info), GFP_ATOMIC);
if (!cinfo) {
printk(KERN_WARNING "%s: no memory.\n", driver->name);
kfree(card);
return -ENOMEM;
}
memset(cinfo, 0, sizeof(avmctrl_info));
card->ctrlinfo = cinfo;
cinfo->card = card;
sprintf(card->name, "b1pci-%x", p->port); sprintf(card->name, "b1pci-%x", p->port);
card->port = p->port; card->port = p->port;
card->irq = p->irq; card->irq = p->irq;
...@@ -155,15 +178,17 @@ static int b1pci_add_card(struct capi_driver *driver, struct capicardparams *p) ...@@ -155,15 +178,17 @@ static int b1pci_add_card(struct capi_driver *driver, struct capicardparams *p)
if (check_region(card->port, AVMB1_PORTLEN)) { if (check_region(card->port, AVMB1_PORTLEN)) {
printk(KERN_WARNING printk(KERN_WARNING
"b1pci: ports 0x%03x-0x%03x in use.\n", "%s: ports 0x%03x-0x%03x in use.\n",
card->port, card->port + AVMB1_PORTLEN); driver->name, card->port, card->port + AVMB1_PORTLEN);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EBUSY; return -EBUSY;
} }
b1_reset(card->port); b1_reset(card->port);
if ((retval = b1_detect(card->port, card->cardtype)) != 0) { if ((retval = b1_detect(card->port, card->cardtype)) != 0) {
printk(KERN_NOTICE "b1pci: NO card at 0x%x (%d)\n", printk(KERN_NOTICE "%s: NO card at 0x%x (%d)\n",
card->port, retval); driver->name, card->port, retval);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EIO; return -EIO;
} }
...@@ -171,19 +196,23 @@ static int b1pci_add_card(struct capi_driver *driver, struct capicardparams *p) ...@@ -171,19 +196,23 @@ static int b1pci_add_card(struct capi_driver *driver, struct capicardparams *p)
request_region(p->port, AVMB1_PORTLEN, card->name); request_region(p->port, AVMB1_PORTLEN, card->name);
retval = request_irq(card->irq, b1pci_interrupt, 0, card->name, card); retval = request_irq(card->irq, b1pci_interrupt, SA_SHIRQ, card->name, card);
if (retval) { if (retval) {
printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", card->irq); printk(KERN_ERR "%s: unable to get IRQ %d.\n",
driver->name, card->irq);
release_region(card->port, AVMB1_PORTLEN); release_region(card->port, AVMB1_PORTLEN);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EBUSY; return -EBUSY;
} }
card->ctrl = di->attach_ctr(driver, card->name, card); cinfo->capi_ctrl = di->attach_ctr(driver, card->name, cinfo);
if (!card->ctrl) { if (!cinfo->capi_ctrl) {
printk(KERN_ERR "b1pci: attach controller failed.\n"); printk(KERN_ERR "%s: attach controller failed.\n",
driver->name);
free_irq(card->irq, card); free_irq(card->irq, card);
release_region(card->port, AVMB1_PORTLEN); release_region(card->port, AVMB1_PORTLEN);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EBUSY; return -EBUSY;
} }
...@@ -252,7 +281,7 @@ int b1pci_init(void) ...@@ -252,7 +281,7 @@ int b1pci_init(void)
while ((dev = pci_find_device(PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_B1, dev))) { while ((dev = pci_find_device(PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_B1, dev))) {
struct capicardparams param; struct capicardparams param;
param.port = get_pcibase(dev, 1) & PCI_BASE_ADDRESS_IO_MASK; param.port = dev->resource[ 1].start & PCI_BASE_ADDRESS_IO_MASK;
param.irq = dev->irq; param.irq = dev->irq;
printk(KERN_INFO printk(KERN_INFO
"%s: PCI BIOS reports AVM-B1 at i/o %#x, irq %d\n", "%s: PCI BIOS reports AVM-B1 at i/o %#x, irq %d\n",
...@@ -277,7 +306,7 @@ int b1pci_init(void) ...@@ -277,7 +306,7 @@ int b1pci_init(void)
printk(KERN_ERR "%s: NO B1-PCI card detected\n", driver->name); printk(KERN_ERR "%s: NO B1-PCI card detected\n", driver->name);
return -ESRCH; return -ESRCH;
#else #else
printk(KERN_ERR "b1pci: kernel not compiled with PCI.\n"); printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name);
return -EIO; return -EIO;
#endif #endif
} }
......
/* /*
* $Id: b1pcmcia.c,v 1.4 1999/08/22 20:26:26 calle Exp $ * $Id: b1pcmcia.c,v 1.5 1999/11/05 16:38:01 calle Exp $
* *
* Module for AVM B1/M1/M2 PCMCIA-card. * Module for AVM B1/M1/M2 PCMCIA-card.
* *
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: b1pcmcia.c,v $ * $Log: b1pcmcia.c,v $
* Revision 1.5 1999/11/05 16:38:01 calle
* Cleanups before kernel 2.4:
* - Changed all messages to use card->name or driver->name instead of
* constant string.
* - Moved some data from struct avmcard into new struct avmctrl_info.
* Changed all lowlevel capi driver to match the new structur.
*
* Revision 1.4 1999/08/22 20:26:26 calle * Revision 1.4 1999/08/22 20:26:26 calle
* backported changes from kernel 2.3.14: * backported changes from kernel 2.3.14:
* - several #include "config.h" gone, others come. * - several #include "config.h" gone, others come.
...@@ -50,13 +57,12 @@ ...@@ -50,13 +57,12 @@
#include <asm/io.h> #include <asm/io.h>
#include <linux/capi.h> #include <linux/capi.h>
#include <linux/b1pcmcia.h> #include <linux/b1pcmcia.h>
#include <linux/isdn_compat.h>
#include "capicmd.h" #include "capicmd.h"
#include "capiutil.h" #include "capiutil.h"
#include "capilli.h" #include "capilli.h"
#include "avmcard.h" #include "avmcard.h"
static char *revision = "$Revision: 1.4 $"; static char *revision = "$Revision: 1.5 $";
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
...@@ -75,11 +81,12 @@ static void b1pcmcia_interrupt(int interrupt, void *devptr, struct pt_regs *regs ...@@ -75,11 +81,12 @@ static void b1pcmcia_interrupt(int interrupt, void *devptr, struct pt_regs *regs
card = (avmcard *) devptr; card = (avmcard *) devptr;
if (!card) { if (!card) {
printk(KERN_WARNING "b1_interrupt: wrong device\n"); printk(KERN_WARNING "b1pcmcia: interrupt: wrong device\n");
return; return;
} }
if (card->interrupt) { if (card->interrupt) {
printk(KERN_ERR "b1_interrupt: reentering interrupt hander (%s)\n", card->name); printk(KERN_ERR "%s: reentering interrupt hander.\n",
card->name);
return; return;
} }
...@@ -93,7 +100,8 @@ static void b1pcmcia_interrupt(int interrupt, void *devptr, struct pt_regs *regs ...@@ -93,7 +100,8 @@ static void b1pcmcia_interrupt(int interrupt, void *devptr, struct pt_regs *regs
static void b1pcmcia_remove_ctr(struct capi_ctr *ctrl) static void b1pcmcia_remove_ctr(struct capi_ctr *ctrl)
{ {
avmcard *card = (avmcard *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
avmcard *card = cinfo->card;
unsigned int port = card->port; unsigned int port = card->port;
b1_reset(port); b1_reset(port);
...@@ -116,16 +124,26 @@ static int b1pcmcia_add_card(struct capi_driver *driver, ...@@ -116,16 +124,26 @@ static int b1pcmcia_add_card(struct capi_driver *driver,
unsigned irq, unsigned irq,
enum avmcardtype cardtype) enum avmcardtype cardtype)
{ {
avmctrl_info *cinfo;
avmcard *card; avmcard *card;
int retval; int retval;
card = (avmcard *) kmalloc(sizeof(avmcard), GFP_ATOMIC); card = (avmcard *) kmalloc(sizeof(avmcard), GFP_ATOMIC);
if (!card) { if (!card) {
printk(KERN_WARNING "b1pcmcia: no memory.\n"); printk(KERN_WARNING "%s: no memory.\n", driver->name);
return -ENOMEM; return -ENOMEM;
} }
memset(card, 0, sizeof(avmcard)); memset(card, 0, sizeof(avmcard));
cinfo = (avmctrl_info *) kmalloc(sizeof(avmctrl_info), GFP_ATOMIC);
if (!cinfo) {
printk(KERN_WARNING "%s: no memory.\n", driver->name);
kfree(card);
return -ENOMEM;
}
memset(cinfo, 0, sizeof(avmctrl_info));
card->ctrlinfo = cinfo;
cinfo->card = card;
switch (cardtype) { switch (cardtype) {
case avm_m1: sprintf(card->name, "m1-%x", port); break; case avm_m1: sprintf(card->name, "m1-%x", port); break;
case avm_m2: sprintf(card->name, "m2-%x", port); break; case avm_m2: sprintf(card->name, "m2-%x", port); break;
...@@ -137,8 +155,9 @@ static int b1pcmcia_add_card(struct capi_driver *driver, ...@@ -137,8 +155,9 @@ static int b1pcmcia_add_card(struct capi_driver *driver,
b1_reset(card->port); b1_reset(card->port);
if ((retval = b1_detect(card->port, card->cardtype)) != 0) { if ((retval = b1_detect(card->port, card->cardtype)) != 0) {
printk(KERN_NOTICE "b1pcmcia: NO card at 0x%x (%d)\n", printk(KERN_NOTICE "%s: NO card at 0x%x (%d)\n",
card->port, retval); driver->name, card->port, retval);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EIO; return -EIO;
} }
...@@ -146,36 +165,42 @@ static int b1pcmcia_add_card(struct capi_driver *driver, ...@@ -146,36 +165,42 @@ static int b1pcmcia_add_card(struct capi_driver *driver,
retval = request_irq(card->irq, b1pcmcia_interrupt, 0, card->name, card); retval = request_irq(card->irq, b1pcmcia_interrupt, 0, card->name, card);
if (retval) { if (retval) {
printk(KERN_ERR "b1pcmcia: unable to get IRQ %d.\n", card->irq); printk(KERN_ERR "%s: unable to get IRQ %d.\n",
driver->name, card->irq);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EBUSY; return -EBUSY;
} }
card->ctrl = di->attach_ctr(driver, card->name, card); cinfo->capi_ctrl = di->attach_ctr(driver, card->name, cinfo);
if (!card->ctrl) { if (!cinfo->capi_ctrl) {
printk(KERN_ERR "b1pcmcia: attach controller failed.\n"); printk(KERN_ERR "%s: attach controller failed.\n",
driver->name);
free_irq(card->irq, card); free_irq(card->irq, card);
kfree(card->ctrlinfo);
kfree(card); kfree(card);
return -EBUSY; return -EBUSY;
} }
MOD_INC_USE_COUNT; MOD_INC_USE_COUNT;
return card->ctrl->cnr; return cinfo->capi_ctrl->cnr;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static char *b1pcmcia_procinfo(struct capi_ctr *ctrl) static char *b1pcmcia_procinfo(struct capi_ctr *ctrl)
{ {
avmcard *card = (avmcard *)(ctrl->driverdata); avmctrl_info *cinfo = (avmctrl_info *)(ctrl->driverdata);
if (!card)
if (!cinfo)
return ""; return "";
sprintf(card->infobuf, "%s %s 0x%x %d", sprintf(cinfo->infobuf, "%s %s 0x%x %d",
card->cardname[0] ? card->cardname : "-", cinfo->cardname[0] ? cinfo->cardname : "-",
card->version[VER_DRIVER] ? card->version[VER_DRIVER] : "-", cinfo->version[VER_DRIVER] ? cinfo->version[VER_DRIVER] : "-",
card->port, card->irq cinfo->card ? cinfo->card->port : 0x0,
cinfo->card ? cinfo->card->irq : 0
); );
return card->infobuf; return cinfo->infobuf;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
...@@ -220,7 +245,7 @@ int b1pcmcia_delcard(unsigned int port, unsigned irq) ...@@ -220,7 +245,7 @@ int b1pcmcia_delcard(unsigned int port, unsigned irq)
avmcard *card; avmcard *card;
for (ctrl = b1pcmcia_driver.controller; ctrl; ctrl = ctrl->next) { for (ctrl = b1pcmcia_driver.controller; ctrl; ctrl = ctrl->next) {
card = (avmcard *)(ctrl->driverdata); card = ((avmctrl_info *)(ctrl->driverdata))->card;
if (card->port == port && card->irq == irq) { if (card->port == port && card->irq == irq) {
b1pcmcia_remove_ctr(ctrl); b1pcmcia_remove_ctr(ctrl);
return 0; return 0;
......
/* /*
* $Id: capi.c,v 1.19 1999/07/09 15:05:42 keil Exp $ * $Id: capi.c,v 1.21 1999/09/10 17:24:18 calle Exp $
* *
* CAPI 2.0 Interface for Linux * CAPI 2.0 Interface for Linux
* *
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de) * Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: capi.c,v $ * $Log: capi.c,v $
* Revision 1.21 1999/09/10 17:24:18 calle
* Changes for proposed standard for CAPI2.0:
* - AK148 "Linux Exention"
*
* Revision 1.20 1999/09/07 09:02:53 calle
* SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and
* DATA_B3_IND is always directly after the CAPI message. The "Data" member
* ist never used inside the kernel.
*
* Revision 1.19 1999/07/09 15:05:42 keil * Revision 1.19 1999/07/09 15:05:42 keil
* compat.h is now isdn_compat.h * compat.h is now isdn_compat.h
* *
...@@ -117,7 +126,6 @@ ...@@ -117,7 +126,6 @@
#include <linux/capi.h> #include <linux/capi.h>
#include <linux/kernelcapi.h> #include <linux/kernelcapi.h>
#include <linux/isdn_compat.h>
#include "capiutil.h" #include "capiutil.h"
#include "capicmd.h" #include "capicmd.h"
#include "capidev.h" #include "capidev.h"
...@@ -201,9 +209,6 @@ static ssize_t capi_read(struct file *file, char *buf, ...@@ -201,9 +209,6 @@ static ssize_t capi_read(struct file *file, char *buf,
skb_queue_head(&cdev->recv_queue, skb); skb_queue_head(&cdev->recv_queue, skb);
return -EMSGSIZE; return -EMSGSIZE;
} }
if (CAPIMSG_COMMAND(skb->data) == CAPI_DATA_B3
&& CAPIMSG_SUBCOMMAND(skb->data) == CAPI_IND)
CAPIMSG_SETDATA(skb->data, buf + CAPIMSG_LEN(skb->data));
retval = copy_to_user(buf, skb->data, skb->len); retval = copy_to_user(buf, skb->data, skb->len);
if (retval) { if (retval) {
skb_queue_head(&cdev->recv_queue, skb); skb_queue_head(&cdev->recv_queue, skb);
...@@ -429,7 +434,7 @@ static int capi_ioctl(struct inode *inode, struct file *file, ...@@ -429,7 +434,7 @@ static int capi_ioctl(struct inode *inode, struct file *file,
return data.errcode; return data.errcode;
case CAPI_INSTALLED: case CAPI_INSTALLED:
if ((*capifuncs->capi_installed) ()) if ((*capifuncs->capi_isinstalled)() == CAPI_NOERROR)
return 0; return 0;
return -ENXIO; return -ENXIO;
...@@ -615,16 +620,12 @@ static struct capi_interface_user cuser = { ...@@ -615,16 +620,12 @@ static struct capi_interface_user cuser = {
int capi_init(void) int capi_init(void)
{ {
#ifdef COMPAT_HAS_NEW_WAITQ
int j; int j;
#endif
memset(capidevs, 0, sizeof(capidevs)); memset(capidevs, 0, sizeof(capidevs));
#ifdef COMPAT_HAS_NEW_WAITQ
for ( j = 0; j < CAPI_MAXMINOR+1; j++ ) { for ( j = 0; j < CAPI_MAXMINOR+1; j++ ) {
init_waitqueue_head(&capidevs[j].recv_wait); init_waitqueue_head(&capidevs[j].recv_wait);
} }
#endif
if (register_chrdev(capi_major, "capi20", &capi_fops)) { if (register_chrdev(capi_major, "capi20", &capi_fops)) {
printk(KERN_ERR "capi20: unable to get major %d\n", capi_major); printk(KERN_ERR "capi20: unable to get major %d\n", capi_major);
......
...@@ -44,11 +44,7 @@ struct capidev { ...@@ -44,11 +44,7 @@ struct capidev {
int is_registered; int is_registered;
__u16 applid; __u16 applid;
struct sk_buff_head recv_queue; struct sk_buff_head recv_queue;
#ifdef COMPAT_HAS_NEW_WAITQ
wait_queue_head_t recv_wait; wait_queue_head_t recv_wait;
#else
struct wait_queue *recv_wait;
#endif
__u16 errcode; __u16 errcode;
/* Statistic */ /* Statistic */
unsigned long nopen; unsigned long nopen;
......
/* /*
* $Id: capidrv.c,v 1.26 1999/08/06 07:41:16 calle Exp $ * $Id: capidrv.c,v 1.28 1999/11/05 16:22:37 calle Exp $
* *
* ISDN4Linux Driver, using capi20 interface (kernelcapi) * ISDN4Linux Driver, using capi20 interface (kernelcapi)
* *
* Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de) * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: capidrv.c,v $ * $Log: capidrv.c,v $
* Revision 1.28 1999/11/05 16:22:37 calle
* Bugfix: Missing break in switch on ISDN_CMD_HANGUP.
*
* Revision 1.27 1999/09/16 15:13:04 calle
* forgot to change paramter type of contr for lower_callback ...
*
* Revision 1.26 1999/08/06 07:41:16 calle * Revision 1.26 1999/08/06 07:41:16 calle
* Added the "vbox patch". if (si1 == 1) si2 = 0; * Added the "vbox patch". if (si1 == 1) si2 = 0;
* *
...@@ -158,12 +164,11 @@ ...@@ -158,12 +164,11 @@
#include <linux/ctype.h> #include <linux/ctype.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <linux/isdn_compat.h>
#include "capiutil.h" #include "capiutil.h"
#include "capicmd.h" #include "capicmd.h"
#include "capidrv.h" #include "capidrv.h"
static char *revision = "$Revision: 1.26 $"; static char *revision = "$Revision: 1.28 $";
int debugmode = 0; int debugmode = 0;
MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>"); MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
...@@ -714,8 +719,6 @@ static struct plcistatechange plcitable[] = ...@@ -714,8 +719,6 @@ static struct plcistatechange plcitable[] =
/* P-0.1 */ /* P-0.1 */
{ST_PLCI_OUTGOING, ST_PLCI_NONE, EV_PLCI_CONNECT_CONF_ERROR, p0}, {ST_PLCI_OUTGOING, ST_PLCI_NONE, EV_PLCI_CONNECT_CONF_ERROR, p0},
{ST_PLCI_OUTGOING, ST_PLCI_ALLOCATED, EV_PLCI_CONNECT_CONF_OK, 0}, {ST_PLCI_OUTGOING, ST_PLCI_ALLOCATED, EV_PLCI_CONNECT_CONF_OK, 0},
{ST_PLCI_OUTGOING, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, 0},
{ST_PLCI_OUTGOING, ST_PLCI_DISCONNECTING, EV_PLCI_FACILITY_IND_DOWN, 0},
/* P-1 */ /* P-1 */
{ST_PLCI_ALLOCATED, ST_PLCI_ACTIVE, EV_PLCI_CONNECT_ACTIVE_IND, 0}, {ST_PLCI_ALLOCATED, ST_PLCI_ACTIVE, EV_PLCI_CONNECT_ACTIVE_IND, 0},
{ST_PLCI_ALLOCATED, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, 0}, {ST_PLCI_ALLOCATED, ST_PLCI_DISCONNECTING, EV_PLCI_DISCONNECT_REQ, 0},
...@@ -1855,14 +1858,19 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card) ...@@ -1855,14 +1858,19 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card)
); );
ncci_change_state(card, bchan->nccip, EV_NCCI_DISCONNECT_B3_REQ); ncci_change_state(card, bchan->nccip, EV_NCCI_DISCONNECT_B3_REQ);
send_message(card, &cmdcmsg); send_message(card, &cmdcmsg);
return 0;
} else if (bchan->plcip) { } else if (bchan->plcip) {
bchan->disconnecting = 1;
if (bchan->plcip->state == ST_PLCI_INCOMING) { if (bchan->plcip->state == ST_PLCI_INCOMING) {
/* just ignore, we a called from isdn_status_callback(), /*
* which will return 0 or 2, this is handled by the * just ignore, we a called from
* CONNECT_IND handler * isdn_status_callback(),
* which will return 0 or 2, this is handled
* by the CONNECT_IND handler
*/ */
} else { bchan->disconnecting = 1;
return 0;
} else if (bchan->plcip->plci) {
bchan->disconnecting = 1;
capi_fill_DISCONNECT_REQ(&cmdcmsg, capi_fill_DISCONNECT_REQ(&cmdcmsg,
global.appid, global.appid,
card->msgid++, card->msgid++,
...@@ -1874,8 +1882,18 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card) ...@@ -1874,8 +1882,18 @@ static int capidrv_command(isdn_ctrl * c, capidrv_contr * card)
); );
plci_change_state(card, bchan->plcip, EV_PLCI_DISCONNECT_REQ); plci_change_state(card, bchan->plcip, EV_PLCI_DISCONNECT_REQ);
send_message(card, &cmdcmsg); send_message(card, &cmdcmsg);
return 0;
} else {
printk(KERN_ERR "capidrv-%d: chan %ld disconnect request while waiting for CONNECT_CONF\n",
card->contrnr,
c->arg);
return -EINVAL;
} }
} }
printk(KERN_ERR "capidrv-%d: chan %ld disconnect request on free channel\n",
card->contrnr,
c->arg);
return -EINVAL;
/* ready */ /* ready */
case ISDN_CMD_SETL2: case ISDN_CMD_SETL2:
...@@ -2022,10 +2040,8 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb) ...@@ -2022,10 +2040,8 @@ static int if_sendbuf(int id, int channel, int doack, struct sk_buff *skb)
(void)capidrv_del_ack(nccip, datahandle); (void)capidrv_del_ack(nccip, datahandle);
return 0; return 0;
} }
#if 1
printk(KERN_DEBUG "capidrv-%d: only %d bytes headroom, need %d\n", printk(KERN_DEBUG "capidrv-%d: only %d bytes headroom, need %d\n",
card->contrnr, skb_headroom(skb), msglen); card->contrnr, skb_headroom(skb), msglen);
#endif
memcpy(skb_push(nskb, msglen), sendcmsg.buf, msglen); memcpy(skb_push(nskb, msglen), sendcmsg.buf, msglen);
errcode = (*capifuncs->capi_put_message) (global.appid, nskb); errcode = (*capifuncs->capi_put_message) (global.appid, nskb);
if (errcode == CAPI_NOERROR) { if (errcode == CAPI_NOERROR) {
...@@ -2211,10 +2227,6 @@ static int capidrv_addcontr(__u16 contr, struct capi_profile *profp) ...@@ -2211,10 +2227,6 @@ static int capidrv_addcontr(__u16 contr, struct capi_profile *profp)
ISDN_FEATURE_L2_V11096 | ISDN_FEATURE_L2_V11096 |
ISDN_FEATURE_L2_V11019 | ISDN_FEATURE_L2_V11019 |
ISDN_FEATURE_L2_V11038 | ISDN_FEATURE_L2_V11038 |
#if 0
ISDN_FEATURE_L2_FAX |
ISDN_FEATURE_L3_FAX |
#endif
ISDN_FEATURE_P_UNKNOWN; ISDN_FEATURE_P_UNKNOWN;
card->interface.hl_hdrlen = 22; /* len of DATA_B3_REQ */ card->interface.hl_hdrlen = 22; /* len of DATA_B3_REQ */
strncpy(card->interface.id, id, sizeof(card->interface.id) - 1); strncpy(card->interface.id, id, sizeof(card->interface.id) - 1);
...@@ -2309,7 +2321,7 @@ static int capidrv_delcontr(__u16 contr) ...@@ -2309,7 +2321,7 @@ static int capidrv_delcontr(__u16 contr)
} }
static void lower_callback(unsigned int cmd, __u16 contr, void *data) static void lower_callback(unsigned int cmd, __u32 contr, void *data)
{ {
switch (cmd) { switch (cmd) {
......
/* /*
* $Id: capiutil.c,v 1.9 1999/07/09 15:05:46 keil Exp $ * $Id: capiutil.c,v 1.10 1999/08/31 11:19:54 paul Exp $
* *
* CAPI 2.0 convert capi message to capi message struct * CAPI 2.0 convert capi message to capi message struct
* *
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
* Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de) * Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: capiutil.c,v $ * $Log: capiutil.c,v $
* Revision 1.10 1999/08/31 11:19:54 paul
* various spelling corrections (new checksums may be needed, Karsten!)
*
* Revision 1.9 1999/07/09 15:05:46 keil * Revision 1.9 1999/07/09 15:05:46 keil
* compat.h is now isdn_compat.h * compat.h is now isdn_compat.h
* *
...@@ -70,7 +73,6 @@ ...@@ -70,7 +73,6 @@
#include <asm/segment.h> #include <asm/segment.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/isdn_compat.h>
#include "capiutil.h" #include "capiutil.h"
/* from CAPI2.0 DDK AVM Berlin GmbH */ /* from CAPI2.0 DDK AVM Berlin GmbH */
...@@ -97,7 +99,7 @@ char *capi_info2str(__u16 reason) ...@@ -97,7 +99,7 @@ char *capi_info2str(__u16 reason)
case 0x1001: case 0x1001:
return "Too many applications"; return "Too many applications";
case 0x1002: case 0x1002:
return "Logical block size to small, must be at least 128 Bytes"; return "Logical block size too small, must be at least 128 Bytes";
case 0x1003: case 0x1003:
return "Buffer exceeds 64 kByte"; return "Buffer exceeds 64 kByte";
case 0x1004: case 0x1004:
......
/* /*
* $Id: capiutil.h,v 1.2 1997/05/18 09:24:19 calle Exp $ * $Id: capiutil.h,v 1.4 1999/09/15 08:16:03 calle Exp $
* *
* CAPI 2.0 defines & types * CAPI 2.0 defines & types
* *
...@@ -7,6 +7,14 @@ ...@@ -7,6 +7,14 @@
* Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de) * Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: capiutil.h,v $ * $Log: capiutil.h,v $
* Revision 1.4 1999/09/15 08:16:03 calle
* Implementation of 64Bit extention complete.
*
* Revision 1.3 1999/09/07 09:02:53 calle
* SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and
* DATA_B3_IND is always directly after the CAPI message. The "Data" member
* ist never used inside the kernel.
*
* Revision 1.2 1997/05/18 09:24:19 calle * Revision 1.2 1997/05/18 09:24:19 calle
* added verbose disconnect reason reporting to avmb1. * added verbose disconnect reason reporting to avmb1.
* some fixes in capi20 interface. * some fixes in capi20 interface.
...@@ -45,12 +53,10 @@ ...@@ -45,12 +53,10 @@
((__u8 *)m)[3] = ((__u16)(applid) >> 8) & 0xff; \ ((__u8 *)m)[3] = ((__u16)(applid) >> 8) & 0xff; \
} while (0) } while (0)
#define CAPIMSG_SETDATA(m, data) \ #define CAPIMSG_SETLEN(m, len) \
do { \ do { \
((__u8 *)m)[12] = (__u32)(data) & 0xff; \ ((__u8 *)m)[0] = (__u16)(len) & 0xff; \
((__u8 *)m)[13] = ((__u32)(data) >> 8) & 0xff; \ ((__u8 *)m)[1] = ((__u16)(len) >> 8) & 0xff; \
((__u8 *)m)[14] = ((__u32)(data) >> 16) & 0xff; \
((__u8 *)m)[15] = ((__u32)(data) >> 24) & 0xff; \
} while (0) } while (0)
/*----- basic-type definitions -----*/ /*----- basic-type definitions -----*/
......
/* /*
* $Id: kcapi.c,v 1.6 1999/07/20 06:41:49 calle Exp $ * $Id: kcapi.c,v 1.10 1999/10/26 15:30:32 calle Exp $
* *
* Kernel CAPI 2.0 Module * Kernel CAPI 2.0 Module
* *
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
* *
* $Log: kcapi.c,v $ * $Log: kcapi.c,v $
* Revision 1.10 1999/10/26 15:30:32 calle
* Generate error message if user want to add card, but driver module is
* not loaded.
*
* Revision 1.9 1999/10/11 22:04:12 keil
* COMPAT_NEED_UACCESS (no include in isdn_compat.h)
*
* Revision 1.8 1999/09/10 17:24:18 calle
* Changes for proposed standard for CAPI2.0:
* - AK148 "Linux Exention"
*
* Revision 1.7 1999/09/04 06:20:05 keil
* Changes from kernel set_current_state()
*
* Revision 1.6 1999/07/20 06:41:49 calle * Revision 1.6 1999/07/20 06:41:49 calle
* Bugfix: After the redesign of the AVM B1 driver, the driver didn't even * Bugfix: After the redesign of the AVM B1 driver, the driver didn't even
* compile, if not selected as modules. * compile, if not selected as modules.
...@@ -57,7 +71,7 @@ ...@@ -57,7 +71,7 @@
#include <linux/tqueue.h> #include <linux/tqueue.h>
#include <linux/capi.h> #include <linux/capi.h>
#include <linux/kernelcapi.h> #include <linux/kernelcapi.h>
#include <linux/isdn_compat.h> #include <asm/uaccess.h>
#include "capicmd.h" #include "capicmd.h"
#include "capiutil.h" #include "capiutil.h"
#include "capilli.h" #include "capilli.h"
...@@ -65,7 +79,7 @@ ...@@ -65,7 +79,7 @@
#include <linux/b1lli.h> #include <linux/b1lli.h>
#endif #endif
static char *revision = "$Revision: 1.6 $"; static char *revision = "$Revision: 1.10 $";
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
...@@ -119,7 +133,7 @@ struct capi_appl { ...@@ -119,7 +133,7 @@ struct capi_appl {
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static struct capi_version driver_version = {2, 0, 1, 1<<4}; static struct capi_version driver_version = {2, 0, 1, 1<<4};
static char driver_serial[CAPI_SERIAL_LEN] = "4711"; static char driver_serial[CAPI_SERIAL_LEN] = "0004711";
static char capi_manufakturer[64] = "AVM Berlin"; static char capi_manufakturer[64] = "AVM Berlin";
#define APPL(a) (&applications[(a)-1]) #define APPL(a) (&applications[(a)-1])
...@@ -719,7 +733,7 @@ static void controllercb_handle_capimsg(struct capi_ctr * card, ...@@ -719,7 +733,7 @@ static void controllercb_handle_capimsg(struct capi_ctr * card,
/* -------- Notifier ------------------------------------------ */ /* -------- Notifier ------------------------------------------ */
static void notify_up(__u16 contr) static void notify_up(__u32 contr)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
...@@ -730,7 +744,7 @@ static void notify_up(__u16 contr) ...@@ -730,7 +744,7 @@ static void notify_up(__u16 contr)
} }
} }
static void notify_down(__u16 contr) static void notify_down(__u32 contr)
{ {
struct capi_interface_user *p; struct capi_interface_user *p;
printk(KERN_NOTICE "kcapi: notify down contr %d\n", contr); printk(KERN_NOTICE "kcapi: notify down contr %d\n", contr);
...@@ -742,7 +756,7 @@ static void notify_down(__u16 contr) ...@@ -742,7 +756,7 @@ static void notify_down(__u16 contr)
static void notify_handler(void *dummy) static void notify_handler(void *dummy)
{ {
__u16 contr; __u32 contr;
for (contr=1; VALID_CARD(contr); contr++) for (contr=1; VALID_CARD(contr); contr++)
if (test_and_clear_bit(contr, &notify_up_set)) if (test_and_clear_bit(contr, &notify_up_set))
...@@ -984,14 +998,14 @@ void detach_capi_driver(struct capi_driver *driver) ...@@ -984,14 +998,14 @@ void detach_capi_driver(struct capi_driver *driver)
/* -------- CAPI2.0 Interface ---------------------------------- */ /* -------- CAPI2.0 Interface ---------------------------------- */
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static int capi_installed(void) static __u16 capi_isinstalled(void)
{ {
int i; int i;
for (i = 0; i < CAPI_MAXCONTR; i++) { for (i = 0; i < CAPI_MAXCONTR; i++) {
if (cards[i].cardstate == CARD_RUNNING) if (cards[i].cardstate == CARD_RUNNING)
return 1; return CAPI_NOERROR;
} }
return 0; return CAPI_REGNOTINSTALLED;
} }
static __u16 capi_register(capi_register_params * rparam, __u16 * applidp) static __u16 capi_register(capi_register_params * rparam, __u16 * applidp)
...@@ -1053,7 +1067,7 @@ static __u16 capi_release(__u16 applid) ...@@ -1053,7 +1067,7 @@ static __u16 capi_release(__u16 applid)
static __u16 capi_put_message(__u16 applid, struct sk_buff *skb) static __u16 capi_put_message(__u16 applid, struct sk_buff *skb)
{ {
struct capi_ncci *np; struct capi_ncci *np;
int contr; __u32 contr;
int showctl = 0; int showctl = 0;
__u8 cmd, subcmd; __u8 cmd, subcmd;
...@@ -1131,53 +1145,53 @@ static __u16 capi_set_signal(__u16 applid, ...@@ -1131,53 +1145,53 @@ static __u16 capi_set_signal(__u16 applid,
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_manufacturer(__u16 contr, __u8 buf[CAPI_MANUFACTURER_LEN]) static __u16 capi_get_manufacturer(__u32 contr, __u8 buf[CAPI_MANUFACTURER_LEN])
{ {
if (contr == 0) { if (contr == 0) {
strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN); strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN);
return CAPI_NOERROR; return CAPI_NOERROR;
} }
if (!VALID_CARD(contr) || CARD(contr)->cardstate != CARD_RUNNING) if (!VALID_CARD(contr) || CARD(contr)->cardstate != CARD_RUNNING)
return 0x2002; return CAPI_REGNOTINSTALLED;
strncpy(buf, CARD(contr)->manu, CAPI_MANUFACTURER_LEN); strncpy(buf, CARD(contr)->manu, CAPI_MANUFACTURER_LEN);
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_version(__u16 contr, struct capi_version *verp) static __u16 capi_get_version(__u32 contr, struct capi_version *verp)
{ {
if (contr == 0) { if (contr == 0) {
*verp = driver_version; *verp = driver_version;
return CAPI_NOERROR; return CAPI_NOERROR;
} }
if (!VALID_CARD(contr) || CARD(contr)->cardstate != CARD_RUNNING) if (!VALID_CARD(contr) || CARD(contr)->cardstate != CARD_RUNNING)
return 0x2002; return CAPI_REGNOTINSTALLED;
memcpy((void *) verp, &CARD(contr)->version, sizeof(capi_version)); memcpy((void *) verp, &CARD(contr)->version, sizeof(capi_version));
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_serial(__u16 contr, __u8 serial[CAPI_SERIAL_LEN]) static __u16 capi_get_serial(__u32 contr, __u8 serial[CAPI_SERIAL_LEN])
{ {
if (contr == 0) { if (contr == 0) {
strncpy(serial, driver_serial, CAPI_SERIAL_LEN); strncpy(serial, driver_serial, CAPI_SERIAL_LEN);
return CAPI_NOERROR; return CAPI_NOERROR;
} }
if (!VALID_CARD(contr) || CARD(contr)->cardstate != CARD_RUNNING) if (!VALID_CARD(contr) || CARD(contr)->cardstate != CARD_RUNNING)
return 0x2002; return CAPI_REGNOTINSTALLED;
strncpy((void *) serial, CARD(contr)->serial, CAPI_SERIAL_LEN); strncpy((void *) serial, CARD(contr)->serial, CAPI_SERIAL_LEN);
return CAPI_NOERROR; return CAPI_NOERROR;
} }
static __u16 capi_get_profile(__u16 contr, struct capi_profile *profp) static __u16 capi_get_profile(__u32 contr, struct capi_profile *profp)
{ {
if (contr == 0) { if (contr == 0) {
profp->ncontroller = ncards; profp->ncontroller = ncards;
return CAPI_NOERROR; return CAPI_NOERROR;
} }
if (!VALID_CARD(contr) || CARD(contr)->cardstate != CARD_RUNNING) if (!VALID_CARD(contr) || CARD(contr)->cardstate != CARD_RUNNING)
return 0x2002; return CAPI_REGNOTINSTALLED;
memcpy((void *) profp, &CARD(contr)->profile, memcpy((void *) profp, &CARD(contr)->profile,
sizeof(struct capi_profile)); sizeof(struct capi_profile));
...@@ -1219,7 +1233,12 @@ static int old_capi_manufacturer(unsigned int cmd, void *data) ...@@ -1219,7 +1233,12 @@ static int old_capi_manufacturer(unsigned int cmd, void *data)
case AVM_CARDTYPE_T1: driver = t1isa_driver; break; case AVM_CARDTYPE_T1: driver = t1isa_driver; break;
default: driver = 0; default: driver = 0;
} }
if (!driver || !driver->add_card) { if (!driver) {
printk(KERN_ERR "kcapi: driver not loaded.\n");
return -EIO;
}
if (!driver->add_card) {
printk(KERN_ERR "kcapi: driver has no add card function.\n");
return -EIO; return -EIO;
} }
...@@ -1277,7 +1296,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data) ...@@ -1277,7 +1296,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data)
while (card->cardstate != CARD_RUNNING) { while (card->cardstate != CARD_RUNNING) {
current->state = TASK_INTERRUPTIBLE; set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ/10); /* 0.1 sec */ schedule_timeout(HZ/10); /* 0.1 sec */
if (signal_pending(current)) if (signal_pending(current))
...@@ -1302,7 +1321,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data) ...@@ -1302,7 +1321,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data)
while (card->cardstate > CARD_DETECTED) { while (card->cardstate > CARD_DETECTED) {
current->state = TASK_INTERRUPTIBLE; set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ/10); /* 0.1 sec */ schedule_timeout(HZ/10); /* 0.1 sec */
if (signal_pending(current)) if (signal_pending(current))
...@@ -1355,7 +1374,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data) ...@@ -1355,7 +1374,7 @@ static int old_capi_manufacturer(unsigned int cmd, void *data)
while (card->cardstate != CARD_FREE) { while (card->cardstate != CARD_FREE) {
current->state = TASK_INTERRUPTIBLE; set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ/10); /* 0.1 sec */ schedule_timeout(HZ/10); /* 0.1 sec */
if (signal_pending(current)) if (signal_pending(current))
...@@ -1404,7 +1423,7 @@ static int capi_manufacturer(unsigned int cmd, void *data) ...@@ -1404,7 +1423,7 @@ static int capi_manufacturer(unsigned int cmd, void *data)
struct capi_interface avmb1_interface = struct capi_interface avmb1_interface =
{ {
capi_installed, capi_isinstalled,
capi_register, capi_register,
capi_release, capi_release,
capi_put_message, capi_put_message,
...@@ -1479,6 +1498,12 @@ extern int t1isa_init(void); ...@@ -1479,6 +1498,12 @@ extern int t1isa_init(void);
#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCMCIA #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCMCIA
extern int b1pcmcia_init(void); extern int b1pcmcia_init(void);
#endif #endif
#ifdef CONFIG_ISDN_DRV_AVMB1_T1PCI
extern int t1pci_init(void);
#endif
#ifdef CONFIG_ISDN_DRV_AVMB1_C4
extern int c4_init(void);
#endif
#endif #endif
/* /*
...@@ -1528,6 +1553,12 @@ int kcapi_init(void) ...@@ -1528,6 +1553,12 @@ int kcapi_init(void)
#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCMCIA #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCMCIA
(void)b1pcmcia_init(); (void)b1pcmcia_init();
#endif #endif
#ifdef CONFIG_ISDN_DRV_AVMB1_T1PCI
(void)t1pci_init();
#endif
#ifdef CONFIG_ISDN_DRV_AVMB1_C4
(void)c4_init();
#endif
#endif #endif
return 0; return 0;
} }
......
This diff is collapsed.
This diff is collapsed.
/* /*
* $Id: divert_procfs.c,v 1.4 1999/08/06 07:42:48 calle Exp $ * $Id: divert_procfs.c,v 1.5 1999/09/14 20:31:01 werner Exp $
* *
* Filesystem handling for the diversion supplementary services. * Filesystem handling for the diversion supplementary services.
* *
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: divert_procfs.c,v $ * $Log: divert_procfs.c,v $
* Revision 1.5 1999/09/14 20:31:01 werner
*
* Removed obsoleted functions for proc fs and synced with new ones.
*
* Revision 1.4 1999/08/06 07:42:48 calle * Revision 1.4 1999/08/06 07:42:48 calle
* Added COMPAT_HAS_NEW_WAITQ for rd_queue for newer kernels. * Added COMPAT_HAS_NEW_WAITQ for rd_queue for newer kernels.
* *
...@@ -38,16 +42,13 @@ ...@@ -38,16 +42,13 @@
#define __NO_VERSION__ #define __NO_VERSION__
#include <linux/module.h> #include <linux/module.h>
#include <linux/version.h> #include <linux/version.h>
#if (LINUX_VERSION_CODE >= 0x020117)
#include <linux/poll.h> #include <linux/poll.h>
#endif
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#else #else
#include <linux/fs.h> #include <linux/fs.h>
#endif #endif
#include <linux/isdnif.h> #include <linux/isdnif.h>
#include <linux/isdn_compat.h>
#include "isdn_divert.h" #include "isdn_divert.h"
/*********************************/ /*********************************/
...@@ -56,11 +57,7 @@ ...@@ -56,11 +57,7 @@
ulong if_used = 0; /* number of interface users */ ulong if_used = 0; /* number of interface users */
static struct divert_info *divert_info_head = NULL; /* head of queue */ static struct divert_info *divert_info_head = NULL; /* head of queue */
static struct divert_info *divert_info_tail = NULL; /* pointer to last entry */ static struct divert_info *divert_info_tail = NULL; /* pointer to last entry */
#ifdef COMPAT_HAS_NEW_WAITQ
static wait_queue_head_t rd_queue; static wait_queue_head_t rd_queue;
#else
static struct wait_queue *rd_queue = 0; /* Queue IO */
#endif
/*********************************/ /*********************************/
/* put an info buffer into queue */ /* put an info buffer into queue */
...@@ -101,11 +98,7 @@ void put_info_buffer(char *cp) ...@@ -101,11 +98,7 @@ void put_info_buffer(char *cp)
/**********************************/ /**********************************/
/* deflection device read routine */ /* deflection device read routine */
/**********************************/ /**********************************/
#if (LINUX_VERSION_CODE < 0x020117)
static int isdn_divert_read(struct inode *inode, struct file *file, char *buf, RWARG count)
#else
static ssize_t isdn_divert_read(struct file *file, char *buf, size_t count, loff_t *off) static ssize_t isdn_divert_read(struct file *file, char *buf, size_t count, loff_t *off)
#endif
{ struct divert_info *inf; { struct divert_info *inf;
int len; int len;
...@@ -130,11 +123,7 @@ static ssize_t isdn_divert_read(struct file *file, char *buf, size_t count, loff ...@@ -130,11 +123,7 @@ static ssize_t isdn_divert_read(struct file *file, char *buf, size_t count, loff
/**********************************/ /**********************************/
/* deflection device write routine */ /* deflection device write routine */
/**********************************/ /**********************************/
#if (LINUX_VERSION_CODE < 0x020117)
static int isdn_divert_write(struct inode *inode, struct file *file, const char *buf, RWARG count)
#else
static ssize_t isdn_divert_write(struct file *file, const char *buf, size_t count, loff_t *off) static ssize_t isdn_divert_write(struct file *file, const char *buf, size_t count, loff_t *off)
#endif
{ {
return(-ENODEV); return(-ENODEV);
} /* isdn_divert_write */ } /* isdn_divert_write */
...@@ -143,17 +132,6 @@ static ssize_t isdn_divert_write(struct file *file, const char *buf, size_t coun ...@@ -143,17 +132,6 @@ static ssize_t isdn_divert_write(struct file *file, const char *buf, size_t coun
/***************************************/ /***************************************/
/* select routines for various kernels */ /* select routines for various kernels */
/***************************************/ /***************************************/
#if (LINUX_VERSION_CODE < 0x020117)
static int isdn_divert_select(struct inode *inode, struct file *file, int type, select_table * st)
{
if (*((struct divert_info **)file->private_data))
return 1;
else
{ if (st) select_wait(&(rd_queue), st);
return 0;
}
} /* isdn_divert_select */
#else
static unsigned int isdn_divert_poll(struct file *file, poll_table * wait) static unsigned int isdn_divert_poll(struct file *file, poll_table * wait)
{ unsigned int mask = 0; { unsigned int mask = 0;
...@@ -164,7 +142,6 @@ static unsigned int isdn_divert_poll(struct file *file, poll_table * wait) ...@@ -164,7 +142,6 @@ static unsigned int isdn_divert_poll(struct file *file, poll_table * wait)
} }
return mask; return mask;
} /* isdn_divert_poll */ } /* isdn_divert_poll */
#endif
/****************/ /****************/
/* Open routine */ /* Open routine */
...@@ -188,11 +165,7 @@ static int isdn_divert_open(struct inode *ino, struct file *filep) ...@@ -188,11 +165,7 @@ static int isdn_divert_open(struct inode *ino, struct file *filep)
/*******************/ /*******************/
/* close routine */ /* close routine */
/*******************/ /*******************/
#if (LINUX_VERSION_CODE < 0x020117)
static void isdn_divert_close(struct inode *ino, struct file *filep)
#else
static int isdn_divert_close(struct inode *ino, struct file *filep) static int isdn_divert_close(struct inode *ino, struct file *filep)
#endif
{ struct divert_info *inf; { struct divert_info *inf;
int flags; int flags;
...@@ -212,10 +185,7 @@ static int isdn_divert_close(struct inode *ino, struct file *filep) ...@@ -212,10 +185,7 @@ static int isdn_divert_close(struct inode *ino, struct file *filep)
kfree(inf); kfree(inf);
} }
MOD_DEC_USE_COUNT; MOD_DEC_USE_COUNT;
#if (LINUX_VERSION_CODE < 0x020117)
#else
return(0); return(0);
#endif
} /* isdn_divert_close */ } /* isdn_divert_close */
/*********/ /*********/
...@@ -301,34 +271,12 @@ static int isdn_divert_ioctl(struct inode *inode, struct file *file, ...@@ -301,34 +271,12 @@ static int isdn_divert_ioctl(struct inode *inode, struct file *file,
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
#if (LINUX_VERSION_CODE < 0x020117)
static LSTYPE
isdn_divert_lseek(struct inode *inode, struct file *file, LSARG offset, int orig)
#else
static loff_t static loff_t
isdn_divert_lseek(struct file *file, loff_t offset, int orig) isdn_divert_lseek(struct file *file, loff_t offset, int orig)
#endif
{ {
return -ESPIPE; return -ESPIPE;
} }
#if (LINUX_VERSION_CODE < 0x020117)
static struct file_operations isdn_fops =
{
isdn_divert_lseek,
isdn_divert_read,
isdn_divert_write,
NULL, /* isdn_readdir */
isdn_divert_select, /* isdn_select */
isdn_divert_ioctl, /* isdn_ioctl */
NULL, /* isdn_mmap */
isdn_divert_open,
isdn_divert_close,
NULL /* fsync */
};
#else
static struct file_operations isdn_fops = static struct file_operations isdn_fops =
{ {
isdn_divert_lseek, isdn_divert_lseek,
...@@ -343,51 +291,33 @@ static struct file_operations isdn_fops = ...@@ -343,51 +291,33 @@ static struct file_operations isdn_fops =
isdn_divert_close, isdn_divert_close,
NULL /* fsync */ NULL /* fsync */
}; };
#endif /* kernel >= 2.1 */
/* struct inode_operations divert_file_inode_operations = {
* proc directories can do almost nothing.. &isdn_fops, /* default proc file-ops */
*/ NULL, /* create */
struct inode_operations proc_isdn_inode_ops = { NULL, /* lookup */
&isdn_fops, /* isdn divert special file-ops */ NULL, /* link */
NULL, /* create */ NULL, /* unlink */
NULL, /* lookup */ NULL, /* symlink */
NULL, /* link */ NULL, /* mkdir */
NULL, /* unlink */ NULL, /* rmdir */
NULL, /* symlink */ NULL, /* mknod */
NULL, /* mkdir */ NULL, /* rename */
NULL, /* rmdir */ NULL, /* readlink */
NULL, /* mknod */ NULL, /* follow_link */
NULL, /* rename */ NULL, /* readpage */
NULL, /* readlink */ NULL, /* writepage */
NULL, /* follow_link */ NULL, /* bmap */
NULL, /* readpage */ NULL, /* truncate */
NULL, /* writepage */ NULL /* permission */
NULL, /* bmap */
NULL, /* truncate */
NULL /* permission */
}; };
/****************************/ /****************************/
/* isdn subdir in /proc/net */ /* isdn subdir in /proc/net */
/****************************/ /****************************/
static struct proc_dir_entry isdn_proc_entry = static struct proc_dir_entry *isdn_proc_entry = NULL;
{ 0, 4, "isdn", S_IFDIR | S_IRUGO | S_IXUGO, 2, 0, 0, 0, static struct proc_dir_entry *isdn_divert_entry = NULL;
&proc_dir_inode_operations,NULL,NULL,NULL,NULL,NULL
};
static struct proc_dir_entry isdn_divert_entry =
{ 0, 6, "divert",S_IFREG | S_IRUGO, 1, 0, 0, 0, &proc_isdn_inode_ops,
NULL
};
/*****************************************************************/
/* variables used for automatic determining existence of proc fs */
/*****************************************************************/
static int (*proc_reg_dynamic)(struct proc_dir_entry *, struct proc_dir_entry *) = NULL;
static int (*proc_unreg)(struct proc_dir_entry *, int) = NULL;
#endif CONFIG_PROC_FS #endif CONFIG_PROC_FS
/***************************************************************************/ /***************************************************************************/
...@@ -396,36 +326,19 @@ static int (*proc_unreg)(struct proc_dir_entry *, int) = NULL; ...@@ -396,36 +326,19 @@ static int (*proc_unreg)(struct proc_dir_entry *, int) = NULL;
int divert_dev_init(void) int divert_dev_init(void)
{ int i; { int i;
#ifdef COMPAT_HAS_NEW_WAITQ
init_waitqueue_head(&rd_queue); init_waitqueue_head(&rd_queue);
#endif
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
#if (LINUX_VERSION_CODE < 0x020117) isdn_proc_entry = create_proc_entry("isdn", S_IFDIR | S_IRUGO | S_IXUGO ,proc_net);
(void *) proc_reg_dynamic = get_module_symbol("","proc_register_dynamic"); if (!isdn_proc_entry)
(void *) proc_unreg = get_module_symbol("","proc_unregister"); return(-1);
if (proc_unreg) isdn_divert_entry = create_proc_entry("divert",S_IFREG | S_IRUGO,isdn_proc_entry);
{ i = proc_reg_dynamic(&proc_net,&isdn_proc_entry); if (!isdn_divert_entry)
if (i) return(i); {
i = proc_reg_dynamic(&isdn_proc_entry,&isdn_divert_entry); remove_proc_entry("isdn",proc_net);
if (i) return(-1);
{ proc_unreg(&proc_net,isdn_proc_entry.low_ino); }
return(i); isdn_divert_entry->ops = &divert_file_inode_operations;
}
} /* proc exists */
#else
(void *) proc_reg_dynamic = get_module_symbol("","proc_register");
(void *) proc_unreg = get_module_symbol("","proc_unregister");
if (proc_unreg)
{ i = proc_reg_dynamic(proc_net,&isdn_proc_entry);
if (i) return(i);
i = proc_reg_dynamic(&isdn_proc_entry,&isdn_divert_entry);
if (i)
{ proc_unreg(proc_net,isdn_proc_entry.low_ino);
return(i);
}
} /* proc exists */
#endif
#endif CONFIG_PROC_FS #endif CONFIG_PROC_FS
return(0); return(0);
...@@ -439,16 +352,8 @@ int divert_dev_deinit(void) ...@@ -439,16 +352,8 @@ int divert_dev_deinit(void)
{ int i; { int i;
#ifdef CONFIG_PROC_FS #ifdef CONFIG_PROC_FS
if (proc_unreg) remove_proc_entry("divert",isdn_proc_entry);
{ i = proc_unreg(&isdn_proc_entry,isdn_divert_entry.low_ino); remove_proc_entry("isdn",proc_net);
if (i) return(i);
#if (LINUX_VERSION_CODE < 0x020117)
i = proc_unreg(&proc_net,isdn_proc_entry.low_ino);
#else
i = proc_unreg(proc_net,isdn_proc_entry.low_ino);
#endif
if (i) return(i);
} /* proc exists */
#endif CONFIG_PROC_FS #endif CONFIG_PROC_FS
return(0); return(0);
......
/* /*
* $Id: isdn_divert.c,v 1.4 1999/08/25 20:02:21 werner Exp $ * $Id: isdn_divert.c,v 1.5 1999/08/31 11:20:04 paul Exp $
* *
* DSS1 main diversion supplementary handling for i4l. * DSS1 main diversion supplementary handling for i4l.
* *
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: isdn_divert.c,v $ * $Log: isdn_divert.c,v $
* Revision 1.5 1999/08/31 11:20:04 paul
* various spelling corrections (new checksums may be needed, Karsten!)
*
* Revision 1.4 1999/08/25 20:02:21 werner * Revision 1.4 1999/08/25 20:02:21 werner
* Changed return values for stat_icall(w) from 3->4 and 4->5 because of conflicts * Changed return values for stat_icall(w) from 3->4 and 4->5 because of conflicts
* with existing software definitions. (PtP incomplete called party number) * with existing software definitions. (PtP incomplete called party number)
...@@ -513,7 +516,7 @@ int isdn_divert_icall(isdn_ctrl *ic) ...@@ -513,7 +516,7 @@ int isdn_divert_icall(isdn_ctrl *ic)
if (cs->akt_state == DEFLECT_ALERT) if (cs->akt_state == DEFLECT_ALERT)
{ strcpy(cs->deflect_dest,dv->rule.to_nr); { strcpy(cs->deflect_dest,dv->rule.to_nr);
if (!cs->timer.expires) if (!cs->timer.expires)
{ strcpy(ic->parm.setup.eazmsn,"Testtext direkt"); { strcpy(ic->parm.setup.eazmsn,"Testtext direct");
ic->parm.setup.screen = dv->rule.screen; ic->parm.setup.screen = dv->rule.screen;
strcpy(ic->parm.setup.phone,dv->rule.to_nr); strcpy(ic->parm.setup.phone,dv->rule.to_nr);
cs->akt_state = DEFLECT_AUTODEL; /* delete after timeout */ cs->akt_state = DEFLECT_AUTODEL; /* delete after timeout */
...@@ -769,18 +772,6 @@ int prot_stat_callback(isdn_ctrl *ic) ...@@ -769,18 +772,6 @@ int prot_stat_callback(isdn_ctrl *ic)
} }
#if 0
sprintf(st, "0x%lx 0x%lx",ic->arg, ic->parm.dss1_io.ll_id);
p = st + strlen(st);
p1 = ic->parm.dss1_io.data;
i = ic->parm.dss1_io.datalen;
while ((i > 0) && (p - st < 530))
{ p += sprintf(p," %02x",(*p1++) & 0xFF);
i--;
}
sprintf(p, "\n");
put_info_buffer(st);
#endif
break; break;
default: default:
......
/* /*
* $Id: isdn_divert.h,v 1.3 1999/08/22 20:26:37 calle Exp $ * $Id: isdn_divert.h,v 1.4 1999/09/02 13:24:12 paul Exp $
* *
* Header for the diversion supplementary ioctl interface. * Header for the diversion supplementary ioctl interface.
* *
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: isdn_divert.h,v $ * $Log: isdn_divert.h,v $
* Revision 1.4 1999/09/02 13:24:12 paul
* cosmetics; text following #endif is not ANSI C
*
* Revision 1.3 1999/08/22 20:26:37 calle * Revision 1.3 1999/08/22 20:26:37 calle
* backported changes from kernel 2.3.14: * backported changes from kernel 2.3.14:
* - several #include "config.h" gone, others come. * - several #include "config.h" gone, others come.
...@@ -29,12 +32,9 @@ ...@@ -29,12 +32,9 @@
* Revision 1.2 1999/07/04 21:37:33 werner * Revision 1.2 1999/07/04 21:37:33 werner
* Ported from kernel version 2.0 * Ported from kernel version 2.0
* *
*
*
*/ */
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/types.h> #include <linux/types.h>
...@@ -94,12 +94,12 @@ typedef struct ...@@ -94,12 +94,12 @@ typedef struct
typedef union typedef union
{ int drv_version; /* return of driver version */ { int drv_version; /* return of driver version */
struct struct
{ int drvid; /* id of driver */ { int drvid; /* id of driver */
char drvnam[30]; /* name of driver */ char drvnam[30]; /* name of driver */
} getid; } getid;
struct struct
{ int ruleidx; /* index of rule */ { int ruleidx; /* index of rule */
divert_rule rule; /* rule parms */ divert_rule rule; /* rule parms */
} getsetrule; } getsetrule;
struct struct
{ u_char subcmd; /* 0 = hangup/reject, { u_char subcmd; /* 0 = hangup/reject,
...@@ -125,7 +125,7 @@ typedef union ...@@ -125,7 +125,7 @@ typedef union
#include <linux/isdnif.h> #include <linux/isdnif.h>
#include <linux/isdn_divertif.h> #include <linux/isdn_divertif.h>
#define AUTODEL_TIME 30 /* timeout in s to delete internal entrys */ #define AUTODEL_TIME 30 /* timeout in s to delete internal entries */
/**************************************************/ /**************************************************/
/* structure keeping ascii info for device output */ /* structure keeping ascii info for device output */
...@@ -153,12 +153,4 @@ extern void deleteprocs(void); ...@@ -153,12 +153,4 @@ extern void deleteprocs(void);
extern int deflect_extern_action(u_char, ulong, char *); extern int deflect_extern_action(u_char, ulong, char *);
extern int cf_command(int, int, u_char, char *, u_char, char *, ulong *); extern int cf_command(int, int, u_char, char *, u_char, char *, ulong *);
#endif __KERNEL__ #endif /* __KERNEL__ */
/* $Id: eicon.h,v 1.11 1999/08/29 17:23:44 armin Exp $ /* $Id: eicon.h,v 1.17 1999/10/26 21:15:33 armin Exp $
* *
* ISDN low-level module for Eicon.Diehl active ISDN-Cards. * ISDN low-level module for Eicon.Diehl active ISDN-Cards.
* *
* Copyright 1998 by Fritz Elfert (fritz@wuemaus.franken.de) * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1998,99 by Armin Schindler (mac@melware.de) * Copyright 1998,99 by Armin Schindler (mac@melware.de)
* Copyright 1999 Cytronics & Melware (info@melware.de) * Copyright 1999 Cytronics & Melware (info@melware.de)
* *
...@@ -21,6 +21,26 @@ ...@@ -21,6 +21,26 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: eicon.h,v $ * $Log: eicon.h,v $
* Revision 1.17 1999/10/26 21:15:33 armin
* using define for checking phone number len to avoid buffer overflow.
*
* Revision 1.16 1999/10/08 22:09:33 armin
* Some fixes of cards interface handling.
* Bugfix of NULL pointer occurence.
* Changed a few log outputs.
*
* Revision 1.15 1999/09/26 14:17:53 armin
* Improved debug and log via readstat()
*
* Revision 1.14 1999/09/08 20:17:31 armin
* Added microchannel patch from Erik Weber.
*
* Revision 1.13 1999/09/06 07:29:35 fritz
* Changed my mail-address.
*
* Revision 1.12 1999/09/04 06:20:05 keil
* Changes from kernel set_current_state()
*
* Revision 1.11 1999/08/29 17:23:44 armin * Revision 1.11 1999/08/29 17:23:44 armin
* New setup compat. * New setup compat.
* Bugfix if compile as not module. * Bugfix if compile as not module.
...@@ -117,6 +137,7 @@ ...@@ -117,6 +137,7 @@
#define MAX_HEADER_LEN 10 #define MAX_HEADER_LEN 10
#define MAX_STATUS_BUFFER 150
/* Struct for adding new cards */ /* Struct for adding new cards */
typedef struct eicon_cdef { typedef struct eicon_cdef {
...@@ -224,9 +245,9 @@ typedef struct { ...@@ -224,9 +245,9 @@ typedef struct {
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/isdn.h>
#include <linux/isdnif.h> #include <linux/isdnif.h>
#include <linux/isdn_compat.h>
typedef struct { typedef struct {
__u16 length __attribute__ ((packed)); /* length of data/parameter field */ __u16 length __attribute__ ((packed)); /* length of data/parameter field */
...@@ -237,7 +258,7 @@ typedef struct { ...@@ -237,7 +258,7 @@ typedef struct {
/* Macro for delay via schedule() */ /* Macro for delay via schedule() */
#define SLEEP(j) { \ #define SLEEP(j) { \
current->state = TASK_INTERRUPTIBLE; \ set_current_state(TASK_INTERRUPTIBLE); \
schedule_timeout(j); \ schedule_timeout(j); \
} }
...@@ -472,7 +493,6 @@ typedef struct { ...@@ -472,7 +493,6 @@ typedef struct {
typedef struct { typedef struct {
int No; /* Channel Number */ int No; /* Channel Number */
unsigned short callref; /* Call Reference */
unsigned short fsm_state; /* Current D-Channel state */ unsigned short fsm_state; /* Current D-Channel state */
unsigned short eazmask; /* EAZ-Mask for this Channel */ unsigned short eazmask; /* EAZ-Mask for this Channel */
int queued; /* User-Data Bytes in TX queue */ int queued; /* User-Data Bytes in TX queue */
...@@ -489,9 +509,13 @@ typedef struct { ...@@ -489,9 +509,13 @@ typedef struct {
entity e; /* Entity */ entity e; /* Entity */
char cpn[32]; /* remember cpn */ char cpn[32]; /* remember cpn */
char oad[32]; /* remember oad */ char oad[32]; /* remember oad */
char dsa[32]; /* remember dsa */
char osa[32]; /* remember osa */
unsigned char cause[2]; /* Last Cause */ unsigned char cause[2]; /* Last Cause */
unsigned char si1; unsigned char si1;
unsigned char si2; unsigned char si2;
unsigned char plan;
unsigned char screen;
} eicon_chan; } eicon_chan;
typedef struct { typedef struct {
...@@ -527,7 +551,7 @@ typedef struct { ...@@ -527,7 +551,7 @@ typedef struct {
#define EICON_STATE_LISTEN 15 #define EICON_STATE_LISTEN 15
#define EICON_STATE_WMCONN 16 #define EICON_STATE_WMCONN 16
#define EICON_MAX_QUEUED 8000 /* 2 * maxbuff */ #define EICON_MAX_QUEUE 2138
#define EICON_LOCK_TX 0 #define EICON_LOCK_TX 0
#define EICON_LOCK_RX 1 #define EICON_LOCK_RX 1
...@@ -581,6 +605,8 @@ typedef struct eicon_card { ...@@ -581,6 +605,8 @@ typedef struct eicon_card {
struct sk_buff_head sndq; /* Send-Message queue */ struct sk_buff_head sndq; /* Send-Message queue */
struct sk_buff_head rackq; /* Req-Ack-Message queue */ struct sk_buff_head rackq; /* Req-Ack-Message queue */
struct sk_buff_head sackq; /* Data-Ack-Message queue */ struct sk_buff_head sackq; /* Data-Ack-Message queue */
struct sk_buff_head statq; /* Status-Message queue */
int statq_entries;
u_char *ack_msg; /* Ptr to User Data in User skb */ u_char *ack_msg; /* Ptr to User Data in User skb */
__u16 need_b3ack; /* Flag: Need ACK for current skb */ __u16 need_b3ack; /* Flag: Need ACK for current skb */
struct sk_buff *sbuf; /* skb which is currently sent */ struct sk_buff *sbuf; /* skb which is currently sent */
...@@ -602,8 +628,9 @@ typedef struct eicon_card { ...@@ -602,8 +628,9 @@ typedef struct eicon_card {
isdn_if interface; /* Interface to upper layer */ isdn_if interface; /* Interface to upper layer */
char regname[35]; /* Name used for request_region */ char regname[35]; /* Name used for request_region */
#ifdef CONFIG_MCA #ifdef CONFIG_MCA
int mca_slot; /* # of cards MCA slot */ int mca_slot; /* # of cards MCA slot */
#endif int mca_io; /* MCA cards IO port */
#endif /* CONFIG_MCA */
} eicon_card; } eicon_card;
/* -----------------------------------------------------------** /* -----------------------------------------------------------**
...@@ -668,6 +695,7 @@ extern int eicon_info(char *, int , void *); ...@@ -668,6 +695,7 @@ extern int eicon_info(char *, int , void *);
#endif /* CONFIG_MCA */ #endif /* CONFIG_MCA */
extern ulong DebugVar; extern ulong DebugVar;
extern void eicon_log(eicon_card * card, int level, const char *fmt, ...);
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
......
This diff is collapsed.
This diff is collapsed.
/* $Id: eicon_isa.c,v 1.7 1999/08/22 20:26:48 calle Exp $ /* $Id: eicon_isa.c,v 1.9 1999/09/08 20:17:31 armin Exp $
* *
* ISDN low-level module for Eicon.Diehl active ISDN-Cards. * ISDN low-level module for Eicon.Diehl active ISDN-Cards.
* Hardware-specific code for old ISA cards. * Hardware-specific code for old ISA cards.
* *
* Copyright 1998 by Fritz Elfert (fritz@wuemaus.franken.de) * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1998,99 by Armin Schindler (mac@melware.de) * Copyright 1998,99 by Armin Schindler (mac@melware.de)
* Copyright 1999 Cytronics & Melware (info@melware.de) * Copyright 1999 Cytronics & Melware (info@melware.de)
* *
...@@ -22,6 +22,12 @@ ...@@ -22,6 +22,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: eicon_isa.c,v $ * $Log: eicon_isa.c,v $
* Revision 1.9 1999/09/08 20:17:31 armin
* Added microchannel patch from Erik Weber.
*
* Revision 1.8 1999/09/06 07:29:35 fritz
* Changed my mail-address.
*
* Revision 1.7 1999/08/22 20:26:48 calle * Revision 1.7 1999/08/22 20:26:48 calle
* backported changes from kernel 2.3.14: * backported changes from kernel 2.3.14:
* - several #include "config.h" gone, others come. * - several #include "config.h" gone, others come.
...@@ -64,7 +70,9 @@ ...@@ -64,7 +70,9 @@
#define release_shmem release_region #define release_shmem release_region
#define request_shmem request_region #define request_shmem request_region
char *eicon_isa_revision = "$Revision: 1.7 $"; char *eicon_isa_revision = "$Revision: 1.9 $";
#undef EICON_MCA_DEBUG
#ifdef CONFIG_ISDN_DRV_EICON_ISA #ifdef CONFIG_ISDN_DRV_EICON_ISA
...@@ -107,7 +115,7 @@ eicon_isa_printpar(eicon_isa_card *card) { ...@@ -107,7 +115,7 @@ eicon_isa_printpar(eicon_isa_card *card) {
case EICON_CTYPE_SCOM: case EICON_CTYPE_SCOM:
case EICON_CTYPE_QUADRO: case EICON_CTYPE_QUADRO:
case EICON_CTYPE_S2M: case EICON_CTYPE_S2M:
printk(KERN_INFO "Eicon %s at 0x%lx, irq %d\n", printk(KERN_INFO "Eicon %s at 0x%lx, irq %d.\n",
eicon_ctype_name[card->type], eicon_ctype_name[card->type],
(unsigned long)card->shmem, (unsigned long)card->shmem,
card->irq); card->irq);
...@@ -210,12 +218,30 @@ eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -210,12 +218,30 @@ eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) {
return -EBUSY; return -EBUSY;
} }
request_shmem((unsigned long)card->shmem, card->ramsize, "Eicon ISA ISDN"); request_shmem((unsigned long)card->shmem, card->ramsize, "Eicon ISA ISDN");
#ifdef EICON_MCA_DEBUG
printk(KERN_INFO "eicon_isa_boot: card->ramsize = %d.\n", card->ramsize);
#endif
card->mvalid = 1; card->mvalid = 1;
/* clear any pending irq's */ /* clear any pending irq's */
readb(card->intack); readb(card->intack);
#ifdef CONFIG_MCA
if (card->type == EICON_CTYPE_SCOM) {
outb_p(0,card->io+1);
}
else {
printk(KERN_WARNING "eicon_isa_boot: Card type yet not supported.\n");
return -EINVAL;
};
#ifdef EICON_MCA_DEBUG
printk(KERN_INFO "eicon_isa_boot: card->io = %x.\n", card->io);
printk(KERN_INFO "eicon_isa_boot: card->irq = %d.\n", (int)card->irq);
#endif
#else
/* set reset-line active */ /* set reset-line active */
writeb(0, card->stopcpu); writeb(0, card->stopcpu);
#endif /* CONFIG_MCA */
/* clear irq-requests */ /* clear irq-requests */
writeb(0, card->intack); writeb(0, card->intack);
readb(card->intack); readb(card->intack);
...@@ -242,7 +268,11 @@ eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -242,7 +268,11 @@ eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) {
/* Start CPU */ /* Start CPU */
writeb(cbuf.boot_opt, &boot->ctrl); writeb(cbuf.boot_opt, &boot->ctrl);
#ifdef CONFIG_MCA
outb_p(0, card->io);
#else
writeb(0, card->startcpu); writeb(0, card->startcpu);
#endif /* CONFIG_MCA */
/* Delay 0.2 sec. */ /* Delay 0.2 sec. */
SLEEP(20); SLEEP(20);
...@@ -254,7 +284,11 @@ eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -254,7 +284,11 @@ eicon_isa_bootload(eicon_isa_card *card, eicon_isa_codebuf *cb) {
SLEEP(10); SLEEP(10);
} }
if (readb(&boot->ctrl) != 0) { if (readb(&boot->ctrl) != 0) {
printk(KERN_WARNING "eicon_isa_boot: CPU test failed\n"); printk(KERN_WARNING "eicon_isa_boot: CPU test failed.\n");
#ifdef EICON_MCA_DEBUG
printk(KERN_INFO "eicon_isa_boot: &boot->ctrl = %d.\n",
readb(&boot->ctrl));
#endif
eicon_isa_release_shmem(card); eicon_isa_release_shmem(card);
return -EIO; return -EIO;
} }
...@@ -307,7 +341,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -307,7 +341,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
return -EFAULT; return -EFAULT;
if (!(code = kmalloc(cbuf.firmware_len, GFP_KERNEL))) { if (!(code = kmalloc(cbuf.firmware_len, GFP_KERNEL))) {
printk(KERN_WARNING "eicon_isa_boot: Couldn't allocate code buffer\n"); printk(KERN_WARNING "eicon_isa_load: Couldn't allocate code buffer\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -323,7 +357,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -323,7 +357,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
/* Check for valid IRQ */ /* Check for valid IRQ */
if ((card->irq < 0) || (card->irq > 15) || if ((card->irq < 0) || (card->irq > 15) ||
(!((1 << card->irq) & eicon_isa_valid_irq[card->type & 0x0f]))) { (!((1 << card->irq) & eicon_isa_valid_irq[card->type & 0x0f]))) {
printk(KERN_WARNING "eicon_isa_boot: illegal irq: %d\n", card->irq); printk(KERN_WARNING "eicon_isa_load: illegal irq: %d\n", card->irq);
eicon_isa_release_shmem(card); eicon_isa_release_shmem(card);
kfree(code); kfree(code);
return -EINVAL; return -EINVAL;
...@@ -332,7 +366,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -332,7 +366,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
if (!request_irq(card->irq, &eicon_irq, 0, "Eicon ISA ISDN", card)) if (!request_irq(card->irq, &eicon_irq, 0, "Eicon ISA ISDN", card))
card->ivalid = 1; card->ivalid = 1;
else { else {
printk(KERN_WARNING "eicon_isa_boot: irq %d already in use.\n", printk(KERN_WARNING "eicon_isa_load: irq %d already in use.\n",
card->irq); card->irq);
eicon_isa_release_shmem(card); eicon_isa_release_shmem(card);
kfree(code); kfree(code);
...@@ -343,7 +377,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -343,7 +377,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
tmp = readb(&boot->msize); tmp = readb(&boot->msize);
if (tmp != 8 && tmp != 16 && tmp != 24 && if (tmp != 8 && tmp != 16 && tmp != 24 &&
tmp != 32 && tmp != 48 && tmp != 60) { tmp != 32 && tmp != 48 && tmp != 60) {
printk(KERN_WARNING "eicon_isa_boot: invalid memsize\n"); printk(KERN_WARNING "eicon_isa_load: invalid memsize\n");
eicon_isa_release_shmem(card); eicon_isa_release_shmem(card);
return -EIO; return -EIO;
} }
...@@ -366,7 +400,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -366,7 +400,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
SLEEP(2); SLEEP(2);
} }
if (readb(&boot->ctrl)) { if (readb(&boot->ctrl)) {
printk(KERN_WARNING "eicon_isa_boot: download timeout at 0x%x\n", p-code); printk(KERN_WARNING "eicon_isa_load: download timeout at 0x%x\n", p-code);
eicon_isa_release(card); eicon_isa_release(card);
kfree(code); kfree(code);
return -EIO; return -EIO;
...@@ -389,7 +423,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -389,7 +423,7 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
SLEEP(2); SLEEP(2);
} }
if (readw(&boot->signature) != 0x4447) { if (readw(&boot->signature) != 0x4447) {
printk(KERN_WARNING "eicon_isa_boot: firmware selftest failed %04x\n", printk(KERN_WARNING "eicon_isa_load: firmware selftest failed %04x\n",
readw(&boot->signature)); readw(&boot->signature));
eicon_isa_release(card); eicon_isa_release(card);
return -EIO; return -EIO;
...@@ -414,11 +448,15 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) { ...@@ -414,11 +448,15 @@ eicon_isa_load(eicon_isa_card *card, eicon_isa_codebuf *cb) {
SLEEP(2); SLEEP(2);
} }
if (card->irqprobe == 1) { if (card->irqprobe == 1) {
printk(KERN_WARNING "eicon_isa_boot: IRQ test failed\n"); printk(KERN_WARNING "eicon_isa_load: IRQ # %d test failed\n", card->irq);
eicon_isa_release(card); eicon_isa_release(card);
return -EIO; return -EIO;
} }
} }
#ifdef EICON_MCA_DEBUG
printk(KERN_INFO "eicon_isa_load: IRQ # %d test succeeded.\n", card->irq);
#endif
writeb(card->irq, &card->shmem->com.Int); writeb(card->irq, &card->shmem->com.Int);
/* initializing some variables */ /* initializing some variables */
......
/* $Id: eicon_isa.h,v 1.3 1999/03/29 11:19:47 armin Exp $ /* $Id: eicon_isa.h,v 1.5 1999/09/08 20:17:31 armin Exp $
* *
* ISDN low-level module for Eicon.Diehl active ISDN-Cards. * ISDN low-level module for Eicon.Diehl active ISDN-Cards.
* *
* Copyright 1998 by Fritz Elfert (fritz@wuemaus.franken.de) * Copyright 1998 by Fritz Elfert (fritz@isdn4linux.de)
* Copyright 1998,99 by Armin Schindler (mac@melware.de) * Copyright 1998,99 by Armin Schindler (mac@melware.de)
* Copyright 1999 Cytronics & Melware (info@melware.de) * Copyright 1999 Cytronics & Melware (info@melware.de)
* *
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: eicon_isa.h,v $ * $Log: eicon_isa.h,v $
* Revision 1.5 1999/09/08 20:17:31 armin
* Added microchannel patch from Erik Weber.
*
* Revision 1.4 1999/09/06 07:29:35 fritz
* Changed my mail-address.
*
* Revision 1.3 1999/03/29 11:19:47 armin * Revision 1.3 1999/03/29 11:19:47 armin
* I/O stuff now in seperate file (eicon_io.c) * I/O stuff now in seperate file (eicon_io.c)
* Old ISA type cards (S,SX,SCOM,Quadro,S2M) implemented. * Old ISA type cards (S,SX,SCOM,Quadro,S2M) implemented.
...@@ -106,6 +112,9 @@ typedef union { ...@@ -106,6 +112,9 @@ typedef union {
typedef struct { typedef struct {
int ramsize; int ramsize;
int irq; /* IRQ */ int irq; /* IRQ */
#ifdef CONFIG_MCA
int io; /* IO-port for MCA brand */
#endif /* CONFIG_MCA */
void* card; void* card;
eicon_isa_shmem* shmem; /* Shared-memory area */ eicon_isa_shmem* shmem; /* Shared-memory area */
unsigned char* intack; /* Int-Acknowledge */ unsigned char* intack; /* Int-Acknowledge */
......
This diff is collapsed.
...@@ -152,8 +152,8 @@ int eicon_pci_find_card(char *ID) ...@@ -152,8 +152,8 @@ int eicon_pci_find_card(char *ID)
aparms->type = EICON_CTYPE_MAESTRA; aparms->type = EICON_CTYPE_MAESTRA;
aparms->irq = pdev->irq; aparms->irq = pdev->irq;
preg = get_pcibase(pdev, 2) & 0xfffffffc; preg = pdev->resource[ 2].start & 0xfffffffc;
pcfg = get_pcibase(pdev, 1) & 0xffffff80; pcfg = pdev->resource[ 1].start & 0xffffff80;
#ifdef EICON_PCI_DEBUG #ifdef EICON_PCI_DEBUG
printk(KERN_DEBUG "eicon_pci: irq=%d\n", aparms->irq); printk(KERN_DEBUG "eicon_pci: irq=%d\n", aparms->irq);
...@@ -174,9 +174,9 @@ int eicon_pci_find_card(char *ID) ...@@ -174,9 +174,9 @@ int eicon_pci_find_card(char *ID)
printk(KERN_INFO "Eicon: DIVA Server PRI/PCI detected !\n"); printk(KERN_INFO "Eicon: DIVA Server PRI/PCI detected !\n");
aparms->type = EICON_CTYPE_MAESTRAP; /*includes 9M,30M*/ aparms->type = EICON_CTYPE_MAESTRAP; /*includes 9M,30M*/
aparms->irq = pdev->irq; aparms->irq = pdev->irq;
pram = get_pcibase(pdev, 0) & 0xfffff000; pram = pdev->resource[ 0].start & 0xfffff000;
preg = get_pcibase(pdev, 2) & 0xfffff000; preg = pdev->resource[ 2].start & 0xfffff000;
pcfg = get_pcibase(pdev, 4) & 0xfffff000; pcfg = pdev->resource[ 4].start & 0xfffff000;
#ifdef EICON_PCI_DEBUG #ifdef EICON_PCI_DEBUG
printk(KERN_DEBUG "eicon_pci: irq=%d\n", aparms->irq); printk(KERN_DEBUG "eicon_pci: irq=%d\n", aparms->irq);
......
...@@ -30,6 +30,8 @@ ISAR_OBJ := ...@@ -30,6 +30,8 @@ ISAR_OBJ :=
HFC_OBJ := HFC_OBJ :=
HFC_2BDS0 := HFC_2BDS0 :=
JADE_OBJ := JADE_OBJ :=
W6692_OBJ :=
ifeq ($(CONFIG_HISAX_16_0),y) ifeq ($(CONFIG_HISAX_16_0),y)
O_OBJS += teles0.o O_OBJS += teles0.o
ISAC_OBJ := isac.o ISAC_OBJ := isac.o
...@@ -170,6 +172,10 @@ ifeq ($(CONFIG_HISAX_GAZEL),y) ...@@ -170,6 +172,10 @@ ifeq ($(CONFIG_HISAX_GAZEL),y)
HSCX_OBJ := hscx.o HSCX_OBJ := hscx.o
endif endif
ifeq ($(CONFIG_HISAX_W6692),y)
W6692_OBJ := w6692.o
endif
# ifeq ($(CONFIG_HISAX_TESTEMU),y) # ifeq ($(CONFIG_HISAX_TESTEMU),y)
# O_OBJS += testemu.o # O_OBJS += testemu.o
# endif # endif
...@@ -179,7 +185,7 @@ ifeq ($(ISAC_OBJ), isac.o) ...@@ -179,7 +185,7 @@ ifeq ($(ISAC_OBJ), isac.o)
endif endif
O_OBJS += $(ISAC_OBJ) $(HSCX_OBJ) $(ISAR_OBJ) $(JADE_OBJ) O_OBJS += $(ISAC_OBJ) $(HSCX_OBJ) $(ISAR_OBJ) $(JADE_OBJ)
O_OBJS += $(HFC_OBJ) $(HFC_2BDS0) O_OBJS += $(HFC_OBJ) $(HFC_2BDS0) $(W6692_OBJ)
OX_OBJS += config.o OX_OBJS += config.o
O_TARGET := O_TARGET :=
......
...@@ -749,8 +749,8 @@ amd7930_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -749,8 +749,8 @@ amd7930_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return(0); return(0);
} }
int __init __initfunc(int
setup_amd7930(struct IsdnCard *card) setup_amd7930(struct IsdnCard *card))
{ {
struct IsdnCardState *cs = card->cs; struct IsdnCardState *cs = card->cs;
char tmp[64]; char tmp[64];
......
...@@ -154,8 +154,6 @@ init_arcofi(struct IsdnCardState *cs) { ...@@ -154,8 +154,6 @@ init_arcofi(struct IsdnCardState *cs) {
cs->dc.isac.arcofitimer.function = (void *) arcofi_timer; cs->dc.isac.arcofitimer.function = (void *) arcofi_timer;
cs->dc.isac.arcofitimer.data = (long) cs; cs->dc.isac.arcofitimer.data = (long) cs;
init_timer(&cs->dc.isac.arcofitimer); init_timer(&cs->dc.isac.arcofitimer);
#ifdef COMPAT_HAS_NEW_WAITQ
init_waitqueue_head(&cs->dc.isac.arcofi_wait); init_waitqueue_head(&cs->dc.isac.arcofi_wait);
#endif
test_and_set_bit(HW_ARCOFI, &cs->HW_Flags); test_and_set_bit(HW_ARCOFI, &cs->HW_Flags);
} }
This diff is collapsed.
...@@ -227,8 +227,8 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) ...@@ -227,8 +227,8 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg)
return(0); return(0);
} }
int __init __initfunc(int
setup_avm_a1(struct IsdnCard *card) setup_avm_a1(struct IsdnCard *card))
{ {
u_char val; u_char val;
struct IsdnCardState *cs = card->cs; struct IsdnCardState *cs = card->cs;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* $Id: hfc_pci.h,v 1.6 1999/08/28 21:04:29 werner Exp $ /* $Id: hfc_pci.h,v 1.7 1999/10/10 20:13:06 werner Exp $
* specific defines for CCD's HFC 2BDS0 PCI chips * specific defines for CCD's HFC 2BDS0 PCI chips
* *
...@@ -21,6 +21,10 @@ ...@@ -21,6 +21,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
* *
* $Log: hfc_pci.h,v $ * $Log: hfc_pci.h,v $
* Revision 1.7 1999/10/10 20:13:06 werner
*
* Corrected timer constant
*
* Revision 1.6 1999/08/28 21:04:29 werner * Revision 1.6 1999/08/28 21:04:29 werner
* Implemented full audio support (transparent mode) * Implemented full audio support (transparent mode)
* *
...@@ -129,7 +133,7 @@ ...@@ -129,7 +133,7 @@
/* bits in CTMT (Write) */ /* bits in CTMT (Write) */
#define HFCPCI_CLTIMER 0x80 #define HFCPCI_CLTIMER 0x80
#define HFCPCI_TIM3_125 0x00 #define HFCPCI_TIM3_125 0x04
#define HFCPCI_TIM25 0x10 #define HFCPCI_TIM25 0x10
#define HFCPCI_TIM50 0x14 #define HFCPCI_TIM50 0x14
#define HFCPCI_TIM400 0x18 #define HFCPCI_TIM400 0x18
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment