From: <abe...@us...> - 2017-06-02 21:25:03
|
Revision: 8367 http://sourceforge.net/p/astlinux/code/8367 Author: abelbeck Date: 2017-06-02 21:25:01 +0000 (Fri, 02 Jun 2017) Log Message: ----------- network, add IPV6_PREFIX_DELEGATION rc.conf variable to select which interfaces get Prefix Delegation web interface, Network tab, IPv6 Autoconfig, add selectable interfaces for Prefix Delegation by selecting 'Assign GUA Prefix' Modified Paths: -------------- branches/1.0/package/dnsmasq/dnsmasq.init branches/1.0/package/webinterface/altweb/admin/network.php branches/1.0/project/astlinux/target_skeleton/etc/init.d/network branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf Modified: branches/1.0/package/dnsmasq/dnsmasq.init =================================================================== --- branches/1.0/package/dnsmasq/dnsmasq.init 2017-06-01 22:08:01 UTC (rev 8366) +++ branches/1.0/package/dnsmasq/dnsmasq.init 2017-06-02 21:25:01 UTC (rev 8367) @@ -5,6 +5,23 @@ . /etc/init.d/functions.d/network . /etc/init.d/functions.d/misc +is_prefix_delegation() +{ + local dhcpv6_pd="" x IFS + + if [ "$DHCPV6_CLIENT_ENABLE" = "yes" ]; then + unset IFS + for x in $IPV6_PREFIX_DELEGATION; do + if [ "$x" = "$1" ]; then + dhcpv6_pd="yes" + break + fi + done + fi + + echo "$dhcpv6_pd" +} + addr_to_prefix64() { local cnt=1 prefix="" next @@ -118,7 +135,7 @@ addIPV6net() { # args: IF, tag, leasetime - local interface="$1" tag="$2" leasetime="$3" dhcpv6="" prefix="" iname IFS + local interface="$1" tag="$2" leasetime="$3" dhcpv6_pd="" prefix="" iname IFS if [ "$IPV6" != "yes" ]; then return 2 @@ -129,7 +146,7 @@ case $iname in INTIF) if [ "$tag" = "lan" ]; then - dhcpv6="$DHCPV6_CLIENT_ENABLE" + dhcpv6_pd="$(is_prefix_delegation "$iname")" prefix="$(addr_to_prefix64 "$INTIPV6")" break fi @@ -136,7 +153,7 @@ ;; INT2IF) if [ "$tag" = "lan2" ]; then - dhcpv6="$DHCPV6_CLIENT_ENABLE" + dhcpv6_pd="$(is_prefix_delegation "$iname")" prefix="$(addr_to_prefix64 "$INT2IPV6")" break fi @@ -143,7 +160,7 @@ ;; INT3IF) if [ "$tag" = "lan3" ]; then - dhcpv6="$DHCPV6_CLIENT_ENABLE" + dhcpv6_pd="$(is_prefix_delegation "$iname")" prefix="$(addr_to_prefix64 "$INT3IPV6")" break fi @@ -150,7 +167,7 @@ ;; INT4IF) if [ "$tag" = "lan4" ]; then - dhcpv6="$DHCPV6_CLIENT_ENABLE" + dhcpv6_pd="$(is_prefix_delegation "$iname")" prefix="$(addr_to_prefix64 "$INT4IPV6")" break fi @@ -157,7 +174,7 @@ ;; DMZIF) if [ "$tag" = "dmz" ]; then - dhcpv6="$DHCPV6_CLIENT_ENABLE" + dhcpv6_pd="$(is_prefix_delegation "$iname")" prefix="$(addr_to_prefix64 "$DMZIPV6")" break fi @@ -165,7 +182,7 @@ esac done - if [ "$dhcpv6" = "yes" -a "$DHCPV6_CLIENT_REQUEST_PREFIX" != "no" -a -z "$prefix" ]; then + if [ "$dhcpv6_pd" = "yes" -a "$DHCPV6_CLIENT_REQUEST_PREFIX" != "no" ]; then echo " dhcp-range=$tag,::1,constructor:$interface,ra-only,$leasetime" return 0 Modified: branches/1.0/package/webinterface/altweb/admin/network.php =================================================================== --- branches/1.0/package/webinterface/altweb/admin/network.php 2017-06-01 22:08:01 UTC (rev 8366) +++ branches/1.0/package/webinterface/altweb/admin/network.php 2017-06-02 21:25:01 UTC (rev 8367) @@ -43,6 +43,7 @@ // 01-22-2017, Removed Dynamic DNS 'getip.krisk.org', map to default // 01-29-2017, Added DDGETIPV6 support // 02-16-2017, Added Restart FTP Server support +// 06-02-2017, Added selectable Prefix Delegation interfaces // // System location of rc.conf file $CONFFILE = '/etc/rc.conf'; @@ -382,15 +383,29 @@ $value = 'NODHCP="'.getNODHCP_value().'"'; fwrite($fp, "### No DHCP on interfaces\n".$value."\n"); - - $x_value = $_POST['int_autoconf']; - $x_value .= $_POST['int2_autoconf']; - $x_value .= $_POST['int3_autoconf']; - $x_value .= $_POST['int4_autoconf']; - $x_value .= $_POST['dmz_autoconf']; + + $tokens = explode('~', $_POST['int_autoconf']); + $x_value = $tokens[0]; + $y_value = $tokens[1]; + $tokens = explode('~', $_POST['int2_autoconf']); + $x_value .= $tokens[0]; + $y_value .= $tokens[1]; + $tokens = explode('~', $_POST['int3_autoconf']); + $x_value .= $tokens[0]; + $y_value .= $tokens[1]; + $tokens = explode('~', $_POST['int4_autoconf']); + $x_value .= $tokens[0]; + $y_value .= $tokens[1]; + $tokens = explode('~', $_POST['dmz_autoconf']); + $x_value .= $tokens[0]; + $y_value .= $tokens[1]; + $value = 'IPV6_AUTOCONF="'.trim($x_value).'"'; fwrite($fp, "### IPv6 Autoconfig\n".$value."\n"); - + + $value = 'IPV6_PREFIX_DELEGATION="'.trim($y_value).'"'; + fwrite($fp, "### IPv6 Prefix Delegation\n".$value."\n"); + $value = 'FWVERS="'.$_POST['firewall'].'"'; fwrite($fp, "### Firewall Type\n".$value."\n"); @@ -1564,8 +1579,15 @@ putHtml(' IPv6 Autoconfig:'); putHtml('<select name="int_autoconf">'); putHtml('<option value="">disabled</option>'); - $sel = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INTIF') ? ' selected="selected"' : ''; - putHtml('<option value=" INTIF"'.$sel.'>enabled</option>'); + if (isVARtype('IPV6_PREFIX_DELEGATION', $db, $cur_db, 'INTIF')) { + $sel1 = ''; + $sel2 = ' selected="selected"'; + } else { + $sel1 = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INTIF') ? ' selected="selected"' : ''; + $sel2 = ''; + } + putHtml('<option value=" INTIF~"'.$sel1.'>enabled</option>'); + putHtml('<option value=" INTIF~ INTIF"'.$sel2.'>Assign GUA Prefix</option>'); putHtml('</select>'); $value = getVARdef($db, 'INTIPV6', $cur_db); putHtml('– IPv6/nn:<input type="text" size="45" maxlength="43" value="'.$value.'" name="int_ipv6" />'); @@ -1596,8 +1618,15 @@ putHtml(' IPv6 Autoconfig:'); putHtml('<select name="int2_autoconf">'); putHtml('<option value="">disabled</option>'); - $sel = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INT2IF') ? ' selected="selected"' : ''; - putHtml('<option value=" INT2IF"'.$sel.'>enabled</option>'); + if (isVARtype('IPV6_PREFIX_DELEGATION', $db, $cur_db, 'INT2IF')) { + $sel1 = ''; + $sel2 = ' selected="selected"'; + } else { + $sel1 = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INT2IF') ? ' selected="selected"' : ''; + $sel2 = ''; + } + putHtml('<option value=" INT2IF~"'.$sel1.'>enabled</option>'); + putHtml('<option value=" INT2IF~ INT2IF"'.$sel2.'>Assign GUA Prefix</option>'); putHtml('</select>'); $value = getVARdef($db, 'INT2IPV6', $cur_db); putHtml('– IPv6/nn:<input type="text" size="45" maxlength="43" value="'.$value.'" name="int2_ipv6" />'); @@ -1628,8 +1657,15 @@ putHtml(' IPv6 Autoconfig:'); putHtml('<select name="int3_autoconf">'); putHtml('<option value="">disabled</option>'); - $sel = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INT3IF') ? ' selected="selected"' : ''; - putHtml('<option value=" INT3IF"'.$sel.'>enabled</option>'); + if (isVARtype('IPV6_PREFIX_DELEGATION', $db, $cur_db, 'INT3IF')) { + $sel1 = ''; + $sel2 = ' selected="selected"'; + } else { + $sel1 = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INT3IF') ? ' selected="selected"' : ''; + $sel2 = ''; + } + putHtml('<option value=" INT3IF~"'.$sel1.'>enabled</option>'); + putHtml('<option value=" INT3IF~ INT3IF"'.$sel2.'>Assign GUA Prefix</option>'); putHtml('</select>'); $value = getVARdef($db, 'INT3IPV6', $cur_db); putHtml('– IPv6/nn:<input type="text" size="45" maxlength="43" value="'.$value.'" name="int3_ipv6" />'); @@ -1660,8 +1696,15 @@ putHtml(' IPv6 Autoconfig:'); putHtml('<select name="int4_autoconf">'); putHtml('<option value="">disabled</option>'); - $sel = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INT4IF') ? ' selected="selected"' : ''; - putHtml('<option value=" INT4IF"'.$sel.'>enabled</option>'); + if (isVARtype('IPV6_PREFIX_DELEGATION', $db, $cur_db, 'INT4IF')) { + $sel1 = ''; + $sel2 = ' selected="selected"'; + } else { + $sel1 = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'INT4IF') ? ' selected="selected"' : ''; + $sel2 = ''; + } + putHtml('<option value=" INT4IF~"'.$sel1.'>enabled</option>'); + putHtml('<option value=" INT4IF~ INT4IF"'.$sel2.'>Assign GUA Prefix</option>'); putHtml('</select>'); $value = getVARdef($db, 'INT4IPV6', $cur_db); putHtml('– IPv6/nn:<input type="text" size="45" maxlength="43" value="'.$value.'" name="int4_ipv6" />'); @@ -1692,8 +1735,15 @@ putHtml(' IPv6 Autoconfig:'); putHtml('<select name="dmz_autoconf">'); putHtml('<option value="">disabled</option>'); - $sel = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'DMZIF') ? ' selected="selected"' : ''; - putHtml('<option value=" DMZIF"'.$sel.'>enabled</option>'); + if (isVARtype('IPV6_PREFIX_DELEGATION', $db, $cur_db, 'DMZIF')) { + $sel1 = ''; + $sel2 = ' selected="selected"'; + } else { + $sel1 = isVARtype('IPV6_AUTOCONF', $db, $cur_db, 'DMZIF') ? ' selected="selected"' : ''; + $sel2 = ''; + } + putHtml('<option value=" DMZIF~"'.$sel1.'>enabled</option>'); + putHtml('<option value=" DMZIF~ DMZIF"'.$sel2.'>Assign GUA Prefix</option>'); putHtml('</select>'); $value = getVARdef($db, 'DMZIPV6', $cur_db); putHtml('– IPv6/nn:<input type="text" size="45" maxlength="43" value="'.$value.'" name="dmz_ipv6" />'); Modified: branches/1.0/project/astlinux/target_skeleton/etc/init.d/network =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-06-01 22:08:01 UTC (rev 8366) +++ branches/1.0/project/astlinux/target_skeleton/etc/init.d/network 2017-06-02 21:25:01 UTC (rev 8367) @@ -105,31 +105,31 @@ id=0 unset IFS - for iname in $IPV6_AUTOCONF; do + for iname in $IPV6_PREFIX_DELEGATION; do int="" case $iname in INTIF) - if [ -n "$INTIF" -a "$INTIF" != "none" -a -n "$INTIP" -a -n "$INTNM" -a -z "$INTIPV6" ]; then + if [ -n "$INTIF" -a "$INTIF" != "none" -a -n "$INTIP" -a -n "$INTNM" ]; then int="$INTIF" fi ;; INT2IF) - if [ -n "$INT2IF" -a "$INT2IF" != "none" -a -n "$INT2IP" -a -n "$INT2NM" -a -z "$INT2IPV6" ]; then + if [ -n "$INT2IF" -a "$INT2IF" != "none" -a -n "$INT2IP" -a -n "$INT2NM" ]; then int="$INT2IF" fi ;; INT3IF) - if [ -n "$INT3IF" -a "$INT3IF" != "none" -a -n "$INT3IP" -a -n "$INT3NM" -a -z "$INT3IPV6" ]; then + if [ -n "$INT3IF" -a "$INT3IF" != "none" -a -n "$INT3IP" -a -n "$INT3NM" ]; then int="$INT3IF" fi ;; INT4IF) - if [ -n "$INT4IF" -a "$INT4IF" != "none" -a -n "$INT4IP" -a -n "$INT4NM" -a -z "$INT4IPV6" ]; then + if [ -n "$INT4IF" -a "$INT4IF" != "none" -a -n "$INT4IP" -a -n "$INT4NM" ]; then int="$INT4IF" fi ;; DMZIF) - if [ -n "$DMZIF" -a "$DMZIF" != "none" -a -n "$DMZIP" -a -n "$DMZNM" -a -z "$DMZIPV6" ]; then + if [ -n "$DMZIF" -a "$DMZIF" != "none" -a -n "$DMZIP" -a -n "$DMZNM" ]; then int="$DMZIF" fi ;; Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf =================================================================== --- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-06-01 22:08:01 UTC (rev 8366) +++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-06-02 21:25:01 UTC (rev 8367) @@ -255,6 +255,9 @@ ## "DMZIF" for DMZ Interface ## Note: the autoconf prefix is derived from the IPv6 address on the interface, which must be defined. #IPV6_AUTOCONF="INTIF" +## Specify what Interface_Name is given a DHCPv6-Prefix Delegation, same format as with IPV6_AUTOCONF +## Note: DHCPv6 Client must be enabled for this to apply +#IPV6_PREFIX_DELEGATION="INTIF" ## DHCPv6 Client ## Enable DHCPv6 client on EXTIF by setting DHCPV6_CLIENT_ENABLE="yes" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-06-08 14:59:22
|
Revision: 8385 http://sourceforge.net/p/astlinux/code/8385 Author: abelbeck Date: 2017-06-08 14:59:19 +0000 (Thu, 08 Jun 2017) Log Message: ----------- Linux version bump from linux-3.16.43 to linux-3.16.44 Modified Paths: -------------- branches/1.0/astlinux-ast11.config branches/1.0/astlinux-ast13.config branches/1.0/crosstool-ng-src/ct-ng-1.20.0-3.16-x86_64.config branches/1.0/crosstool-ng-src/ct-ng-1.20.0-3.16.config branches/1.0/crosstool-ng-src/get-files.sh branches/1.0/project/astlinux/geni586/linux-smp.config branches/1.0/project/astlinux/genx86_64/linux-smp-vm.config branches/1.0/project/astlinux/genx86_64/linux-smp.config branches/1.0/project/runnix/geni586/linux.config branches/1.0/project/runnix-iso/geni586/linux.config branches/1.0/runnix-iso.config branches/1.0/runnix.config branches/1.0/x86_64-configs/astlinux-ast11.config branches/1.0/x86_64-configs/astlinux-ast13.config Modified: branches/1.0/astlinux-ast11.config =================================================================== --- branches/1.0/astlinux-ast11.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/astlinux-ast11.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -915,7 +915,7 @@ # BR2_LINUX_KERNEL_CUSTOM_VERSION is not set BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # BR2_LINUX_KERNEL_CUSTOM_GIT is not set -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.43.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.44.tar.gz" BR2_LINUX_KERNEL_VERSION="custom" BR2_LINUX_KERNEL_PATCH="project/astlinux/kernel-patches" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set Modified: branches/1.0/astlinux-ast13.config =================================================================== --- branches/1.0/astlinux-ast13.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/astlinux-ast13.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -915,7 +915,7 @@ # BR2_LINUX_KERNEL_CUSTOM_VERSION is not set BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # BR2_LINUX_KERNEL_CUSTOM_GIT is not set -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.43.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.44.tar.gz" BR2_LINUX_KERNEL_VERSION="custom" BR2_LINUX_KERNEL_PATCH="project/astlinux/kernel-patches" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set Modified: branches/1.0/crosstool-ng-src/ct-ng-1.20.0-3.16-x86_64.config =================================================================== --- branches/1.0/crosstool-ng-src/ct-ng-1.20.0-3.16-x86_64.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/crosstool-ng-src/ct-ng-1.20.0-3.16-x86_64.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -219,7 +219,7 @@ # CT_KERNEL_V_2_6_31 is not set # CT_KERNEL_V_2_6_27 is not set CT_KERNEL_LINUX_CUSTOM=y -CT_KERNEL_LINUX_CUSTOM_LOCATION="${CT_TOP_DIR}/linux-3.16.43.tar.gz" +CT_KERNEL_LINUX_CUSTOM_LOCATION="${CT_TOP_DIR}/linux-3.16.44.tar.gz" CT_KERNEL_windows_AVAILABLE=y # Modified: branches/1.0/crosstool-ng-src/ct-ng-1.20.0-3.16.config =================================================================== --- branches/1.0/crosstool-ng-src/ct-ng-1.20.0-3.16.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/crosstool-ng-src/ct-ng-1.20.0-3.16.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -219,7 +219,7 @@ # CT_KERNEL_V_2_6_31 is not set # CT_KERNEL_V_2_6_27 is not set CT_KERNEL_LINUX_CUSTOM=y -CT_KERNEL_LINUX_CUSTOM_LOCATION="${CT_TOP_DIR}/linux-3.16.43.tar.gz" +CT_KERNEL_LINUX_CUSTOM_LOCATION="${CT_TOP_DIR}/linux-3.16.44.tar.gz" CT_KERNEL_windows_AVAILABLE=y # Modified: branches/1.0/crosstool-ng-src/get-files.sh =================================================================== --- branches/1.0/crosstool-ng-src/get-files.sh 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/crosstool-ng-src/get-files.sh 2017-06-08 14:59:19 UTC (rev 8385) @@ -4,7 +4,7 @@ TARBALLS=".build/tarballs" -LINUX_KERNEL="linux-3.16.43.tar.gz" +LINUX_KERNEL="linux-3.16.44.tar.gz" EGLIBC="eglibc-2_18.tar.bz2" Modified: branches/1.0/project/astlinux/geni586/linux-smp.config =================================================================== --- branches/1.0/project/astlinux/geni586/linux-smp.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/project/astlinux/geni586/linux-smp.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/i386 3.16.43 Kernel Configuration +# Linux/i386 3.16.44 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y Modified: branches/1.0/project/astlinux/genx86_64/linux-smp-vm.config =================================================================== --- branches/1.0/project/astlinux/genx86_64/linux-smp-vm.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/project/astlinux/genx86_64/linux-smp-vm.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86_64 3.16.43 Kernel Configuration +# Linux/x86_64 3.16.44 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y Modified: branches/1.0/project/astlinux/genx86_64/linux-smp.config =================================================================== --- branches/1.0/project/astlinux/genx86_64/linux-smp.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/project/astlinux/genx86_64/linux-smp.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86_64 3.16.43 Kernel Configuration +# Linux/x86_64 3.16.44 Kernel Configuration # CONFIG_64BIT=y CONFIG_X86_64=y Modified: branches/1.0/project/runnix/geni586/linux.config =================================================================== --- branches/1.0/project/runnix/geni586/linux.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/project/runnix/geni586/linux.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/i386 3.16.43 Kernel Configuration +# Linux/i386 3.16.44 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y Modified: branches/1.0/project/runnix-iso/geni586/linux.config =================================================================== --- branches/1.0/project/runnix-iso/geni586/linux.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/project/runnix-iso/geni586/linux.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/i386 3.16.43 Kernel Configuration +# Linux/i386 3.16.44 Kernel Configuration # # CONFIG_64BIT is not set CONFIG_X86_32=y Modified: branches/1.0/runnix-iso.config =================================================================== --- branches/1.0/runnix-iso.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/runnix-iso.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -817,7 +817,7 @@ # BR2_LINUX_KERNEL_CUSTOM_VERSION is not set BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # BR2_LINUX_KERNEL_CUSTOM_GIT is not set -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.43.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.44.tar.gz" BR2_LINUX_KERNEL_VERSION="custom" BR2_LINUX_KERNEL_PATCH="" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set Modified: branches/1.0/runnix.config =================================================================== --- branches/1.0/runnix.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/runnix.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -818,7 +818,7 @@ # BR2_LINUX_KERNEL_CUSTOM_VERSION is not set BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # BR2_LINUX_KERNEL_CUSTOM_GIT is not set -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.43.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.44.tar.gz" BR2_LINUX_KERNEL_VERSION="custom" BR2_LINUX_KERNEL_PATCH="" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set Modified: branches/1.0/x86_64-configs/astlinux-ast11.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast11.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/x86_64-configs/astlinux-ast11.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -896,7 +896,7 @@ # BR2_LINUX_KERNEL_CUSTOM_VERSION is not set BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # BR2_LINUX_KERNEL_CUSTOM_GIT is not set -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.43.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.44.tar.gz" BR2_LINUX_KERNEL_VERSION="custom" BR2_LINUX_KERNEL_PATCH="project/astlinux/kernel-patches" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set Modified: branches/1.0/x86_64-configs/astlinux-ast13.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast13.config 2017-06-07 21:57:23 UTC (rev 8384) +++ branches/1.0/x86_64-configs/astlinux-ast13.config 2017-06-08 14:59:19 UTC (rev 8385) @@ -896,7 +896,7 @@ # BR2_LINUX_KERNEL_CUSTOM_VERSION is not set BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # BR2_LINUX_KERNEL_CUSTOM_GIT is not set -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.43.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.44.tar.gz" BR2_LINUX_KERNEL_VERSION="custom" BR2_LINUX_KERNEL_PATCH="project/astlinux/kernel-patches" # BR2_LINUX_KERNEL_USE_DEFCONFIG is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-06-10 16:23:57
|
Revision: 8392 http://sourceforge.net/p/astlinux/code/8392 Author: abelbeck Date: 2017-06-10 16:23:55 +0000 (Sat, 10 Jun 2017) Log Message: ----------- openvmtools, now functional, only enabled for genx86_64-vm with 'master-build', needs testing Modified Paths: -------------- branches/1.0/astlinux-ast11.config branches/1.0/astlinux-ast13.config branches/1.0/initrd.config branches/1.0/package/Config.in branches/1.0/package/openvmtools/openvmtools.mk branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf branches/1.0/runnix-iso.config branches/1.0/runnix.config branches/1.0/scripts/master-build branches/1.0/x86_64-configs/astlinux-ast11.config branches/1.0/x86_64-configs/astlinux-ast13.config branches/1.0/x86_64-configs/initrd.config Added Paths: ----------- branches/1.0/package/openvmtools/openvmtools.init Modified: branches/1.0/astlinux-ast11.config =================================================================== --- branches/1.0/astlinux-ast11.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/astlinux-ast11.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:24:32 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:27 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -835,6 +835,7 @@ # BR2_PACKAGE_ATTR is not set BR2_PACKAGE_HTOP=y BR2_PACKAGE_MODULE_INIT_TOOLS=y +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/astlinux-ast13.config =================================================================== --- branches/1.0/astlinux-ast13.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/astlinux-ast13.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:24:37 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:29 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -835,6 +835,7 @@ # BR2_PACKAGE_ATTR is not set BR2_PACKAGE_HTOP=y BR2_PACKAGE_MODULE_INIT_TOOLS=y +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/initrd.config =================================================================== --- branches/1.0/initrd.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/initrd.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:24:45 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:31 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -687,6 +687,7 @@ # BR2_PACKAGE_ATTR is not set # BR2_PACKAGE_HTOP is not set # BR2_PACKAGE_MODULE_INIT_TOOLS is not set +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/package/Config.in =================================================================== --- branches/1.0/package/Config.in 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/package/Config.in 2017-06-10 16:23:55 UTC (rev 8392) @@ -601,6 +601,7 @@ endif source "package/htop/Config.in" source "package/module-init-tools/Config.in" +source "package/openvmtools/Config.in" if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS source "package/procps/Config.in" source "package/psmisc/Config.in" Added: branches/1.0/package/openvmtools/openvmtools.init =================================================================== --- branches/1.0/package/openvmtools/openvmtools.init (rev 0) +++ branches/1.0/package/openvmtools/openvmtools.init 2017-06-10 16:23:55 UTC (rev 8392) @@ -0,0 +1,68 @@ +#!/bin/sh + +. /etc/rc.conf + +PIDFILE="/var/run/vmtoolsd.pid" + +test_if_in_vmware() +{ + if ! lscpu | grep -q -i '^hypervisor vendor: *vmware'; then + return 1 + fi + + if ! vmware-checkvm >/dev/null 2>&1; then + return 1 + fi + + return 0 +} + +init () { + : +} + +start () { + + if [ "$VMWARE_TOOLS" != "no" ] && test_if_in_vmware; then + echo "Starting VMware (vmtoolsd) daemon..." + + vmtoolsd -b $PIDFILE + fi +} + +stop () { + + if [ -f $PIDFILE ]; then + echo "Stopping VMware (vmtoolsd) daemon..." + kill $(cat $PIDFILE) >/dev/null 2>&1 + rm -f $PIDFILE + fi +} + +case $1 in + +start) + start + ;; + +stop) + stop + ;; + +init) + init + start + ;; + +restart) + stop + sleep 2 + start + ;; + +*) + echo "Usage: start|stop|restart" + ;; + +esac + Modified: branches/1.0/package/openvmtools/openvmtools.mk =================================================================== --- branches/1.0/package/openvmtools/openvmtools.mk 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/package/openvmtools/openvmtools.mk 2017-06-10 16:23:55 UTC (rev 8392) @@ -39,11 +39,23 @@ OPENVMTOOLS_CONF_OPT += --without-ssl endif -define OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES +define OPENVMTOOLS_POST_INSTALL rm -f $(TARGET_DIR)/etc/vmware-tools/scripts/vmware/network rm -f $(TARGET_DIR)/lib/udev/rules.d/99-vmware-scsi-udev.rules + $(INSTALL) -m 0755 -D package/openvmtools/openvmtools.init $(TARGET_DIR)/etc/init.d/openvmtools + ln -sf ../../init.d/openvmtools $(TARGET_DIR)/etc/runlevels/default/S01openvmtools + ln -sf ../../init.d/openvmtools $(TARGET_DIR)/etc/runlevels/default/K94openvmtools endef -OPENVMTOOLS_POST_INSTALL_TARGET_HOOKS += OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES +OPENVMTOOLS_POST_INSTALL_TARGET_HOOKS += OPENVMTOOLS_POST_INSTALL +define OPENVMTOOLS_UNINSTALL_TARGET_CMDS + rm -rf $(TARGET_DIR)/etc/vmware-tools + rm -rf $(TARGET_DIR)/usr/lib/open-vm-tools + rm -rf $(TARGET_DIR)/usr/share/open-vm-tools + rm -f $(TARGET_DIR)/etc/init.d/openvmtools + rm -f $(TARGET_DIR)/etc/runlevels/default/S01openvmtools + rm -f $(TARGET_DIR)/etc/runlevels/default/K94openvmtools +endef + $(eval $(call AUTOTARGETS,package,openvmtools)) Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf =================================================================== --- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-06-10 16:23:55 UTC (rev 8392) @@ -1173,5 +1173,10 @@ ## Enabled by default, set to "no" to disable. #FIRSTRUN="no" +## If the image is built with the "openvmtools" package and kernel support (genx86_64-vm) +## the vmtoolsd daemon will be started automatically when a VMware hypervisor is detected. +## Enabled by default, set to "no" to disable. +#VMWARE_TOOLS="no" + ## End rc.conf ## Modified: branches/1.0/runnix-iso.config =================================================================== --- branches/1.0/runnix-iso.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/runnix-iso.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:25:00 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:37 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -733,6 +733,7 @@ # BR2_PACKAGE_BOOTUTILS is not set # BR2_PACKAGE_HTOP is not set # BR2_PACKAGE_MODULE_INIT_TOOLS is not set +# BR2_PACKAGE_OPENVMTOOLS is not set # BR2_PACKAGE_PROCPS is not set # BR2_PACKAGE_PSMISC is not set # BR2_PACKAGE_RSYSLOG is not set Modified: branches/1.0/runnix.config =================================================================== --- branches/1.0/runnix.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/runnix.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:24:49 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:36 2017 # BR2_HAVE_DOT_CONFIG=y # BR2_arm is not set @@ -734,6 +734,7 @@ # BR2_PACKAGE_BOOTUTILS is not set # BR2_PACKAGE_HTOP is not set # BR2_PACKAGE_MODULE_INIT_TOOLS is not set +# BR2_PACKAGE_OPENVMTOOLS is not set # BR2_PACKAGE_PROCPS is not set # BR2_PACKAGE_PSMISC is not set # BR2_PACKAGE_RSYSLOG is not set Modified: branches/1.0/scripts/master-build =================================================================== --- branches/1.0/scripts/master-build 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/scripts/master-build 2017-06-10 16:23:55 UTC (rev 8392) @@ -65,6 +65,12 @@ sed -i 's:^# BR2_PACKAGE_DAHDI_NO_CARD_FIRMWARE .*$:BR2_PACKAGE_DAHDI_NO_CARD_FIRMWARE=y:' .config } +set_openvmtools_package() +{ + # enable BR2_PACKAGE_OPENVMTOOLS + sed -i 's:^# BR2_PACKAGE_OPENVMTOOLS .*$:BR2_PACKAGE_OPENVMTOOLS=y:' .config +} + set_asterisk_version() { case $1 in @@ -183,6 +189,7 @@ cp "x86_64-configs/$CONFIG" .config set_smp64vm_kernel unset_major_pci_packages + set_openvmtools_package for board in $BOARDS_SMP64VM; do build_board "$FIRMWARE" Modified: branches/1.0/x86_64-configs/astlinux-ast11.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast11.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/x86_64-configs/astlinux-ast11.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:25:15 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:41 2017 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -816,6 +816,7 @@ # BR2_PACKAGE_ATTR is not set BR2_PACKAGE_HTOP=y BR2_PACKAGE_MODULE_INIT_TOOLS=y +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/x86_64-configs/astlinux-ast13.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast13.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/x86_64-configs/astlinux-ast13.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:25:19 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:43 2017 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -816,6 +816,7 @@ # BR2_PACKAGE_ATTR is not set BR2_PACKAGE_HTOP=y BR2_PACKAGE_MODULE_INIT_TOOLS=y +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set Modified: branches/1.0/x86_64-configs/initrd.config =================================================================== --- branches/1.0/x86_64-configs/initrd.config 2017-06-10 00:08:14 UTC (rev 8391) +++ branches/1.0/x86_64-configs/initrd.config 2017-06-10 16:23:55 UTC (rev 8392) @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Buildroot astlinux-1.x-svn8350-dirty Configuration -# Sun May 28 09:25:25 2017 +# Buildroot astlinux-1.x-svn8391-dirty Configuration +# Sat Jun 10 11:06:45 2017 # BR2_HAVE_DOT_CONFIG=y BR2_ARCH_IS_64=y @@ -668,6 +668,7 @@ # BR2_PACKAGE_ATTR is not set # BR2_PACKAGE_HTOP is not set # BR2_PACKAGE_MODULE_INIT_TOOLS is not set +# BR2_PACKAGE_OPENVMTOOLS is not set BR2_PACKAGE_UTIL_LINUX=y # BR2_PACKAGE_UTIL_LINUX_MOUNT is not set # BR2_PACKAGE_UTIL_LINUX_FSCK is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-06-19 13:15:09
|
Revision: 8401 http://sourceforge.net/p/astlinux/code/8401 Author: abelbeck Date: 2017-06-19 13:15:06 +0000 (Mon, 19 Jun 2017) Log Message: ----------- dahdi-linux version bump to 2.10.2, dahdi-tools version bump to 2.10.2. Also mount /dev/shm on tmpfs so the dahdi_cfg command works Modified Paths: -------------- branches/1.0/package/dahdi-linux/Config.in branches/1.0/package/dahdi-linux/dahdi-linux-2-wcfxo-international.patch branches/1.0/package/dahdi-linux/dahdi-linux.mk branches/1.0/package/dahdi-tools/dahdi-tools.mk branches/1.0/package/dahdi-tools/dahdi.init branches/1.0/project/astlinux/target_skeleton/etc/rc Added Paths: ----------- branches/1.0/package/dahdi-linux/hfcs-2.10/ branches/1.0/package/dahdi-linux/hfcs-2.10/Kbuild branches/1.0/package/dahdi-linux/hfcs-2.10/base.c branches/1.0/package/dahdi-linux/hfcs-2.10/dahdi_hfcs.h branches/1.0/package/dahdi-linux/hfcs-2.10/fifo.c branches/1.0/package/dahdi-linux/hfcs-2.10/fifo.h branches/1.0/package/dahdi-linux/hfcs-2.10-Kbuild.patch branches/1.0/package/dahdi-tools/dahdi-tools-2.10-dahdi_cfg-sem_open-permissions.patch branches/1.0/package/dahdi-tools/dahdi-tools-2.10-remove-Werror.patch branches/1.0/package/dahdi-tools/dahdi-tools-2.10-udev-rules.patch Removed Paths: ------------- branches/1.0/package/dahdi-linux/dahdi-linux-2.6-udev-rules.patch branches/1.0/package/dahdi-linux/dahdi-linux-2.8-disable-pciradio.patch branches/1.0/package/dahdi-linux/hfcs-2.6/ branches/1.0/package/dahdi-linux/hfcs-2.6-Kbuild.patch branches/1.0/package/dahdi-linux/hfcs-2.8/ branches/1.0/package/dahdi-linux/hfcs-2.8-Kbuild.patch branches/1.0/package/dahdi-linux/oslec-2.6-echocan_oslec.patch branches/1.0/package/dahdi-tools/dahdi-tools-2.8-00udev-rules.patch branches/1.0/package/dahdi-tools/dahdi-tools-2.8-udev-rules.patch Modified: branches/1.0/package/dahdi-linux/Config.in =================================================================== --- branches/1.0/package/dahdi-linux/Config.in 2017-06-16 18:07:04 UTC (rev 8400) +++ branches/1.0/package/dahdi-linux/Config.in 2017-06-19 13:15:06 UTC (rev 8401) @@ -36,5 +36,5 @@ help Reduce image size by removing PCI / PCI-e card firmware files. - It saves 3 MB (DAHDI 2.6) or 8 MB (DAHDI 2.8) of uncompressed space. + It saves 8.8 MB (DAHDI 2.10) of uncompressed space. Modified: branches/1.0/package/dahdi-linux/dahdi-linux-2-wcfxo-international.patch =================================================================== --- branches/1.0/package/dahdi-linux/dahdi-linux-2-wcfxo-international.patch 2017-06-16 18:07:04 UTC (rev 8400) +++ branches/1.0/package/dahdi-linux/dahdi-linux-2-wcfxo-international.patch 2017-06-19 13:15:06 UTC (rev 8401) @@ -1,6 +1,6 @@ --- dahdi-linux-2.6.1/drivers/dahdi/wcfxo.c.orig 2012-10-13 09:35:10.000000000 -0500 +++ dahdi-linux-2.6.1/drivers/dahdi/wcfxo.c 2012-10-13 09:35:18.000000000 -0500 -@@ -239,6 +239,13 @@ +@@ -240,6 +240,13 @@ { "CTR21", 0, 0, 3, 0, 0, 3, 0 }, /* Austria, Belgium, Denmark, Finland, France, Germany, Greece, Iceland, Ireland, Italy, Luxembourg, Netherlands, Norway, Portugal, Spain, Sweden, Switzerland, and UK */ Deleted: branches/1.0/package/dahdi-linux/dahdi-linux-2.6-udev-rules.patch =================================================================== --- branches/1.0/package/dahdi-linux/dahdi-linux-2.6-udev-rules.patch 2017-06-16 18:07:04 UTC (rev 8400) +++ branches/1.0/package/dahdi-linux/dahdi-linux-2.6-udev-rules.patch 2017-06-19 13:15:06 UTC (rev 8401) @@ -1,40 +0,0 @@ ---- dahdi-linux-2.4.1.1/build_tools/genudevrules.orig 2011-10-13 18:31:15.000000000 -0500 -+++ dahdi-linux-2.4.1.1/build_tools/genudevrules 2011-10-13 18:32:27.000000000 -0500 -@@ -1,17 +1,5 @@ - #!/bin/sh - --ver=`udevinfo -V | cut -f3 -d" "` -- --if [ -z "${ver}" ]; then -- # Not found - try udevadm -- ver=`udevadm info -V | cut -f3 -d" "` -- -- if [ -z "${ver}" ]; then -- # nobody has that old version, anyway. -- ver=54 -- fi --fi -- - # udev versions prior to 055 use a single '=' for matching key values - # udev versions 055 and later support '==' for that purpose, and versions - # beyond 092 will probably make it mandatory -@@ -19,11 +7,7 @@ - # very old versions of udev required naming rules and permissions rules to be - # in separate files, but it's not clear at what version number that changed - --if [ ${ver} -gt 54 ]; then -- match="==" --else -- match="=" --fi -+match="==" - - cat <<EOF - # udev rules to generate the /dev/dahdi device files (if not yet provided -@@ -36,5 +20,5 @@ - KERNEL${match}"dahdi[0-9]*", NAME="dahdi/%n" - - # DAHDI devices with ownership/permissions for running as non-root --SUBSYSTEM${match}"dahdi", OWNER="asterisk", GROUP="asterisk", MODE="0660" -+#SUBSYSTEM${match}"dahdi", OWNER="asterisk", GROUP="asterisk", MODE="0660" - EOF Deleted: branches/1.0/package/dahdi-linux/dahdi-linux-2.8-disable-pciradio.patch =================================================================== --- branches/1.0/package/dahdi-linux/dahdi-linux-2.8-disable-pciradio.patch 2017-06-16 18:07:04 UTC (rev 8400) +++ branches/1.0/package/dahdi-linux/dahdi-linux-2.8-disable-pciradio.patch 2017-06-19 13:15:06 UTC (rev 8401) @@ -1,10 +0,0 @@ ---- dahdi-linux-2.8.0.1/drivers/dahdi/Kbuild.orig 2017-05-21 14:49:59.714846097 -0500 -+++ dahdi-linux-2.8.0.1/drivers/dahdi/Kbuild 2017-05-21 14:51:11.730334517 -0500 -@@ -45,7 +45,6 @@ - - obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_WCFXO) += wcfxo.o - obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_TOR2) += tor2.o --obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_PCIRADIO) += pciradio.o - endif - - obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_XPP) += xpp/ Modified: branches/1.0/package/dahdi-linux/dahdi-linux.mk =================================================================== --- branches/1.0/package/dahdi-linux/dahdi-linux.mk 2017-06-16 18:07:04 UTC (rev 8400) +++ branches/1.0/package/dahdi-linux/dahdi-linux.mk 2017-06-19 13:15:06 UTC (rev 8401) @@ -3,15 +3,7 @@ # dahdi-linux # ############################################################## -ifeq ($(BR2_PACKAGE_RHINO),y) -DAHDI_LINUX_VERSION := 2.8.0.1 -else - ifeq ($(BR2_PACKAGE_WANPIPE),y) -DAHDI_LINUX_VERSION := 2.8.0.1 - else -DAHDI_LINUX_VERSION := 2.8.0.1 - endif -endif +DAHDI_LINUX_VERSION := 2.10.2 DAHDI_LINUX_SOURCE := dahdi-linux-$(DAHDI_LINUX_VERSION).tar.gz DAHDI_LINUX_SITE := http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases DAHDI_LINUX_DIR := $(BUILD_DIR)/dahdi-linux-$(DAHDI_LINUX_VERSION) @@ -53,7 +45,7 @@ $(DAHDI_LINUX_DRIVERS_DIR)/$(DAHDI_LINUX_BINARY): $(DAHDI_LINUX_DIR)/.source $(MAKE) -C $(DAHDI_LINUX_DIR) \ - HOSTCC=gcc CC=$(TARGET_CC) ARCH=$(KERNEL_ARCH) \ + HOSTCC=gcc CC=$(TARGET_CC) LD=$(TARGET_LD) ARCH=$(KERNEL_ARCH) \ KVERS=$(LINUX_VERSION_PROBED) KSRC=$(LINUX_DIR) PWD=$(DAHDI_LINUX_DIR) $(DAHDI_LINUX_DIR)/include/dahdi/kernel.h: $(DAHDI_LINUX_DIR)/.source @@ -60,7 +52,7 @@ $(STAGING_DIR)/usr/include/dahdi/kernel.h: $(DAHDI_LINUX_DIR)/include/dahdi/kernel.h $(MAKE1) -C $(DAHDI_LINUX_DIR) \ - HOSTCC=gcc CC=$(TARGET_CC) ARCH=$(KERNEL_ARCH) \ + HOSTCC=gcc CC=$(TARGET_CC) LD=$(TARGET_LD) ARCH=$(KERNEL_ARCH) \ DESTDIR=$(STAGING_DIR) KVERS=$(LINUX_VERSION_PROBED) \ KSRC=$(LINUX_DIR) PWD=$(DAHDI_LINUX_DIR) \ install-include @@ -68,16 +60,12 @@ $(TARGET_DIR)/$(DAHDI_LINUX_TARGET_BINARY): $(DAHDI_LINUX_DRIVERS_DIR)/$(DAHDI_LINUX_BINARY) mkdir -p $(TARGET_DIR)$(PERLLIBDIR) $(MAKE1) -C $(DAHDI_LINUX_DIR) \ - HOSTCC=gcc CC=$(TARGET_CC) ARCH=$(KERNEL_ARCH) \ + HOSTCC=gcc CC=$(TARGET_CC) LD=$(TARGET_LD) ARCH=$(KERNEL_ARCH) \ DESTDIR=$(TARGET_DIR) KVERS=$(LINUX_VERSION_PROBED) \ KSRC=$(LINUX_DIR) PWD=$(DAHDI_LINUX_DIR) \ PERLLIBDIR=$(PERLLIBDIR) \ install rm -rf $(TARGET_DIR)/usr/include - # Remove duplicate dahdi firmware files in target /usr/lib/hotplug/firmware - if [ -d $(TARGET_DIR)/usr/lib/hotplug/firmware ]; then \ - find $(TARGET_DIR)/usr/lib/hotplug/firmware/ -type f -name "*dahdi-fw-*" -print0 | xargs -0 rm -f ; \ - fi ifeq ($(BR2_PACKAGE_DAHDI_NO_CARD_FIRMWARE),y) find $(TARGET_DIR)/lib/firmware/ -type f -name "*dahdi-fw-*" -print0 | xargs -0 rm -f endif Added: branches/1.0/package/dahdi-linux/hfcs-2.10/Kbuild =================================================================== --- branches/1.0/package/dahdi-linux/hfcs-2.10/Kbuild (rev 0) +++ branches/1.0/package/dahdi-linux/hfcs-2.10/Kbuild 2017-06-19 13:15:06 UTC (rev 8401) @@ -0,0 +1,10 @@ +obj-m += dahdi_hfcs.o + +EXTRA_CFLAGS := -I$(src)/.. -Wno-undef + +dahdi_hfcs-objs := base.o fifo.o + +$(obj)/base.o: $(src)/dahdi_hfcs.h +$(obj)/fifo.o: $(src)/fifo.h + + Added: branches/1.0/package/dahdi-linux/hfcs-2.10/base.c =================================================================== --- branches/1.0/package/dahdi-linux/hfcs-2.10/base.c (rev 0) +++ branches/1.0/package/dahdi-linux/hfcs-2.10/base.c 2017-06-19 13:15:06 UTC (rev 8401) @@ -0,0 +1,1753 @@ +/* + * dahdi_hfcs.c - Dahdi driver for HFC-S PCI A based ISDN BRI cards + * + * Dahdi rewrite in hardhdlc mode + * Jose A. Deniz <od...@ho...> + * + * Copyright (C) 2011, Raoul Bönisch + * Copyright (C) 2009, Jose A. Deniz + * Copyright (C) 2006, headiisue GmbH; Jens Wilke + * Copyright (C) 2004 Daniele Orlandi + * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH + * + * Jens Wilke <jw_...@he...> + * + * Original author of this code is + * Daniele "Vihai" Orlandi <da...@or...> + * + * Major rewrite of the driver made by + * Klaus-Peter Junghanns <kp...@ju...> + * + * This program is free software and may be modified and + * distributed under the terms of the GNU Public License. + * + * Please read the README file for important infos. + */ + +#include <linux/spinlock.h> +#include <linux/init.h> +#include <linux/pci.h> +#include <linux/interrupt.h> +#include <linux/module.h> +#include <linux/moduleparam.h> +#include <linux/version.h> +#include <linux/kernel.h> +#include <linux/delay.h> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32)) +#include <linux/sched.h> +#endif +#ifdef CONFIG_PROC_FS +#include <linux/proc_fs.h> +#endif /* CONFIG_PROC_FS */ +#include <linux/if_arp.h> + +#include <dahdi/kernel.h> + +#include "dahdi_hfcs.h" +#include "fifo.h" + +#if CONFIG_PCI + +#define DAHDI_B1 0 +#define DAHDI_B2 1 +#define DAHDI_D 2 + +#define D 0 +#define B1 1 +#define B2 2 + +/* + * Mode Te for all + */ +static int modes; +static int nt_modes[hfc_MAX_BOARDS]; +static int nt_modes_count; +static int force_l1_up; +#ifdef CONFIG_PROC_FS +static struct proc_dir_entry *hfc_proc_dahdi_hfcs_dir; +#endif /* CONFIG_PROC_FS */ + +#define DEBUG +#ifdef DEBUG +int debug_level; +#endif + +#ifndef FALSE +#define FALSE 0 +#endif +#ifndef TRUE +#define TRUE (!FALSE) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) +#define SET_PROC_DIRENTRY_OWNER(p) do { (p)->owner = THIS_MODULE; } while(0); +#else +#define SET_PROC_DIRENTRY_OWNER(p) do { } while(0); +#endif + +static DEFINE_PCI_DEVICE_TABLE(hfc_pci_ids) = { + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_2BD0, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B000, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B006, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B007, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B008, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B009, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00A, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00B, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B00C, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_B100, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_ABOCOM, PCI_DEVICE_ID_ABOCOM_2BD1, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_ASUSTEK, PCI_DEVICE_ID_ASUSTEK_0675, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_T_CONCEPT, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_BERKOM, PCI_DEVICE_ID_BERKOM_A1T, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_ANIGMA, PCI_DEVICE_ID_ANIGMA_MC145575, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_ZOLTRIX, PCI_DEVICE_ID_ZOLTRIX_2BD0, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_E, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_E, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_IOM2_A, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_DIGI_DF_M_A, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {PCI_VENDOR_ID_SITECOM, PCI_DEVICE_ID_SITECOM_3069, + PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, + {0,} +}; + +MODULE_DEVICE_TABLE(pci, hfc_pci_ids); + +static int __devinit hfc_probe(struct pci_dev *dev + , const struct pci_device_id *ent); +static void __devexit hfc_remove(struct pci_dev *dev); + +static struct pci_driver hfc_driver = { + .name = hfc_DRIVER_NAME, + .id_table = hfc_pci_ids, + .probe = hfc_probe, + .remove = __devexit_p(hfc_remove), +}; + +/****************************************** + * HW routines + ******************************************/ + +static void hfc_softreset(struct hfc_card *card) +{ + printk(KERN_INFO hfc_DRIVER_PREFIX + "card %d: " + "resetting\n", + card->cardnum); + +/* + * Softreset procedure. Put it on, wait and off again + */ + hfc_outb(card, hfc_CIRM, hfc_CIRM_RESET); + udelay(6); + hfc_outb(card, hfc_CIRM, 0); + + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout((hfc_RESET_DELAY * HZ) / 1000); +} + +static void hfc_resetCard(struct hfc_card *card) +{ + card->regs.m1 = 0; + hfc_outb(card, hfc_INT_M1, card->regs.m1); + + card->regs.m2 = 0; + hfc_outb(card, hfc_INT_M2, card->regs.m2); + + hfc_softreset(card); + + card->regs.trm = 0; + hfc_outb(card, hfc_TRM, card->regs.trm); + + /* + * Select the non-capacitive line mode for the S/T interface + */ + card->regs.sctrl = hfc_SCTRL_NONE_CAP; + + if (card->nt_mode) { + /* + * ST-Bit delay for NT-Mode + */ + hfc_outb(card, hfc_CLKDEL, hfc_CLKDEL_NT); + + card->regs.sctrl |= hfc_SCTRL_MODE_NT; + } else { + /* + * ST-Bit delay for TE-Mode + */ + hfc_outb(card, hfc_CLKDEL, hfc_CLKDEL_TE); + + card->regs.sctrl |= hfc_SCTRL_MODE_TE; + } + + hfc_outb(card, hfc_SCTRL, card->regs.sctrl); + + /* + * S/T Auto awake + */ + card->regs.sctrl_e = hfc_SCTRL_E_AUTO_AWAKE; + hfc_outb(card, hfc_SCTRL_E, card->regs.sctrl_e); + + /* + * No B-channel enabled at startup + */ + card->regs.sctrl_r = 0; + hfc_outb(card, hfc_SCTRL_R, card->regs.sctrl_r); + + /* + * HFC Master Mode + */ + hfc_outb(card, hfc_MST_MODE, hfc_MST_MODE_MASTER); + + /* + * Connect internal blocks + */ + card->regs.connect = + hfc_CONNECT_B1_HFC_from_ST | + hfc_CONNECT_B1_ST_from_HFC | + hfc_CONNECT_B1_GCI_from_HFC | + hfc_CONNECT_B2_HFC_from_ST | + hfc_CONNECT_B2_ST_from_HFC | + hfc_CONNECT_B2_GCI_from_HFC; + hfc_outb(card, hfc_CONNECT, card->regs.connect); + + /* + * All bchans are HDLC by default, not useful, actually + * since mode is set during open() + */ + hfc_outb(card, hfc_CTMT, 0); + + /* + * bit order + */ + hfc_outb(card, hfc_CIRM, 0); + + /* + * Enable D-rx FIFO. At least one FIFO must be enabled (by specs) + */ + card->regs.fifo_en = hfc_FIFOEN_DRX; + hfc_outb(card, hfc_FIFO_EN, card->regs.fifo_en); + + card->late_irqs = 0; + + /* + * Clear already pending ints + */ + hfc_inb(card, hfc_INT_S1); + hfc_inb(card, hfc_INT_S2); + + /* + * Enable IRQ output + */ + card->regs.m1 = hfc_INTS_DREC | hfc_INTS_L1STATE | hfc_INTS_TIMER; + hfc_outb(card, hfc_INT_M1, card->regs.m1); + + card->regs.m2 = hfc_M2_IRQ_ENABLE; + hfc_outb(card, hfc_INT_M2, card->regs.m2); + + /* + * Unlocks the states machine + */ + hfc_outb(card, hfc_STATES, 0); + + /* + * There's no need to explicitly activate L1 now. + * Activation is managed inside the interrupt routine. + */ +} + +static void hfc_update_fifo_state(struct hfc_card *card) +{ + /* + * I'm not sure if irqsave is needed but there could be a race + * condition since hfc_update_fifo_state could be called from + * both the IRQ handler and the *_(open|close) functions + */ + + unsigned long flags; + spin_lock_irqsave(&card->chans[B1].lock, flags); + if (!card->fifo_suspended && + (card->chans[B1].status == open_framed || + card->chans[B1].status == open_voice)) { + + if (!(card->regs.fifo_en & hfc_FIFOEN_B1RX)) { + card->regs.fifo_en |= hfc_FIFOEN_B1RX; + hfc_clear_fifo_rx(&card->chans[B1].rx); + } + + if (!(card->regs.fifo_en & hfc_FIFOEN_B1TX)) { + card->regs.fifo_en |= hfc_FIFOEN_B1TX; + hfc_clear_fifo_tx(&card->chans[B1].tx); + } + } else { + if (card->regs.fifo_en & hfc_FIFOEN_B1RX) + card->regs.fifo_en &= ~hfc_FIFOEN_B1RX; + if (card->regs.fifo_en & hfc_FIFOEN_B1TX) + card->regs.fifo_en &= ~hfc_FIFOEN_B1TX; + } + spin_unlock_irqrestore(&card->chans[B1].lock, flags); + + spin_lock_irqsave(&card->chans[B2].lock, flags); + if (!card->fifo_suspended && + (card->chans[B2].status == open_framed || + card->chans[B2].status == open_voice || + card->chans[B2].status == sniff_aux)) { + + if (!(card->regs.fifo_en & hfc_FIFOEN_B2RX)) { + card->regs.fifo_en |= hfc_FIFOEN_B2RX; + hfc_clear_fifo_rx(&card->chans[B2].rx); + } + + if (!(card->regs.fifo_en & hfc_FIFOEN_B2TX)) { + card->regs.fifo_en |= hfc_FIFOEN_B2TX; + hfc_clear_fifo_tx(&card->chans[B2].tx); + } + } else { + if (card->regs.fifo_en & hfc_FIFOEN_B2RX) + card->regs.fifo_en &= ~hfc_FIFOEN_B2RX; + if (card->regs.fifo_en & hfc_FIFOEN_B2TX) + card->regs.fifo_en &= ~hfc_FIFOEN_B2TX; + } + spin_unlock_irqrestore(&card->chans[B2].lock, flags); + + spin_lock_irqsave(&card->chans[D].lock, flags); + if (!card->fifo_suspended && + card->chans[D].status == open_framed) { + + if (!(card->regs.fifo_en & hfc_FIFOEN_DTX)) { + card->regs.fifo_en |= hfc_FIFOEN_DTX; + + card->chans[D].tx.ugly_framebuf_size = 0; + card->chans[D].tx.ugly_framebuf_off = 0; + } + } else { + if (card->regs.fifo_en & hfc_FIFOEN_DTX) + card->regs.fifo_en &= ~hfc_FIFOEN_DTX; + } + spin_unlock_irqrestore(&card->chans[D].lock, flags); + + hfc_outb(card, hfc_FIFO_EN, card->regs.fifo_en); +} + +static inline void hfc_suspend_fifo(struct hfc_card *card) +{ + card->fifo_suspended = TRUE; + + hfc_update_fifo_state(card); + + /* + * When L1 goes down D rx receives garbage; it is nice to + * clear it to avoid a CRC error on reactivation + * udelay is needed because the FIFO deactivation happens + * in 250us + */ + udelay(250); + hfc_clear_fifo_rx(&card->chans[D].rx); + +#ifdef DEBUG + if (debug_level >= 3) { + printk(KERN_DEBUG hfc_DRIVER_PREFIX + "card %d: " + "FIFOs suspended\n", + card->cardnum); + } +#endif +} + +static inline void hfc_resume_fifo(struct hfc_card *card) +{ + card->fifo_suspended = FALSE; + + hfc_update_fifo_state(card); + +#ifdef DEBUG + if (debug_level >= 3) { + printk(KERN_DEBUG hfc_DRIVER_PREFIX + "card %d: " + "FIFOs resumed\n", + card->cardnum); + } +#endif +} + +static void hfc_check_l1_up(struct hfc_card *card) +{ + if ((!card->nt_mode && card->l1_state != 7) + || (card->nt_mode && card->l1_state != 3)) { + + hfc_outb(card, hfc_STATES, hfc_STATES_DO_ACTION | + hfc_STATES_ACTIVATE| + hfc_STATES_NT_G2_G3); + + /* + * 0 because this is quite verbose when an inferface is unconnected, jaw + */ +#if 0 + if (debug_level >= 1) { + printk(KERN_DEBUG hfc_DRIVER_PREFIX + "card %d: " + "L1 is down, bringing up L1.\n", + card->cardnum); + } +#endif + } +} + + +/******************* + * Dahdi interface * + *******************/ + +static int hfc_dahdi_open(struct dahdi_chan *dahdi_chan) +{ + struct hfc_chan_duplex *chan = dahdi_chan->pvt; + struct hfc_card *card = chan->card; + + spin_lock(&chan->lock); + + switch (chan->number) { + case D: + if (chan->status != free && + chan->status != open_framed) { + spin_unlock(&chan->lock); + return -EBUSY; + } + chan->status = open_framed; + break; + + case B1: + case B2: + if (chan->status != free) { + spin_unlock(&chan->lock); + return -EBUSY; + } + chan->status = open_voice; + break; + } + + chan->open_by_dahdi = TRUE; + try_module_get(THIS_MODULE); + spin_unlock(&chan->lock); + + switch (chan->number) { + case D: + break; + + case B1: + card->regs.m2 |= hfc_M2_PROC_TRANS; + /* + * Enable transparent mode + */ + card->regs.ctmt |= hfc_CTMT_TRANSB1; + /* + * Reversed bit order + */ + card->regs.cirm |= hfc_CIRM_B1_REV; + /* + * Enable transmission + */ + card->regs.sctrl |= hfc_SCTRL_B1_ENA; + /* + * Enable reception + */ + card->regs.sctrl_r |= hfc_SCTRL_R_B1_ENA; + break; + + case B2: + card->regs.m2 |= hfc_M2_PROC_TRANS; + card->regs.ctmt |= hfc_CTMT_TRANSB2; + card->regs.cirm |= hfc_CIRM_B2_REV; + card->regs.sctrl |= hfc_SCTRL_B2_ENA; + card->regs.sctrl_r |= hfc_SCTRL_R_B2_ENA; + break; + + } + + /* + * If not already enabled, enable processing transition (8KHz) + * interrupt + */ + hfc_outb(card, hfc_INT_M2, card->regs.m2); + hfc_outb(card, hfc_CTMT, card->regs.ctmt); + hfc_outb(card, hfc_CIRM, card->regs.cirm); + hfc_outb(card, hfc_SCTRL, card->regs.sctrl); + hfc_outb(card, hfc_SCTRL_R, card->regs.sctrl_r); + + hfc_update_fifo_state(card); + + printk(KERN_INFO hfc_DRIVER_PREFIX + "card %d: " + "chan %s opened as %s.\n", + card->cardnum, + chan->name, + dahdi_chan->name); + + return 0; +} + +static int hfc_dahdi_close(struct dahdi_chan *dahdi_chan) +{ + struct hfc_chan_duplex *chan = dahdi_chan->pvt; + struct hfc_card *card = chan->card; + + if (!card) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "hfc_dahdi_close called with NULL card\n"); + return -1; + } + + spin_lock(&chan->lock); + + if (chan->status == free) { + spin_unlock(&chan->lock); + return -EINVAL; + } + + chan->status = free; + chan->open_by_dahdi = FALSE; + + spin_unlock(&chan->lock); + + switch (chan->number) { + case D: + break; + + case B1: + card->regs.ctmt &= ~hfc_CTMT_TRANSB1; + card->regs.cirm &= ~hfc_CIRM_B1_REV; + card->regs.sctrl &= ~hfc_SCTRL_B1_ENA; + card->regs.sctrl_r &= ~hfc_SCTRL_R_B1_ENA; + break; + + case B2: + card->regs.ctmt &= ~hfc_CTMT_TRANSB2; + card->regs.cirm &= ~hfc_CIRM_B2_REV; + card->regs.sctrl &= ~hfc_SCTRL_B2_ENA; + card->regs.sctrl_r &= ~hfc_SCTRL_R_B2_ENA; + break; + } + + if (card->chans[B1].status == free && + card->chans[B2].status == free) + card->regs.m2 &= ~hfc_M2_PROC_TRANS; + + hfc_outb(card, hfc_INT_M2, card->regs.m2); + hfc_outb(card, hfc_CTMT, card->regs.ctmt); + hfc_outb(card, hfc_CIRM, card->regs.cirm); + hfc_outb(card, hfc_SCTRL, card->regs.sctrl); + hfc_outb(card, hfc_SCTRL_R, card->regs.sctrl_r); + + hfc_update_fifo_state(card); + + module_put(THIS_MODULE); + + printk(KERN_INFO hfc_DRIVER_PREFIX + "card %d: " + "chan %s closed as %s.\n", + card->cardnum, + chan->name, + dahdi_chan->name); + + return 0; +} + +static int hfc_dahdi_rbsbits(struct dahdi_chan *chan, int bits) +{ + return 0; +} + +static int hfc_dahdi_ioctl(struct dahdi_chan *chan, + unsigned int cmd, unsigned long data) +{ + switch (cmd) { + + default: + return -ENOTTY; + } + + return 0; +} + +static void hfc_hdlc_hard_xmit(struct dahdi_chan *d_chan) +{ + struct hfc_chan_duplex *chan = d_chan->pvt; + struct hfc_card *card = chan->card; + struct dahdi_hfc *hfccard = card->dahdi_dev; + + atomic_inc(&hfccard->hdlc_pending); + +} + +static int hfc_dahdi_startup(struct file *file, struct dahdi_span *span) +{ + struct dahdi_hfc *dahdi_hfcs = dahdi_hfc_from_span(span); + struct hfc_card *hfctmp = dahdi_hfcs->card; + int alreadyrunning; + + if (!hfctmp) { + printk(KERN_INFO hfc_DRIVER_PREFIX + "card %d: " + "no card for span at startup!\n", + hfctmp->cardnum); + } + + alreadyrunning = span->flags & DAHDI_FLAG_RUNNING; + + if (!alreadyrunning) + span->flags |= DAHDI_FLAG_RUNNING; + + return 0; +} + +static int hfc_dahdi_shutdown(struct dahdi_span *span) +{ + return 0; +} + +static int hfc_dahdi_maint(struct dahdi_span *span, int cmd) +{ + return 0; +} + +static int hfc_dahdi_chanconfig(struct file *file, struct dahdi_chan *d_chan, int sigtype) +{ + struct hfc_chan_duplex *chan = d_chan->pvt; + struct hfc_card *card = chan->card; + struct dahdi_hfc *hfccard = card->dahdi_dev; + + if ((sigtype == DAHDI_SIG_HARDHDLC) && (hfccard->sigchan == d_chan)) { + hfccard->sigactive = 0; + atomic_set(&hfccard->hdlc_pending, 0); + } + + return 0; +} + +static int hfc_dahdi_spanconfig(struct file *file, struct dahdi_span *span, + struct dahdi_lineconfig *lc) +{ + span->lineconfig = lc->lineconfig; + + return 0; +} + +static const struct dahdi_span_ops hfc_dahdi_span_ops = { + .owner = THIS_MODULE, + .chanconfig = hfc_dahdi_chanconfig, + .spanconfig = hfc_dahdi_spanconfig, + .startup = hfc_dahdi_startup, + .shutdown = hfc_dahdi_shutdown, + .maint = hfc_dahdi_maint, + .rbsbits = hfc_dahdi_rbsbits, + .open = hfc_dahdi_open, + .close = hfc_dahdi_close, + .ioctl = hfc_dahdi_ioctl, + .hdlc_hard_xmit = hfc_hdlc_hard_xmit +}; + +static int hfc_dahdi_initialize(struct dahdi_hfc *hfccard) +{ + struct hfc_card *hfctmp = hfccard->card; + int i; + + hfccard->ddev = dahdi_create_device(); + if (!hfccard->ddev) + return -ENOMEM; + + memset(&hfccard->span, 0x0, sizeof(struct dahdi_span)); + + /* + * ZTHFC + * + * Cards' and channels' names shall contain "ZTHFC" + * as the dahdi-tools look for this string to guess framing. + * We don't want to modify dahdi-tools only in order to change this. + * + * So we choose for a span name: DAHDI HFC-S formerly known as ZTHFC. :-) + */ + + sprintf(hfccard->span.name, "DAHDI_HFCS_FKA_ZTHFC%d", hfctmp->cardnum + 1); + sprintf(hfccard->span.desc, + "HFC-S PCI A ISDN card %d [%s] ", + hfctmp->cardnum, + hfctmp->nt_mode ? "NT" : "TE"); + hfccard->span.spantype = hfctmp->nt_mode ? SPANTYPE_DIGITAL_BRI_NT : SPANTYPE_DIGITAL_BRI_TE; + hfccard->ddev->manufacturer = "Cologne Chips"; + hfccard->span.flags = 0; + hfccard->span.ops = &hfc_dahdi_span_ops; + hfccard->ddev->devicetype = kasprintf(GFP_KERNEL, "HFC-S PCI-A ISDN"); + hfccard->ddev->location = kasprintf(GFP_KERNEL, "PCI Bus %02d Slot %02d", + hfctmp->pcidev->bus->number, + PCI_SLOT(hfctmp->pcidev->devfn) + 1); + hfccard->span.chans = hfccard->_chans; + hfccard->span.channels = 3; + for (i = 0; i < hfccard->span.channels; i++) + hfccard->_chans[i] = &hfccard->chans[i]; + hfccard->span.deflaw = DAHDI_LAW_ALAW; + hfccard->span.linecompat = DAHDI_CONFIG_AMI | DAHDI_CONFIG_CCS; + hfccard->span.offset = 0; + + for (i = 0; i < hfccard->span.channels; i++) { + memset(&hfccard->chans[i], 0x0, sizeof(struct dahdi_chan)); + + sprintf(hfccard->chans[i].name, + "DAHDI_HFCS_FKA_ZTHFC%d/%d/%d", + hfctmp->cardnum + 1, 0, i + 1); + + printk(KERN_INFO hfc_DRIVER_PREFIX + "card %d: " + "registered %s\n", + hfctmp->cardnum, + hfccard->chans[i].name); + + if (i == hfccard->span.channels - 1) { + hfccard->chans[i].sigcap = DAHDI_SIG_HARDHDLC; + hfccard->sigchan = &hfccard->chans[DAHDI_D]; + hfccard->sigactive = 0; + atomic_set(&hfccard->hdlc_pending, 0); + } else { + hfccard->chans[i].sigcap = + DAHDI_SIG_CLEAR | DAHDI_SIG_DACS; + } + + hfccard->chans[i].chanpos = i + 1; + } + + hfccard->chans[DAHDI_D].readchunk = + hfctmp->chans[D].rx.dahdi_buffer; + + hfccard->chans[DAHDI_D].writechunk = + hfctmp->chans[D].tx.dahdi_buffer; + + hfccard->chans[DAHDI_D].pvt = &hfctmp->chans[D]; + + hfccard->chans[DAHDI_B1].readchunk = + hfctmp->chans[B1].rx.dahdi_buffer; + + hfccard->chans[DAHDI_B1].writechunk = + hfctmp->chans[B1].tx.dahdi_buffer; + + hfccard->chans[DAHDI_B1].pvt = &hfctmp->chans[B1]; + + hfccard->chans[DAHDI_B2].readchunk = + hfctmp->chans[B2].rx.dahdi_buffer; + + hfccard->chans[DAHDI_B2].writechunk = + hfctmp->chans[B2].tx.dahdi_buffer; + + hfccard->chans[DAHDI_B2].pvt = &hfctmp->chans[B2]; + + list_add_tail(&hfccard->span.device_node, &hfccard->ddev->spans); + if (dahdi_register_device(hfccard->ddev, &hfccard->card->pcidev->dev)) { + printk(KERN_NOTICE "Unable to register device with DAHDI\n"); + return -1; + } + + return 0; +} + +static void hfc_dahdi_transmit(struct hfc_chan_simplex *chan) +{ + hfc_fifo_put(chan, chan->dahdi_buffer, DAHDI_CHUNKSIZE); +} + +static void hfc_dahdi_receive(struct hfc_chan_simplex *chan) +{ + hfc_fifo_get(chan, chan->dahdi_buffer, DAHDI_CHUNKSIZE); +} + +/****************************************** + * Interrupt Handler + ******************************************/ + +static void hfc_handle_timer_interrupt(struct hfc_card *card); +static void hfc_handle_state_interrupt(struct hfc_card *card); +static void hfc_handle_processing_interrupt(struct hfc_card *card); +static void hfc_frame_arrived(struct hfc_chan_duplex *chan); +static void hfc_handle_voice(struct hfc_card *card); + +#if (KERNEL_VERSION(2, 6, 24) < LINUX_VERSION_CODE) +static irqreturn_t hfc_interrupt(int irq, void *dev_id) +#else +static irqreturn_t hfc_interrupt(int irq, void *dev_id, struct pt_regs *regs) +#endif +{ + struct hfc_card *card = dev_id; + unsigned long flags; + u8 status, s1, s2; + + if (!card) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "spurious interrupt (IRQ %d)\n", + irq); + return IRQ_NONE; + } + + spin_lock_irqsave(&card->lock, flags); + status = hfc_inb(card, hfc_STATUS); + if (!(status & hfc_STATUS_ANYINT)) { + /* + * maybe we are sharing the irq + */ + spin_unlock_irqrestore(&card->lock, flags); + return IRQ_NONE; + } + + /* We used to ingore the IRQ when the card was in processing + * state but apparently there is no restriction to access the + * card in such state: + * + * Joerg Ciesielski wrote: + * > There is no restriction for the IRQ handler to access + * > HFC-S PCI during processing phase. A IRQ latency of 375 us + * > is also no problem since there are no interrupt sources in + * > HFC-S PCI which must be handled very fast. + * > Due to its deep fifos the IRQ latency can be several ms with + * > out the risk of loosing data. Even the S/T state interrupts + * > must not be handled with a latency less than <5ms. + * > + * > The processing phase only indicates that HFC-S PCI is + * > processing the Fifos as PCI master so that data is read and + * > written in the 32k memory window. But there is no restriction + * > to access data in the memory window during this time. + * + * // if (status & hfc_STATUS_PCI_PROC) { + * // return IRQ_HANDLED; + * // } + */ + + s1 = hfc_inb(card, hfc_INT_S1); + s2 = hfc_inb(card, hfc_INT_S2); + + if (s1 != 0) { + if (s1 & hfc_INTS_TIMER) { + /* + * timer (bit 7) + */ + hfc_handle_timer_interrupt(card); + } + + if (s1 & hfc_INTS_L1STATE) { + /* + * state machine (bit 6) + */ + hfc_handle_state_interrupt(card); + } + + if (s1 & hfc_INTS_DREC) { + /* + * D chan RX (bit 5) + */ + hfc_frame_arrived(&card->chans[D]); + } + + if (s1 & hfc_INTS_B1REC) { + /* + * B1 chan RX (bit 3) + */ + hfc_frame_arrived(&card->chans[B1]); + } + + if (s1 & hfc_INTS_B2REC) { + /* + * B2 chan RX (bit 4) + */ + hfc_frame_arrived(&card->chans[B2]); + } + + if (s1 & hfc_INTS_DTRANS) { + /* + * D chan TX (bit 2) + */ + } + + if (s1 & hfc_INTS_B1TRANS) { + /* + * B1 chan TX (bit 0) + */ + } + + if (s1 & hfc_INTS_B2TRANS) { + /* + * B2 chan TX (bit 1) + */ + } + + } + + if (s2 != 0) { + if (s2 & hfc_M2_PMESEL) { + /* + * kaboom irq (bit 7) + * + * CologneChip says: + * + * the meaning of this fatal error bit is that HFC-S + * PCI as PCI master could not access the PCI bus + * within 125us to finish its data processing. If this + * happens only very seldom it does not cause big + * problems but of course some B-channel or D-channel + * data will be corrupted due to this event. + * + * Unfortunately this bit is only set once after the + * problem occurs and can only be reseted by a + * software reset. That means it is not easily + * possible to check how often this fatal error + * happens. + * + */ + + if (!card->sync_loss_reported) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "card %d: " + "sync lost, pci performance too low!\n", + card->cardnum); + + card->sync_loss_reported = TRUE; + } + } + + if (s2 & hfc_M2_GCI_MON_REC) { + /* + * RxR monitor channel (bit 2) + */ + } + + if (s2 & hfc_M2_GCI_I_CHG) { + /* + * GCI I-change (bit 1) + */ + } + + if (s2 & hfc_M2_PROC_TRANS) { + /* + * processing/non-processing transition (bit 0) + */ + hfc_handle_processing_interrupt(card); + } + + } + + spin_unlock_irqrestore(&card->lock, flags); + + return IRQ_HANDLED; +} + +static void hfc_handle_timer_interrupt(struct hfc_card *card) +{ + if (card->ignore_first_timer_interrupt) { + card->ignore_first_timer_interrupt = FALSE; + return; + } + + if ((card->nt_mode && card->l1_state == 3) || + (!card->nt_mode && card->l1_state == 7)) { + + card->regs.ctmt &= ~hfc_CTMT_TIMER_MASK; + hfc_outb(card, hfc_CTMT, card->regs.ctmt); + + hfc_resume_fifo(card); + } +} + +static void hfc_handle_state_interrupt(struct hfc_card *card) +{ + u8 new_state = hfc_inb(card, hfc_STATES) & hfc_STATES_STATE_MASK; + +#ifdef DEBUG + if (debug_level >= 1) { + printk(KERN_DEBUG hfc_DRIVER_PREFIX + "card %d: " + "layer 1 state = %c%d\n", + card->cardnum, + card->nt_mode ? 'G' : 'F', + new_state); + } +#endif + + if (card->nt_mode) { + /* + * NT mode + */ + + if (new_state == 3) { + /* + * fix to G3 state (see specs) + */ + hfc_outb(card, hfc_STATES, hfc_STATES_LOAD_STATE | 3); + } + + if (new_state == 3 && card->l1_state != 3) + hfc_resume_fifo(card); + + if (new_state != 3 && card->l1_state == 3) + hfc_suspend_fifo(card); + + } else { + if (new_state == 3) { + /* + * Keep L1 up... zaptel & libpri expects + * a always up L1... + * Enable only when using an unpatched libpri + * + * Are we still using unpatched libpri? Is this tested at runtime??? + * Does it only affect zaptel or DAHDI, too? + */ + + if (force_l1_up) { + hfc_outb(card, hfc_STATES, + hfc_STATES_DO_ACTION | + hfc_STATES_ACTIVATE| + hfc_STATES_NT_G2_G3); + } + } + + if (new_state == 7 && card->l1_state != 7) { + /* + * TE is now active, schedule FIFO activation after + * some time, otherwise the first frames are lost + */ + + card->regs.ctmt |= hfc_CTMT_TIMER_50 | + hfc_CTMT_TIMER_CLEAR; + hfc_outb(card, hfc_CTMT, card->regs.ctmt); + + /* + * Activating the timer firest an + * interrupt immediately, we + * obviously need to ignore it + */ + card->ignore_first_timer_interrupt = TRUE; + } + + if (new_state != 7 && card->l1_state == 7) { + /* + * TE has become inactive, disable FIFO + */ + hfc_suspend_fifo(card); + } + } + + card->l1_state = new_state; +} + +static void hfc_handle_processing_interrupt(struct hfc_card *card) +{ + int available_bytes = 0; + + /* + * Synchronize with the first enabled channel + */ + if (card->regs.fifo_en & hfc_FIFOEN_B1RX) + available_bytes = hfc_fifo_used_rx(&card->chans[B1].rx); + if (card->regs.fifo_en & hfc_FIFOEN_B2RX) + available_bytes = hfc_fifo_used_rx(&card->chans[B2].rx); + else + available_bytes = -1; + + if ((available_bytes == -1 && card->ticks == 8) || + available_bytes >= DAHDI_CHUNKSIZE + hfc_RX_FIFO_PRELOAD) { + card->ticks = 0; + + if (available_bytes > DAHDI_CHUNKSIZE*2 + hfc_RX_FIFO_PRELOAD) { + card->late_irqs++; + /* + * we are out of sync, clear fifos, jaw + */ + hfc_clear_fifo_rx(&card->chans[B1].rx); + hfc_clear_fifo_tx(&card->chans[B1].tx); + hfc_clear_fifo_rx(&card->chans[B2].rx); + hfc_clear_fifo_tx(&card->chans[B2].tx); + +#ifdef DEBUG + if (debug_level >= 4) { + printk(KERN_DEBUG hfc_DRIVER_PREFIX + "card %d: " + "late IRQ, %d bytes late\n", + card->cardnum, + available_bytes - + (DAHDI_CHUNKSIZE + + hfc_RX_FIFO_PRELOAD)); + } +#endif + } else { + hfc_handle_voice(card); + } + } + + card->ticks++; +} + + +static void hfc_handle_voice(struct hfc_card *card) +{ + struct dahdi_hfc *hfccard = card->dahdi_dev; + int frame_left, res; + unsigned char buf[hfc_HDLC_BUF_LEN]; + unsigned int size = sizeof(buf) / sizeof(buf[0]); + + + if (card->chans[B1].status != open_voice && + card->chans[B2].status != open_voice) + return; + + dahdi_transmit(&hfccard->span); + + if (card->regs.fifo_en & hfc_FIFOEN_B1TX) + hfc_dahdi_transmit(&card->chans[B1].tx); + if (card->regs.fifo_en & hfc_FIFOEN_B2TX) + hfc_dahdi_transmit(&card->chans[B2].tx); + + /* + * dahdi hdlc frame tx + */ + + if (atomic_read(&hfccard->hdlc_pending)) { + hfc_check_l1_up(card); + res = dahdi_hdlc_getbuf(hfccard->sigchan, buf, &size); + if (size > 0) { + hfccard->sigactive = 1; + memcpy(card->chans[D].tx.ugly_framebuf + + card->chans[D].tx.ugly_framebuf_size, + buf, size); + card->chans[D].tx.ugly_framebuf_size += size; + if (res != 0) { + hfc_fifo_put_frame(&card->chans[D].tx, + card->chans[D].tx.ugly_framebuf, + card->chans[D].tx.ugly_framebuf_size); + ++hfccard->frames_out; + hfccard->sigactive = 0; + card->chans[D].tx.ugly_framebuf_size + = 0; + atomic_dec(&hfccard->hdlc_pending); + } + } + } + /* + * dahdi hdlc frame tx done + */ + + if (card->regs.fifo_en & hfc_FIFOEN_B1RX) + hfc_dahdi_receive(&card->chans[B1].rx); + else + memset(&card->chans[B1].rx.dahdi_buffer, 0x7f, + sizeof(card->chans[B1].rx.dahdi_buffer)); + + if (card->regs.fifo_en & hfc_FIFOEN_B2RX) + hfc_dahdi_receive(&card->chans[B2].rx); + else + memset(&card->chans[B2].rx.dahdi_buffer, 0x7f, + sizeof(card->chans[B1].rx.dahdi_buffer)); + + /* + * Echo cancellation + */ + dahdi_ec_chunk(&hfccard->chans[DAHDI_B1], + card->chans[B1].rx.dahdi_buffer, + card->chans[B1].tx.dahdi_buffer); + dahdi_ec_chunk(&hfccard->chans[DAHDI_B2], + card->chans[B2].rx.dahdi_buffer, + card->chans[B2].tx.dahdi_buffer); + + /* + * dahdi hdlc frame rx + */ + if (hfc_fifo_has_frames(&card->chans[D].rx)) + hfc_frame_arrived(&card->chans[D]); + + if (card->chans[D].rx.ugly_framebuf_size) { + frame_left = card->chans[D].rx.ugly_framebuf_size - + card->chans[D].rx.ugly_framebuf_off ; + if (frame_left > hfc_HDLC_BUF_LEN) { + dahdi_hdlc_putbuf(hfccard->sigchan, + card->chans[D].rx.ugly_framebuf + + card->chans[D].rx.ugly_framebuf_off, + hfc_HDLC_BUF_LEN); + card->chans[D].rx.ugly_framebuf_off += + hfc_HDLC_BUF_LEN; + } else { + dahdi_hdlc_putbuf(hfccard->sigchan, + card->chans[D].rx.ugly_framebuf + + card->chans[D].rx.ugly_framebuf_off, + frame_left); + dahdi_hdlc_finish(hfccard->sigchan); + card->chans[D].rx.ugly_framebuf_size = 0; + card->chans[D].rx.ugly_framebuf_off = 0; + } + } + /* + * dahdi hdlc frame rx done + */ + + if (hfccard->span.flags & DAHDI_FLAG_RUNNING) + dahdi_receive(&hfccard->span); + +} + +static void hfc_frame_arrived(struct hfc_chan_duplex *chan) +{ + struct hfc_card *card = chan->card; + int antiloop = 16; + struct sk_buff *skb; + + while (hfc_fifo_has_frames(&chan->rx) && --antiloop) { + int frame_size = hfc_fifo_get_frame_size(&chan->rx); + + if (frame_size < 3) { +#ifdef DEBUG + if (debug_level >= 2) + printk(KERN_DEBUG hfc_DRIVER_PREFIX + "card %d: " + "chan %s: " + "invalid frame received, " + "just %d bytes\n", + card->cardnum, + chan->name, + frame_size); +#endif + + hfc_fifo_drop_frame(&chan->rx); + + + continue; + } else if (frame_size == 3) { +#ifdef DEBUG + if (debug_level >= 2) + printk(KERN_DEBUG hfc_DRIVER_PREFIX + "card %d: " + "chan %s: " + "empty frame received\n", + card->cardnum, + chan->name); +#endif + + hfc_fifo_drop_frame(&chan->rx); + + + continue; + } + + if (chan->open_by_dahdi && + card->chans[D].rx.ugly_framebuf_size) { + + /* + * We have to wait for Dahdi to transmit the + * frame... wait for next time + */ + + break; + } + + skb = dev_alloc_skb(frame_size - 3); + + if (!skb) { + printk(KERN_ERR hfc_DRIVER_PREFIX + "card %d: " + "chan %s: " + "cannot allocate skb: frame dropped\n", + card->cardnum, + chan->name); + + hfc_fifo_drop_frame(&chan->rx); + + + continue; + } + + + /* + * HFC does the checksum + */ +#ifndef CHECKSUM_HW + skb->ip_summed = CHECKSUM_COMPLETE; +#else + skb->ip_summed = CHECKSUM_HW; +#endif + + if (chan->open_by_dahdi) { + card->chans[D].rx.ugly_framebuf_size = frame_size - 1; + + if (hfc_fifo_get_frame(&card->chans[D].rx, + card->chans[D].rx.ugly_framebuf, + frame_size - 1) == -1) { + dev_kfree_skb(skb); + continue; + } + + memcpy(skb_put(skb, frame_size - 3), + card->chans[D].rx.ugly_framebuf, + frame_size - 3); + } else { + if (hfc_fifo_get_frame(&chan->rx, + skb_put(skb, frame_size - 3), + frame_size - 3) == -1) { + dev_kfree_skb(skb); + continue; + } + } + } + + if (!antiloop) + printk(KERN_CRIT hfc_DRIVER_PREFIX + "card %d: " + "Infinite loop detected\n", + card->cardnum); +} + +/****************************************** + * Module initialization and cleanup + ******************************************/ + +static int __devinit hfc_probe(struct pci_dev *pci_dev, + const struct pci_device_id *ent) +{ + static int cardnum; + int err; + int i; + + struct hfc_card *card = NULL; + struct dahdi_hfc *dahdi_hfcs = NULL; + card = kmalloc(sizeof(struct hfc_card), GFP_KERNEL); + if (!card) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "unable to kmalloc!\n"); + err = -ENOMEM; + goto err_alloc_hfccard; + } + + memset(card, 0x00, sizeof(struct hfc_card)); + card->cardnum = cardnum; + card->pcidev = pci_dev; + spin_lock_init(&card->lock); + + pci_set_drvdata(pci_dev, card); + + err = pci_enable_device(pci_dev); + if (err) + goto err_pci_enable_device; + + err = pci_set_dma_mask(pci_dev, PCI_DMA_32BIT); + if (err) { + printk(KERN_ERR hfc_DRIVER_PREFIX + "card %d: " + "No suitable DMA configuration available.\n", + card->cardnum); + goto err_pci_set_dma_mask; + } + + pci_write_config_word(pci_dev, PCI_COMMAND, PCI_COMMAND_MEMORY); + err = pci_request_regions(pci_dev, hfc_DRIVER_NAME); + if (err) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "card %d: " + "cannot request I/O memory region\n", + card->cardnum); + goto err_pci_request_regions; + } + + pci_set_master(pci_dev); + + if (!pci_dev->irq) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "card %d: " + "no irq!\n", + card->cardnum); + err = -ENODEV; + goto err_noirq; + } + + card->io_bus_mem = pci_resource_start(pci_dev, 1); + if (!card->io_bus_mem) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "card %d: " + "no iomem!\n", + card->cardnum); + err = -ENODEV; + goto err_noiobase; + } + + card->io_mem = ioremap(card->io_bus_mem, hfc_PCI_MEM_SIZE); + if (!(card->io_mem)) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "card %d: " + "cannot ioremap I/O memory\n", + card->cardnum); + err = -ENODEV; + goto err_ioremap; + } + + /* + * pci_alloc_consistent guarantees alignment + * (Documentation/DMA-mapping.txt) + */ + card->fifo_mem = pci_alloc_consistent(pci_dev, + hfc_FIFO_SIZE, &card->fifo_bus_mem); + if (!card->fifo_mem) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "card %d: " + "unable to allocate FIFO DMA memory!\n", + card->cardnum); + err = -ENOMEM; + goto err_alloc_fifo; + } + + memset(card->fifo_mem, 0x00, hfc_FIFO_SIZE); + + card->fifos = card->fifo_mem; + + pci_write_config_dword(card->pcidev, hfc_PCI_MWBA, card->fifo_bus_mem); + + err = request_irq(card->pcidev->irq, &hfc_interrupt, + +#if (KERNEL_VERSION(2, 6, 23) < LINUX_VERSION_CODE) + IRQF_SHARED, hfc_DRIVER_NAME, card); +#else + SA_SHIRQ, hfc_DRIVER_NAME, card); +#endif + + if (err) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "card %d: " + "unable to register irq\n", + card->cardnum); + goto err_request_irq; + } + + card->nt_mode = FALSE; + + if (modes & (1 << card->cardnum)) + card->nt_mode = TRUE; + + for (i = 0; i < nt_modes_count; i++) { + if (nt_modes[i] == card->cardnum) + card->nt_mode = TRUE; + } + + /* + * D Channel + */ + card->chans[D].card = card; + card->chans[D].name = "D"; + card->chans[D].status = free; + card->chans[D].number = D; + spin_lock_init(&card->chans[D].lock); + + card->chans[D].rx.chan = &card->chans[D]; + card->chans[D].rx.fifo_base = card->fifos + 0x4000; + card->chans[D].rx.z_base = card->fifos + 0x4000; + card->chans[D].rx.z1_base = card->fifos + 0x6080; + card->chans[D].rx.z2_base = card->fifos + 0x6082; + card->chans[D].rx.z_min = 0x0000; + card->chans[D].rx.z_max = 0x01FF; + card->chans[D].rx.f_min = 0x10; + card->chans[D].rx.f_max = 0x1F; + card->chans[D].rx.f1 = card->fifos + 0x60a0; + card->chans[D].rx.f2 = card->fifos + 0x60a1; + card->chans[D].rx.fifo_size = card->chans[D].rx.z_max + - card->chans[D].rx.z_min + 1; + card->chans[D].rx.f_num = card->chans[D].rx.f_max + - card->chans[D].rx.f_min + 1; + + card->chans[D].tx.chan = &card->chans[D]; + card->chans[D].tx.fifo_base = card->fifos + 0x0000; + card->chans[D].tx.z_base = card->fifos + 0x0000; + card->chans[D].tx.z1_base = card->fifos + 0x2080; + card->chans[D].tx.z2_base = card->fifos + 0x2082; + card->chans[D].tx.z_min = 0x0000; + card->chans[D].tx.z_max = 0x01FF; + card->chans[D].tx.f_min = 0x10; + card->chans[D].tx.f_max = 0x1F; + card->chans[D].tx.f1 = card->fifos + 0x20a0; + card->chans[D].tx.f2 = card->fifos + 0x20a1; + card->chans[D].tx.fifo_size = card->chans[D].tx.z_max - + card->chans[D].tx.z_min + 1; + card->chans[D].tx.f_num = card->chans[D].tx.f_max - + card->chans[D].tx.f_min + 1; + + /* + * B1 Channel + */ + card->chans[B1].card = card; + card->chans[B1].name = "B1"; + card->chans[B1].status = free; + card->chans[B1].number = B1; + card->chans[B1].protocol = 0; + spin_lock_init(&card->chans[B1].lock); + + card->chans[B1].rx.chan = &card->chans[B1]; + card->chans[B1].rx.fifo_base = card->fifos + 0x4200; + card->chans[B1].rx.z_base = card->fifos + 0x4000; + card->chans[B1].rx.z1_base = card->fifos + 0x6000; + card->chans[B1].rx.z2_base = card->fifos + 0x6002; + card->chans[B1].rx.z_min = 0x0200; + card->chans[B1].rx.z_max = 0x1FFF; + card->chans[B1].rx.f_min = 0x00; + card->chans[B1].rx.f_max = 0x1F; + card->chans[B1].rx.f1 = card->fifos + 0x6080; + card->chans[B1].rx.f2 = card->fifos + 0x6081; + card->chans[B1].rx.fifo_size = card->chans[B1].rx.z_max - + card->chans[B1].rx.z_min + 1; + card->chans[B1].rx.f_num = card->chans[B1].rx.f_max - + card->chans[B1].rx.f_min + 1; + + card->chans[B1].tx.chan = &card->chans[B1]; + card->chans[B1].tx.fifo_base = card->fifos + 0x0200; + card->chans[B1].tx.z_base = card->fifos + 0x0000; + card->chans[B1].tx.z1_base = card->fifos + 0x2000; + card->chans[B1].tx.z2_base = card->fifos + 0x2002; + card->chans[B1].tx.z_min = 0x0200; + card->chans[B1].tx.z_max = 0x1FFF; + card->chans[B1].tx.f_min = 0x00; + card->chans[B1].tx.f_max = 0x1F; + card->chans[B1].tx.f1 = card->fifos + 0x2080; + card->chans[B1].tx.f2 = card->fifos + 0x2081; + card->chans[B1].tx.fifo_size = card->chans[B1].tx.z_max - + card->chans[B1].tx.z_min + 1; + card->chans[B1].tx.f_num = card->chans[B1].tx.f_max - + card->chans[B1].tx.f_min + 1; + + /* + * B2 Channel + */ + card->chans[B2].card = card; + card->chans[B2].name = "B2"; + card->chans[B2].status = free; + card->chans[B2].number = B2; + card->chans[B2].protocol = 0; + spin_lock_init(&card->chans[B2].lock); + + card->chans[B2].rx.chan = &card->chans[B2]; + card->chans[B2].rx.fifo_base = card->fifos + 0x6200, + card->chans[B2].rx.z_base = card->fifos + 0x6000; + card->chans[B2].rx.z1_base = card->fifos + 0x6100; + card->chans[B2].rx.z2_base = card->fifos + 0x6102; + card->chans[B2].rx.z_min = 0x0200; + card->chans[B2].rx.z_max = 0x1FFF; + card->chans[B2].rx.f_min = 0x00; + card->chans[B2].rx.f_max = 0x1F; + card->chans[B2].rx.f1 = card->fifos + 0x6180; + card->chans[B2].rx.f2 = card->fifos + 0x6181; + card->chans[B2].rx.fifo_size = card->chans[B2].rx.z_max - + card->chans[B2].rx.z_min + 1; + card->chans[B2].rx.f_num = card->chans[B2].rx.f_max - + card->chans[B2].rx.f_min + 1; + + card->chans[B2].tx.chan = &card->chans[B2]; + card->chans[B2].tx.fifo_base = card->fifos + 0x2200; + card->chans[B2].tx.z_base = card->fifos + 0x2000; + card->chans[B2].tx.z1_base = card->fifos + 0x2100; + card->chans[B2].tx.z2_base = card->fifos + 0x2102; + card->chans[B2].tx.z_min = 0x0200; + card->chans[B2].tx.z_max = 0x1FFF; + card->chans[B2].tx.f_min = 0x00; + card->chans[B2].tx.f_max = 0x1F; + card->chans[B2].tx.f1 = card->fifos + 0x2180; + card->chans[B2].tx.f2 = card->fifos + 0x2181; + card->chans[B2].tx.fifo_size = card->chans[B2].tx.z_max - + card->chans[B2].tx.z_min + 1; + card->chans[B2].tx.f_num = card->chans[B2].tx.f_max - + card->chans[B2].tx.f_min + 1; + + /* + * All done + */ + + dahdi_hfcs = kmalloc(sizeof(struct dahdi_hfc), GFP_KERNEL); + if (!dahdi_hfcs) { + printk(KERN_CRIT hfc_DRIVER_PREFIX + "unable to kmalloc!\n"); + goto err_request_irq; + } + memset(dahdi_hfcs, 0x0, sizeof(struct dahdi_hfc)); + + dahdi_hfcs->card = card; + hfc_dahdi_initialize(dahdi_hfcs); + card->dahdi_dev = dahdi_hfcs; + +#ifdef CONFIG_PROC_FS + snprintf(card->proc_dir_name, + sizeof(card->proc_dir_name), + "%d", card->cardnum); + card->proc_dir = proc_mkdir(card->proc_dir_name, hfc_proc_dahdi_hfcs_dir); + SET_PROC_DIRENTRY_OWNER(card->proc_dir); +#endif /* CONFIG_PROC_FS */ + + hfc_resetCard(card); + + printk(KERN_INFO hfc_DRIVER_PREFIX + "card %d configured for %s mode at mem %#lx (0x%p) IRQ %u\n", + card->cardnum, + card->nt_mode ? "NT" : "TE", + card->io_bus_mem, + card->io_mem, + card->pcidev->irq); + + cardnum++; + + return 0; + +err_request_irq: + pci_free_consistent(pci_dev, hfc_FIFO_SIZE, + card->fifo_mem, card->fifo_bus_mem); +err_alloc_fifo: + iounmap(card->io_mem); +err_ioremap: +err_noiobase: +err_noirq: + pci_release_regions(pci_dev); +err_pci_request_regions: +err_pci_set_dma_mask: +err_pci_enable_device: + kfree(card); +err_alloc_hfccard: + return err; +} + +static void __devexit hfc_remove(struct pci_dev *pci_dev) +{ + struct hfc_card *card = pci_get_drvdata(pci_dev); + + + printk(KERN_INFO hfc_DRIVER_PREFIX + "card %d: " + "shutting down card at %p.\n", + card->cardnum, + card->io_mem); + + if (!card) { + return; + } + + hfc_softreset(card); + + dahdi_unregister_device(card->dahdi_dev->ddev); + + + /* + * disable memio and bustmaster + */ + pci_write_config_word(pci_dev, PCI_COMMAND, 0); + +#ifdef CONFIG_PROC_FS +/* +BUG: these proc entries just cause Call traces, so removed. + remove_proc_entry("bufs", card->proc_dir); + remove_proc_entry("fifos", card->proc_dir); + remove_proc_entry("info", card->proc_dir); +*/ + remove_proc_entry(card->proc_dir_name, hfc_proc_dahdi_hfcs_dir); +#endif /* CONFIG_PROC_FS */ + + free_irq(pci_dev->irq, card); + + pci_free_consistent(pci_dev, hfc_FIFO_SIZE, + card->fifo_mem, card->fifo_bus_mem); + + iounmap(card->io_mem); + + pci_release_regions(pci_dev); + + pci_disable_device(pci_dev); + + kfree(card); +} + +/****************************************** + * Module stuff + ******************************************/ + +static int __init hfc_init_module(void) +{ + int ret; + + printk(KERN_INFO hfc_DRIVER_PREFIX + hfc_DRIVER_STRING " loading\n"); +#ifdef DEBUG +printk(KERN_INFO hfc_DRIVER_PREFIX "Check /var/log/kern-debug.log for debugging output level %d.", debug_level); +printk(KERN_DEBUG hfc_DRIVER_PREFIX "base.c is debugging."); +#endif + +#ifdef CONFIG_PROC_FS +#if (KERNEL_VERSION(2, 6, 26) <= LINUX_VERSION_CODE) + hfc_proc_dahdi_hfcs_dir = proc_mkdir(hfc_DRIVER_NAME, NULL); +#else + hfc_proc_dahdi_hfcs_dir = proc_mkdir(hfc_DRIVER_NAME, proc_root_driver); +#endif +#endif /* CONFIG_PROC_FS */ + + ret = dahdi_pci_module(&hfc_driver); + return ret; +} + +module_init(hfc_init_module); + +static void __exit hfc_module_exit(void) +{ + pci_unregister_driver(&hfc_driver); + +#ifdef CONFIG_PROC_FS +#if (KERNEL_VERSION(2, 6, 26) <= LINUX_VERSION_CODE) + remove_proc_entry(hfc_DRIVER_NAME, NULL); +#else + remove_proc_entry(hfc_DRIVER_NAME, proc_root_driver); +#endif +#endif /* CONFIG_PROC_FS */ + + printk(KERN_INFO hfc_DRIVER_PREFIX + hfc_DRIVER_STRING " unloaded\n"); +} + +module_exit(hfc_module_exit); + +#endif + +MODULE_DESCRIPTION(hfc_DRIVER_DESCR); +MODULE_AUTHOR("Jens Wilke <jw_...@he...>, " + "Daniele (Vihai) Orlandi <da...@or...>, " + "Jose A. Deniz <od...@ho...>"); +MODULE_ALIAS("dahdi_hfcs"); +#ifdef MODULE_LICENSE +MODULE_LICENSE("GPL"); +#endif + + +module_param(modes, int, 0444); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10) +module_param_array(nt_modes, int, &nt_modes_count, 0444); +#else +module_param_array(nt_modes, int, nt_modes_count, 0444); +#endif + +module_param(force_l1_up, int, 0444); +#ifdef DEBUG +module_param(debug_level, int, 0444); +#endif + +MODULE_PARM_DESC(modes, "[Deprecated] bit-mask to configure NT mode"); +MODULE_PARM_DESC(nt_modes, + "Comma-separated list of card IDs to configure in NT mode"); +MODULE_PARM_DESC(force_l1_up, "Don't allow L1 to go down"); +#ifdef DEBUG +MODULE_PARM_DESC(debug_level, "Debug verbosity level"); +#endif Added: branches/1.0/package/dahdi-linux/hfcs-2.10/dahdi_hfcs.h =================================================================== --- branches/1.0/package/dahdi-linux/hfcs-2.10/dahdi_hfcs.h (rev 0) +++ branches/1.0/package/dahdi-linux/hfcs-2.10/dahdi_hfcs.h 2017-06-19 13:15:06 UTC (rev 8401) @@ -0,0 +1,424 @@ +/* + * dahdi_hfcs.h - Dahdi driver for HFC-S PCI A based ISDN BRI cards + * + * Dahdi port by Jose A. Deniz <od...@ho...> + * + * Copyright (C) 2009 Jose A. Deniz + * Copyright (C) 2006 headissue GmbH; Jens Wilke + * Copyright (C) 2004 Daniele Orlandi + * Copyright (C) 2002, 2003, 2004, Junghanns.NET GmbH + * + * Jens Wilke <jw_...@he...> + * + * Orginal author of this code is + * Daniele "Vihai" Orlandi <da...@or...> + * + * Major rewrite of the driver made by + * Klaus-Peter Junghanns <kp...@ju...> + * + * This program is free software and may be modified and + * distributed under the terms of the GNU Public License. + * + */ + +#ifndef _HFC_ZAPHFC_H +#define _HFC_ZAPHFC_H + +#include <asm/io.h> + +#define hfc_DRIVER_NAME "dahdi_hfcs" +#define hfc_DRIVER_PREFIX hfc_DRIVER_NAME ": " +#define hfc_DRIVER_DESCR "HFC-S PCI A ISDN" +#define hfc_DRIVER_VERSION "1.42" +#define hfc_DRIVER_STRING hfc_DRIVER_DESCR " (V" hfc_DRIVER_VERSION ")" + +#define hfc_MAX_BOARDS 32 + +#ifndef PCI_DMA_32BIT +#define PCI_DMA_32BIT 0x00000000ffffffffULL +#endif + +#ifndef PCI_VENDOR_ID_SITECOM +#define PCI_VENDOR_ID_SITECOM 0x182D +#endif + +#ifndef PCI_DEVICE_ID_SITECOM_3069 +#define PCI_DEVICE_ID_SITECOM_3069 0x3069 +#endif + +#define hfc_RESET_DELAY 20 + +#define hfc_CLKDEL_TE 0x0f /* CLKDEL in TE mode */ +#define hfc_CLKDEL_NT 0x6c /* CLKDEL in NT mode */ + +/* PCI memory mapped I/O */ + +#define hfc_PCI_MEM_SIZE 0x0100 +#define hfc_PCI_MWBA 0x80 + +/* GCI/IOM bus monitor registers */ + +#define hfc_C_I 0x08 +#define hfc_TRxR 0x0C +#define hfc_MON1_D 0x28 +#define hfc_MON2_D 0x2C + + +/* GCI/IOM bus timeslot registers */ + +#define hfc_B1_SSL 0x80 +#define hfc_B2_SSL 0x84 +#define hfc_AUX1_SSL 0x88 +#define hfc_AUX2_SSL 0x8C +#define hfc_B1_RSL 0x90 +#define hfc_B2_RSL 0x94 +#define hfc_AUX1_RSL 0x98 +#define hfc_AUX2_RSL 0x9C + +/* GCI/IOM bus data registers */ + +#define hfc_B1_D 0xA0 +#define hfc_B2_D 0xA4 +#define hfc_AUX1_D 0xA8 +#define hfc_AUX2_D 0xAC + +/* GCI/IOM bus configuration registers */ + +#define hfc_MST_EMOD 0xB4 +#define hfc_MST_MODE 0xB8 +#define hfc_CONNECT 0xBC + + +/* Interrupt and status registers */ + +#define hfc_FIFO_EN 0x44 +#define hfc_TRM 0x48 +#define hfc_B_MODE 0x4C +#define hfc_CHIP_ID 0x58 +#define hfc_CIRM 0x60 +#define hfc_CTMT 0x64 +#define hfc_INT_M1 0x68 +#define hfc_INT_M2 0x6C +#define hfc_INT_S1 0x78 +#define hfc_INT_S2 0x7C +#define hfc_STATUS 0x70 + +/* S/T section registers */ + +#define hfc_STATES 0xC0 +#define hfc_SCTRL 0xC4 +#define hfc_SCTRL_E 0xC8 +#define hfc_SCTRL_R 0xCC +#define hfc_SQ 0xD0 +#define hfc_CLKDEL 0xDC +#define hfc_B1_REC 0xF0 +#define hfc_B1_SEND 0xF0 +#define hfc_B2_REC 0xF4 +#define hfc_B2_SEND 0xF4 +#define hfc_D_REC 0xF8 +#define hfc_D_SEND 0xF8 +#define hfc_E_REC 0xFC + +/* Bits and values in various HFC PCI registers */ + +/* bits in status register (READ) */ +#define hfc_STATUS_PCI_PROC 0x02 +#define hfc_STATUS_NBUSY 0x04 +#define hfc_STATUS_TIMER_ELAP 0x10 +#define hfc_STATUS_STATINT 0x20 +#define hfc_STATUS_FRAMEINT 0x40 +#define hfc_STATUS_ANYINT 0x80 + +/* bits in CTMT (Write) */ +#define hfc_CTMT_TRANSB1 0x01 +#define hfc_CTMT_TRANSB2 0x02 +#define hfc_CTMT_TIMER_CLEAR 0x80 +#define hfc_CTMT_TIMER_MASK 0x1C +#define hfc_CTMT_TIMER_3_125 (0x01 << 2) +#define hfc_CTMT_TIMER_6_25 (0x02 << 2) +#define hfc_CTMT_TIMER_12_5 (0x03 << 2) +#define hfc_CTMT_TIMER_25 (0x04 << 2) +#define hfc_CTMT_TIMER_50 (0x05 << 2) +#define hfc_CTMT_TIMER_400 (0x06 << 2) +#define hfc_CTMT_TIMER_800 (0x07 << 2) +#define hfc_CTMT_AUTO_TIMER 0x20 + +/* bits in CIRM (Write) */ +#define hfc_CIRM_AUX_MSK 0x07 +#define hfc_CIRM_RESET 0x08 +#define hfc_CIRM_B1_REV 0x40 +#define hfc_CIRM_B2_REV 0x80 + +/* bits in INT_M1 and INT_S1 */ +#define hfc_INTS_B1TRANS 0x01 +#define hfc_INTS_B2TRANS 0x02 +#define hfc_INTS_DTRANS 0x04 +#define hfc_INTS_B1REC 0x08 +#define hfc_INTS_B2REC 0x10 +#define hfc_INTS_DREC 0x20 +#define hfc_INTS_L1STATE 0x40 +#define hfc_INTS_TIMER 0x80 + +/* bits in INT_M2 */ +#define hfc_M2_PROC_TRANS 0x01 +#define hfc_M2_GCI_I_CHG 0x02 +#define hfc_M2_GCI_MON_REC 0x04 +#define hfc_M2_IRQ_ENABLE 0x08 +#define hfc_M2_PMESEL 0x80 + +/* bits in STATES */ +#define hfc_STATES_STATE_MASK 0x0F +#define hfc_STATES_LOAD_STATE 0x10 +#define hfc_STATES_ACTIVATE 0x20 +#define hfc_STATES_DO_ACTION 0x40 +#define hfc_STATES_NT_G2_G3 0x80 + +/* bits in HFCD_MST_MODE */ +#define hfc_MST_MODE_MASTER 0x01 +#define hfc_MST_MODE_SLAVE 0x00 +/* remaining bits are for codecs control */ + +/* bits in HFCD_SCTRL */ +#define hfc_SCTRL_B1_ENA 0x01 +#define hfc_SCTRL_B2_ENA 0x02 +#define hfc_SCTRL_MODE_TE 0x00 +#define hfc_SCTRL_MODE_NT 0x04 +#define hfc_SCTRL_LOW_PRIO 0x08 +#define hfc_SCTRL_SQ_ENA 0x10 +#define hfc_SCTRL_TEST 0x20 +#define hfc_SCTRL_NONE_CAP 0x40 +#define hfc_SCTRL_PWR_DOWN 0x80 + +/* bits in SCTRL_E */ +#define hfc_SCTRL_E_AUTO_AWAKE 0x01 +#define hfc_SCTRL_E_DBIT_1 0x04 +#define hfc_SCTRL_E_IGNORE_COL 0x08 +#define hfc_SCTRL_E_CHG_B1_B2 0x80 + +/* bits in SCTRL_R */ +#define hfc_SCTRL_R_B1_ENA 0x01 +#define hfc_SCTRL_R_B2_ENA 0x02 + +/* bits in FIFO_EN register */ +#define hfc_FIFOEN_B1TX 0x01 +#define hfc_FIFOEN_B1RX 0x02 +#define hfc_FIFOEN_B2TX 0x04 +#define hfc_FIFOEN_B2RX 0x08 +#define hfc_FIFOEN_DTX 0x10 +#define hfc_FIFOEN_DRX 0x20 + +#define hfc_FIFOEN_B1 (hfc_FIFOEN_B1TX|hfc_FIFOEN_B1RX) +#define hfc_FIFOEN_B2 (hfc_FIFOEN_B2TX|hfc_FIFOEN_B2RX) +#define hfc_FIFOEN_D (hfc_FIFOEN_DTX|hfc_FIFOEN_DRX) + +/* bits in the CONNECT register */ +#define hfc_CONNECT_B1_HFC_from_ST 0x00 +#define hfc_CONNECT_B1_HFC_from_GCI 0x01 +#define hfc_CONNECT_B1_ST_from_HFC 0x00 +#define hfc_CONNECT_B1_ST_from_GCI 0x02 +#define hfc_CONNECT_B1_GCI_from_HFC 0x00 +#define hfc_CONNECT_B1_GCI_from_ST 0x04 + +#define hfc_CONNECT_B2_HFC_from_ST 0x00 +#define hfc_CONNECT_B2_HFC_from_GCI 0x08 +#define hfc_CONNECT_B2_ST_from_HFC 0x00 +#define hfc_CONNECT_B2_ST_from_GCI 0x10 +#define hfc_CONNECT_B2_GCI_from_HFC 0x00 +#define hfc_CONNECT_B2_GCI_from_ST 0x20 + +/* bits in the TRM register */ +#define hfc_TRM_TRANS_INT_00 0x00 +#define hfc_TRM_TRANS_INT_01 0x01 +#define hfc_TRM_TRANS_INT_10 0x02 +#define hfc_TRM_TRANS_INT_11 0x04 +#define hfc_TRM_ECHO 0x20 +#define hfc_TRM_B1_PLUS_B2 0x40 +#define hfc_T... [truncated message content] |
From: <abe...@us...> - 2017-06-19 15:31:17
|
Revision: 8403 http://sourceforge.net/p/astlinux/code/8403 Author: abelbeck Date: 2017-06-19 15:31:15 +0000 (Mon, 19 Jun 2017) Log Message: ----------- asterisk-fop2, version bump to 2.31.10 Modified Paths: -------------- branches/1.0/package/asterisk-fop2/asterisk-fop2.mk branches/1.0/project/astlinux/target_skeleton/usr/sbin/upgrade-package Modified: branches/1.0/package/asterisk-fop2/asterisk-fop2.mk =================================================================== --- branches/1.0/package/asterisk-fop2/asterisk-fop2.mk 2017-06-19 15:10:14 UTC (rev 8402) +++ branches/1.0/package/asterisk-fop2/asterisk-fop2.mk 2017-06-19 15:31:15 UTC (rev 8403) @@ -3,7 +3,7 @@ # asterisk-fop2 # ############################################################# -ASTERISK_FOP2_VERSION = 2.31.09 +ASTERISK_FOP2_VERSION = 2.31.10 ASTERISK_FOP2_SOURCE = fop2-$(ASTERISK_FOP2_VERSION)-debian-i386.tgz ASTERISK_FOP2_SITE = http://download2.fop2.com # Note: be sure to edit "project/astlinux/target_skeleton/usr/sbin/upgrade-package" on version change Modified: branches/1.0/project/astlinux/target_skeleton/usr/sbin/upgrade-package =================================================================== --- branches/1.0/project/astlinux/target_skeleton/usr/sbin/upgrade-package 2017-06-19 15:10:14 UTC (rev 8402) +++ branches/1.0/project/astlinux/target_skeleton/usr/sbin/upgrade-package 2017-06-19 15:31:15 UTC (rev 8403) @@ -248,7 +248,7 @@ if ! RAM_needed_MB 475; then finish $RED "Not enough RAM installed. Minimum: 512 MB, Recommended: 1024+ MB" fi - SRC_URL="https://files.astlinux-project.org/fop2-2.31.09-debian-$(uname -m | sed -e 's/i.86/i386/').tgz" + SRC_URL="https://files.astlinux-project.org/fop2-2.31.10-debian-$(uname -m | sed -e 's/i.86/i386/').tgz" ;; show) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-07-01 20:02:01
|
Revision: 8421 http://sourceforge.net/p/astlinux/code/8421 Author: abelbeck Date: 2017-07-01 20:01:58 +0000 (Sat, 01 Jul 2017) Log Message: ----------- acme, enable the acme package for default builds Modified Paths: -------------- branches/1.0/astlinux-ast11.config branches/1.0/astlinux-ast13.config branches/1.0/package/acme/Config.in branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf branches/1.0/x86_64-configs/astlinux-ast11.config branches/1.0/x86_64-configs/astlinux-ast13.config Modified: branches/1.0/astlinux-ast11.config =================================================================== --- branches/1.0/astlinux-ast11.config 2017-07-01 13:31:24 UTC (rev 8420) +++ branches/1.0/astlinux-ast11.config 2017-07-01 20:01:58 UTC (rev 8421) @@ -517,7 +517,7 @@ # # Crypto # -# BR2_PACKAGE_ACME is not set +BR2_PACKAGE_ACME=y # BR2_PACKAGE_BEECRYPT is not set BR2_PACKAGE_CA_CERTIFICATES=y # BR2_PACKAGE_GNUTLS is not set Modified: branches/1.0/astlinux-ast13.config =================================================================== --- branches/1.0/astlinux-ast13.config 2017-07-01 13:31:24 UTC (rev 8420) +++ branches/1.0/astlinux-ast13.config 2017-07-01 20:01:58 UTC (rev 8421) @@ -517,7 +517,7 @@ # # Crypto # -# BR2_PACKAGE_ACME is not set +BR2_PACKAGE_ACME=y # BR2_PACKAGE_BEECRYPT is not set BR2_PACKAGE_CA_CERTIFICATES=y # BR2_PACKAGE_GNUTLS is not set Modified: branches/1.0/package/acme/Config.in =================================================================== --- branches/1.0/package/acme/Config.in 2017-07-01 13:31:24 UTC (rev 8420) +++ branches/1.0/package/acme/Config.in 2017-07-01 20:01:58 UTC (rev 8421) @@ -3,5 +3,6 @@ depends on BR2_PACKAGE_OPENSSL help An ACME (Automated Certificate Management Environment) protocol client + Managed using the "acme-client" command. https://github.com/Neilpang/acme.sh Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf =================================================================== --- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-07-01 13:31:24 UTC (rev 8420) +++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-07-01 20:01:58 UTC (rev 8421) @@ -1057,6 +1057,15 @@ possible abuse or criminal activity, system personnel may provide the results of such monitoring to appropriate officials." +## Automatic Certificate Management Environment (ACME) +## For use with "Let's Encrypt" using the "acme-client" command. +## Note: Only DNS challenge validation is supported within AstLinux. +## +## Deploy service types: lighttpd, asterisk and prosody +#ACME_SERVICE="lighttpd" # space separated list of deploy service types +## Registration email address, used for expiry notifications (optional) +#ACME_ACCOUNT_EMAIL="ac...@my..." + ## International E.164 dialing prefixes. Currently used by dialproxy.php ## Define 4 ~ (tilde) separated arguments (all optional) ## Arg1: InternationalPrefix Modified: branches/1.0/x86_64-configs/astlinux-ast11.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast11.config 2017-07-01 13:31:24 UTC (rev 8420) +++ branches/1.0/x86_64-configs/astlinux-ast11.config 2017-07-01 20:01:58 UTC (rev 8421) @@ -498,7 +498,7 @@ # # Crypto # -# BR2_PACKAGE_ACME is not set +BR2_PACKAGE_ACME=y # BR2_PACKAGE_BEECRYPT is not set BR2_PACKAGE_CA_CERTIFICATES=y # BR2_PACKAGE_GNUTLS is not set Modified: branches/1.0/x86_64-configs/astlinux-ast13.config =================================================================== --- branches/1.0/x86_64-configs/astlinux-ast13.config 2017-07-01 13:31:24 UTC (rev 8420) +++ branches/1.0/x86_64-configs/astlinux-ast13.config 2017-07-01 20:01:58 UTC (rev 8421) @@ -498,7 +498,7 @@ # # Crypto # -# BR2_PACKAGE_ACME is not set +BR2_PACKAGE_ACME=y # BR2_PACKAGE_BEECRYPT is not set BR2_PACKAGE_CA_CERTIFICATES=y # BR2_PACKAGE_GNUTLS is not set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-07-10 21:25:00
|
Revision: 8433 http://sourceforge.net/p/astlinux/code/8433 Author: abelbeck Date: 2017-07-10 21:24:57 +0000 (Mon, 10 Jul 2017) Log Message: ----------- asterisk-fop2, version bump to 2.31.11 Modified Paths: -------------- branches/1.0/package/asterisk-fop2/asterisk-fop2.mk branches/1.0/project/astlinux/target_skeleton/usr/sbin/upgrade-package Modified: branches/1.0/package/asterisk-fop2/asterisk-fop2.mk =================================================================== --- branches/1.0/package/asterisk-fop2/asterisk-fop2.mk 2017-07-10 21:01:07 UTC (rev 8432) +++ branches/1.0/package/asterisk-fop2/asterisk-fop2.mk 2017-07-10 21:24:57 UTC (rev 8433) @@ -3,7 +3,7 @@ # asterisk-fop2 # ############################################################# -ASTERISK_FOP2_VERSION = 2.31.10 +ASTERISK_FOP2_VERSION = 2.31.11 ASTERISK_FOP2_SOURCE = fop2-$(ASTERISK_FOP2_VERSION)-debian-i386.tgz ASTERISK_FOP2_SITE = http://download2.fop2.com # Note: be sure to edit "project/astlinux/target_skeleton/usr/sbin/upgrade-package" on version change Modified: branches/1.0/project/astlinux/target_skeleton/usr/sbin/upgrade-package =================================================================== --- branches/1.0/project/astlinux/target_skeleton/usr/sbin/upgrade-package 2017-07-10 21:01:07 UTC (rev 8432) +++ branches/1.0/project/astlinux/target_skeleton/usr/sbin/upgrade-package 2017-07-10 21:24:57 UTC (rev 8433) @@ -248,7 +248,7 @@ if ! RAM_needed_MB 475; then finish $RED "Not enough RAM installed. Minimum: 512 MB, Recommended: 1024+ MB" fi - SRC_URL="https://files.astlinux-project.org/fop2-2.31.10-debian-$(uname -m | sed -e 's/i.86/i386/').tgz" + SRC_URL="https://files.astlinux-project.org/fop2-2.31.11-debian-$(uname -m | sed -e 's/i.86/i386/').tgz" ;; show) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-07-12 14:42:54
|
Revision: 8435 http://sourceforge.net/p/astlinux/code/8435 Author: abelbeck Date: 2017-07-12 14:42:51 +0000 (Wed, 12 Jul 2017) Log Message: ----------- acme, add 'slapd' service type to ACME_SERVICE for LDAP SSL support Modified Paths: -------------- branches/1.0/package/acme/deploy/astlinux.sh branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf Modified: branches/1.0/package/acme/deploy/astlinux.sh =================================================================== --- branches/1.0/package/acme/deploy/astlinux.sh 2017-07-10 21:29:00 UTC (rev 8434) +++ branches/1.0/package/acme/deploy/astlinux.sh 2017-07-12 14:42:51 UTC (rev 8435) @@ -55,7 +55,7 @@ fi sleep 1 service lighttpd init - logger -s -t acme-client "New ACME certificates deployed for HTTPS and Lighttpd restarted" + logger -s -t acme-client "New ACME certificates deployed for HTTPS and 'lighttpd' restarted" fi fi @@ -69,7 +69,7 @@ cat "$_ckey" > /mnt/kd/ssl/sip-tls/keys/server.key chmod 600 /mnt/kd/ssl/sip-tls/keys/server.key asterisk -rx "core restart when convenient" >/dev/null 2>&1 & - logger -s -t acme-client "New ACME certificates deployed for SIP-TLS and Asterisk restart when convenient requested" + logger -s -t acme-client "New ACME certificates deployed for SIP-TLS and 'asterisk' restart when convenient requested" fi if astlinux_is_acme_service prosody; then @@ -86,8 +86,25 @@ chown prosody:prosody /mnt/kd/prosody/certs/server.key sleep 1 service prosody init - logger -s -t acme-client "New ACME certificates deployed for XMPP and Prosody restarted" + logger -s -t acme-client "New ACME certificates deployed for XMPP and 'prosody' restarted" fi + if astlinux_is_acme_service slapd; then + service slapd stop + mkdir -p /mnt/kd/ldap/certs + if [ -f "$_cfullchain" ]; then + cat "$_cfullchain" > /mnt/kd/ldap/certs/server.crt + else + cat "$_ccert" > /mnt/kd/ldap/certs/server.crt + fi + cat "$_ckey" > /mnt/kd/ldap/certs/server.key + chmod 600 /mnt/kd/ldap/certs/server.key + chown ldap:ldap /mnt/kd/ldap/certs/server.crt + chown ldap:ldap /mnt/kd/ldap/certs/server.key + sleep 1 + service slapd init + logger -s -t acme-client "New ACME certificates deployed for LDAP and 'slapd' restarted" + fi + return 0 } Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf =================================================================== --- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-07-10 21:29:00 UTC (rev 8434) +++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2017-07-12 14:42:51 UTC (rev 8435) @@ -1061,7 +1061,7 @@ ## For use with "Let's Encrypt" using the "acme-client" command. ## Note: Only DNS challenge validation is supported within AstLinux. ## -## Deploy service types: lighttpd, asterisk and prosody +## Deploy service types: lighttpd, asterisk, prosody and slapd #ACME_SERVICE="lighttpd" # space separated list of deploy service types ## Registration email address, used for expiry notifications (optional) #ACME_ACCOUNT_EMAIL="ac...@my..." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-08-11 13:42:42
|
Revision: 8475 http://sourceforge.net/p/astlinux/code/8475 Author: abelbeck Date: 2017-08-11 13:42:39 +0000 (Fri, 11 Aug 2017) Log Message: ----------- mark release 'astlinux-1.3.0' Modified Paths: -------------- branches/1.0/docs/ChangeLog.txt branches/1.0/project/astlinux/target_skeleton/etc/astlinux-release Modified: branches/1.0/docs/ChangeLog.txt =================================================================== --- branches/1.0/docs/ChangeLog.txt 2017-08-10 00:13:01 UTC (rev 8474) +++ branches/1.0/docs/ChangeLog.txt 2017-08-11 13:42:39 UTC (rev 8475) @@ -8,7 +8,7 @@ Additions for AstLinux 1.3.0: ============================= -Released @TBD@ +Released 2017-08-11 ** IMPORTANT NOTICE Modified: branches/1.0/project/astlinux/target_skeleton/etc/astlinux-release =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/astlinux-release 2017-08-10 00:13:01 UTC (rev 8474) +++ branches/1.0/project/astlinux/target_skeleton/etc/astlinux-release 2017-08-11 13:42:39 UTC (rev 8475) @@ -1 +1 @@ -svn +astlinux-1.3.0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <abe...@us...> - 2017-08-11 13:42:50
|
Revision: 8477 http://sourceforge.net/p/astlinux/code/8477 Author: abelbeck Date: 2017-08-11 13:42:47 +0000 (Fri, 11 Aug 2017) Log Message: ----------- return to release 'svn' Modified Paths: -------------- branches/1.0/docs/ChangeLog.txt branches/1.0/project/astlinux/target_skeleton/etc/astlinux-release Modified: branches/1.0/docs/ChangeLog.txt =================================================================== --- branches/1.0/docs/ChangeLog.txt 2017-08-11 13:42:44 UTC (rev 8476) +++ branches/1.0/docs/ChangeLog.txt 2017-08-11 13:42:47 UTC (rev 8477) @@ -5,6 +5,12 @@ === docs/ChangeLog.txt ========================================================= +Additions for AstLinux 1.3.1: +============================= + +Released @TBD@ + + Additions for AstLinux 1.3.0: ============================= Modified: branches/1.0/project/astlinux/target_skeleton/etc/astlinux-release =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/astlinux-release 2017-08-11 13:42:44 UTC (rev 8476) +++ branches/1.0/project/astlinux/target_skeleton/etc/astlinux-release 2017-08-11 13:42:47 UTC (rev 8477) @@ -1 +1 @@ -astlinux-1.3.0 +svn This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |