Commit Graph

16 Commits

Author SHA1 Message Date
pooka dae7af8b24 Ready the kernel side of i4b for primary rate interface support by
removing assumptions that there are only two B channels and by
adding support for a varying number of channels.

Due to this, rename previously used isdn identified "bri" to "isdnif",
which better describes the current situation.
2003-10-03 16:38:44 +00:00
drochner 037daa02c2 fixed botched prototype,
while being here clean up whitespace
2003-07-11 10:15:56 +00:00
itojun 7f6ed16ef4 function prototype must not have variable name 2003-07-08 10:06:28 +00:00
leo e70f340199 Fritz!PCI v2.0 ISDN driver from FreeBSD. 2002-10-25 21:03:47 +00:00
martin f12d3f51e7 Remove some redundant tries to disable interupts. We already avoided enabling
them.
Fix a stupid typo when enabling/disabling interrupts: we clear pending
interrupts when enabling, not disbling isac interrupts.
2002-04-10 23:51:06 +00:00
martin 58502ab93e Combine sc_enabled and sc_dying into one field sc_intr_valid, they are used
for the same purpose (ignoring invalid interrupts).

For cards that are not able to stop all interrupts (or we don't know a way
to do that in software, at least) run the clearirq callback even when
ignoring an interrupt because we are not enabled. Otherwise the card would
stop interrupting.

Reserve a driver specific callout handle and an int value in the generic
isic_softc to allow card drivers to implement fancy blinkenlights.
2002-04-08 12:20:49 +00:00
martin 87b8f8f259 Remove leftover from my first, incomplete attempt to cope with detaching
pcmcia cards. Now that pcmcia attachements properly handle the activate
callback, this is no longer needed (and is suspect to cause completely
unrelated problems.)
2002-04-06 21:46:51 +00:00
martin e5c92d53f8 Be a nice citizen, enable interrupts only when we are ready to talk
to the ISDN (i.e. when userland has /dev/isdn open).
2002-03-30 19:13:44 +00:00
martin ed4ba39c75 Add a command to layer 1 drivers to update LED state for controllers that
have status LEDs.
2002-03-30 17:54:17 +00:00
martin ebd73ccd11 After Jason Thorpe explained to me how it is supposed to work, implement
(de)activate for pcmcia cards.
Implement detach/(de)activate for PCI cards.
Clean up internal state (free call-descriptors) if a controller is
detached while it has open connections.
2002-03-27 07:39:35 +00:00
martin 0db68b667b Now that we have all pieces in place (and enough granularity to specify
B-channel and D-channel drivers separately) split the Fritz!PCI card
driver out of the isic driver.

The new device is called "ifpci" and uses the same D-channel driver as the
isic devices, but has it's own B-channel driver.
2002-03-25 16:39:52 +00:00
martin a994533d0a Make pcmcia cards detach properly.
Notify userland of attaching/detaching cards.
This partly fixes PR 15951.
2002-03-25 12:07:33 +00:00
martin 0bc69b6498 Now that we have all the pieces of the puzzle available start to unriddle
and move them in their proper places.

Move the BRI registry from layer 2 (duh!) to layer 4, so active cards
(which don't have layer 3 or layer 2 in their driver). Remove all remaining
hard coded controller and driver types. Remove any arbitrary hard coded
limits, at least those that show up in the internal API.

This fixes PR 15950.
2002-03-24 20:35:43 +00:00
martin e2c42aeaa8 Remove all knowledge about specific application (layer 4) drivers from
the generic layer 4 and layer 3 management system.

This should make the layer 4 driver API LKM clean - finaly.

Make the Fritz!PCI driver work again after resent changes (oops!),
noted by Frank Kardel (PR 15948) and Matthias Scheeler.
2002-03-17 20:54:04 +00:00
martin 5171d409a5 First step to cleanup the hardware driver <-> upper layers interface.
This now provides slightly more functionality than the FreeBSD layer1-newbus
interface. It was meant to be a simple change to one header and a few
c files, but the change rippled all through various stuff.

To prevent a change to the kernel<->userland interface right now the kernel
is now lying about card types to userland (but who cares). This will be fixed
when the userland interface changes, after layer 3 <-> layer 4 has been
fixed.

Functional changes:

Provide a clean interface for hardware drivers to attach to the upper
layers. This will need another small change in the B-channel handling
when a similar change to the layer 3 <-> layer 4 interface happens.

Avoid passing indices into global arrays of pointers around, instead pass
the pointers itself. Don't code hardware driver types by predefined magic
numbers (think LKM). Prepare for detachable drivers (think pcmcia).

While there remove some sets of function pointers always pointing to the
same function (meant to be the configurable set of D channel protocol
handlers). It is unlikely another supported D-channel protocol will fit into
that (maximal layer interface) abstraction. When we get support for another
protocol, we will need to come up with a workable interface. Besides, the
old implementation was, uhm, strange.
2001-03-24 12:40:29 +00:00
martin f0d6660cf4 Filename cleanup: remove i4b_ prefixes outside sys/netisdn, last round.
Renamed in sys/dev/ic:
i4b_hscx.c -> hscx.c
i4b_hscx.h -> hscx.h
i4b_ipac.h -> ipac.h
i4b_isac.c -> isac.c
i4b_isac.h -> isac.h
i4b_isic.c -> isic.c
i4b_isicbchan.c -> isic_bchan.c
i4b_isicl1.c -> isic_l1.c
i4b_isicl1.h -> isic_l1.h
i4b_isicl1fsm.c -> isic_l1fsm.c
2001-02-20 22:24:31 +00:00