#------------------------------------------------------------------------------ # /etc/rc.d/rc220.i4l - load isdn drivers # # Creation: 29.03.2000 fm # Last Update: $Id$ #------------------------------------------------------------------------------ CAPI20_CONF=/etc/capi20.conf FIRMWARE_DIR=/lib/firmware/isdn add_option () { case x$1 in x) ;; *) options="$options $2=$1" ;; esac } init_capi () { if [ ! -f /var/run/capi_loaded ] then do_modprobe_if_exists kernel/drivers/isdn/capi capidrv do_modprobe_if_exists kernel/drivers/isdn/capi capi echo "TRACELEVEL 0" > $CAPI20_CONF > /var/run/capi_loaded fi } case $OPT_ISDN in yes) begin_script I4L "configuring isdn ..." > /etc/ppp/ioptions do_modprobe ppp_generic i4l=1 case "$ISDN_TYPE" in "0") # no isdn card i4l= ;; # do nothing 201) # ICN 2B do_modprobe icn portbase=$ISDN_IO membase=$ISDN_MEM icn_id=icn /sbin/icnctrl -d icn load ${FIRMWARE_DIR}/loadpg.bin \ ${FIRMWARE_DIR}/pc_eu_ca.bin ;; 1[01][0-9]) # 100-119: AVM CAPI drivers modules= options= loadfile= init_capi > /var/run/avm_capi case $ISDN_TYPE in 101) modules="b1pci" # AVM B1-PCI loadfile="b1.t4" options="reset";; 102) modules="b1isa" # AVM B1-ISA loadfile="b1.t4" options="addcard b1isa $ISDN_IO $ISDN_IRQ";; 103) modules="avm_cs" # AVM B1-PCMCIA loadfile="b1.t4";; 104) modules="fcdsl" # AVM DSL loadfile="fdslbase.bin";; 105) modules="fcpci";; # AVM PCI 106) modules="fcpnp";; # AVM PNP 107) modules="fcclassic" # AVM CLASSIC options="addcard fcclassic $ISDN_IO $ISDN_IRQ";; 108) modules="fcdsl2" # AVM DSLv2 loadfile="fds2base.bin";; 109) modules="fcusb2" # AVM USBv2 if lsusb -d 057c:1000 then loadfile="fus2base.frm" else loadfile="fus3base.frm" fi;; 110) modules="fcdslusb" # AVM DSL USB loadfile="fdsubase.frm";; 111) modules="fcusb";; # AVM USB 112) modules="fxusb";; # AVM X USB 113) modules="fcdslusb2" # AVM DSL USBv2 loadfile="fds2base.frm";; 114) modules="fcpcmcia_cs";; # AVM FC PCMCIA esac for i in $modules do do_modprobe $i done if [ "$options" ] then sleep 2; /sbin/avmcapictrl $options; sleep 2 fi if [ "$loadfile" ] then sleep 2; /sbin/avmcapictrl load ${FIRMWARE_DIR}/$loadfile; sleep 2 fi ;; 15[0-9]) # HST Saphir Cards if [ -f /etc/rc.d/hstsaphir-helper ] then . /etc/rc.d/hstsaphir-helper fi init_capi ;; 16[0-9]) # remote CAPI init_capi case $ISDN_TYPE in 160) if [ -n "$ISDN_IP" ] then if [ -z "$ISDN_PORT" ] then ISDN_PORT=5031 fi echo REMOTE fritzbox $ISDN_IP $ISDN_PORT >> $CAPI20_CONF fi;; # AVM Fritz!Box 161) if [ -n "$ISDN_IP" ] then if [ -z "$ISDN_PORT" ] then ISDN_PORT=2662 fi echo REMOTE rcapi $ISDN_IP $ISDN_PORT >> $CAPI20_CONF fi;; # Rcapid esac i4l= ;; 3[0-9][0-9]) # 300-399 misdn drivers modules= options="debug=1" loadfile= init_capi do_modprobe mISDN_dsp case $ISDN_TYPE in 301) modules="hfcmulti";; # PCI HFC E1, 4S, 8S 302) modules="hfcpci";; # PCI HFC-PCI 303) modules="hfcsusb";; # USB HFCS-USB 304) modules="avmfritz";; # PCI AVM Fritz!Card 305) modules="mISDNinfineon";; # PCI Infineon-Chip-Based 306) modules="netjet";; # PCI NetJet TJ300/320 307) modules="speedfax";; # PCI Sedlbauer Speedfax+ 308) modules="w6692";; # PCI Winbond 6692 esac for i in $modules do do_modprobe $i $options done i4l= ;; *) # HISAX ... options= add_option "$ISDN_IO" io add_option "$ISDN_IO0" io0 add_option "$ISDN_IO1" io1 add_option "$ISDN_MEM" mem add_option "$ISDN_IRQ" irq case "$ISDN_TYPE" in [89][0-9]) ;; # sub drivers *) add_option "$ISDN_TYPE" type esac module=hisax # default pcmcia_mod= firmware= case "$ISDN_TYPE" in 4) pcmcia_mod="teles_cs";; # Creatix/Teles PnP 10) pcmcia_mod="elsa_cs";; # ELSA PCMCIA 22) pcmcia_mod="sedlbauer_cs";; # Sedlbauer Speed Star (PCMCIA) 26) pcmcia_mod="avma1_cs";; # AVM A1 PCMCIA (Fritz!) 28) firmware="ISAR.BIN";; # Sedlbauer Speed Fax+ 29) firmware="ISAR.BIN";; # Siemens I-Surf 1.0 81) module=hisax_st5481;; # BeWan Gazel 128 USB 82) module=hfc_usb;; # HFC USB based adapters 83) module=hfc4s8s_l1;; # HFC-4s/8s based cards 84) module=hisax_fcpcipnp;; # AVM Fritz!Card PCI/PCIv2/PnP esac # load HiSax driver do_modprobe $module $options # load PCMCIA driver if necessary if [ -n "$pcmcia_mod" -a "$OPT_PCMCIA" = "yes" ] then do_modprobe $pcmcia_mod fi # determine HiSax driver id of first registered HiSax driver drvid=$(dmesg | grep "^HiSax: Card 1 " | sed -e 's/.*\