Commit Graph

63 Commits

Author SHA1 Message Date
Poul-Henning Kamp
6df6552a3d Be consistent about marking functions static.
Found by:	FlexeLint.
2002-10-15 20:32:45 +00:00
Poul-Henning Kamp
85fee3197a It's bad enough people can't figure out to use the same code, or in
this case, ugly macros, but the data tables can be reused:

Put one copy of the software HDLC tables in its own file.
2002-09-11 12:44:58 +00:00
Poul-Henning Kamp
695aa14fe2 Add missing calls to mtx_init().
It seems counter-intuitive that all drivers have to do this.

Pointed in right direction by:	gj
2002-09-10 16:41:08 +00:00
Brooks Davis
5906e69ac2 Continue de-counting i4b. Devices i4bctl, i4bcapi, iavc, i4bq921,
i4bq931, i4b, isic, iwic, ifpi, ifpi2, ifpnp, ihfc, and itjc are
no longer count devices.  Also remove a few other instances of N<DEVICE>
being used to control compilation of whole files.

Reviewed by:    hm
2002-09-02 00:52:11 +00:00
Brooks Davis
22afbb6bb0 Remote pci.h/NPCI usage from i4b code.
Approved by:	hm
2002-06-13 06:04:28 +00:00
Jens Schweikhardt
21dc7d4f57 Fix typo in the BSD copyright: s/withough/without/
Spotted and suggested by:	des
MFC after:	3 weeks
2002-06-02 20:05:59 +00:00
Peter Wemm
fe8ae4dd13 Fix some low hanging fruit warnings. There are problems in i4b_ing.c
still, but they are due due to some bogosity in netgraph.
2002-05-24 05:46:50 +00:00
Gary Jennejohn
c0a06166a0 Fix a problem which could cause some machines to hang after a warm boot.
This should be in 4.6.

Submitted by:	Ari Suutari <ari.suutari@syncrontech.com>
2002-05-10 12:04:04 +00:00
Gary Jennejohn
3573a23fa1 Change instances of avma1pp2- to ifpi2- in printf's since the name
of the driver should be emitted.

This was already changed in the code committed to RELENG_4.
2002-04-28 11:47:10 +00:00
Gary Jennejohn
bb83e7583e On slow machines interrupts could be lost, so check for pending
interrupts in a loop.

Tested by: Andrew Gordon <arg-bsd@arg1.demon.co.uk>
2002-04-23 10:25:35 +00:00
John Baldwin
6008862bc2 Change callers of mtx_init() to pass in an appropriate lock type name. In
most cases NULL is passed, but in some cases such as network driver locks
(which use the MTX_NETWORK_LOCK macro) and UMA zone locks, a name is used.

Tested on:	i386, alpha, sparc64
2002-04-04 21:03:38 +00:00
Hellmuth Michaelis
e0d83003c4 Clean up the i4b kernel part: remove unmaintained #if(def)s for NetBSD,
OpenBSD and BSD/OS and respective code, remove pre $FreeBSD CVS id's,
remove #if(def)s and respective code for FreeBSD versions < 5 .
2002-03-17 09:33:15 +00:00
Peter Wemm
183439a14a Quiet bogus gcc warning 2002-02-28 03:15:53 +00:00
Gary Jennejohn
588974c99a Fix some places where the macro L0IFPIUNIT was used instead of the correct
form L0IFPI2UNIT. This could result in a panic if the user tried to
trace using isdntrace(8). I fixed this locally but forgot to commit it.

Reminded by:	"Wittig, Christoph" <wc@medianet-world.de>
2002-01-02 12:55:04 +00:00
Joerg Wunsch
230ce3668b Fix two typos in previous commit. 2001-12-30 19:37:41 +00:00
Gary Jennejohn
1c6126426b Protect mtx_init() invocations with mtx_intialized() checks to avoid a
reported panic.

Submitted by:	Alexander Leidinger <Alexander@Leidinger.net> (partly)
MFC after:	4 weeks
2001-12-30 09:27:28 +00:00
Gary Jennejohn
01ecab4055 Fix an error which could cause a panic if both an ifpi and ifpi2 controller
were installed.

For the ifpi2, change the string in the driver_t from "ifpi2" to
"ifpi2-" so that one sees "ifpi2-0" instead of "ifpi20" at boot time.
2001-12-29 17:19:25 +00:00
Gary Jennejohn
c3e8386594 Add a driver for the AVM Fritz!Card PCI version 2 ISDN controller.
MFC after:	4 weeks
2001-12-22 09:22:02 +00:00
Hellmuth Michaelis
8ae67d78bf Fix bug attaching the ELSA PCC16, the cardtyp value was set incorrectly
in the probe routine.
MFC after:	3 days
2001-10-21 09:22:48 +00:00
Hellmuth Michaelis
676ccc0cd0 Add a driver for the Compaq Microcom 610 ISDN (Compaq series PSB2222I) ISA PnP
card.

Submitted by:   Steve Looman
Reviewed by:    hm
MFC after:      1 month
2001-10-21 09:20:52 +00:00
Jeroen Ruigrok van der Werven
1a6e52d0e9 Fix typo: seperate -> separate.
Seperate does not exist in the english language.
2001-02-06 11:21:58 +00:00
Hellmuth Michaelis
d04d012625 Add experimental support for Eicon.Diehl DIVA 2.0 and 2.02 ISA PnP cards.
Thanks a lot to Jakob Schripsema (sch@kpn.com) for pointing out similarities
of the Eicon 2.02 to the Siemens I-surf driver !
2001-01-26 13:16:11 +00:00
Hellmuth Michaelis
b5dd89c336 remove redundant definitions of card types:
- remove all occurances of FLAG_XXX values and replace with CARD_TYPEP_XXX
 - remove sc_flag from isic softc and replace it with sc_cardtyp
remove some left over redundant definitions from isic and i4b_l1.h
remove left over cvs id from i4b cvs repository
2001-01-24 08:41:52 +00:00
Hellmuth Michaelis
92ced03849 Update the iwic driver: fix error handling for rx errors on the D-channel
which prevents erroneous packets from being put onto the protocol stack;
enhance error detection for B-channel HDLC errors; remove old cvs id´s.
2001-01-21 10:12:50 +00:00
Hellmuth Michaelis
23f507c5d1 Reenable support for FreeBSD 4.x and possibly the other supported BSD's 2001-01-15 14:54:43 +00:00
Hellmuth Michaelis
2fbe70cb49 Add the ISDN itjc hardware driver. This driver supports the NETJet-S cards
from Traverse Technology and also the Teles PCI-TJ cards both based on the
chipset combination of the Siemens ISAC and the TJNet Tiger300/320 chips.

The itjc/i4b_hdlc.h file will hopefully soon be merged with the file
/usr/src/sys/i4b/layer1/i4b_hdlc.h.

Submitted by:	Sergio de Souza Prallon <prallon@tmp.com.br>
2001-01-11 14:35:45 +00:00
Hellmuth Michaelis
2fd9d69993 Update the ihfc driver with a patch from the author. He writes: This patch
enables the driver to work on current (I have not tested the isa part fully,
but I suppose it should work). The patching from jlemon caused a crash at
probe time. This is probably my fault not having added a comment for
"RESET_SOFT" saying: "this resets all!".

Submitted by:	Hans Petter Selasky <hselasky@c2i.net>
2001-01-11 13:38:38 +00:00
Hellmuth Michaelis
0dac6ca13f Add PCI id's for the Planet PCI ISDN Adapter (Model IA128P-STDV)
Submitted by:	Luiz Henrique Duma <duma@bsi.com.br>
2001-01-10 13:34:23 +00:00
Jonathan Lemon
13403f7fd8 Move the mutex initialization from avma1pp_bchannel_setup into
avma1pp_attach_avma1pp, since the former may be called multiple
times and we only want to initialize the mutex once.

Submitted by: Thomas Moestl <tmoestl@gmx.net>
2001-01-09 15:01:42 +00:00
Hellmuth Michaelis
1fa9b0422d Bugfix: enable interrupt sharing for ELSA Microlink ISDN PCI 2000-12-03 16:20:33 +00:00
Jonathan Lemon
df5e198723 Lock down the network interface queues. The queue mutex must be obtained
before adding/removing packets from the queue.  Also, the if_obytes and
if_omcasts fields should only be manipulated under protection of the mutex.

IF_ENQUEUE, IF_PREPEND, and IF_DEQUEUE perform all necessary locking on
the queue.  An IF_LOCK macro is provided, as well as the old (mutex-less)
versions of the macros in the form _IF_ENQUEUE, _IF_QFULL, for code which
needs them, but their use is discouraged.

Two new macros are introduced: IF_DRAIN() to drain a queue, and IF_HANDOFF,
which takes care of locking/enqueue, and also statistics updating/start
if necessary.
2000-11-25 07:35:38 +00:00
Jeroen Ruigrok van der Werven
b95c229b4d Fix two typo's: teh -> the, ther -> there. 2000-11-08 12:08:53 +00:00
Hellmuth Michaelis
86bc05b331 Remove unused #include statements
Submitted by:	phk
2000-10-30 14:49:26 +00:00
Hellmuth Michaelis
f33f907ea4 Add infrastructure for Cologne Chip HFC-S PCI driver. 2000-10-26 07:00:05 +00:00
Hellmuth Michaelis
065a09a83c Make the software HDLC decoder work again.
Submitted by:	Hans Petter Selasky <hselasky@c2i.net>
2000-10-26 06:31:18 +00:00
Hellmuth Michaelis
1c2715d95d Submitted by: Hans Petter Selasky <hselasky@c2i.net>
Remove double 0x7e flags between hdlc-frames.
2000-10-20 11:20:58 +00:00
Poul-Henning Kamp
db7e3af111 Remove unneeded #include <machine/clock.h> 2000-10-15 14:19:01 +00:00
Hellmuth Michaelis
5d113d0ac0 Submitted by: phk
Remove not needed includes.
2000-10-13 14:10:51 +00:00
Hellmuth Michaelis
767469d9b2 update to i4b version 0.95.04 (oops, forgot this one ..) 2000-10-09 14:30:50 +00:00
Hellmuth Michaelis
440c876352 update to i4b version 0.95.04 2000-10-09 13:29:00 +00:00
John Baldwin
9a94c9c5c3 - Remove the inthand2_t type and use the equivalent driver_intr_t type from
newbus for referencing device interrupt handlers.
- Move the 'struct intrec' type which describes interrupt sources into
  sys/interrupt.h instead of making it just be a x86 structure.
- Don't create 'ithd' and 'intrec' typedefs, instead, just use 'struct ithd'
  and 'struct intrec'
- Move the code to translate new-bus interrupt flags into an interrupt thread
  priority out of the x86 nexus code and into a MI ithread_priority()
  function in sys/kern/kern_intr.c.
- Remove now-uneeded x86-specific headers from sys/dev/ata/ata-all.c and
  sys/pci/pci_compat.c.
2000-09-13 18:33:25 +00:00
Peter Wemm
55b161a4d3 Make this compile without the old 2.2 compatability defines. 2000-05-28 16:24:17 +00:00
Poul-Henning Kamp
e9340d96fa Remove 42 unneeded #include <sys/ioccom.h>.
ioccom.h defines only implementation detail, and should therefore
only be included from the #include which defines the ioctl tags,
in other words: never include it from *.c
2000-05-03 07:31:38 +00:00
Poul-Henning Kamp
eb95c536ad Remove unneeded #include <sys/kernel.h> 2000-04-29 15:36:14 +00:00
Hellmuth Michaelis
17df19190a Fix a problem which caused i/o resource allocation conflict of this
particular ISDN card with the 2nd IDE controller and/or other cards
depending on configuration.

The amount of i/o ports allocated are reduced from 0x40 per range to
0x20 per range.

Submitted by:	Andrew Gordon <arg@arg1.demon.co.uk>
Approved by:	jkh
2000-03-09 20:57:47 +00:00
Gary Jennejohn
4f9d49f140 Newbus-ify the USR Sportster TA Intern driver.
Enable the driver in sys/conf/files.i386.

In isa/isavar.h increase ISA_NPORT from 32 to 50. This is required
because this brain-damaged card maps 49 (!) port ranges. This does
not have a negative impact because this value only specifies the maximum
number of entries in a linked list and not the size of an array which
is allocated in all drivers.

The register/fifo access routines were not newbus-ified because
1) I knew that the old code worked and is simpler and more efficient
2) the if_ed driver does something similar and
3) the newbus macros collapse to inb/outb anyway.

Reviewed and tested by:	hm
Approved by:	jkh
2000-02-21 02:10:10 +00:00
Hellmuth Michaelis
acfb47d41c update to isdn4bsd beta release 0.90 1999-12-14 20:48:35 +00:00
Peter Wemm
136018cbbe Temporary adjustment to build after pnp changes. There is a new version
in the pipeline apparently.

OK'ed by: hm
1999-12-07 12:06:31 +00:00
Warner Losh
e653ecce87 Disable old PCCARD_MODULE code.
This should fix LINT.

Prompted by: phk's explicit message about LINT breakage
1999-10-29 17:28:09 +00:00
Peter Wemm
9d38d41c02 Finish making LINT compile. Disable references to pnp in files that
don't appear to use it, and disable i4b_isic_pnp.c (with a #warning)
until it's converted.
1999-09-03 20:38:47 +00:00