Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Martin Husemann <martin@netbsd.org>
List: source-changes
Date: 03/24/2001 14:40:33
Module Name:	syssrc
Committed By:	martin
Date:		Sat Mar 24 12:40:33 UTC 2001

Modified Files:
	syssrc/sys/conf: files
	syssrc/sys/dev/ic: hscx.c isac.c isic.c isic_bchan.c isic_l1.c
	    isic_l1.h isic_l1fsm.c
	syssrc/sys/dev/isa: isic_isa.c
	syssrc/sys/dev/isapnp: isic_isapnp.c
	syssrc/sys/dev/pci: isic_pci.c isic_pci_avm_fritz_pci.c
	syssrc/sys/dev/pcmcia: isic_pcmcia.c
	syssrc/sys/netisdn: i4b_ctl.c i4b_global.h i4b_i4bdrv.c i4b_iframe.c
	    i4b_ipr.c i4b_isppp.c i4b_l1l2.h i4b_l2.c i4b_l2.h i4b_l2fsm.c
	    i4b_l2if.c i4b_l2timer.c i4b_l3.h i4b_l3fsm.c i4b_l3l4.h
	    i4b_l3timer.c i4b_l4.c i4b_l4if.c i4b_l4mgmt.c i4b_lme.c i4b_q931.c
	    i4b_q932fac.c i4b_rbch.c i4b_sframe.c i4b_tei.c i4b_tel.c
	    i4b_trace.c i4b_trace.h i4b_uframe.c i4b_util.c
Added Files:
	syssrc/sys/netisdn: i4b_l1l2.c
Removed Files:
	syssrc/sys/netisdn: i4b_l2l3.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -r1.429 -r1.430 syssrc/sys/conf/files
cvs rdiff -r1.1 -r1.2 syssrc/sys/dev/ic/hscx.c syssrc/sys/dev/ic/isac.c \
    syssrc/sys/dev/ic/isic.c syssrc/sys/dev/ic/isic_bchan.c \
    syssrc/sys/dev/ic/isic_l1.c syssrc/sys/dev/ic/isic_l1.h \
    syssrc/sys/dev/ic/isic_l1fsm.c
cvs rdiff -r1.2 -r1.3 syssrc/sys/dev/isa/isic_isa.c
cvs rdiff -r1.2 -r1.3 syssrc/sys/dev/isapnp/isic_isapnp.c
cvs rdiff -r1.2 -r1.3 syssrc/sys/dev/pci/isic_pci.c \
    syssrc/sys/dev/pci/isic_pci_avm_fritz_pci.c
cvs rdiff -r1.2 -r1.3 syssrc/sys/dev/pcmcia/isic_pcmcia.c
cvs rdiff -r1.1 -r1.2 syssrc/sys/netisdn/i4b_ctl.c \
    syssrc/sys/netisdn/i4b_l1l2.h syssrc/sys/netisdn/i4b_l2.h \
    syssrc/sys/netisdn/i4b_l2fsm.c syssrc/sys/netisdn/i4b_l2if.c \
    syssrc/sys/netisdn/i4b_l3.h syssrc/sys/netisdn/i4b_l3l4.h \
    syssrc/sys/netisdn/i4b_l4if.c syssrc/sys/netisdn/i4b_lme.c \
    syssrc/sys/netisdn/i4b_q932fac.c syssrc/sys/netisdn/i4b_sframe.c \
    syssrc/sys/netisdn/i4b_tei.c syssrc/sys/netisdn/i4b_trace.h \
    syssrc/sys/netisdn/i4b_uframe.c
cvs rdiff -r1.2 -r1.3 syssrc/sys/netisdn/i4b_global.h \
    syssrc/sys/netisdn/i4b_i4bdrv.c syssrc/sys/netisdn/i4b_iframe.c \
    syssrc/sys/netisdn/i4b_l2timer.c syssrc/sys/netisdn/i4b_l3fsm.c \
    syssrc/sys/netisdn/i4b_l3timer.c syssrc/sys/netisdn/i4b_l4.c \
    syssrc/sys/netisdn/i4b_l4mgmt.c syssrc/sys/netisdn/i4b_q931.c \
    syssrc/sys/netisdn/i4b_rbch.c syssrc/sys/netisdn/i4b_tel.c \
    syssrc/sys/netisdn/i4b_util.c
cvs rdiff -r1.4 -r1.5 syssrc/sys/netisdn/i4b_ipr.c
cvs rdiff -r1.3 -r1.4 syssrc/sys/netisdn/i4b_isppp.c \
    syssrc/sys/netisdn/i4b_l2.c syssrc/sys/netisdn/i4b_trace.c
cvs rdiff -r0 -r1.1 syssrc/sys/netisdn/i4b_l1l2.c
cvs rdiff -r1.1 -r0 syssrc/sys/netisdn/i4b_l2l3.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.