Compare commits

..

71 Commits

Author SHA1 Message Date
Shaun Ruffell
1e0aa64075 Importing files for 2.5.1 release.
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/tags/2.5.1@10671 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-18 17:15:37 +00:00
Shaun Ruffell
ecc4999070 Creating tag for the release of dahdi-linux-2.5.1
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/tags/2.5.1@10670 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-18 17:15:00 +00:00
Shaun Ruffell
66edd67565 xpp: Fix compilation when CONFIG_DAHDI_WATCHDOG is defined.
Looks like a hold over from when dahdi_span_ops was first implemented in r8985
"dahdi: Move the callbacks in dahdi_span into its own structure" [1].

[1] http://svnview.digium.com/svn/dahdi?view=revision&revision=8985
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10658

Conflicts:

	drivers/dahdi/xpp/xpp_dahdi.h

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10659 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-11 20:19:24 +00:00
Mike Sinkovsky
897cbb01de dahdi: Fix compilation when CONFIG_DAHDI_WATCHDOG is defined.
From: Mike Sinkovsky <msink@trikom.ru>

Internal-Issue-ID: DAHLIN-288
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10655

Conflicts:

	drivers/dahdi/dahdi-base.c

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10656 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-11 17:45:35 +00:00
Tzafrir Cohen
f9e4bf52c2 FPGA_1161.201.hex rev 10545: fix reset of XR1000
Previous commit (r10650) included an incorrect version. Including full message
from that commit for the description.

rev. 10502 of the FPGA firmware for the new E-Main rev. 4 fixes a potential
issue when used on Xorcom XR1000 systems: an issue with the power supply may
cause the unit to reset.

Note that there is no issue with previous models, with a normal setup of an
Astribank, or other XRx000 systems.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10652

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10653 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-11 09:11:44 +00:00
Tzafrir Cohen
44a5add969 FPGA_1161.201.hex rev 10532: fix reset of XR1000
rev. 10502 of the FPGA firmware for the new E-Main rev. 4 fixes a potential
issue when used on Xorcom XR1000 systems: an issue with the power supply may
cause the unit to reset.

Note that there is no issue with previous models, with a normal setup of an
Astribank, or other XRx000 systems.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10649

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10650 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-10 21:51:49 +00:00
Shaun Ruffell
d18ec7f3b9 wcte12xp, wctdm24xxp, wct4xxp: Print warning about potential GPL violation w/HOTPLUG_FIRMWARE=no.
Print a warning message that it may be a GPL violation to redistribute these
binaries if the firmware for the VPMOCT032/64/128/256 is compiled in.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10646

Conflicts:

	drivers/dahdi/wct4xxp/Kbuild

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10647 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-05 20:34:44 +00:00
Shaun Ruffell
f69326bb66 wcb4xxp: Remove asm/system.h include.
Not needed anymore and will break compilation on Kernel versions >= 3.4 since
commit 0195c00244dc2e [1]

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=0195c00244dc2e

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10641

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10643 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-05 16:22:30 +00:00
Shaun Ruffell
c95385bb06 dahdi_dummy: Include timer.h instead of time.h
It appears that some kernel configurations do not include timer.h in any of
the include files that are included by dahdi_dummy. The timer_structs are
defined in timer.h and not time.h, so this change is correct even though I
never could find a configuation myself that actually failed to compile.

This has negligible impact since dahdi_dummy is not compiled by default.

Internal-Issue-ID: DAHLIN-185
Reported-by: Steve Murphy
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10640

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10642 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-05 16:22:26 +00:00
Shaun Ruffell
76468854ed dahdi: Fix compilation when CONFIG_DAHDI_ECHOCAN_PROCESS_TX is defined.
'ec_state' was renamed to 'dahdi_echocan_state' in r6529 [1] but support for
CONFIG_DAHDI_ECHOCAN_PROCESS_TX was first committed in r9442 [2]. So it
appears that I never compiled tested this exact commit when it went in for the
2.5.0 release.

[1] http://svnview.digium.com/svn/dahdi?view=revision&revision=6529
[2] http://svnview.digium.com/svn/dahdi?view=revision&revision=9442

Reported-by: Pavel Selivanov
Internal-Issue-ID: DAHLIN-279
Patches: ec.patch uploaded by Pavel Selivanov (License #5420)
[ edited the patch slightly for minor formatting ]
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10633

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10635 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-03 22:02:20 +00:00
Shaun Ruffell
2242c5394b wctdm24xxp, wcte12xp: Allow VPMOCT032 firmware to be compiled into driver.
Enables the driver to update firmware on systems that do not have the firmware
loader configured / enabled (Linux config option CONFIG_FW_LOADER). Compiling
the firmware into the driver increase the memory footprint by around ~440K.

Internal-Issue-ID: DAHDI-963
Reported-and-Tested-by: Guenther Kelleter
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10618

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10619 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-04-02 14:05:11 +00:00
Shaun Ruffell
62c5402a24 wctdm24xxp: Remove forward declaration of inline for GCC 3.4.4
GCC 3.4.4 does not allow forward declaration of inline functions.

Internal-Issue-ID: DAHLIN-286
Reported-by: Guenther Kelleter
Patches: wctdm24xxp-inline.patch uploaded by Guenther Kelleter (License #6372)
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10613

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10615 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-29 15:29:14 +00:00
Oron Peled
b222cfeb5d xpp: FXS: added a 'lower_ringing_noise' parameter
* Adds a new parameter, 'lower_ringing_noise', to module xpd_fxs.

* Makes the "power-down" behaviour that was added
  in upstream svn r10478, switchable in runtime.

* By default (false), makes the vbat_h behave like it did
  before the power-down change.
  - I.e: vbat_h is held throughout the ringing period (during
    both ring-up/ring-down)
  - So this patch revert part of r10478

* When switched to true, activate the "power-down" behaviour.
  - I.e: vbat_h follows the ring-up/ring-down.
  - This behaviour lowers the noise caused by group ringing of
    FXS channels in the same unit, but causes problems with CallerID.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10574

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10578 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-21 20:40:52 +00:00
Oron Peled
bd373e5075 xpp: FXS: atomic vbat_h power handling
* In do_chan_power() make vbat_h changes atomic.
* As a result we can ignore duplicate requests.
  This will allow cleaner logic in the next commit.
* Added proper debug messages.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10573

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10577 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-21 20:40:29 +00:00
Tzafrir Cohen
49d2e93245 xpp: firmwares: useless 0x1A at EOF
Remove a mostly harmless 0x1A (^Z) at the end of the file. If you
add a NL after it, it breaks the firmware loading.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10550

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10551 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-20 11:19:17 +00:00
Tzafrir Cohen
c573e5eaf5 xpp: firmwares to support E-Main 4
USB firmware (USB_FW.201.hex 10402) and FPGA firmware
(FPGA_1161.201.hex 10480) with support of the new E-Main 4 Astribank
mainboard.

(This was accidentally labeled as 'E-Main 3' in some previous commit
messages)

Also includes Makefile fixes from r10536.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10535

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10540 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-18 19:07:51 +00:00
Tzafrir Cohen
7559b61e54 xpp: USB_FW rev 10401: minor 6FXS/2FXO caps issue
Fixes an issues with the 6FXS/2FXO module: if an extra FXS or FXO module
is added to a system with such a module, an excessive number of port
licenses was accidentally required (as if the 6FXS/2FXO module required
8FXS/8FXO licenses).

Internal-Issue-ID: #1371
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10534

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10539 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-18 19:04:12 +00:00
Shaun Ruffell
f4cffb0c1a xpp: '%d' -> '%lu' when displaying module_refcount on kernel versions >= 3.3
Upstream commit bd77c047 "module: struct module_ref should contains long
fields" changed the return of module_refcount from int to unsigned long. This
change eliminates a warning from the string format specifier.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10485

Conflicts:

	drivers/dahdi/xpp/xproto.c

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10529 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-16 16:11:47 +00:00
Shaun Ruffell
42c0efb700 xpp: Use 'bool' type for boolean module parameters on kernel versions >= 2.6.31.
Eliminates warnings that are a result of upstream commit 72db395ffa
"module_param: check that bool parameters really are bool."

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10484

Conflicts:

	drivers/dahdi/xpp/xpd.h

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10528 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-16 16:11:43 +00:00
Shaun Ruffell
4afe8d0213 wctdm24xxp: Fix bug if hook state on FXS changes before channel configuration.
If the hook state on an FXS port changes before the channel is
configured with dahdi_cfg it is possible to erroneously force the line
feed register open without setting a timer to clear it.

The result would be a "dead" channel that cannot be cleared unless the
driver is reloaded and warning in the kernel log that "0 is an invalid
signaling state for an FXS module".

This change makes the OFF_HOOK to ON_HOOK change behave just as the
ON_HOOK to OFF_HOOK change has.

Internal-Issue-ID: DAHLIN-272
Reported-and-Tested-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10396

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10527 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-16 16:11:38 +00:00
Oron Peled
ae9d3a0bdc xpp: FXS: better power-down to lower noise
* Now every linefeed control command which is not RING'ing
  powers-down the SLIC. This reduce audible noise when
  several channels are ringing.

* Simplify code by removing redundant calls to do_chan_power()
  before linefeed_control()

* Manage vbat_h state so we skip do_chan_power() calls when
  there isn't a state change

* Export vbat_h state to /proc/.../fxs_info

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10478

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10488 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15 17:33:16 +00:00
Oron Peled
d635b1ef61 xpp: reset Astribank SPI busses
* A driver reload should reset Astribank hardware
* This patch send an SPI reset after we get AB_DESCRIPTION reply from Astribank

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10474

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10487 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-03-15 17:32:43 +00:00
Tzafrir Cohen
6527164a02 USB_RECOV.hex: recovering from xpp hardware issues
USB_RECOV.hex, rev. 9760. It may be used to recover from certain
issues of the USB controller of the Astribank (when an Astribank
is not detected as such) by Support staff.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10455

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10456 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-02-07 22:17:34 +00:00
Tzafrir Cohen
2f55744b15 Astribank I firmwares rev. 7107
A slightly newer firmware (Xorcom rev. 7107) for older (non Astribank
II) Astribank modules. Was accidentally left uncommited. Includes minor
bug fixes.

No change for any relatively recent (Astribank II) Astribank.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10443

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10444 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-25 19:56:05 +00:00
Tzafrir Cohen
5ddb6535f7 Build OSLEC EC if in the tree
Build the OSLEC echo canceller (drivers/staging/echo and
dahdi_echocan_oslec) if the code of oslec is present in the tree.

Also closing another issue regarding documentation of building OSLEC,
as it is now even clearer than before.

Patch has been used in the Debian package for quite some time.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

(closes issue DAHLIN-110)
Reported by: biohumanoid (Pavel Selivanov)
Patches:
     oslec_auto.diff uploaded by tzafrir (license 5035)

(closes issue DAHLIN-261)

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10440

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10441 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-17 14:46:23 +00:00
Oron Peled
172ddb07b9 xpp: bugfix: fix bad refcount
Code path called in error condition contained an superflous put_xpd() call

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10408

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10420 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-11 12:03:56 +00:00
Tzafrir Cohen
94a00c0f00 Avoid building PCI devices if kernel has no PCI
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10398 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-03 22:55:29 +00:00
Oron Peled
47fbd9bcc3 xpp: BRI: batch D-Channel packets to fix frag.
* We need to split the BRI D-Channel (HDLC) frames to smaller packets,
  limitation of the FPGA.
* This changes batches BRI D-channel packets of the same HDLC frame to a
  single XPP frame.
* Avoids an accidental fragmantion in case we were delayed for a few ms-s.
* Also improves efficiency.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10394 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-03 14:44:37 +00:00
Oron Peled
1a9b8662ad xpp: BRI: split multibyte functionality
* The zero lenth case (Magic request) was split into
  send_magic_request() function. It was not possible
  to move it into card_bri.c, because it is called
  directly from the general interface we provide for
  register read/write via sysfs/proc.

* The normal case (send_multibyte_request) was moved from
  card_global.c into card_bri.c

* This sets the stage to enable bundling of multibyte
  packets into frames (like we do for PCM).

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10393 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-03 14:42:47 +00:00
Oron Peled
c3f65d39fa xpp: BRI: remove trivial BRISTUFF wrappers
Now that legacy BRISTUFF code is gone, some wrapper
functions became trivial. Removed these wrappers
and inlined their contents.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10392 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-03 14:42:21 +00:00
Oron Peled
c36b6cd738 xpp: BRI: remove legacy BRISTUFF code
Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10391 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2012-01-03 14:41:04 +00:00
Tzafrir Cohen
14f64038b0 xpp: Allow up to 128 Astribanks on a system
This is also a work around the bug fixed in the previous commit.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10386 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-21 18:38:13 +00:00
Oron Peled
a135f4e817 xpp: bad module_put() when too many Astribanks
module_put() that was added while developing the sysfs code. The real
module_get()/module_put() pair were already removed at the time of
developing code for this branch. It was only triggered when using a
system with more than 32 (MAX_BUSES) Astribanks.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10385 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-21 18:37:34 +00:00
Shaun Ruffell
1e8c9fb797 wctdm24xxp: Do not call voicebus_release() before wctdm_back_out_gracefully()
voicebus_release is already called as part of the wctdm_back_out_gracefully()
call. If an Hx8 card fails to initialize, this will eliminate warnings from
the kernel such as:

  WARNING: at kernel/irq/manage.c:904 __free_irq+0x94/0x173()
  Trying to free already-free IRQ 18

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10377

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10378 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-12 18:28:49 +00:00
Oron Peled
0893461985 xpp: BRI: fix timing priority calculation
Use similar caculation as in the PRI module:
* Save timing_priority from spanconfig and
  elect syncer when spanconfig is called.
* Create custom timing_priority() function that returns
  the value or error if span is disconnected.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: : Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10376 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-07 19:45:16 +00:00
Oron Peled
8edbfa881e xpp: FXS: mwi and search_fsk fixes
* We must not block PCM during from 'search_fsk_pattern' channels.
* We must vmwi_search() not only on FXS_LINE_POL_ACTIVE, but also during
  'neon_blinking' -- so we notice the message to turn it off.
* Also added 'search_fsk_pattern' and neon_blinking to /proc/.../fxs_info

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by: : Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10375 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-07 19:44:37 +00:00
Tzafrir Cohen
43412bc513 xpp: bugfix -- manage xpd refcount for EC module
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10374 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-07 19:42:20 +00:00
Shaun Ruffell
1cf2b86e75 dahdi: #include <linux/module.h> in dahdi/kernel.h and GpakCust.h
Commit de47725, first released in 3.2-rc1 removed module.h from some
kernel headers. Include it explicitly now.

Resolves compilation errors like:
error: implicit declaration of function 'try_module_get'
error: 'THIS_MODULE' undeclared (first use in this function)
error: implicit declaration of function 'module_put'

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10361

Conflicts:

	include/dahdi/kernel.h

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10363 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-02 20:06:03 +00:00
Shaun Ruffell
380ceed257 wctc4xxp: Replace 'ndo_set_multicast_list' with 'set_rx_mode'
The ndo_set_multicast_list callback was removed in b81693d9, which was
first released in Linux Kernel 3.2-rc1

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10360

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10362 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-12-02 20:05:58 +00:00
Oron Peled
3408c774ce xpp: pri: fix RS1 init in E1 CAS mode
Force some reserved bits to really be 1 in E1 mode (otherwise
terrorists will win).

(Closes issue DAHLIN-264)

Signed-off-by: Oron Peled <oron.peled@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10353 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-30 10:22:01 +00:00
Oron Peled
2de79e8905 xpp: fxs: demote SETPOLARITY message to DBG()
Signed-off-by: Oron Peled <oron.peled@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10352 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-30 10:21:20 +00:00
Tzafrir Cohen
99f1c099ec xpp: Adaptations for E-Main-3
* An xbus transport now have a "model_string" member
 * The xpp_usb driver fills this with "usb:<idVendor>/<idProduct>/<bcdDevice>"
 * It is passed via environment to the "init_card_<type>_<protocol>" scripts
 * The FXS script uses this to condition two registers according to
   the power supply model.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10351 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-30 10:20:38 +00:00
Tzafrir Cohen
136ab72d6c xpp: increase command queue length to 1500
A length of 1000 commands is not enough is some cases with CAS.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10342 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-16 12:17:29 +00:00
Tzafrir Cohen
e667e47418 xpp: USB_FW rev 10085: fix regression from r10324
Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10340 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-13 15:11:39 +00:00
Tzafrir Cohen
90c209f77b xpp: PIC_TYPE_1 rev 9841: followup to r10324
An extra fix that was accidentally not included in r10324. Minor bug fixes.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10338 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-13 13:35:12 +00:00
Oron Peled
2ecf474a07 xpp: silence some bad ioctl() reporting
Ignore some FXS-specific ioctl-s in xpd_pri.

Signed-off-by: Oron Peled <oron.peled@xorcom.com>
Acked-by Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10336 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-13 09:52:28 +00:00
Tzafrir Cohen
2fefa9dd60 xpp: USB firmware r9964: minor bugfixes
USB_FW rev 9964: includes a few stability bugfixes.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10324 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-07 15:55:06 +00:00
Shaun Ruffell
d624adb358 dahdi: First span registered becomes master by default.
r10205 "dahdi: Check for master in DAHDI_STARTUP / resolves MeetMe
regression." did not handle the case for the wcb4xxp driver since it
would set DAHDI_FLAG_RUNNING as part of the probe. Therefore, the
DAHDI_STARTUP ioctl was never processed for it, creating a situation
where audio is missing on channels that are conferenced with channels on
the BRI spans.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10304

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10305 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-11-02 20:01:58 +00:00
Shaun Ruffell
40942e2a43 dahdi: Move WARN_ON_ONCE from wctc4xxp driver to include/dahdi/kernel.h
I only generally test on RHEL 4 when testing against kernels older
than 2.6.18. Apparently OpenSUSE 10.1 runs with 2.6.16 and doesn't
have WARN_ON_ONCE backported. I took the patch Richard Miller
originally attached to the issue and moved it to
include/dahdi/kernel.h so it would be available for all the board
drivers in the future.

Internal-Issue-ID: DAHLIN-260
Reported-by: Richard Miller
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10252

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10254 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-21 19:48:24 +00:00
Shaun Ruffell
78c92b52ed wcb4xxp: Do not show LASVEGAS2 as echocan name if vpmsupport is set to 0
This fixes an issue where "EC: LASVEGAS2" was displayed in /proc/dahdi/x
for a B410P span even though vpmsupport was disabled with the module
parameter.

Internal-Issue-ID: DAHLIN-247
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10251

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10253 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-21 19:48:20 +00:00
Shaun Ruffell
1bf7ebc42f wct4xxp: Fix condition where hardware echo canceler erroneously mutes DTMF.
Commit r9750 "wct4xxp: Reduce the memory footprint of the hardware
echocanceler.", as part of reducing the non-pageable memory required to
support the VPMOCT064 and VPMOCT128, disabled caching of some hardware
echocan registers. This resulted in more physical reads to the echo
canceler. These new read transactions exposed an existing issue where
sometimes reads could be turned into writes which put a channel into an
unintended state preventing Asterisk from detecting any DTMF.

This issue is resolved by ensuring that the write signal to the Octasic
part is explicitly cleared between when the address is presented on the
bus and when the read and chip select signals are asserted. The cost is
an increase in the average time to enable / disable echo cancellation by
about 5 us on one Intel Xeon X3220 test machine (~250ns increase per
read from the Octasic part and 20 reads to enable / disable a channel).

This commit resolves a behavioral regression first introduced in 2.5.0
and 2.4.1 which could take many calls before revealing itself. This
change only affects cards with a VPMOCT128 or VPMOCT064 installed.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Doug Bailey <dbailey@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10220

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10221 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-10-12 16:32:35 +00:00
Shaun Ruffell
7a275dc70b wctc4xxp: Allow G723 SID frames to pass to the hardware decoder.
The driver has, until now, dropped G723 SID frames even though the
firmware on the TC400/TCE400 can handle them. Now let them on
through.

Reported-and-Tested-by: Angel Carhuas <acarhuas@colinanet.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10218

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10219 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-30 19:23:22 +00:00
Shaun Ruffell
9fb13e2f6c wctdm24xxp: Set dahdi_span.devicetype string in one place.
Currently the devicetype string was set both when the device was first
allocated and updated when an echocanceler was detected. For simplicity,
combine both these steps into a single function.

This change also replaces an improper use of strncat with strlcat.

Additionally, on the 2.5 branch, this change actually makes r10206
"wctdm24xxp, wcte12xp: Advertise VPMOCT032 presence in
dahdi_span.devicetype",  work the way it was originally intended. That
change was only functioning properly previously on trunk.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10210

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10211 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-27 22:10:34 +00:00
Tzafrir Cohen
fcbde772c4 xpp: fxs: bugfix for 2fxs+6fxo cards
* Bug sympthoms: wrong FSK VMWI sent few seconds after
  offhook. That was caused because the driver kept
  polling the (physically unconnected) digital inputs.
  [note: a workaround for drivers without this patch
   is to zero the 'xpd_fxs.poll_digital_inputs' parameter.]

* Also, the digital_inputs/digital_output masks were
  calculate using a different condition.

* Now we determine number of channels, digital inputs and
  digital outputs in a single place and use this info
  later to calculate the correct masks.

* We poll only if there are digital_inputs

* We added a sanity check in process_digital_inputs, so
  we get a notice if it's called on an xpd without digital
  inputs (e.g: hypothetic firmware bug).

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10208 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-25 08:59:02 +00:00
Shaun Ruffell
2bc2ebd1de dahdi: Check for master in DAHDI_STARTUP / resolves MeetMe regression.
There were a couple of reports that MeetMe conferences were not
working in 2.5.0.1 and that downgrading to 2.4.1.2 resolved the
issue. This could occur if there were no analog spans in a system,
and all the digital spans were out of alarm before DAHDI_STARTUP
ioctl was called by dahdi_cfg. If the spans were *not* out of alarm,
they would be marked master when the span changes it's alarm state.

This would result in a condition where no spans were marked as the
"master" and so the core timer was handling conferencing. The core
timer runs by default at 4ms and most board drivers run at 1ms
intervals, but a channel currently only buffers up 2ms of data when
conferenced. Therefore, 2ms of audio from a board was continuously
dropped from the conference every 4ms by default.

This fixes a regression first introduced in 2.5.0 which was
specifically added in revision r9611 "dahdi: Do not locate new
master in interrupt context."

Internal-reference-ID: DAHDI-894
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Tested-by: Dennis Martinez <dmartinez@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10205

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10207 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-23 20:23:47 +00:00
Shaun Ruffell
0f8559b045 wctdm24xxp, wcte12xp: Advertise VPMOCT032 presence in dahdi_span.devicetype.
A "(VPMADT032)" string is appended to the devicetype (as shown by
dahdi_scan) for the span if one is installed. Now append '(VPMOCT032)'
if one is installed as well.

Also, for the wcte12xp driver append the VPM name to the device type after
initially probing as opposed to only after the span is configured.

(Related to issue DAHDI-890)
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10203

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10206 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-23 20:23:43 +00:00
Shaun Ruffell
d6075a4c78 dahdi: Decrease the initial coretimer delay to 4ms from 1 second.
DAHDI currently waits a second before checking if a board driver is
calling dahdi_receive and switching to internal timing. Some versions of
Asterisk (I was looking at 1.4.42 when writing this) only wait 300ms for
a timer to expire when first starting and verifying that DAHDI is
properly configured. This can result in a

"ERROR[27673] asterisk.c: Asterisk has detected a problem with your DAHDI
configuration and will shutdown for your protection. You have options:"

message if asterisk is started soon after loading DAHDI.

This change sets the inital polling interval to the same as that used
during normal coretimer operation, 4ms. The interval will still be
slowed to 1 second if a board driver starts calling dahdi_receive().

DAHDI-892.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10200

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10201 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-13 18:38:19 +00:00
Tzafrir Cohen
c6e5ab448c xpp: firmware to detect the new 2+6 module
New firmwares to handle the new 2FXS/6FXO module.

FPGA_1161.hex, PIC_TYPE_1.hex, PIC_TYPE_2.hex of internal rev. 9732

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10180 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-09-05 10:29:53 +00:00
Doug Bailey
8ff6810740 wcte12xp, wctdm24xxp: Update VPMOCT032 firmware to 1.11.0.
Firmware version 1.11.0 resolves an issue where the driver fails to
detect certain VPMOCT032 modules after a cold boot.

Signed-off-by: Doug Bailey <dbailey@digium.com>
Acked-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10172

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10173 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-30 21:06:20 +00:00
Tzafrir Cohen
f3262ae381 xpp: FXS: new 2+6 module has no digital I/O ports
This module is recognized via subtype==4

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10157 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-28 09:45:15 +00:00
Shaun Ruffell
c3c891abdd wctdm24xxp: Set 'fastoffhook' counter to 8ms and turn off calibration delay.
r10006 "wctdm24xxp: Add 'fastpick' module parameter." copied the
fast-off hook module parameter from the wctdm.c driver, but the setting
in that driver does not match the data sheet. The previous commit did
not actually change any of the significant bits in that register. Also,
that commit changed the timer, but did not disable the callibration
delay which is necessary for Type-II callerid.

The fastpickup option in the wctdm24xxp driver should now match the
fastpickup option in the wctdm driver.

DAHDI-224.

Reported-By: Kinnith Wallace <kwallace@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10148

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10150 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-19 22:53:51 +00:00
Shaun Ruffell
2fb5d7d6d7 wctdm: Set 'fastpickup' counter to 8ms
This fixes what looks like a typo in r1055 [1].

[1] http://svnview.digium.com/svn/dahdi?view=revision&revision=1055

Reported-by: Kinnith Wallace <kwallace@digium.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10147

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10149 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-19 22:53:47 +00:00
Shaun Ruffell
08ce93306d wctdm24xxp: Use our own free list for IRQ commands.
Really only *necessary* when SLAB debugging is enabled, but in that
case, can reduce the chance of latency bumps when first loading the
driver. Otherwise the constant slab poisoning / checking in interrupt
context from the kmalloc / kfrees is too much.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10144

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10146 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-18 19:35:01 +00:00
Russ Meyerriecks
dac1d88399 wct4xxp: Bug in timing cable with different span density cards
The logic loops through the static cards[] array to determine timing,
    but the subloop was based off the current card's numspans member.
    This could cause a null dereference in the case where two cards of
    different span densities were connected via timing cables.

Reported-by: Doug Bailey <dbailey@digium.com>
Signed-off-by: Russ Meyerriecks <rmeyerriecks@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10140

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10145 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-18 19:34:57 +00:00
Shaun Ruffell
5218e90962 wctc4xxp: Fix lock imbalance in wctc4xxp_watchdog.
r10082 "wctc4xxp: Cleanup in-flight commands when halting due to
hardware error." introduced a lock imblance on the error path where the
cmd_list_lock would be unlocked twice when the board is halted due to a
hardware error. Thanks sparse.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10138

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10139 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-15 21:55:49 +00:00
Shaun Ruffell
da2406db64 wcte12xp, wctdm24xxp: Force local interrupts off in the interrupt handler.
r10066 "wctdm24xxp, wcte12xp: Run the ISR with interrupts disabled."
requested that the interrupt handler be run in "fast" mode (disabled)
but this isn't necessarily guaranteed.

This patch makes the interrupt handler itself disable all the interrupts.
Linux commit 470c66239ef0336429b35345f3f615d47341e13b [1] contains a comment
about why this is necessary.

[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=470c66239ef03364

(closes issue DAHLIN-248)
Reported-and-Tested-by: Vladimir Mikhelson <vlad@mikhelson.com>
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10118

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10119 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-12 16:06:28 +00:00
Shaun Ruffell
0b52fb24a0 dahdi: Define HAVE_NET_DEVICE_OPS on kernels > 2.6.29
HAVE_NET_DEVICE_OPS was defined in the mainline kernel in commit
47fd5b83 which was first released in 2.6.29. Any kernels after that will
have those fields defined.

Mainline commit e2270ea62ae4d7a removed the feature test macros, so
the easiest thing to do is define HAVE_NET_DEVICE_OPS ourselves on the
kernels since it was committed.

This change is needed to compile against the 3.1 kernel.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10109

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10117 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-11 19:56:22 +00:00
Wagner Gegler
2f880acd10 dahdi_dynamic: Call dahdi_receive in rx packet handler.
Currently dahdi_receive is called on all channels in the context of the
master dynamic span. If one span (not the master) receive two packets
before the master span received a packet, the older packet on the
dynamic span would end up lost because the "readchunk" for the
channels would be overwritten by the new packet. DAHLIN-245

Signed-off-by: Wagner Gegler <wagner@aligera.com.br> (License #6268)
Changed dahdi_ec_chunk to dahdi_ec_span.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10110

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10116 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-11 19:56:18 +00:00
Shaun Ruffell
950a3f2486 wctc4xxp, wcte12xp, wctdm24xxp: Remove check for HAVE_NETDEV_PRIV
DAHDI currently supports kernels >= 2.6.9. netdev_priv() has been in the
mainline kernel since versions 2.6.6 so it's available in all the
supported kernels. This change is needed to compile against the 3.1 kernel.

Signed-off-by: Shaun Ruffell <sruffell@digium.com>

Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10096

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10115 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-11 19:56:14 +00:00
Tzafrir Cohen
2405c809e7 FPGA_1161 rev 9605: EC related bug fixes
Astribank II FPGA firmware rev 9605. Includes two bug fixes:

* Error in checking EC licenses when the license was for exactly 64 or 128
  channels.
* Proper handling of a slave FXO Astribank (in line with the quirks
  handling from r10019).

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10100 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-09 12:26:35 +00:00
Tzafrir Cohen
eb1c6cbeed A stable branch for DAHDI-linux 2.5
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/branches/2.5@10098 a0bf4364-ded3-4de4-8d8a-66a801d63aff
2011-08-09 09:38:56 +00:00
56 changed files with 32184 additions and 7488 deletions

1
.version Normal file
View File

@@ -0,0 +1 @@
2.5.1

5541
ChangeLog Normal file

File diff suppressed because it is too large Load Diff

187
README
View File

@@ -17,7 +17,6 @@ Digital Cards
* Digium TE405P/TE407P/TE410P/TE412P: PCI quad-port T1/E1/J1
* Digium TE220: PCI-Express dual-port T1/E1/J1
* Digium TE420: PCI-Express quad-port T1/E1/J1
* Digium TE820: PCI-Express eight-port T1/E1/J1
- wcte12xp:
* Digium TE120P: PCI single-port T1/E1/J1
* Digium TE121: PCI-Express single-port T1/E1/J1
@@ -212,13 +211,10 @@ under driver/staging/echo . In fact, dahdi_echocan_oslec assumes that
this is where the oslec code lies. If it is elsewhere you'll need to fix
the #include line.
Thus for the moment, the simplest way to build OSLEC with dahdi is:
1. Copy the directory `drivers/staging/echo` from a recent kernel tree
(at least 2.6.28-rc1) to the a subdirectory with the same name in the
dahdi-linux tree.
2. Edit drivers/dahdi/Kbuild and uncomment the two lines related to OSLEC.
Thus for the moment, the simplest way to build OSLEC with dahdi is to
copy the directory `drivers/staging/echo` from a recent kernel tree (at
least 2.6.28-rc1) to the a subdirectory with the same name in the
dahdi-linux tree.
After doing that, you'll see the following when building (running
'make')
@@ -539,7 +535,6 @@ timing device it will hang forever in the first cycle. Otherwise it will just
give you in each cycle the percent of how close it was. Also try running it
with the option -v for a verbose output.
Spans and Channels
~~~~~~~~~~~~~~~~~~
DAHDI provides telephony *channels* to the userspace applications.
@@ -559,81 +554,6 @@ There are up to 128 spans and 1024 channels. This is a hard-wired limit
number fits in a 16 bits number). Channel and span numbers start at 1.
Span Assignments
~~~~~~~~~~~~~~~~
A DAHDI device (e.g. a PCI card) is represented within the DAHDI drivers
as a 'DAHDI device'. Normally (with auto_assign_spans=1 in the module
dahdi, which is the default), when a device is discovered and loaded,
it registers with the DAHDI core and its spans automatically become
available. However if you have more than one device, you may be
interested to set explicit spans and channels numbers for them. To use
manual span assigment, set 'auto_assign_spans' to 0 . e.g. in a file
under /etc/modprobe.d/ include the following line:
options dahdi auto_assign_spans=0
You will then need to assign the spans manually at device startup. You
will need to assign a span number and channel numbers for each
available span on the system. On my test system I have one BRI PCI card
and one Astribank BRI+FXS:
# grep . /sys/bus/dahdi_devices/devices/*/spantype
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:1:BRI
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:2:BRI
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:3:BRI
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:4:BRI
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:5:BRI
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:6:BRI
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:7:BRI
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:8:BRI
/sys/bus/dahdi_devices/devices/astribanks:xbus-00/spantype:9:FXS
/sys/bus/dahdi_devices/devices/pci:0000:00:09.0/spantype:1:TE
/sys/bus/dahdi_devices/devices/pci:0000:00:09.0/spantype:2:TE
/sys/bus/dahdi_devices/devices/pci:0000:00:09.0/spantype:3:NT
/sys/bus/dahdi_devices/devices/pci:0000:00:09.0/spantype:4:NT
All spans here, except the FXS one, are BRI spans with 3 channels per span.
In order to assign a span, we write three numbers separated by colns to
the file 'assign_span' in the SysFS node
local_num:span_num:base_chan_num
Thus:
echo 9:5:10 >/sys/bus/dahdi_devices/devices/astribanks:xbus-00/assign_span
echo 2:8:40 >/sys/bus/dahdi_devices/devices/pci:0000:00:09.0/assign_span
echo 1:1:1 >/sys/bus/dahdi_devices/devices/astribanks:xbus-00/assign_span
echo 4:6:20 >/sys/bus/dahdi_devices/devices/pci:0000:00:09.0/assign_span
echo 3:2:5 >/sys/bus/dahdi_devices/devices/astribanks:xbus-00/assign_span
As you can see, the order of span numbers or local span number is
insignificant. However the order of channel numbers must be the same as
that of span numbers.
Which indeed produced:
# head -n3 -q /proc/dahdi/*
Span 1: XBUS-00/XPD-00 "Xorcom XPD [usb:LAB-0003].1: BRI_NT"
1 XPP_BRI_NT/00/00/0
Span 2: XBUS-00/XPD-02 "Xorcom XPD [usb:LAB-0003].3: BRI_TE"
5 XPP_BRI_TE/00/02/0
Span 5: XBUS-00/XPD-10 "Xorcom XPD [usb:LAB-0003].9: FXS" (MASTER)
10 XPP_FXS/00/10/0
Span 6: B4/0/4 "B4XXP (PCI) Card 0 Span 4" RED
23 B4/0/4/1 YELLOW
Span 8: B4/0/2 "B4XXP (PCI) Card 0 Span 2" RED
40 B4/0/2/1 RED
Likewise spans can be unassigned by writing to the 'unassign-span'
"file".
Dynamic Spans
~~~~~~~~~~~~~
Dynamic spans are spans that are not represented by real hardware.
@@ -721,103 +641,6 @@ see an extra '(In use)':
2 XPP_FXS/0/0/1 FXOLS (In use)
SysFS Interface
~~~~~~~~~~~~~~~
DAHDI exposes several interfaces under the SysFS virtual file system.
SysFS represents kernel objects in nodes - directories. There properties
are often files. They may also contain other nodes or include symlinks
to other nodes.
Class DAHDI
^^^^^^^^^^^
under /sys/class/dadhi there exists a node for each DAHDI device file
under /dev/dahdi. The name is 'dahdi!foo' for the file '/dev/dahdi/foo'
(udev translates exclamation marks to slashes). Those nodes are not, for
the most part, proper SysFS nodes, and don't include any interesting
properties.
Devices Bus
^^^^^^^^^^^
Each DAHDI device (a physical device, such as a PCI card) is represented
by a node under /sys/bus/dahdi_devices/devices named with the name of
its device.
Its attributes include:
===== /sys/bus/dahdi_devices/devices/DEVICE/assgin-span
Write-only attribute: this device's spans should now be assigned
("registered"). See section about <<_span_assignments>>.
===== /sys/bus/dahdi_devices/devices/DEVICE/auto-assign
Write-only attribute. Spans in the device auto-assign ("register" as in
the original interface). See section about <<_span_assignments>>.
===== /sys/bus/dahdi_devices/devices/DEVICE/hardware_id
A unique hardware-level identifier (e.g. serial number), if available.
===== /sys/bus/dahdi_devices/devices/DEVICE/manufacturer
The name of the manufacturer. Freeform-string.
===== /sys/bus/dahdi_devices/devices/DEVICE/spantype
A line for each available span: <num>:<type>. This has to be provided
here as in the case of manual assignment, userspace may need to know
it before span nodes are created.
===== /sys/bus/dahdi_devices/devices/DEVICE/spantype
Device type.
===== /sys/bus/dahdi_devices/devices/DEVICE/unassign-span
Write-only attribute: the span whose device-local number is written
should now be unassigned ("unregistered"). See section about
<<_span_assignments>>.
Spans Bus
^^^^^^^^^
Each DAHDI span is represented by a node under
/sys/bus/dahdi_spans/devices with the name 'span-N' (where N is the
number of the span). Spans of each device also reside under the node of
the device.
Useful attributes in the span node:
===== /sys/bus/dahdi_spans/devices/span-N/alarms
The alarms of the span. Currently this is a numeric representation.
This may change in the future.
===== /sys/bus/dahdi_spans/devices/span-N/basechan
The channel number of the first channel. The channel numbers of the
following channels are guaranteed to follow it.
===== /sys/bus/dahdi_spans/devices/span-N/channels
The number of the channels in the span.
===== /sys/bus/dahdi_spans/devices/span-N/desc
A free-form description of the span.
===== /sys/bus/dahdi_spans/devices/span-N/is_digital
1 if the span is digital, 0 if it isn't.
===== /sys/bus/dahdi_spans/devices/span-N/is_sync_master
1 if the span is the sync master, 0 if it isn't.
===== /sys/bus/dahdi_spans/devices/span-N/lbo
LBO setting for the channel.
===== /sys/bus/dahdi_spans/devices/span-N/local_spanno
The number of the span within the DAHDI device.
===== /sys/bus/dahdi_spans/devices/span-N/name
A concise name for this span.
===== /sys/bus/dahdi_spans/devices/span-N/spantype
A very short type string.
===== /sys/bus/dahdi_spans/devices/span-N/syncsrc
Current sync source.
User-space Interface
~~~~~~~~~~~~~~~~~~~~
User-space programs can only work with DAHDI channels. The basic
@@ -895,7 +718,7 @@ standard HDLC rate of 64k).
Low-Level Drivers
~~~~~~~~~~~~~~~~~
Low-level drivers create spans ('struct dahdi_span'). They register the
spans with the DAHDI core using 'dahdi_device_register()'.
spans with the DAHDI core using 'dahdi_register()'.
'struct dahdi_span' has a number of informative members that are updated
solely by the low-level driver:

View File

@@ -293,10 +293,6 @@ load)
# TODO: A local copy of Asterisk, configured with dahdi_gnconf.
# doable, but trickier.
run_asterisk
if [ "$LIVE_DAHDI_FREEPBXDB" = 'yes' ]; then
GENCONF_PARAMETERS=$DESTDIR/etc/dahdi/genconf_parameters \
dahdi_genconf freepbxdb
fi
;;
genconf)
genconf

View File

@@ -33,14 +33,13 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_ECHOCAN_MG2) += dahdi_echocan_mg2.o
obj-m += $(DAHDI_MODULES_EXTRA)
# Only enable this if you think you know what you're doing. This is not
# supported yet:
#obj-m += dahdi_echocan_oslec.o
#
# A quick and dirty way to build OSLEC, if you happened to place it
# yourself in the dahdi source tree. This is experimental. See README
# regarding OSLEC.
#obj-m += ../staging/echo/
# If you want to build OSLEC, include the code in the standard location:
# drivers/staging/echo . The DAHDI OSLEC echo canceller will be built as
# well:
ifneq (,$(wildcard $(src)/../staging/echo/echo.c))
obj-m += dahdi_echocan_oslec.o
obj-m += ../staging/echo/
endif
CFLAGS_MODULE += -I$(DAHDI_INCLUDE) -I$(src)

File diff suppressed because it is too large Load Diff

View File

@@ -49,311 +49,6 @@ static struct class_simple *dahdi_class = NULL;
#define class_destroy class_simple_destroy
#endif
/*
* Very old hotplug support
*/
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 9)
#define OLD_HOTPLUG_SUPPORT /* for older kernels */
#define OLD_HOTPLUG_SUPPORT_269
#endif
#ifdef OLD_HOTPLUG_SUPPORT_269
/* Copy from new kernels lib/kobject_uevent.c */
enum kobject_action {
KOBJ_ADD,
KOBJ_REMOVE,
KOBJ_CHANGE,
KOBJ_MOUNT,
KOBJ_UMOUNT,
KOBJ_OFFLINE,
KOBJ_ONLINE,
};
#endif
/*
* Hotplug replaced with uevent in 2.6.16
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
#define OLD_HOTPLUG_SUPPORT /* for older kernels */
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
#define DEVICE_ATTR_READER(name, dev, buf) \
ssize_t name(struct device *dev, struct device_attribute *attr,\
char *buf)
#define DEVICE_ATTR_WRITER(name, dev, buf, count) \
ssize_t name(struct device *dev, struct device_attribute *attr,\
const char *buf, size_t count)
#define BUS_ATTR_READER(name, dev, buf) \
ssize_t name(struct device *dev, struct device_attribute *attr, \
char *buf)
#define BUS_ATTR_WRITER(name, dev, buf, count) \
ssize_t name(struct device *dev, struct device_attribute *attr,\
const char *buf, size_t count)
#else
#define DEVICE_ATTR_READER(name, dev, buf) \
ssize_t name(struct device *dev, char *buf)
#define DEVICE_ATTR_WRITER(name, dev, buf, count) \
ssize_t name(struct device *dev, const char *buf, size_t count)
#define BUS_ATTR_READER(name, dev, buf) \
ssize_t name(struct device *dev, char *buf)
#define BUS_ATTR_WRITER(name, dev, buf, count) \
ssize_t name(struct device *dev, const char *buf, size_t count)
#endif
#define DRIVER_ATTR_READER(name, drv, buf) \
ssize_t name(struct device_driver *drv, char * buf)
static char *initdir = "/usr/share/dahdi";
module_param(initdir, charp, 0644);
static int span_match(struct device *dev, struct device_driver *driver)
{
return 1;
}
static inline struct dahdi_span *dev_to_span(struct device *dev)
{
return dev_get_drvdata(dev);
}
#ifdef OLD_HOTPLUG_SUPPORT
static int span_hotplug(struct device *dev, char **envp, int envnum,
char *buff, int bufsize)
{
struct dahdi_span *span;
if (!dev)
return -ENODEV;
span = dev_to_span(dev);
envp[0] = buff;
if (snprintf(buff, bufsize, "SPAN_NAME=%s", span->name) >= bufsize)
return -ENOMEM;
envp[1] = NULL;
return 0;
}
#else
#define SPAN_VAR_BLOCK \
do { \
DAHDI_ADD_UEVENT_VAR("DAHDI_INIT_DIR=%s", initdir); \
DAHDI_ADD_UEVENT_VAR("SPAN_NUM=%d", span->spanno); \
DAHDI_ADD_UEVENT_VAR("SPAN_NAME=%s", span->name); \
} while (0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
#define DAHDI_ADD_UEVENT_VAR(fmt, val...) \
do { \
int err = add_uevent_var(envp, num_envp, &i, \
buffer, buffer_size, &len, \
fmt, val); \
if (err) \
return err; \
} while (0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
#define dev_name(dev) ((dev)->bus_id)
#define dev_set_name(dev, format, ...) \
snprintf((dev)->bus_id, BUS_ID_SIZE, format, ## __VA_ARGS__);
#endif
static int span_uevent(struct device *dev, char **envp, int num_envp,
char *buffer, int buffer_size)
{
struct dahdi_span *span;
int i = 0;
int len = 0;
if (!dev)
return -ENODEV;
span = dev_to_span(dev);
if (!span)
return -ENODEV;
dahdi_dbg(GENERAL, "SYFS dev_name=%s span=%s\n",
dev_name(dev), span->name);
SPAN_VAR_BLOCK;
envp[i] = NULL;
return 0;
}
#else
#define DAHDI_ADD_UEVENT_VAR(fmt, val...) \
do { \
int err = add_uevent_var(kenv, fmt, val); \
if (err) \
return err; \
} while (0)
static int span_uevent(struct device *dev, struct kobj_uevent_env *kenv)
{
struct dahdi_span *span;
if (!dev)
return -ENODEV;
span = dev_to_span(dev);
if (!span)
return -ENODEV;
dahdi_dbg(GENERAL, "SYFS dev_name=%s span=%s\n",
dev_name(dev), span->name);
SPAN_VAR_BLOCK;
return 0;
}
#endif
#endif /* OLD_HOTPLUG_SUPPORT */
#define span_attr(field, format_string) \
static BUS_ATTR_READER(field##_show, dev, buf) \
{ \
struct dahdi_span *span; \
\
span = dev_to_span(dev); \
return sprintf(buf, format_string, span->field); \
}
span_attr(name, "%s\n");
span_attr(desc, "%s\n");
span_attr(spantype, "%s\n");
span_attr(alarms, "0x%x\n");
span_attr(lbo, "%d\n");
span_attr(syncsrc, "%d\n");
static BUS_ATTR_READER(local_spanno_show, dev, buf)
{
struct dahdi_span *span;
span = dev_to_span(dev);
return sprintf(buf, "%d\n", local_spanno(span));
}
static BUS_ATTR_READER(is_digital_show, dev, buf)
{
struct dahdi_span *span;
span = dev_to_span(dev);
return sprintf(buf, "%d\n", dahdi_is_digital_span(span));
}
static BUS_ATTR_READER(is_sync_master_show, dev, buf)
{
struct dahdi_span *span;
span = dev_to_span(dev);
return sprintf(buf, "%d\n", dahdi_is_sync_master(span));
}
static BUS_ATTR_READER(basechan_show, dev, buf)
{
struct dahdi_span *span;
span = dev_to_span(dev);
return sprintf(buf, "%d\n", span->chans[0]->channo);
}
static BUS_ATTR_READER(channels_show, dev, buf)
{
struct dahdi_span *span;
span = dev_to_span(dev);
return sprintf(buf, "%d\n", span->channels);
}
static struct device_attribute span_dev_attrs[] = {
__ATTR_RO(name),
__ATTR_RO(desc),
__ATTR_RO(spantype),
__ATTR_RO(local_spanno),
__ATTR_RO(alarms),
__ATTR_RO(lbo),
__ATTR_RO(syncsrc),
__ATTR_RO(is_digital),
__ATTR_RO(is_sync_master),
__ATTR_RO(basechan),
__ATTR_RO(channels),
__ATTR_NULL,
};
static struct driver_attribute dahdi_attrs[] = {
__ATTR_NULL,
};
static struct bus_type spans_bus_type = {
.name = "dahdi_spans",
.match = span_match,
#ifdef OLD_HOTPLUG_SUPPORT
.hotplug = span_hotplug,
#else
.uevent = span_uevent,
#endif
.dev_attrs = span_dev_attrs,
.drv_attrs = dahdi_attrs,
};
static int span_probe(struct device *dev)
{
struct dahdi_span *span;
span = dev_to_span(dev);
span_dbg(DEVICES, span, "\n");
return 0;
}
static int span_remove(struct device *dev)
{
struct dahdi_span *span;
span = dev_to_span(dev);
span_dbg(DEVICES, span, "\n");
return 0;
}
static struct device_driver dahdi_driver = {
.name = "generic_lowlevel",
.bus = &spans_bus_type,
.probe = span_probe,
.remove = span_remove,
#ifndef OLD_HOTPLUG_SUPPORT
.owner = THIS_MODULE
#endif
};
static void span_uevent_send(struct dahdi_span *span, enum kobject_action act)
{
struct kobject *kobj;
kobj = &span->span_device->kobj;
span_dbg(DEVICES, span, "SYFS dev_name=%s action=%d\n",
dev_name(span->span_device), act);
#if defined(OLD_HOTPLUG_SUPPORT_269)
{
/* Copy from new kernels lib/kobject_uevent.c */
static const char *const str[] = {
[KOBJ_ADD] "add",
[KOBJ_REMOVE] "remove",
[KOBJ_CHANGE] "change",
[KOBJ_MOUNT] "mount",
[KOBJ_UMOUNT] "umount",
[KOBJ_OFFLINE] "offline",
[KOBJ_ONLINE] "online"
};
kobject_hotplug(str[act], kobj);
}
#elif defined(OLD_HOTPLUG_SUPPORT)
kobject_hotplug(kobj, act);
#else
kobject_uevent(kobj, act);
#endif
}
static void span_release(struct device *dev)
{
dahdi_dbg(DEVICES, "%s: %s\n", __func__, dev_name(dev));
}
int dahdi_register_chardev(struct dahdi_chardev *dev)
{
@@ -383,15 +78,7 @@ EXPORT_SYMBOL(dahdi_unregister_chardev);
void span_sysfs_remove(struct dahdi_span *span)
{
struct device *span_device;
int x;
span_dbg(DEVICES, span, "\n");
span_device = span->span_device;
if (!span_device)
return;
for (x = 0; x < span->channels; x++) {
struct dahdi_chan *chan = span->chans[x];
if (!test_bit(DAHDI_FLAGBIT_DEVFILE, &chan->flags))
@@ -401,55 +88,13 @@ void span_sysfs_remove(struct dahdi_span *span)
MKDEV(DAHDI_MAJOR, chan->channo));
clear_bit(DAHDI_FLAGBIT_DEVFILE, &chan->flags);
}
if (!dev_get_drvdata(span_device))
return;
/* Grab an extra reference to the device since we'll still want it
* after we've unregistered it */
get_device(span_device);
span_uevent_send(span, KOBJ_OFFLINE);
device_unregister(span->span_device);
dev_set_drvdata(span_device, NULL);
span_device->parent = NULL;
put_device(span_device);
memset(&span->span_device, 0, sizeof(span->span_device));
kfree(span->span_device);
span->span_device = NULL;
}
int span_sysfs_create(struct dahdi_span *span)
{
struct device *span_device;
int res = 0;
int x;
if (span->span_device) {
WARN_ON(1);
return -EEXIST;
}
span->span_device = kzalloc(sizeof(*span->span_device), GFP_KERNEL);
if (!span->span_device)
return -ENOMEM;
span_device = span->span_device;
span_dbg(DEVICES, span, "\n");
span_device->bus = &spans_bus_type;
span_device->parent = &span->parent->dev;
dev_set_name(span_device, "span-%d", span->spanno);
dev_set_drvdata(span_device, span);
span_device->release = span_release;
res = device_register(span_device);
if (res) {
span_err(span, "%s: device_register failed: %d\n", __func__,
res);
kfree(span->span_device);
span->span_device = NULL;
goto cleanup;
}
for (x = 0; x < span->channels; x++) {
struct dahdi_chan *chan = span->chans[x];
char chan_name[32];
@@ -492,248 +137,10 @@ static struct {
unsigned int timer:1;
unsigned int channel:1;
unsigned int pseudo:1;
unsigned int sysfs_driver_registered:1;
unsigned int sysfs_spans_bus_type:1;
unsigned int dahdi_device_bus_registered:1;
} dummy_dev;
static inline struct dahdi_device *to_ddev(struct device *dev)
{
return container_of(dev, struct dahdi_device, dev);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t dahdi_device_manufacturer_show(struct device *dev, char *buf)
#else
static ssize_t
dahdi_device_manufacturer_show(struct device *dev,
struct device_attribute *attr, char *buf)
#endif
{
struct dahdi_device *ddev = to_ddev(dev);
return sprintf(buf, "%s\n", ddev->manufacturer);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t dahdi_device_type_show(struct device *dev, char *buf)
#else
static ssize_t
dahdi_device_type_show(struct device *dev,
struct device_attribute *attr, char *buf)
#endif
{
struct dahdi_device *ddev = to_ddev(dev);
return sprintf(buf, "%s\n", ddev->devicetype);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t dahdi_device_span_count_show(struct device *dev, char *buf)
#else
static ssize_t
dahdi_device_span_count_show(struct device *dev,
struct device_attribute *attr, char *buf)
#endif
{
struct dahdi_device *ddev = to_ddev(dev);
unsigned int count = 0;
struct list_head *pos;
list_for_each(pos, &ddev->spans)
++count;
return sprintf(buf, "%d\n", count);
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t dahdi_device_hardware_id_show(struct device *dev, char *buf)
#else
static ssize_t
dahdi_device_hardware_id_show(struct device *dev,
struct device_attribute *attr, char *buf)
#endif
{
struct dahdi_device *ddev = to_ddev(dev);
return sprintf(buf, "%s\n",
(ddev->hardware_id) ? ddev->hardware_id : "");
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t
dahdi_device_auto_assign(struct device *dev, const char *buf, size_t count)
#else
static ssize_t
dahdi_device_auto_assign(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
#endif
{
struct dahdi_device *ddev = to_ddev(dev);
dahdi_assign_device_spans(ddev);
return count;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t
dahdi_device_assign_span(struct device *dev, const char *buf, size_t count)
#else
static ssize_t
dahdi_device_assign_span(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
#endif
{
int ret;
struct dahdi_span *span;
unsigned int local_span_number;
unsigned int desired_spanno;
unsigned int desired_basechanno;
struct dahdi_device *const ddev = to_ddev(dev);
ret = sscanf(buf, "%u:%u:%u", &local_span_number, &desired_spanno,
&desired_basechanno);
if (ret != 3) {
dev_notice(dev, "badly formatted input (should be <num>:<num>:<num>)\n");
return -EINVAL;
}
if (desired_spanno && !desired_basechanno) {
dev_notice(dev, "Must set span number AND base chan number\n");
return -EINVAL;
}
list_for_each_entry(span, &ddev->spans, device_node) {
if (local_span_number == local_spanno(span)) {
ret = dahdi_assign_span(span, desired_spanno,
desired_basechanno, 1);
return (ret) ? ret : count;
}
}
dev_notice(dev, "no match for local span number %d\n", local_span_number);
return -EINVAL;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t
dahdi_device_unassign_span(struct device *dev, const char *buf, size_t count)
#else
static ssize_t
dahdi_device_unassign_span(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
#endif
{
int ret;
unsigned int local_span_number;
struct dahdi_span *span;
struct dahdi_device *const ddev = to_ddev(dev);
ret = sscanf(buf, "%u", &local_span_number);
if (ret != 1)
return -EINVAL;
ret = -ENODEV;
list_for_each_entry(span, &ddev->spans, device_node) {
if (local_span_number == local_spanno(span))
ret = dahdi_unassign_span(span);
}
if (-ENODEV == ret) {
if (printk_ratelimit()) {
dev_info(dev, "'%d' is an invalid local span number.\n",
local_span_number);
}
return -EINVAL;
}
return (ret < 0) ? ret : count;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t dahdi_spantype_show(struct device *dev, char *buf)
#else
static ssize_t
dahdi_spantype_show(struct device *dev,
struct device_attribute *attr, char *buf)
#endif
{
struct dahdi_device *ddev = to_ddev(dev);
int count = 0;
ssize_t total = 0;
struct dahdi_span *span;
/* TODO: Make sure this doesn't overflow the page. */
list_for_each_entry(span, &ddev->spans, device_node) {
count = sprintf(buf, "%d:%s\n", local_spanno(span), span->spantype);
buf += count;
total += count;
}
return total;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13)
static ssize_t
dahdi_spantype_store(struct device *dev, const char *buf, size_t count)
#else
static ssize_t
dahdi_spantype_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
#endif
{
struct dahdi_device *const ddev = to_ddev(dev);
int ret;
struct dahdi_span *span;
unsigned int local_span_number;
char desired_spantype[80];
ret = sscanf(buf, "%u:%70s", &local_span_number, desired_spantype);
if (ret != 2)
return -EINVAL;
list_for_each_entry(span, &ddev->spans, device_node) {
if (local_spanno(span) == local_span_number)
break;
}
if (test_bit(DAHDI_FLAGBIT_REGISTERED, &span->flags)) {
module_printk(KERN_WARNING, "Span %s is already assigned.\n",
span->name);
return -EINVAL;
}
if (local_spanno(span) != local_span_number) {
module_printk(KERN_WARNING, "%d is not a valid local span number "
"for this device.\n", local_span_number);
return -EINVAL;
}
if (!span->ops->set_spantype) {
module_printk(KERN_WARNING, "Span %s does not support "
"setting type.\n", span->name);
return -EINVAL;
}
ret = span->ops->set_spantype(span, &desired_spantype[0]);
return (ret < 0) ? ret : count;
}
static struct device_attribute dahdi_device_attrs[] = {
__ATTR(manufacturer, S_IRUGO, dahdi_device_manufacturer_show, NULL),
__ATTR(type, S_IRUGO, dahdi_device_type_show, NULL),
__ATTR(span_count, S_IRUGO, dahdi_device_span_count_show, NULL),
__ATTR(hardware_id, S_IRUGO, dahdi_device_hardware_id_show, NULL),
__ATTR(auto_assign, S_IWUSR, NULL, dahdi_device_auto_assign),
__ATTR(assign_span, S_IWUSR, NULL, dahdi_device_assign_span),
__ATTR(unassign_span, S_IWUSR, NULL, dahdi_device_unassign_span),
__ATTR(spantype, S_IWUSR | S_IRUGO, dahdi_spantype_show,
dahdi_spantype_store),
__ATTR_NULL,
};
static struct bus_type dahdi_device_bus = {
.name = "dahdi_devices",
.dev_attrs = dahdi_device_attrs,
};
void dahdi_sysfs_exit(void)
{
dahdi_dbg(DEVICES, "SYSFS\n");
if (dummy_dev.pseudo) {
dahdi_dbg(DEVICES, "Removing /dev/dahdi/pseudo:\n");
DEL_DAHDI_DEV(DAHDI_PSEUDO);
@@ -759,60 +166,7 @@ void dahdi_sysfs_exit(void)
class_destroy(dahdi_class);
dahdi_class = NULL;
}
if (dummy_dev.sysfs_driver_registered) {
dahdi_dbg(DEVICES, "Unregister driver\n");
driver_unregister(&dahdi_driver);
dummy_dev.sysfs_driver_registered = 0;
}
if (dummy_dev.sysfs_spans_bus_type) {
dahdi_dbg(DEVICES, "Unregister span bus type\n");
bus_unregister(&spans_bus_type);
dummy_dev.sysfs_spans_bus_type = 0;
}
unregister_chrdev(DAHDI_MAJOR, "dahdi");
if (dummy_dev.dahdi_device_bus_registered) {
bus_unregister(&dahdi_device_bus);
dummy_dev.dahdi_device_bus_registered = 0;
}
}
static void dahdi_device_release(struct device *dev)
{
struct dahdi_device *ddev = container_of(dev, struct dahdi_device, dev);
kfree(ddev);
}
/**
* dahdi_sysfs_add_device - Add the dahdi_device into the sysfs hierarchy.
* @ddev: The device to add.
* @parent: The physical device that is implementing this device.
*
* By adding the dahdi_device to the sysfs hierarchy user space can control
* how spans are numbered.
*
*/
int dahdi_sysfs_add_device(struct dahdi_device *ddev, struct device *parent)
{
int ret;
struct device *const dev = &ddev->dev;
dev->parent = parent;
dev->bus = &dahdi_device_bus;
dev_set_name(dev, "%s:%s", parent->bus->name, dev_name(parent));
ret = device_add(dev);
return ret;
}
void dahdi_sysfs_init_device(struct dahdi_device *ddev)
{
device_initialize(&ddev->dev);
ddev->dev.release = dahdi_device_release;
}
void dahdi_sysfs_unregister_device(struct dahdi_device *ddev)
{
device_del(&ddev->dev);
}
int __init dahdi_sysfs_init(const struct file_operations *dahdi_fops)
@@ -820,12 +174,6 @@ int __init dahdi_sysfs_init(const struct file_operations *dahdi_fops)
int res = 0;
void *dev;
res = bus_register(&dahdi_device_bus);
if (res)
return res;
dummy_dev.dahdi_device_bus_registered = 1;
res = register_chrdev(DAHDI_MAJOR, "dahdi", dahdi_fops);
if (res) {
module_printk(KERN_ERR, "Unable to register DAHDI character device handler on %d\n", DAHDI_MAJOR);
@@ -872,20 +220,6 @@ int __init dahdi_sysfs_init(const struct file_operations *dahdi_fops)
goto cleanup;
}
dummy_dev.ctl = 1;
res = bus_register(&spans_bus_type);
if (res != 0) {
dahdi_err("%s: bus_register(%s) failed. Error number %d",
__func__, spans_bus_type.name, res);
goto cleanup;
}
dummy_dev.sysfs_spans_bus_type = 1;
res = driver_register(&dahdi_driver);
if (res < 0) {
dahdi_err("%s: driver_register(%s) failed. Error number %d",
__func__, dahdi_driver.name, res);
goto cleanup;
}
dummy_dev.sysfs_driver_registered = 1;
return 0;

View File

@@ -34,28 +34,4 @@ void span_sysfs_remove(struct dahdi_span *span);
int __init dahdi_sysfs_init(const struct file_operations *dahdi_fops);
void dahdi_sysfs_exit(void);
void dahdi_sysfs_init_device(struct dahdi_device *ddev);
int dahdi_sysfs_add_device(struct dahdi_device *ddev, struct device *parent);
void dahdi_sysfs_unregister_device(struct dahdi_device *ddev);
int dahdi_assign_span(struct dahdi_span *span, unsigned int spanno,
unsigned int basechan, int prefmaster);
int dahdi_unassign_span(struct dahdi_span *span);
int dahdi_assign_device_spans(struct dahdi_device *ddev);
static inline int get_span(struct dahdi_span *span)
{
return try_module_get(span->ops->owner);
}
static inline void put_span(struct dahdi_span *span)
{
module_put(span->ops->owner);
}
static inline int local_spanno(struct dahdi_span *span)
{
return span->offset + 1;
}
#endif /* _DAHDI_H */

View File

@@ -53,7 +53,7 @@
#if defined(USE_HIGHRESTIMER)
#include <linux/hrtimer.h>
#else
#include <linux/time.h>
#include <linux/timer.h>
#endif
#include <dahdi/kernel.h>

View File

@@ -400,7 +400,6 @@ static void dahdi_dynamic_release(struct kref *kref)
for (x = 0; x < d->span.channels; x++)
kfree(d->chans[x]);
dahdi_free_device(d->ddev);
kfree(d);
}
@@ -470,7 +469,7 @@ static int _destroy_dynamic(struct dahdi_dynamic_span *dds)
return -EBUSY;
}
dahdi_unregister_device(d->ddev);
dahdi_unregister(&d->span);
spin_lock_irqsave(&dspan_lock, flags);
list_del_rcu(&d->list);
@@ -579,8 +578,8 @@ static int _create_dynamic(struct dahdi_dynamic_span *dds)
d = kzalloc(sizeof(*d), GFP_KERNEL);
if (!d)
return -ENOMEM;
kref_init(&d->kref);
d->ddev = dahdi_create_device();
for (x = 0; x < dds->numchans; x++) {
d->chans[x] = kzalloc(sizeof(*d->chans[x]), GFP_KERNEL);
@@ -658,9 +657,8 @@ static int _create_dynamic(struct dahdi_dynamic_span *dds)
return res;
}
list_add_tail(&d->span.device_node, &d->ddev->spans);
/* Whee! We're created. Now register the span */
if (dahdi_register_device(d->ddev, d->dev)) {
if (dahdi_register(&d->span, 0)) {
printk(KERN_NOTICE "Unable to register span '%s'\n",
d->span.name);
dynamic_put(d);
@@ -771,7 +769,7 @@ void dahdi_dynamic_unregister_driver(struct dahdi_dynamic_driver *dri)
WARN_ON(1);
}
}
dahdi_unregister_device(d->ddev);
dahdi_unregister(&d->span);
spin_lock_irqsave(&dspan_lock, flags);
list_del_rcu(&d->list);
spin_unlock_irqrestore(&dspan_lock, flags);

View File

@@ -24,16 +24,14 @@
OCT6114_064_VERSION:=1.05.01
OCT6114_128_VERSION:=1.05.01
OCT6114_256_VERSION:=1.05.01
TC400M_VERSION:=MR6.12
VPMADT032_VERSION:=1.25.0
HX8_VERSION:=2.06
VPMOCT032_VERSION:=1.12.0
WCT820_VERSION:=1.76
VPMOCT032_VERSION:=1.11.0
FIRMWARE_URL:=http://downloads.digium.com/pub/telephony/firmware/releases
ALL_FIRMWARE=FIRMWARE-OCT6114-064 FIRMWARE-OCT6114-128 FIRMWARE-OCT6114-256 FIRMWARE-TC400M FIRMWARE-HX8 FIRMWARE-VPMOCT032 FIRMWARE-TE820
ALL_FIRMWARE=FIRMWARE-OCT6114-064 FIRMWARE-OCT6114-128 FIRMWARE-TC400M FIRMWARE-HX8 FIRMWARE-VPMOCT032
# Firmware files should use the naming convention: dahdi-fw-<base name>-<sub name>-<version> or dahdi-fw-<base name>-<version>
# First example: dahdi-fw-oct6114-064-1.05.01
@@ -44,20 +42,18 @@ ALL_FIRMWARE=FIRMWARE-OCT6114-064 FIRMWARE-OCT6114-128 FIRMWARE-OCT6114-256 FIRM
# Build a list of firmware package filenames we need
FIRMWARE:=$(ALL_FIRMWARE:FIRMWARE-OCT6114-064=dahdi-fw-oct6114-064-$(OCT6114_064_VERSION).tar.gz)
FIRMWARE:=$(FIRMWARE:FIRMWARE-OCT6114-128=dahdi-fw-oct6114-128-$(OCT6114_128_VERSION).tar.gz)
FIRMWARE:=$(FIRMWARE:FIRMWARE-OCT6114-256=dahdi-fw-oct6114-256-$(OCT6114_256_VERSION).tar.gz)
FIRMWARE:=$(FIRMWARE:FIRMWARE-TC400M=dahdi-fw-tc400m-$(TC400M_VERSION).tar.gz)
FIRMWARE:=$(FIRMWARE:FIRMWARE-HX8=dahdi-fw-hx8-$(HX8_VERSION).tar.gz)
FIRMWARE:=$(FIRMWARE:FIRMWARE-VPMOCT032=dahdi-fw-vpmoct032-$(VPMOCT032_VERSION).tar.gz)
FIRMWARE:=$(FIRMWARE:FIRMWARE-TE820=dahdi-fw-te820-$(WCT820_VERSION).tar.gz)
FWLOADERS:=dahdi-fwload-vpmadt032-$(VPMADT032_VERSION).tar.gz
# Build a list of object files if hotplug will not be used
OBJECT_FILES:=$(ALL_FIRMWARE:FIRMWARE-OCT6114-064=dahdi-fw-oct6114-064.o)
OBJECT_FILES:=$(OBJECT_FILES:FIRMWARE-OCT6114-128=dahdi-fw-oct6114-128.o)
OBJECT_FILES:=$(OBJECT_FILES:FIRMWARE-OCT6114-256=dahdi-fw-oct6114-256.o)
OBJECT_FILES:=$(OBJECT_FILES:FIRMWARE-TC400M=dahdi-fw-tc400m.o)
OBJECT_FILES:=$(OBJECT_FILES:FIRMWARE-HX8=dahdi-fw-hx8.o)
OBJECT_FILES:=$(OBJECT_FILES:FIRMWARE-VPMOCT032=dahdi-fw-vpmoct032.o)
# Force usage of wget, for now
DOWNLOAD=wget
@@ -128,17 +124,6 @@ ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-12
else
@echo "Firmware dahdi-fw-oct6114-128.bin is already installed with required version $(OCT6114_128_VERSION)"
endif
ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-256-$(OCT6114_256_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-256-$(OCT6114_256_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
@echo "Installing dahdi-fw-oct6114-256.bin to hotplug firmware directories"
@install -m 644 dahdi-fw-oct6114-256.bin $(DESTDIR)/usr/lib/hotplug/firmware
@rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-256-*
@touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-oct6114-256-$(OCT6114_256_VERSION)
@install -m 644 dahdi-fw-oct6114-256.bin $(DESTDIR)/lib/firmware
@rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-256-*
@touch $(DESTDIR)/lib/firmware/.dahdi-fw-oct6114-256-$(OCT6114_256_VERSION)
else
@echo "Firmware dahdi-fw-oct6114-256.bin is already installed with required version $(OCT6114_256_VERSION)"
endif
ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-tc400m-$(TC400M_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
@echo "Installing dahdi-fw-tc400m.bin to hotplug firmware directories"
@install -m 644 dahdi-fw-tc400m.bin $(DESTDIR)/usr/lib/hotplug/firmware
@@ -172,17 +157,6 @@ ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-vpmoct032-
else
@echo "Firmware dahdi-fw-vpmoct032.bin is already installed with required version $(VPMOCT032_VERSION)"
endif
ifeq ($(shell if ( [ -f $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-te820-$(WCT820_VERSION) ] ) && ( [ -f $(DESTDIR)/lib/firmware/.dahdi-fw-te820-$(WCT820_VERSION) ] ); then echo "no"; else echo "yes"; fi),yes)
@echo "Installing dahdi-fw-te820.bin to hotplug firmware directories"
@install -m 644 dahdi-fw-te820.bin $(DESTDIR)/usr/lib/hotplug/firmware
@rm -rf $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-te820-*
@touch $(DESTDIR)/usr/lib/hotplug/firmware/.dahdi-fw-te820-$(WCT820_VERSION)
@install -m 644 dahdi-fw-te820.bin $(DESTDIR)/lib/firmware
@rm -rf $(DESTDIR)/lib/firmware/.dahdi-fw-te820-*
@touch $(DESTDIR)/lib/firmware/.dahdi-fw-te820-$(WCT820_VERSION)
else
@echo "Firmware dahdi-fw-te820.bin is already installed with required version $(WCT820_VERSION)"
endif
# Uninstall any installed dahdi firmware images from hotplug firmware directories
hotplug-uninstall:
@@ -211,12 +185,12 @@ dahdi-fw-oct6114-128.o: dahdi-fw-oct6114-128-$(OCT6114_128_VERSION).tar.gz dahdi
@echo Making firmware object file for dahdi-fw-oct6114-128.bin
./make_firmware_object dahdi-fw-oct6114-128.bin $@
# Build object file of an oct6114 256 firmware image for linking
dahdi-fw-oct6114-256.o: dahdi-fw-oct6114-256-$(OCT6114_256_VERSION).tar.gz dahdi-fw-oct6114-256.bin make_firmware_object
@echo Making firmware object file for dahdi-fw-oct6114-256.bin
./make_firmware_object dahdi-fw-oct6114-256.bin $@
# Build object file of a TC400M firmware image for linking
dahdi-fw-tc400m.o: dahdi-fw-tc400m-$(TC400M_VERSION).tar.gz dahdi-fw-tc400m.bin make_firmware_object
@echo Making firmware object file for dahdi-fw-tc400m.bin
./make_firmware_object dahdi-fw-tc400m.bin $@
# Build object file of a VPMOCT032 firmware image for linking
dahdi-fw-vpmoct032.o: dahdi-fw-vpmoct032-$(VPMOCT032_VERSION).tar.gz dahdi-fw-vpmoct032.bin make_firmware_object
@echo Making firmware object file for dahdi-fw-vpmoct032.bin
./make_firmware_object dahdi-fw-vpmoct032.bin $@

View File

@@ -397,7 +397,7 @@ $Octasic_Revision: 171 $
/* Max defines.*/
#ifndef cOCT6100_MAX_ECHO_CHANNELS
#define cOCT6100_MAX_ECHO_CHANNELS 256
#define cOCT6100_MAX_ECHO_CHANNELS 128
#endif
#define cOCT6100_MAX_TSI_CNCTS 1530
#define cOCT6100_MAX_CALLER_ID_PLAYOUT_BUFFERS ( 3328 + 6 )

View File

@@ -146,7 +146,6 @@ struct encdec
struct pciradio {
struct pci_dev *dev;
struct dahdi_device *ddev;
struct dahdi_span span;
unsigned char ios;
int usecount;
@@ -1489,7 +1488,7 @@ static int pciradio_initialize(struct pciradio *rad)
rad->span.flags = DAHDI_FLAG_RBS;
rad->span.ops = &pciradio_span_ops;
if (dahdi_register_device(rad->ddev, &rad->dev->dev)) {
if (dahdi_register(&rad->span, 0)) {
printk(KERN_NOTICE "Unable to register span with DAHDI\n");
return -1;
}
@@ -1778,7 +1777,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de
release_region(rad->ioaddr, 0xff);
pci_free_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, (void *)rad->writechunk, rad->writedma);
pci_set_drvdata(pdev, NULL);
dahdi_free_device(rad->ddev);
dahdi_unregister(&rad->span);
kfree(rad);
return -EIO;
@@ -1811,7 +1810,7 @@ static int __devinit pciradio_init_one(struct pci_dev *pdev, const struct pci_de
static void pciradio_release(struct pciradio *rad)
{
dahdi_unregister_device(rad->ddev);
dahdi_unregister(&rad->span);
if (rad->freeregion)
release_region(rad->ioaddr, 0xff);
kfree(rad);

View File

@@ -97,7 +97,6 @@ struct tor2 {
unsigned long xilinx8_region; /* 8 bit Region allocated to Xilinx */
unsigned long xilinx8_len; /* Length of 8 bit Xilinx region */
__iomem volatile unsigned char *mem8; /* Virtual representation of 8 bit Xilinx memory area */
struct dahdi_device *ddev;
struct tor2_span tspans[SPANS_PER_CARD]; /* Span data */
struct dahdi_chan **chans[SPANS_PER_CARD]; /* Pointers to card channels */
struct tor2_chan tchans[32 * SPANS_PER_CARD]; /* Channel user data */
@@ -286,6 +285,10 @@ static void init_spans(struct tor2 *tor)
snprintf(s->desc, sizeof(s->desc) - 1,
"Tormenta 2 (PCI) Quad %s Card %d Span %d",
(tor->cardtype == TYPE_T1) ? "T1" : "E1", tor->num, x + 1);
s->manufacturer = "Digium";
strlcpy(s->devicetype, tor->type, sizeof(s->devicetype));
snprintf(s->location, sizeof(s->location) - 1,
"PCI Bus %02d Slot %02d", tor->pci->bus->number, PCI_SLOT(tor->pci->devfn) + 1);
if (tor->cardtype == TYPE_T1) {
s->channels = 24;
s->deflaw = DAHDI_LAW_MULAW;
@@ -319,31 +322,19 @@ static void init_spans(struct tor2 *tor)
static int __devinit tor2_launch(struct tor2 *tor)
{
int res;
struct dahdi_span *s;
int i;
if (test_bit(DAHDI_FLAGBIT_REGISTERED, &tor->tspans[0].dahdi_span.flags))
return 0;
tor->ddev = dahdi_create_device();
tor->ddev->location = kasprintf(GFP_KERNEL, "PCI Bus %02d Slot %02d",
tor->pci->bus->number,
PCI_SLOT(tor->pci->devfn) + 1);
if (!tor->ddev->location)
return -ENOMEM;
printk(KERN_INFO "Tor2: Launching card: %d\n", tor->order);
for (i = 0; i < SPANS_PER_CARD; ++i) {
s = &tor->tspans[i].dahdi_span;
list_add_tail(&s->device_node, &tor->ddev->spans);
}
res = dahdi_register_device(tor->ddev, &tor->pci->dev);
if (res) {
dev_err(&tor->pci->dev, "Unable to register with DAHDI.\n");
return res;
if (dahdi_register(s, 0)) {
printk(KERN_ERR "Unable to register span %s\n", s->name);
goto error_exit;
}
}
writew(PLX_INTENA, &tor->plx[INTCSR]); /* enable PLX interrupt */
@@ -351,6 +342,14 @@ static int __devinit tor2_launch(struct tor2 *tor)
tasklet_init(&tor->tor2_tlet, tor2_tasklet, (unsigned long)tor);
#endif
return 0;
error_exit:
for (i = 0; i < SPANS_PER_CARD; ++i) {
s = &tor->tspans[i].dahdi_span;
if (test_bit(DAHDI_FLAGBIT_REGISTERED, &s->flags))
dahdi_unregister(s);
}
return -1;
}
static void free_tor(struct tor2 *tor)
@@ -366,8 +365,6 @@ static void free_tor(struct tor2 *tor)
if (tor->chans[x])
kfree(tor->chans[x]);
}
kfree(tor->ddev->location);
dahdi_free_device(tor->ddev);
kfree(tor);
}
@@ -634,6 +631,7 @@ static struct pci_driver tor2_driver;
static void __devexit tor2_remove(struct pci_dev *pdev)
{
struct tor2 *tor;
int i;
tor = pci_get_drvdata(pdev);
if (!tor)
@@ -643,7 +641,11 @@ static void __devexit tor2_remove(struct pci_dev *pdev)
writeb(0, &tor->mem8[LEDREG]);
writew(0, &tor->plx[INTCSR]);
free_irq(tor->irq, tor);
dahdi_unregister_device(tor->ddev);
for (i = 0; i < SPANS_PER_CARD; ++i) {
struct dahdi_span *s = &tor->tspans[i].dahdi_span;
if (test_bit(DAHDI_FLAGBIT_REGISTERED, &s->flags))
dahdi_unregister(s);
}
release_mem_region(tor->plx_region, tor->plx_len);
release_mem_region(tor->xilinx32_region, tor->xilinx32_len);
release_mem_region(tor->xilinx8_region, tor->xilinx8_len);

View File

@@ -126,8 +126,8 @@ static int vpmadt032_getreg_full_return(struct vpmadt032 *vpm, int pagechange,
unsigned long ret;
BUG_ON(!cmd);
/* We'll wait for 2s */
ret = wait_for_completion_timeout(&cmd->complete, HZ*2);
/* We'll wait for 200ms */
ret = wait_for_completion_timeout(&cmd->complete, HZ/5);
if (unlikely(!ret)) {
spin_lock_irqsave(&vpm->list_lock, flags);
list_del(&cmd->node);

View File

@@ -2,4 +2,17 @@ obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_VOICEBUS) += dahdi_voicebus.o
dahdi_voicebus-objs := voicebus.o GpakCust.o GpakApi.o voicebus_net.o vpmoct.o
EXTRA_CFLAGS := -I$(src)/.. -Wno-undef
FIRM_DIR := ../firmware
ifneq ($(HOTPLUG_FIRMWARE),yes)
dahdi_voicebus-objs += $(FIRM_DIR)/dahdi-fw-vpmoct032.o
$(warning WARNING: You are compiling firmware into voicebus.ko which is not available under the terms of the GPL. It may be a violation of the GPL to distribute the resulting image since it combines both GPL and non-GPL work. You should consult a lawyer of your own before distributing such an image.)
else
EXTRA_CFLAGS+=-DHOTPLUG_FIRMWARE
endif
EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
$(obj)/$(FIRM_DIR)/dahdi-fw-vpmoct032.o: $(obj)/voicebus.o
$(MAKE) -C $(obj)/$(FIRM_DIR) dahdi-fw-vpmoct032.o

View File

@@ -2030,7 +2030,7 @@ static int __init voicebus_module_init(void)
* defined, but it will make sure that this module is a dependency of
* dahdi.ko, so that when it is being unloded, this module will be
* unloaded as well. */
dahdi_register_device(NULL, NULL);
dahdi_register(NULL, 0);
spin_lock_init(&loader_list_lock);
return 0;
}

View File

@@ -72,7 +72,7 @@ static int _vpmoct_read(struct vpmoct *vpm, u8 address,
list_del(&cmd->node);
spin_unlock_irqrestore(&vpm->list_lock, flags);
kfree(cmd);
dev_err(vpm->dev, "vpmoct_read_byte cmd timed out\n");
dev_err(vpm->dev, "vpmoct_read_byte cmd timed out :O(\n");
return 0;
}
@@ -443,6 +443,47 @@ static void vpmoct_set_defaults(struct vpmoct *vpm)
vpmoct_write_dword(vpm, 0x30, 0);
}
static const char *const FIRMWARE_NAME = "dahdi-fw-vpmoct032.bin";
#if defined(HOTPLUG_FIRMWARE)
static int
vpmoct_request_firmware(const struct firmware **fw, struct device *dev)
{
return request_firmware(fw, FIRMWARE_NAME, dev);
}
static void vpmoct_release_firmware(const struct firmware *fw)
{
release_firmware(fw);
}
#else
static int
vpmoct_request_firmware(const struct firmware **fw_p, struct device *dev)
{
struct firmware *fw;
extern void _binary_dahdi_fw_vpmoct032_bin_size;
extern u8 _binary_dahdi_fw_vpmoct032_bin_start[];
*fw_p = fw = kzalloc(sizeof(*fw), GFP_KERNEL);
if (!fw)
return -ENOMEM;
fw->data = _binary_dahdi_fw_vpmoct032_bin_start;
/* Yes... this is weird. objcopy gives us a symbol containing
the size of the firmware, not a pointer a variable containing the
size. The only way we can get the value of the symbol is to take
its address, so we define it as a pointer and then cast that value
to the proper type. */
fw->size = (size_t) &_binary_dahdi_fw_vpmoct032_bin_size;
return 0;
}
static void vpmoct_release_firmware(const struct firmware *fw)
{
kfree(fw);
}
#endif
/**
* vpmoct_load_flash - Check the current flash version and possibly load.
* @vpm: The VPMOCT032 module to check / load.
@@ -463,10 +504,9 @@ static void vpmoct_load_flash(struct work_struct *data)
const struct firmware *fw;
const struct vpmoct_header *header;
char serial[VPMOCT_SERIAL_SIZE+1];
const char *const FIRMWARE_NAME = "dahdi-fw-vpmoct032.bin";
int i;
res = request_firmware(&fw, FIRMWARE_NAME, vpm->dev);
res = vpmoct_request_firmware(&fw, vpm->dev);
if (res) {
dev_warn(vpm->dev,
"vpmoct: Failed to load firmware from userspace! %d\n",
@@ -505,7 +545,7 @@ static void vpmoct_load_flash(struct work_struct *data)
FIRMWARE_NAME);
/* Just use the old version of the fimware. */
release_firmware(fw);
vpmoct_release_firmware(fw);
vpmoct_set_defaults(vpm);
vpmoct_load_complete(work, true);
return;
@@ -514,7 +554,7 @@ static void vpmoct_load_flash(struct work_struct *data)
if (vpm->minor == header->minor &&
vpm->major == header->major) {
/* Proper version is running */
release_firmware(fw);
vpmoct_release_firmware(fw);
vpmoct_set_defaults(vpm);
vpmoct_load_complete(work, true);
return;
@@ -548,14 +588,14 @@ static void vpmoct_load_flash(struct work_struct *data)
if (vpmoct_check_firmware_crc(vpm, fw->size-VPMOCT_FIRM_HEADER_LEN*2,
header->major, header->minor))
goto error;
release_firmware(fw);
vpmoct_release_firmware(fw);
vpmoct_set_defaults(vpm);
vpmoct_load_complete(work, true);
return;
error:
dev_info(vpm->dev, "Unable to load firmware\n");
release_firmware(fw);
vpmoct_release_firmware(fw);
/* TODO: Should we disable module if the firmware doesn't load? */
vpmoct_load_complete(work, false);
return;

View File

@@ -35,7 +35,6 @@
#include <linux/spinlock.h>
#include <linux/device.h> /* dev_err() */
#include <linux/interrupt.h>
#include <asm/system.h> /* cli(), *_flags */
#include <asm/uaccess.h> /* copy_*_user */
#include <linux/workqueue.h> /* work_struct */
#include <linux/timer.h> /* timer_struct */
@@ -2475,6 +2474,7 @@ static void init_spans(struct b4xxp *b4)
bspan = &b4->spans[i];
bspan->parent = b4;
bspan->span.irq = b4->pdev->irq;
bspan->span.spantype = (bspan->te_mode) ? "TE" : "NT";
bspan->span.offset = i;
bspan->span.channels = WCB4XXP_CHANNELS_PER_SPAN;
@@ -2493,6 +2493,11 @@ static void init_spans(struct b4xxp *b4)
sprintf(bspan->span.name, "B4/%d/%d", b4->cardno, i+1);
sprintf(bspan->span.desc, "B4XXP (PCI) Card %d Span %d", b4->cardno, i+1);
bspan->span.manufacturer = "Digium";
strlcpy(bspan->span.devicetype, b4->variety,
sizeof(bspan->span.devicetype));
sprintf(bspan->span.location, "PCI Bus %02d Slot %02d",
b4->pdev->bus->number, PCI_SLOT(b4->pdev->devfn) + 1);
bspan->span.ops = &b4xxp_span_ops;
/* HDLC stuff */
@@ -2924,27 +2929,14 @@ static int __devinit b4xx_probe(struct pci_dev *pdev, const struct pci_device_id
hfc_init_all_st(b4);
/* initialize the DAHDI structures, and let DAHDI know it has some new hardware to play with */
b4->ddev = dahdi_create_device();
init_spans(b4);
for (x=0; x < b4->numspans; x++) {
struct dahdi_span *const s = &b4->spans[x].span;
list_add_tail(&s->device_node, &b4->ddev->spans);
}
b4->ddev->manufacturer = "Digium";
b4->ddev->devicetype = b4->variety;
b4->ddev->location = kasprintf(GFP_KERNEL, "PCI Bus %02d Slot %02d",
b4->pdev->bus->number,
PCI_SLOT(b4->pdev->devfn) + 1);
if (!b4->ddev->location) {
ret = -ENOMEM;
goto err_out_del_from_card_array;
}
if (dahdi_register_device(b4->ddev, &b4->pdev->dev)) {
dev_err(&b4->pdev->dev, "Unable to register device.\n");
goto err_out_unreg_spans;
if (dahdi_register(&b4->spans[x].span, 0)) {
dev_err(&b4->pdev->dev,
"Unable to register span %s\n",
b4->spans[x].span.name);
goto err_out_unreg_spans;
}
}
@@ -2980,7 +2972,10 @@ static int __devinit b4xx_probe(struct pci_dev *pdev, const struct pci_device_id
/* 'x' will have the failing span #. (0-3). We need to unregister everything before it. */
err_out_unreg_spans:
dahdi_unregister_device(b4->ddev);
while (x) {
dahdi_unregister(&b4->spans[x].span);
x--;
};
b4xxp_init_stage1(b4); /* full reset, re-init to "no-irq" state */
free_irq(pdev->irq, b4);
@@ -3001,8 +2996,6 @@ err_out_free_mem:
pci_set_drvdata(pdev, NULL);
pci_iounmap(pdev, b4->ioaddr);
pci_iounmap(pdev, b4->addr);
kfree(b4->ddev->location);
dahdi_free_device(b4->ddev);
kfree(b4);
err_out_release_regions:
@@ -3017,11 +3010,14 @@ err_out_disable_pdev:
static void __devexit b4xxp_remove(struct pci_dev *pdev)
{
struct b4xxp *b4 = pci_get_drvdata(pdev);
int i;
if (b4) {
b4->shutdown = 1;
dahdi_unregister_device(b4->ddev);
for (i=b4->numspans - 1; i >= 0; i--) {
dahdi_unregister(&b4->spans[i].span);
}
b4xxp_init_stage1(b4);
remove_sysfs_files(b4);
@@ -3036,8 +3032,6 @@ static void __devexit b4xxp_remove(struct pci_dev *pdev)
tasklet_kill(&b4->b4xxp_tlet);
kfree(b4->ddev->location);
dahdi_free_device(b4->ddev);
kfree(b4);
}

View File

@@ -474,7 +474,6 @@ struct b4xxp {
/* Flags for our bottom half */
unsigned int shutdown; /* 1=bottom half doesn't process anything, just returns */
struct tasklet_struct b4xxp_tlet;
struct dahdi_device *ddev;
};
/* CPLD access bits */

View File

@@ -135,7 +135,6 @@ static int wecareregs[] =
struct wcfxo {
struct pci_dev *dev;
char *variety;
struct dahdi_device *ddev;
struct dahdi_span span;
struct dahdi_chan _chan;
struct dahdi_chan *chan;
@@ -648,24 +647,19 @@ static const struct dahdi_span_ops wcfxo_span_ops = {
static int wcfxo_initialize(struct wcfxo *wc)
{
wc->ddev = dahdi_create_device();
/* DAHDI stuff */
sprintf(wc->span.name, "WCFXO/%d", wc->pos);
snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Board %d", wc->variety, wc->pos + 1);
sprintf(wc->chan->name, "WCFXO/%d/%d", wc->pos, 0);
wc->ddev->location = kasprintf(GFP_KERNEL, "PCI Bus %02d Slot %02d",
wc->dev->bus->number,
PCI_SLOT(wc->dev->devfn) + 1);
if (!wc->ddev->location)
return -ENOMEM;
wc->ddev->manufacturer = "Digium";
wc->ddev->devicetype = wc->variety;
snprintf(wc->span.location, sizeof(wc->span.location) - 1,
"PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1);
wc->span.manufacturer = "Digium";
strlcpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype));
wc->chan->sigcap = DAHDI_SIG_FXSKS | DAHDI_SIG_FXSLS | DAHDI_SIG_SF;
wc->chan->chanpos = 1;
wc->span.chans = &wc->chan;
wc->span.channels = 1;
wc->span.irq = wc->dev->irq;
wc->span.flags = DAHDI_FLAG_RBS;
wc->span.deflaw = DAHDI_LAW_MULAW;
#ifdef ENABLE_TASKLETS
@@ -674,8 +668,7 @@ static int wcfxo_initialize(struct wcfxo *wc)
wc->chan->pvt = wc;
wc->span.ops = &wcfxo_span_ops;
list_add_tail(&wc->span.device_node, &wc->ddev->spans);
if (dahdi_register_device(wc->ddev, &wc->dev->dev)) {
if (dahdi_register(&wc->span, 0)) {
printk(KERN_NOTICE "Unable to register span with DAHDI\n");
return -1;
}
@@ -983,7 +976,7 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
printk(KERN_NOTICE "Failed to initailize DAA, giving up...\n");
wcfxo_stop_dma(wc);
wcfxo_disable_interrupts(wc);
dahdi_unregister_device(wc->ddev);
dahdi_unregister(&wc->span);
free_irq(pdev->irq, wc);
/* Reset PCI chip and registers */
@@ -991,8 +984,6 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
kfree(wc->ddev->location);
dahdi_free_device(wc->ddev);
kfree(wc);
return -EIO;
}
@@ -1004,11 +995,9 @@ static int __devinit wcfxo_init_one(struct pci_dev *pdev, const struct pci_devic
static void wcfxo_release(struct wcfxo *wc)
{
dahdi_unregister_device(wc->ddev);
dahdi_unregister(&wc->span);
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
kfree(wc->ddev->location);
dahdi_free_device(wc->ddev);
kfree(wc);
printk(KERN_INFO "Freed a Wildcard\n");
}

View File

@@ -159,7 +159,6 @@ struct t1xxp {
unsigned char ec_chunk2[31][DAHDI_CHUNKSIZE];
unsigned char tempo[32];
struct dahdi_span span; /* Span */
struct dahdi_device *ddev;
struct dahdi_chan *chans[31]; /* Channels */
};
@@ -273,11 +272,10 @@ static void t1xxp_release(struct t1xxp *wc)
{
unsigned int x;
dahdi_unregister_device(wc->ddev);
dahdi_unregister(&wc->span);
for (x = 0; x < (wc->ise1 ? 31 : 24); x++) {
kfree(wc->chans[x]);
}
dahdi_free_device(wc->ddev);
kfree(wc);
printk(KERN_INFO "Freed a Wildcard\n");
}
@@ -772,20 +770,14 @@ static int t1xxp_software_init(struct t1xxp *wc)
}
if (x >= WC_MAX_CARDS)
return -1;
wc->ddev = dahdi_create_device();
wc->num = x;
sprintf(wc->span.name, "WCT1/%d", wc->num);
snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d", wc->variety, wc->num);
wc->ddev->manufacturer = "Digium";
wc->ddev->devicetype = wc->variety;
wc->ddev->location = kasprintf(GFP_KERNEL, "PCI Bus %02d Slot %02d",
wc->dev->bus->number,
PCI_SLOT(wc->dev->devfn) + 1);
if (!wc->ddev->location)
return -ENOMEM;
wc->span.manufacturer = "Digium";
strlcpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype));
snprintf(wc->span.location, sizeof(wc->span.location) - 1,
"PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1);
wc->span.irq = wc->dev->irq;
wc->span.chans = wc->chans;
wc->span.flags = DAHDI_FLAG_RBS;
if (wc->ise1) {
@@ -809,8 +801,7 @@ static int t1xxp_software_init(struct t1xxp *wc)
wc->chans[x]->chanpos = x + 1;
}
wc->span.ops = &t1xxp_span_ops;
list_add_tail(&wc->span.device_node, &wc->ddev->spans);
if (dahdi_register_device(wc->ddev, &wc->dev->dev)) {
if (dahdi_register(&wc->span, 0)) {
printk(KERN_NOTICE "Unable to register span with DAHDI\n");
return -1;
}
@@ -917,10 +908,10 @@ static void t1xxp_receiveprep(struct t1xxp *wc, int ints)
if (((oldcan & 0xffff0000) >> 16) != CANARY) {
/* Check top part */
if (debug) printk(KERN_DEBUG "Expecting top %04x, got %04x\n", CANARY, (oldcan & 0xffff0000) >> 16);
wc->ddev->irqmisses++;
wc->span.irqmisses++;
} else if ((oldcan & 0xffff) != ((wc->canary - 1) & 0xffff)) {
if (debug) printk(KERN_DEBUG "Expecting bottom %d, got %d\n", wc->canary - 1, oldcan & 0xffff);
wc->ddev->irqmisses++;
wc->span.irqmisses++;
}
for (y=0;y<DAHDI_CHUNKSIZE;y++) {
for (x=0;x<wc->span.channels;x++) {

View File

@@ -17,7 +17,8 @@ endif
wct4xxp-objs := base.o vpm450m.o $(shell $(src)/../oct612x/octasic-helper objects ../oct612x)
ifneq ($(HOTPLUG_FIRMWARE),yes)
wct4xxp-objs += $(FIRM_DIR)/dahdi-fw-oct6114-064.o $(FIRM_DIR)/dahdi-fw-oct6114-128.o $(FIRM_DIR)/dahdi-fw-oct6114-256.o
wct4xxp-objs += $(FIRM_DIR)/dahdi-fw-oct6114-064.o $(FIRM_DIR)/dahdi-fw-oct6114-128.o
$(warning WARNING: You are compiling firmware into wct4xxp.ko which is not available under the terms of the GPL. It may be a violation of the GPL to distribute the resulting image since it combines both GPL and non-GPL work. You should consult a lawyer of your own before distributing such an image.)
endif
$(obj)/$(FIRM_DIR)/dahdi-fw-oct6114-064.o: $(obj)/base.o
@@ -25,6 +26,3 @@ $(obj)/$(FIRM_DIR)/dahdi-fw-oct6114-064.o: $(obj)/base.o
$(obj)/$(FIRM_DIR)/dahdi-fw-oct6114-128.o: $(obj)/base.o
$(MAKE) -C $(obj)/$(FIRM_DIR) dahdi-fw-oct6114-128.o
$(obj)/$(FIRM_DIR)/dahdi-fw-oct6114-256.o: $(obj)/base.o
$(MAKE) -C $(obj)/$(FIRM_DIR) dahdi-fw-oct6114-256.o

File diff suppressed because it is too large Load Diff

View File

@@ -172,9 +172,9 @@ UINT32 Oct6100UserDriverReadBurstApi(tPOCT6100_READ_BURST_PARAMS f_pBurstParams)
struct vpm450m {
tPOCT6100_INSTANCE_API pApiInstance;
UINT32 aulEchoChanHndl[256];
int chanflags[256];
int ecmode[256];
UINT32 aulEchoChanHndl[128];
int chanflags[128];
int ecmode[128];
int numchans;
};
@@ -422,7 +422,6 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
tOCT6100_GET_INSTANCE_SIZE InstanceSize;
tOCT6100_CHANNEL_OPEN *ChannelOpen;
UINT32 ulResult;
unsigned int sout_stream, rout_stream;
struct vpm450m *vpm450m;
int x,y,law;
@@ -468,22 +467,15 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
ChipOpen->ulMemoryType = cOCT6100_MEM_TYPE_DDR;
ChipOpen->ulMemoryChipSize = cOCT6100_MEMORY_CHIP_SIZE_32MB;
ChipOpen->ulNumMemoryChips = 1;
ChipOpen->ulMaxTdmStreams = 4;
ChipOpen->aulTdmStreamFreqs[0] = cOCT6100_TDM_STREAM_FREQ_8MHZ;
ChipOpen->ulTdmSampling = cOCT6100_TDM_SAMPLE_AT_FALLING_EDGE;
ChipOpen->ulMaxFlexibleConfParticipants = 0;
ChipOpen->ulMaxConfBridges = 0;
ChipOpen->ulMaxRemoteDebugSessions = 0;
ChipOpen->fEnableChannelRecording = FALSE;
ChipOpen->ulSoftToneEventsBufSize = 64;
if (vpm450m->numchans <= 128) {
ChipOpen->ulMaxTdmStreams = 4;
ChipOpen->ulTdmSampling = cOCT6100_TDM_SAMPLE_AT_FALLING_EDGE;
} else {
ChipOpen->ulMaxTdmStreams = 32;
ChipOpen->fEnableFastH100Mode = TRUE;
ChipOpen->ulTdmSampling = cOCT6100_TDM_SAMPLE_AT_RISING_EDGE;
}
#if 0
ChipOpen->fEnableAcousticEcho = TRUE;
#endif
@@ -515,11 +507,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
kfree(ChannelOpen);
return NULL;
}
sout_stream = (8 == numspans) ? 29 : 2;
rout_stream = (8 == numspans) ? 24 : 3;
for (x = 0; x < ((8 == numspans) ? 256 : 128); x++) {
for (x = 0; x < ARRAY_SIZE(vpm450m->aulEchoChanHndl); x++) {
/* execute this loop always on 4 span cards but
* on 2 span cards only execute for the channels related to our spans */
if (( numspans > 2) || ((x & 0x03) <2)) {
@@ -527,7 +515,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
* therefore, the lower 2 bits tell us which span this
* timeslot/channel
*/
if (isalaw[x & 0x07])
if (isalaw[x & 0x03])
law = cOCT6100_PCM_A_LAW;
else
law = cOCT6100_PCM_U_LAW;
@@ -541,13 +529,11 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
ChannelOpen->TdmConfig.ulSinStream = 1;
ChannelOpen->TdmConfig.ulSinTimeslot = x;
ChannelOpen->TdmConfig.ulSoutPcmLaw = law;
ChannelOpen->TdmConfig.ulSoutStream = sout_stream;
ChannelOpen->TdmConfig.ulSoutStream = 2;
ChannelOpen->TdmConfig.ulSoutTimeslot = x;
#if 1
ChannelOpen->TdmConfig.ulRoutPcmLaw = law;
ChannelOpen->TdmConfig.ulRoutStream = rout_stream;
ChannelOpen->TdmConfig.ulRoutStream = 3;
ChannelOpen->TdmConfig.ulRoutTimeslot = x;
#endif
ChannelOpen->VqeConfig.fEnableNlp = TRUE;
ChannelOpen->VqeConfig.fRinDcOffsetRemoval = TRUE;
ChannelOpen->VqeConfig.fSinDcOffsetRemoval = TRUE;
@@ -557,7 +543,7 @@ struct vpm450m *init_vpm450m(void *wc, int *isalaw, int numspans, const struct f
ulResult = Oct6100ChannelOpen(vpm450m->pApiInstance, ChannelOpen);
if (ulResult != GENERIC_OK) {
printk(KERN_NOTICE "Failed to open channel %d %x!\n", x, ulResult);
printk(KERN_NOTICE "Failed to open channel %d!\n", x);
continue;
}
for (y = 0; y < ARRAY_SIZE(tones); y++) {

View File

@@ -54,12 +54,6 @@
#define FRMR_SIC3 0x40
#define FRMR_CMR1 0x44
#define FRMR_CMR2 0x45
/* OctalFALC Only */
#define FRMR_CMR4 0x41
#define FRMR_CMR5 0x42
#define FRMR_CMR6 0x43
#define FRMR_GPC2 0x8a
/* End Octal */
#define FRMR_GCR 0x46
#define FRMR_ISR0 0x68
#define FRMR_ISR0_RME 0x80
@@ -82,13 +76,6 @@
#define FRMR_CIS_GIS2 0x02
#define FRMR_CIS_GIS3 0x04
#define FRMR_CIS_GIS4 0x08
/* CIS - Octal falc bits */
#define FRMR_CIS_GIS5 0x10
#define FRMR_CIS_GIS6 0x20
#define FRMR_CIS_GIS7 0x40
#define FRMR_CIS_GIS8 0x80
#define FRMR_CMDR 0x02
#define FRMR_CMDR_SRES 0x01
#define FRMR_CMDR_XRES 0x10
@@ -126,11 +113,6 @@ struct t4_regs {
unsigned char regs[NUM_REGS];
};
struct t4_reg {
unsigned int reg;
unsigned int val;
};
#define T4_CHECK_VPM 0
#define T4_LOADING_FW 1
#define T4_STOP_DMA 2
@@ -138,7 +120,5 @@ struct t4_reg {
#define T4_CHANGE_LATENCY 4
#define T4_IGNORE_LATENCY 5
#define WCT4_GET_REGS _IOW(DAHDI_CODE, 60, struct t4_regs)
#define WCT4_GET_REG _IOW(DAHDI_CODE, 61, struct t4_reg)
#define WCT4_SET_REG _IOW(DAHDI_CODE, 62, struct t4_reg)
#define WCT4_GET_REGS _IOW (DAHDI_CODE, 60, struct t4_regs)

View File

@@ -205,7 +205,6 @@ struct wctdm {
struct pci_dev *dev;
char *variety;
struct dahdi_span span;
struct dahdi_device *ddev;
unsigned char ios;
int usecount;
unsigned int intcount;
@@ -2363,26 +2362,13 @@ static int wctdm_initialize(struct wctdm *wc)
{
int x;
wc->ddev = dahdi_create_device();
if (!wc->ddev)
return -ENOMEM;
/* DAHDI stuff */
sprintf(wc->span.name, "WCTDM/%d", wc->pos);
snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Board %d", wc->variety, wc->pos + 1);
wc->ddev->location = kasprintf(GFP_KERNEL,
"PCI Bus %02d Slot %02d",
wc->dev->bus->number,
PCI_SLOT(wc->dev->devfn) + 1);
if (!wc->ddev->location) {
dahdi_free_device(wc->ddev);
wc->ddev = NULL;
return -ENOMEM;
}
wc->ddev->manufacturer = "Digium";
wc->ddev->devicetype = wc->variety;
snprintf(wc->span.location, sizeof(wc->span.location) - 1,
"PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1);
wc->span.manufacturer = "Digium";
strlcpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype));
if (alawoverride) {
printk(KERN_INFO "ALAW override parameter detected. Device will be operating in ALAW\n");
wc->span.deflaw = DAHDI_LAW_ALAW;
@@ -2398,15 +2384,12 @@ static int wctdm_initialize(struct wctdm *wc)
}
wc->span.chans = wc->chans;
wc->span.channels = NUM_CARDS;
wc->span.irq = wc->dev->irq;
wc->span.flags = DAHDI_FLAG_RBS;
wc->span.ops = &wctdm_span_ops;
list_add_tail(&wc->span.device_node, &wc->ddev->spans);
if (dahdi_register_device(wc->ddev, &wc->dev->dev)) {
if (dahdi_register(&wc->span, 0)) {
printk(KERN_NOTICE "Unable to register span with DAHDI\n");
kfree(wc->ddev->location);
dahdi_free_device(wc->ddev);
wc->ddev = NULL;
return -1;
}
return 0;
@@ -2694,9 +2677,7 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
release_region(wc->ioaddr, 0xff);
pci_free_consistent(pdev, DAHDI_MAX_CHUNKSIZE * 2 * 2 * 2 * 4, (void *)wc->writechunk, wc->writedma);
pci_set_drvdata(pdev, NULL);
dahdi_unregister_device(wc->ddev);
kfree(wc->ddev->location);
dahdi_free_device(wc->ddev);
dahdi_unregister(&wc->span);
kfree(wc);
return -EIO;
@@ -2727,14 +2708,10 @@ static int __devinit wctdm_init_one(struct pci_dev *pdev, const struct pci_devic
static void wctdm_release(struct wctdm *wc)
{
dahdi_unregister_device(wc->ddev);
dahdi_unregister(&wc->span);
if (wc->freeregion)
release_region(wc->ioaddr, 0xff);
kfree(wc->ddev->location);
dahdi_free_device(wc->ddev);
kfree(wc);
printk(KERN_INFO "Freed a Wildcard\n");
}

File diff suppressed because it is too large Load Diff

View File

@@ -45,6 +45,7 @@
* \brief Default ringer debounce (in ms)
*/
#define DEFAULT_RING_DEBOUNCE 1024
#define POLARITY_DEBOUNCE 64 /* Polarity debounce (in ms) */
#define OHT_TIMER 6000 /* How long after RING to retain OHT */
@@ -84,6 +85,7 @@
#define NUM_CAL_REGS 12
#define ISR_COMMANDS 2
#define QRV_DEBOUNCETIME 20
#define VPM150M_HPI_CONTROL 0x00
@@ -105,30 +107,10 @@ struct calregs {
enum battery_state {
BATTERY_UNKNOWN = 0,
BATTERY_DEBOUNCING_PRESENT,
BATTERY_DEBOUNCING_PRESENT_ALARM,
BATTERY_PRESENT,
BATTERY_DEBOUNCING_LOST,
BATTERY_DEBOUNCING_LOST_ALARM,
BATTERY_LOST,
};
enum ring_detector_state {
RINGOFF = 0,
DEBOUNCING_RINGING_POSITIVE,
DEBOUNCING_RINGING_NEGATIVE,
RINGING,
DEBOUNCING_RINGOFF,
};
enum polarity_state {
UNKNOWN_POLARITY = 0,
POLARITY_DEBOUNCE_POSITIVE,
POLARITY_POSITIVE,
POLARITY_DEBOUNCE_NEGATIVE,
POLARITY_NEGATIVE,
};
struct wctdm_cmd {
struct list_head node;
struct completion *complete;
@@ -164,26 +146,29 @@ struct wctdm_chan {
};
struct fxo {
enum ring_detector_state ring_state:4;
enum battery_state battery_state:4;
enum polarity_state polarity_state:4;
u8 ring_polarity_change_count:4;
u8 hook_ring_shadow;
s8 line_voltage_status;
int wasringing;
int lastrdtx;
int lastrdtx_count;
int ringdebounce;
int offhook;
int battdebounce;
int battalarm;
enum battery_state battery;
int lastpol;
int polarity;
int polaritydebounce;
int neonmwi_state;
int neonmwi_last_voltage;
unsigned int neonmwi_debounce;
unsigned int neonmwi_offcounter;
unsigned long display_fxovoltage;
unsigned long ringdebounce_timer;
unsigned long battdebounce_timer;
unsigned long poldebounce_timer;
};
struct fxs {
u8 oht_active:1;
u8 off_hook:1;
int oldrxhook;
int debouncehook;
int lastrxhook;
int debounce;
int ohttimer;
int idletxhookstate; /* IDLE changing hook state */
/* lasttxhook reflects the last value written to the proslic's reg
* 64 (LINEFEED_CONTROL) in bits 0-2. Bit 4 indicates if the last
@@ -195,18 +180,13 @@ struct fxs {
* voicebus ISR.
*/
int lasttxhook;
u8 linefeed_control_shadow;
u8 hook_state_shadow;
int oppending_ms;
int palarms;
struct dahdi_vmwi_info vmwisetting;
int vmwi_active_messages;
int vmwi_linereverse;
int reversepolarity; /* polarity reversal */
struct calregs calregs;
unsigned long check_alarm;
unsigned long check_proslic;
unsigned long oppending_timeout;
unsigned long ohttimer;
};
struct qrv {
@@ -223,7 +203,6 @@ struct qrv {
int radmode;
signed short rxgain;
signed short txgain;
u8 isrshadow[3];
};
enum module_type {
@@ -236,7 +215,7 @@ enum module_type {
};
struct wctdm_module {
union modtypes {
union {
struct fxo fxo;
struct fxs fxs;
struct qrv qrv;
@@ -248,6 +227,7 @@ struct wctdm_module {
struct list_head active_cmds;
u8 offsets[3];
u8 subaddr;
u8 isrshadow[ISR_COMMANDS];
u8 card;
enum module_type type;
@@ -262,7 +242,7 @@ struct wctdm {
spinlock_t frame_list_lock;
struct list_head frame_list;
unsigned long framecount;
unsigned int intcount;
unsigned char txident;
unsigned char rxident;
@@ -297,7 +277,6 @@ struct wctdm {
int not_ready; /* 0 when the entire card is ready to go */
unsigned long checkflag; /* Internal state flags and task bits */
int companding;
struct dahdi_device *ddev;
};
static inline bool is_initialized(struct wctdm *wc)

View File

@@ -174,7 +174,6 @@ struct t1 {
unsigned char ec_chunk1[32][DAHDI_CHUNKSIZE];
unsigned char ec_chunk2[32][DAHDI_CHUNKSIZE];
unsigned char tempo[33];
struct dahdi_device *ddev;
struct dahdi_span span; /* Span */
struct dahdi_chan *chans[32]; /* Channels */
};
@@ -341,12 +340,10 @@ static void t1xxp_release(struct t1 *wc)
{
unsigned int x;
dahdi_unregister_device(wc->ddev);
dahdi_unregister(&wc->span);
for (x = 0; x < (wc->spantype == TYPE_E1 ? 31 : 24); x++) {
kfree(wc->chans[x]);
}
kfree(wc->ddev->location);
dahdi_free_device(wc->ddev);
kfree(wc);
printk(KERN_INFO "Freed a Wildcard\n");
}
@@ -979,21 +976,15 @@ static int t1xxp_software_init(struct t1 *wc)
}
if (x >= WC_MAX_CARDS)
return -1;
wc->ddev = dahdi_create_device();
t4_serial_setup(wc);
wc->num = x;
sprintf(wc->span.name, "WCT1/%d", wc->num);
snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d", wc->variety, wc->num);
wc->ddev->manufacturer = "Digium";
wc->ddev->devicetype = wc->variety;
wc->ddev->location = kasprintf(GFP_KERNEL, "PCI Bus %02d Slot %02d",
wc->dev->bus->number,
PCI_SLOT(wc->dev->devfn) + 1);
if (!wc->ddev->location)
return -ENOMEM;
wc->span.manufacturer = "Digium";
strlcpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype));
snprintf(wc->span.location, sizeof(wc->span.location) - 1,
"PCI Bus %02d Slot %02d", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1);
wc->span.irq = wc->dev->irq;
if (wc->spantype == TYPE_E1) {
if (unchannelized)
wc->span.channels = 32;
@@ -1020,8 +1011,7 @@ static int t1xxp_software_init(struct t1 *wc)
wc->chans[x]->chanpos = x + 1;
}
wc->span.ops = &t1xxp_span_ops;
list_add_tail(&wc->span.device_node, &wc->ddev->spans);
if (dahdi_register_device(wc->ddev, &wc->dev->dev)) {
if (dahdi_register(&wc->span, 0)) {
printk(KERN_NOTICE "Unable to register span with DAHDI\n");
return -1;
}
@@ -1128,10 +1118,10 @@ static void t1xxp_receiveprep(struct t1 *wc, int ints)
if (((oldcan & 0xffff0000) >> 16) != CANARY) {
/* Check top part */
if (debug) printk(KERN_DEBUG "Expecting top %04x, got %04x\n", CANARY, (oldcan & 0xffff0000) >> 16);
wc->ddev->irqmisses++;
wc->span.irqmisses++;
} else if ((oldcan & 0xffff) != ((wc->canary - 1) & 0xffff)) {
if (debug) printk(KERN_DEBUG "Expecting bottom %d, got %d\n", wc->canary - 1, oldcan & 0xffff);
wc->ddev->irqmisses++;
wc->span.irqmisses++;
}
for (y=0;y<DAHDI_CHUNKSIZE;y++) {
for (x=0;x<wc->span.channels;x++) {

View File

@@ -55,18 +55,13 @@
#error VOICEBUS_SFRAME_SIZE != SFRAME_SIZE
#endif
#ifndef pr_fmt
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#endif
static int debug;
static int j1mode = 0;
static int alarmdebounce = 2500; /* LOF/LFA def to 2.5s AT&T TR54016*/
static int losalarmdebounce = 2500; /* LOS def to 2.5s AT&T TR54016*/
static int aisalarmdebounce = 2500; /* AIS(blue) def to 2.5s AT&T TR54016*/
static int yelalarmdebounce = 500; /* RAI(yellow) def to 0.5s AT&T devguide */
static int t1e1override = -1; /* deprecated */
static char *default_linemode = "auto"; /* 'auto', 'e1', or 't1' */
static int t1e1override = -1;
static int latency = VOICEBUS_DEFAULT_LATENCY;
static unsigned int max_latency = VOICEBUS_DEFAULT_MAXLATENCY;
static int vpmsupport = 1;
@@ -755,7 +750,7 @@ static void __t1xxp_set_clear(struct t1 *wc)
/* Calculate all states on all 24 channels using the channel
flags, then write all 3 clear channel registers at once */
for (i = 0; i < wc->span.channels; i++) {
for (i = 0; i < 24; i++) {
offset = i/8;
if (wc->span.chans[i]->flags & DAHDI_FLAG_CLEAR)
reg[offset] |= 1 << (7 - (i % 8));
@@ -776,31 +771,19 @@ static void __t1xxp_set_clear(struct t1 *wc)
t1_info(wc, "Unable to set clear/rbs mode!\n");
}
/**
* _t1_free_channels - Free the memory allocated for the channels.
*
* Must be called with wc->reglock held.
*
*/
static void _t1_free_channels(struct t1 *wc)
{
int x;
for (x = 0; x < ARRAY_SIZE(wc->chans); x++) {
kfree(wc->chans[x]);
kfree(wc->ec[x]);
wc->chans[x] = NULL;
wc->ec[x] = NULL;
}
}
static void free_wc(struct t1 *wc)
{
unsigned int x;
unsigned long flags;
struct command *cmd;
LIST_HEAD(list);
for (x = 0; x < (wc->spantype == TYPE_E1 ? 31 : 24); x++) {
kfree(wc->chans[x]);
kfree(wc->ec[x]);
}
spin_lock_irqsave(&wc->reglock, flags);
_t1_free_channels(wc);
list_splice_init(&wc->active_cmds, &list);
list_splice_init(&wc->pending_cmds, &list);
spin_unlock_irqrestore(&wc->reglock, flags);
@@ -820,14 +803,14 @@ static void free_wc(struct t1 *wc)
}
#endif
kfree(wc->ddev->location);
kfree(wc->ddev->devicetype);
dahdi_free_device(wc->ddev);
kfree(wc);
}
static void t4_serial_setup(struct t1 *wc)
{
t1_info(wc, "Setting up global serial parameters for %s\n",
((wc->spantype == TYPE_E1) ? "E1" : "T1"));
t1_setreg(wc, 0x85, 0xe0); /* GPC1: Multiplex mode enabled, FSC is output, active low, RCLK from channel 0 */
t1_setreg(wc, 0x08, 0x05); /* IPC: Interrupt push/pull active low */
@@ -1021,12 +1004,12 @@ static void t1_configure_e1(struct t1 *wc, int lineconfig)
t1_info(wc, "Span configured for %s/%s%s\n", framing, line, crc4);
}
static void t1xxp_framer_start(struct t1 *wc)
static void t1xxp_framer_start(struct t1 *wc, struct dahdi_span *span)
{
if (dahdi_is_e1_span(&wc->span)) {
t1_configure_e1(wc, wc->span.lineconfig);
if (wc->spantype == TYPE_E1) { /* if this is an E1 card */
t1_configure_e1(wc, span->lineconfig);
} else { /* is a T1 card */
t1_configure_t1(wc, wc->span.lineconfig, wc->span.txlevel);
t1_configure_t1(wc, span->lineconfig, span->txlevel);
__t1xxp_set_clear(wc);
}
@@ -1035,28 +1018,18 @@ static void t1xxp_framer_start(struct t1 *wc)
static void set_span_devicetype(struct t1 *wc)
{
const char *olddevicetype;
olddevicetype = wc->ddev->devicetype;
strncpy(wc->span.devicetype, wc->variety,
sizeof(wc->span.devicetype) - 1);
#if defined(VPM_SUPPORT)
if (wc->vpmadt032) {
wc->ddev->devicetype = kasprintf(GFP_KERNEL,
"%s (VPMADT032)", wc->variety);
strncat(wc->span.devicetype, " (VPMADT032)",
sizeof(wc->span.devicetype) - 1);
} else if (wc->vpmoct) {
wc->ddev->devicetype = kasprintf(GFP_KERNEL,
"%s (VPMOCT032)", wc->variety);
} else {
wc->ddev->devicetype = kasprintf(GFP_KERNEL, "%s", wc->variety);
strncat(wc->span.devicetype, " (VPMOCT032)",
sizeof(wc->span.devicetype) - 1);
}
#else
wc->ddev->devicetype = kasprintf(GFP_KERNEL, "%s", wc->variety);
#endif
/* On the off chance that we were able to allocate it previously. */
if (!wc->ddev->devicetype)
wc->ddev->devicetype = olddevicetype;
else
kfree(olddevicetype);
}
static int t1xxp_startup(struct file *file, struct dahdi_span *span)
@@ -1077,7 +1050,7 @@ static int t1xxp_startup(struct file *file, struct dahdi_span *span)
#endif
/* Reset framer with proper parameters and start */
t1xxp_framer_start(wc);
t1xxp_framer_start(wc, span);
debug_printk(wc, 1, "Calling startup (flags is %lu)\n", span->flags);
return 0;
@@ -1117,7 +1090,7 @@ static int t1xxp_chanconfig(struct file *file,
}
if (test_bit(DAHDI_FLAGBIT_RUNNING, &chan->span->flags) &&
dahdi_is_t1_span(&wc->span)) {
(wc->spantype != TYPE_E1)) {
__t1xxp_set_clear(wc);
}
return 0;
@@ -1132,7 +1105,7 @@ static int t1xxp_rbsbits(struct dahdi_chan *chan, int bits)
debug_printk(wc, 2, "Setting bits to %d on channel %s\n",
bits, chan->name);
if (dahdi_is_e1_span(&wc->span)) { /* do it E1 way */
if (wc->spantype == TYPE_E1) { /* do it E1 way */
if (chan->chanpos == 16)
return 0;
@@ -1185,7 +1158,7 @@ static inline void t1_check_sigbits(struct t1 *wc)
if (!(test_bit(DAHDI_FLAGBIT_RUNNING, &wc->span.flags)))
return;
if (dahdi_is_e1_span(&wc->span)) {
if (wc->spantype == TYPE_E1) {
for (i = 0; i < 15; i++) {
a = t1_getreg(wc, 0x71 + i);
if (a > -1) {
@@ -1280,7 +1253,7 @@ static void t1xxp_maint_work(struct work_struct *work)
int reg = 0;
int cmd = w->cmd;
if (dahdi_is_e1_span(&wc->span)) {
if (wc->spantype == TYPE_E1) {
switch (cmd) {
case DAHDI_MAINT_NONE:
t1_info(wc, "Clearing all maint modes\n");
@@ -1352,7 +1325,7 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd)
struct maint_work_struct *work;
struct t1 *wc = container_of(span, struct t1, span);
if (dahdi_is_e1_span(&wc->span)) {
if (wc->spantype == TYPE_E1) {
switch (cmd) {
case DAHDI_MAINT_NONE:
case DAHDI_MAINT_LOCALLOOP:
@@ -1601,7 +1574,6 @@ static int vpm_start_load(struct t1 *wc)
work->wc = wc;
queue_work(wc->wq, &work->work);
wc->not_ready++;
return 0;
}
@@ -1648,23 +1620,12 @@ static void check_and_load_vpm(struct t1 *wc)
options.vpmnlptype = vpmnlptype;
options.vpmnlpthresh = vpmnlpthresh;
options.vpmnlpmaxsupp = vpmnlpmaxsupp;
options.channels = dahdi_is_t1_span(&wc->span) ? 24 : 32;
options.channels = (TYPE_T1 == wc->spantype) ? 24 : 32;
/* We do not want to check that the VPM is alive until after we're
* done setting it up here, an hour should cover it... */
wc->vpm_check = jiffies + HZ*3600;
/* If there was one already allocated, let's free it. */
if (wc->vpmadt032) {
vpmadt = wc->vpmadt032;
clear_bit(VPM150M_ACTIVE, &vpmadt->control);
flush_workqueue(vpmadt->wq);
spin_lock_irqsave(&wc->reglock, flags);
wc->vpmadt032 = NULL;
spin_unlock_irqrestore(&wc->reglock, flags);
vpmadt032_free(vpmadt);
}
vpmadt = vpmadt032_alloc(&options);
if (!vpmadt)
return;
@@ -1719,7 +1680,7 @@ static void t1_chan_set_sigcap(struct dahdi_span *span, int x)
struct dahdi_chan *chan = wc->chans[x];
chan->sigcap = DAHDI_SIG_CLEAR;
/* E&M variant supported depends on span type */
if (dahdi_is_e1_span(&wc->span)) {
if (wc->spantype == TYPE_E1) {
/* E1 sigcap setup */
if (span->lineconfig & DAHDI_CONFIG_CCS) {
/* CCS setup */
@@ -1802,46 +1763,54 @@ static void t1xxp_disable_hw_preechocan(struct dahdi_chan *chan)
vpmoct_preecho_disable(wc->vpmoct, chan->chanpos - 1);
}
/**
* t1_software_init - Initialize the board for the given type.
* @wc: The board to initialize.
* @type: The type of board we are, T1 / E1
*
* This function is called at startup and when the type of the span is changed
* via the dahdi_device before the span is assigned a number.
*
*/
static int t1_software_init(struct t1 *wc, enum linemode type)
static const struct dahdi_span_ops t1_span_ops = {
.owner = THIS_MODULE,
.spanconfig = t1xxp_spanconfig,
.chanconfig = t1xxp_chanconfig,
.startup = t1xxp_startup,
.rbsbits = t1xxp_rbsbits,
.maint = t1xxp_maint,
.ioctl = t1xxp_ioctl,
#ifdef VPM_SUPPORT
.enable_hw_preechocan = t1xxp_enable_hw_preechocan,
.disable_hw_preechocan = t1xxp_disable_hw_preechocan,
.echocan_create = t1xxp_echocan_create,
.echocan_name = t1xxp_echocan_name,
#endif
};
static int t1_software_init(struct t1 *wc)
{
int x;
struct dahdi_chan *chans[32] = {NULL,};
struct dahdi_echocan_state *ec[32] = {NULL,};
unsigned long flags;
int res = 0;
int num;
struct pci_dev *pdev = wc->vb.pdev;
/* We may already be setup properly. */
if (wc->span.channels == ((E1 == type) ? 31 : 24))
return 0;
for (x = 0; x < ((E1 == type) ? 31 : 24); x++) {
chans[x] = kzalloc(sizeof(*chans[x]), GFP_KERNEL);
ec[x] = kzalloc(sizeof(*ec[x]), GFP_KERNEL);
if (!chans[x] || !ec[x])
goto error_exit;
/* Find position */
for (x = 0; x < ARRAY_SIZE(ifaces); ++x) {
if (ifaces[x] == wc) {
debug_printk(wc, 1, "software init for card %d\n", x);
break;
}
}
if (x == ARRAY_SIZE(ifaces))
return -1;
t4_serial_setup(wc);
num = x;
sprintf(wc->span.name, "WCT1/%d", num);
snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d", wc->variety, num);
wc->span.manufacturer = "Digium";
set_span_devicetype(wc);
/* Because the interrupt handler is running, we need to atomically
* swap the channel arrays. */
spin_lock_irqsave(&wc->reglock, flags);
_t1_free_channels(wc);
memcpy(wc->chans, chans, sizeof(wc->chans));
memcpy(wc->ec, ec, sizeof(wc->ec));
memset(chans, 0, sizeof(chans));
memset(ec, 0, sizeof(ec));
snprintf(wc->span.location, sizeof(wc->span.location) - 1,
"PCI Bus %02d Slot %02d", pdev->bus->number,
PCI_SLOT(pdev->devfn) + 1);
if (type == E1) {
wc->span.irq = pdev->irq;
if (wc->spantype == TYPE_E1) {
wc->span.channels = 31;
wc->span.spantype = "E1";
wc->span.linecompat = DAHDI_CONFIG_AMI | DAHDI_CONFIG_HDB3 |
@@ -1854,89 +1823,24 @@ static int t1_software_init(struct t1 *wc, enum linemode type)
DAHDI_CONFIG_D4 | DAHDI_CONFIG_ESF;
wc->span.deflaw = DAHDI_LAW_MULAW;
}
spin_unlock_irqrestore(&wc->reglock, flags);
if (!wc->ddev->location)
return -ENOMEM;
t1_info(wc, "Setting up global serial parameters for %s\n",
(dahdi_is_e1_span(&wc->span) ? "E1" : "T1"));
t4_serial_setup(wc);
wc->span.chans = wc->chans;
set_bit(DAHDI_FLAGBIT_RBS, &wc->span.flags);
for (x = 0; x < wc->span.channels; x++) {
sprintf(wc->chans[x]->name, "%s/%d", wc->span.name, x + 1);
sprintf(wc->chans[x]->name, "WCT1/%d/%d", num, x + 1);
t1_chan_set_sigcap(&wc->span, x);
wc->chans[x]->pvt = wc;
wc->chans[x]->chanpos = x + 1;
}
check_and_load_vpm(wc);
set_span_devicetype(wc);
wc->span.ops = &t1_span_ops;
if (dahdi_register(&wc->span, 0)) {
t1_info(wc, "Unable to register span with DAHDI\n");
return -1;
}
return 0;
error_exit:
for (x = 0; x < ARRAY_SIZE(chans); ++x) {
kfree(chans[x]);
kfree(ec[x]);
}
return res;
}
/**
* t1xx_set_linemode - Change the type of span before assignment.
* @span: The span to change.
* @linemode: Text string for the line mode.
*
* This function may be called after the dahdi_device is registered but
* before the spans are assigned numbers (and are visible to the rest of
* DAHDI).
*
*/
static int t1xxp_set_linemode(struct dahdi_span *span, const char *linemode)
{
int res;
struct t1 *wc = container_of(span, struct t1, span);
/* We may already be set to the requested type. */
if (!strcasecmp(span->spantype, linemode))
return 0;
res = t1_wait_for_ready(wc);
if (res)
return res;
/* Stop the processing of the channels since we're going to change
* them. */
clear_bit(INITIALIZED, &wc->bit_flags);
smp_mb__after_clear_bit();
del_timer_sync(&wc->timer);
flush_workqueue(wc->wq);
if (!strcasecmp(linemode, "t1")) {
dev_info(&wc->vb.pdev->dev,
"Changing from E1 to T1 line mode.\n");
res = t1_software_init(wc, T1);
} else if (!strcasecmp(linemode, "e1")) {
dev_info(&wc->vb.pdev->dev,
"Changing from T1 to E1 line mode.\n");
res = t1_software_init(wc, E1);
} else {
dev_err(&wc->vb.pdev->dev,
"'%s' is an unknown linemode.\n", linemode);
res = -EINVAL;
}
/* Since we probably reallocated the channels we need to make
* sure they are configured before setting INITIALIZED again. */
if (!res) {
dahdi_init_span(span);
set_bit(INITIALIZED, &wc->bit_flags);
mod_timer(&wc->timer, jiffies + HZ/5);
}
return res;
}
#if 0
@@ -1955,53 +1859,39 @@ static inline unsigned char t1_vpm_out(struct t1 *wc, int unit, const unsigned i
#endif
#endif
static int t1_hardware_post_init(struct t1 *wc, enum linemode *type)
static int t1_hardware_post_init(struct t1 *wc)
{
int res;
int reg;
unsigned int reg;
int x;
/* T1 or E1 */
if (-1 != t1e1override) {
pr_info("t1e1override is deprecated. Please use 'default_linemode'.\n");
*type = (t1e1override) ? E1 : T1;
if (t1e1override > -1) {
if (t1e1override)
wc->spantype = TYPE_E1;
else
wc->spantype = TYPE_T1;
} else {
if (!strcasecmp(default_linemode, "e1")) {
*type = E1;
} else if (!strcasecmp(default_linemode, "t1")) {
*type = T1;
} else {
u8 pins;
res = t1_getpins(wc, &pins);
if (res)
return res;
*type = (pins & 0x01) ? T1 : E1;
}
u8 pins;
res = t1_getpins(wc, &pins);
if (res)
return res;
wc->spantype = (pins & 0x01) ? TYPE_T1 : TYPE_E1;
}
debug_printk(wc, 1, "linemode: %s\n", (*type == T1) ? "T1" : "E1");
debug_printk(wc, 1, "spantype: %s\n", 1 == wc->spantype ? "T1" : "E1");
/* what version of the FALC are we using? */
reg = t1_setreg(wc, 0x4a, 0xaa);
reg = t1_getreg(wc, 0x4a);
if (reg < 0) {
t1_info(wc, "Failed to read FALC version (%d)\n", reg);
return -EIO;
}
debug_printk(wc, 1, "FALC version: %08x\n", reg);
/* make sure reads and writes work */
for (x = 0; x < 256; x++) {
t1_setreg(wc, 0x14, x);
reg = t1_getreg(wc, 0x14);
if (reg < 0) {
t1_info(wc, "Failed register read (%d)\n", reg);
return -EIO;
}
if (reg != x) {
t1_info(wc, "Register test failed. "
"Wrote '%x' but read '%x'\n", x, reg);
return -EIO;
}
if (reg != x)
t1_info(wc, "Wrote '%x' but read '%x'\n", x, reg);
}
t1_setleds(wc, wc->ledstate);
@@ -2029,7 +1919,7 @@ static inline void t1_check_alarms(struct t1 *wc)
/* And consider only carrier alarms */
wc->span.alarms &= (DAHDI_ALARM_RED | DAHDI_ALARM_BLUE | DAHDI_ALARM_NOTOPEN);
if (dahdi_is_e1_span(&wc->span)) {
if (wc->spantype == TYPE_E1) {
if (c & 0x04) {
/* No multiframe found, force RAI high after 400ms only if
we haven't found a multiframe since last loss
@@ -2355,7 +2245,7 @@ static inline void t1_receiveprep(struct t1 *wc, const u8* sframe)
wc->rxident = eframe[EFRAME_SIZE + 1];
wc->statreg = eframe[EFRAME_SIZE + 2];
if (wc->rxident != expected) {
wc->ddev->irqmisses++;
wc->span.irqmisses++;
_resend_cmds(wc);
if (unlikely(debug)) {
t1_info(wc, "oops: rxident=%d "
@@ -2638,31 +2528,14 @@ static inline void remove_sysfs_files(struct t1 *wc) { return; }
#endif /* CONFIG_VOICEBUS_SYSFS */
static const struct dahdi_span_ops t1_span_ops = {
.owner = THIS_MODULE,
.spanconfig = t1xxp_spanconfig,
.chanconfig = t1xxp_chanconfig,
.startup = t1xxp_startup,
.rbsbits = t1xxp_rbsbits,
.maint = t1xxp_maint,
.ioctl = t1xxp_ioctl,
.set_spantype = t1xxp_set_linemode,
#ifdef VPM_SUPPORT
.enable_hw_preechocan = t1xxp_enable_hw_preechocan,
.disable_hw_preechocan = t1xxp_disable_hw_preechocan,
.echocan_create = t1xxp_echocan_create,
.echocan_name = t1xxp_echocan_name,
#endif
};
static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
struct t1 *wc;
const struct t1_desc *d = (struct t1_desc *) ent->driver_data;
struct t1_desc *d = (struct t1_desc *) ent->driver_data;
unsigned int x;
int res;
unsigned int index = -1;
enum linemode type;
for (x = 0; x < ARRAY_SIZE(ifaces); x++) {
if (!ifaces[x]) {
@@ -2681,22 +2554,18 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
if (!wc)
return -ENOMEM;
/* Set the performance counters to -1 since this card currently does
* not support collecting them. */
memset(&wc->span.count, -1, sizeof(wc->span.count));
wc->not_ready = 1;
ifaces[index] = wc;
sprintf(wc->span.name, "WCT1/%d", index);
snprintf(wc->span.desc, sizeof(wc->span.desc) - 1, "%s Card %d",
d->name, index);
wc->not_ready = 1;
wc->ledstate = -1;
wc->variety = d->name;
wc->txident = 1;
spin_lock_init(&wc->reglock);
INIT_LIST_HEAD(&wc->active_cmds);
INIT_LIST_HEAD(&wc->pending_cmds);
wc->variety = d->name;
wc->txident = 1;
# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
wc->timer.function = te12xp_timer;
wc->timer.data = (unsigned long)wc;
@@ -2717,22 +2586,6 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
INIT_WORK(&wc->vpm_check_work, vpm_check_func);
# endif
wc->ddev = dahdi_create_device();
if (!wc->ddev) {
ifaces[index] = NULL;
kfree(wc);
return -ENOMEM;
}
wc->ddev->manufacturer = "Digium";
wc->ddev->location = kasprintf(GFP_KERNEL, "PCI Bus %02d Slot %02d",
pdev->bus->number,
PCI_SLOT(pdev->devfn) + 1);
if (!wc->ddev->location) {
ifaces[index] = NULL;
kfree(wc);
return -ENOMEM;
}
#ifdef CONFIG_VOICEBUS_ECREFERENCE
for (x = 0; x < ARRAY_SIZE(wc->ec_reference); ++x) {
/* 256 is used here since it is the largest power of two that
@@ -2764,7 +2617,6 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
wc->wq = create_singlethread_workqueue(wc->name);
if (!wc->wq) {
kfree(wc);
ifaces[index] = NULL;
return -ENOMEM;
}
@@ -2778,33 +2630,36 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
if (voicebus_start(&wc->vb)) {
voicebus_release(&wc->vb);
free_wc(wc);
ifaces[index] = NULL;
return -EIO;
}
res = t1_hardware_post_init(wc, &type);
res = t1_hardware_post_init(wc);
if (res) {
voicebus_release(&wc->vb);
free_wc(wc);
ifaces[index] = NULL;
return res;
}
wc->span.chans = wc->chans;
for (x = 0; x < (wc->spantype == TYPE_E1 ? 31 : 24); x++) {
wc->chans[x] = kzalloc(sizeof(*wc->chans[x]), GFP_KERNEL);
if (!wc->chans[x]) {
free_wc(wc);
ifaces[index] = NULL;
return -ENOMEM;
}
res = t1_software_init(wc, type);
wc->ec[x] = kzalloc(sizeof(*wc->ec[x]), GFP_KERNEL);
if (!wc->ec[x]) {
free_wc(wc);
ifaces[index] = NULL;
return -ENOMEM;
}
}
res = t1_software_init(wc);
if (res) {
voicebus_release(&wc->vb);
free_wc(wc);
ifaces[index] = NULL;
return res;
}
wc->span.ops = &t1_span_ops;
list_add_tail(&wc->span.device_node, &wc->ddev->spans);
res = dahdi_register_device(wc->ddev, &wc->vb.pdev->dev);
if (res) {
t1_info(wc, "Unable to register with DAHDI\n");
return res;
}
@@ -2814,7 +2669,10 @@ static int __devinit te12xp_init_one(struct pci_dev *pdev, const struct pci_devi
t1_info(wc, "Found a %s\n", wc->variety);
voicebus_unlock_latency(&wc->vb);
wc->not_ready--;
/* If there is VPMADT032 module attached to this device, it will
* signal ready after the channels are configured and ready for use. */
if (!wc->vpmadt032)
wc->not_ready--;
return 0;
}
@@ -2829,7 +2687,7 @@ static void __devexit te12xp_remove_one(struct pci_dev *pdev)
if (!wc)
return;
dahdi_unregister_device(wc->ddev);
dahdi_unregister(&wc->span);
remove_sysfs_files(wc);
@@ -2920,16 +2778,6 @@ static int __init te12xp_init(void)
if (!cmd_cache)
return -ENOMEM;
if (-1 != t1e1override) {
pr_info("'t1e1override' is deprecated. "
"Please use 'default_linemode' instead\n");
} else if (strcasecmp(default_linemode, "auto") &&
strcasecmp(default_linemode, "t1") &&
strcasecmp(default_linemode, "e1")) {
pr_err("'%s' is an unknown span type.", default_linemode);
default_linemode = "auto";
return -EINVAL;
}
res = dahdi_pci_module(&te12xp_driver);
if (res) {
kmem_cache_destroy(cmd_cache);
@@ -2948,9 +2796,6 @@ static void __exit te12xp_cleanup(void)
module_param(debug, int, S_IRUGO | S_IWUSR);
module_param(t1e1override, int, S_IRUGO | S_IWUSR);
module_param(default_linemode, charp, S_IRUGO);
MODULE_PARM_DESC(default_linemode, "\"auto\"(default), \"e1\", or \"t1\". "
"\"auto\" will use the value from the hardware jumpers.");
module_param(j1mode, int, S_IRUGO | S_IWUSR);
module_param(alarmdebounce, int, S_IRUGO | S_IWUSR);
module_param(losalarmdebounce, int, S_IRUGO | S_IWUSR);

View File

@@ -74,10 +74,8 @@
#define CMD_BYTE(slot, a, is_vpm) (slot*6)+(a*2)+is_vpm /* only even slots */
//TODO: make a separate macro
enum linemode {
T1 = 1,
E1,
};
#define TYPE_T1 1
#define TYPE_E1 2
struct command {
struct list_head node;
@@ -96,6 +94,7 @@ struct t1 {
unsigned char txident;
unsigned char rxident;
unsigned char statreg; /* bit 0 = vpmadt032 int */
int spantype;
struct {
unsigned int nmf:1;
unsigned int sendingyellow:1;
@@ -117,7 +116,6 @@ struct t1 {
unsigned long alarmtimer;
unsigned char ledstate;
unsigned char vpm_check_count;
struct dahdi_device *ddev;
struct dahdi_span span; /* Span */
struct dahdi_chan *chans[32]; /* Channels */
struct dahdi_echocan_state *ec[32]; /* Echocan state for channels */

View File

@@ -733,7 +733,6 @@ static const struct dahdi_span_ops BRI_span_ops = {
.maint = xpp_maint,
.echocan_create = xpp_echocan_create,
.echocan_name = xpp_echocan_name,
.assigned = xpp_span_assigned,
#ifdef DAHDI_SYNC_TICK
.sync_tick = dahdi_sync_tick,
#endif

View File

@@ -28,6 +28,7 @@ enum fxo_opcodes {
XPROTO_NAME(FXO, SIG_CHANGED) = 0x06,
/**/
XPROTO_NAME(FXO, DAA_WRITE) = 0x0F, /* Write to DAA */
XPROTO_NAME(FXO, XPD_STATE) = 0x0F, /* Write to DAA */
XPROTO_NAME(FXO, CHAN_CID) = 0x0F, /* Write to DAA */
XPROTO_NAME(FXO, LED) = 0x0F, /* Write to DAA */
};

View File

@@ -42,6 +42,8 @@ static DEF_PARM(uint, poll_digital_inputs, 1000, 0644, "Poll Digital Inputs");
static DEF_PARM_BOOL(vmwi_ioctl, 1, 0644, "Asterisk support VMWI notification via ioctl");
static DEF_PARM_BOOL(ring_trapez, 0, 0664, "Use trapezoid ring type");
static DEF_PARM_BOOL(lower_ringing_noise, 0, 0664,
"Lower ringing noise (may loose CallerID)");
/* Signaling is opposite (fxo signalling for fxs card) */
#if 1
@@ -135,6 +137,7 @@ struct FXS_priv_data {
xpp_line_t want_dtmf_mute; /* what dahdi want */
xpp_line_t prev_key_down; /* DTMF down sets the bit */
xpp_line_t neon_blinking;
xpp_line_t vbat_h; /* High voltage */
struct timeval prev_key_time[CHANNELS_PERXPD];
int led_counter[NUM_LEDS][CHANNELS_PERXPD];
int ohttimer[CHANNELS_PERXPD];
@@ -157,24 +160,48 @@ struct FXS_priv_data {
#define LED_BLINK_RING (1000/8) /* in ticks */
/*---------------- FXS: Static functions ----------------------------------*/
static int linefeed_control(xbus_t *xbus, xpd_t *xpd, lineno_t chan, enum fxs_state value)
{
struct FXS_priv_data *priv;
priv = xpd->priv;
LINE_DBG(SIGNAL, xpd, chan, "value=0x%02X\n", value);
priv->lasttxhook[chan] = value;
return SLIC_DIRECT_REQUEST(xbus, xpd, chan, SLIC_WRITE, 0x40, value);
}
static int do_chan_power(xbus_t *xbus, xpd_t *xpd, lineno_t chan, bool on)
{
int value = (on) ? REG_BATTERY_BATSL : 0x00;
struct FXS_priv_data *priv;
unsigned long *p;
int was;
BUG_ON(!xbus);
BUG_ON(!xpd);
priv = xpd->priv;
p = (unsigned long *)&priv->vbat_h;
if (on)
was = test_and_set_bit(chan, p) != 0;
else
was = test_and_clear_bit(chan, p) != 0;
if (was == on) {
LINE_DBG(SIGNAL, xpd, chan,
"%s (same, ignored)\n", (on) ? "up" : "down");
return 0;
}
LINE_DBG(SIGNAL, xpd, chan, "%s\n", (on) ? "up" : "down");
return SLIC_DIRECT_REQUEST(xbus, xpd, chan, SLIC_WRITE, REG_BATTERY, value);
return SLIC_DIRECT_REQUEST(xbus, xpd, chan, SLIC_WRITE, REG_BATTERY,
(on) ? REG_BATTERY_BATSL : 0x00);
}
static int linefeed_control(xbus_t *xbus, xpd_t *xpd, lineno_t chan, enum fxs_state value)
{
struct FXS_priv_data *priv;
bool want_vbat_h;
priv = xpd->priv;
/*
* Should we drop vbat_h only during actuall ring?
* - It would lower the noise caused to other channels by
* group ringing
* - But it may also stop CallerID from passing through the SLIC
*/
want_vbat_h = value == FXS_LINE_RING;
if (lower_ringing_noise || want_vbat_h)
do_chan_power(xbus, xpd, chan, want_vbat_h);
LINE_DBG(SIGNAL, xpd, chan, "value=0x%02X\n", value);
priv->lasttxhook[chan] = value;
return SLIC_DIRECT_REQUEST(xbus, xpd, chan, SLIC_WRITE, 0x40, value);
}
static void vmwi_search(xpd_t *xpd, lineno_t pos, bool on)
@@ -691,7 +718,7 @@ static int send_ring(xpd_t *xpd, lineno_t chan, bool on)
LINE_DBG(SIGNAL, xpd, chan, "%s\n", (on)?"on":"off");
priv = xpd->priv;
set_vm_led_mode(xbus, xpd, chan, 0);
do_chan_power(xbus, xpd, chan, on); // Power up (for ring)
do_chan_power(xbus, xpd, chan, on); /* Power up (for ring) */
ret = linefeed_control(xbus, xpd, chan, value);
if(on) {
MARK_BLINK(priv, chan, LED_GREEN, LED_BLINK_RING);
@@ -1324,8 +1351,7 @@ static void process_digital_inputs(xpd_t *xpd, const reg_cmd_t *info)
#endif
static const char dtmf_digits[] = {
'D', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '*', '#',
'A', 'B', 'C'
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '*', '#', 'A', 'B', 'C', 'D'
};
/*
@@ -1347,6 +1373,12 @@ static void process_dtmf(xpd_t *xpd, uint portnum, byte val)
return;
priv = xpd->priv;
val &= 0xF;
if(val <= 0) {
if(key_down)
XPD_NOTICE(xpd, "Bad DTMF value %d. Ignored\n", val);
return;
}
val--;
digit = dtmf_digits[val];
want_mute = IS_SET(priv->want_dtmf_mute, portnum);
want_event = IS_SET(priv->want_dtmf_events, portnum);
@@ -1550,6 +1582,11 @@ static int proc_fxs_info_read(char *page, char **start, off_t off, int count, in
IS_SET(priv->search_fsk_pattern, i)
);
}
len += sprintf(page + len, "\n%-12s", "vbat_h:");
for_each_line(xpd, i) {
len += sprintf(page + len, "%4d",
test_bit(i, (unsigned long *)&priv->vbat_h));
}
len += sprintf(page + len, "\n");
for(led = 0; led < NUM_LEDS; led++) {
len += sprintf(page + len, "LED #%d", led);

View File

@@ -27,6 +27,7 @@
enum fxs_opcodes {
XPROTO_NAME(FXS, SIG_CHANGED) = 0x06,
/**/
XPROTO_NAME(FXS, XPD_STATE) = 0x0F, /* Write to SLIC */
XPROTO_NAME(FXS, CHAN_POWER) = 0x0F, /* Write to SLIC */
XPROTO_NAME(FXS, CHAN_CID) = 0x0F, /* Write to SLIC */
XPROTO_NAME(FXS, LED) = 0x0F, /* Write to SLIC */

View File

@@ -422,19 +422,37 @@ int xpp_register_request(xbus_t *xbus, xpd_t *xpd, xportno_t portno,
return 0;
}
/* 0x23 */ HOSTCMD(GLOBAL, RESET_SYNC_COUNTERS)
/*
* Wrapper for different types of xbus reset
*/
static int send_xbus_reset(xbus_t *xbus, uint8_t reset_mask)
{
xframe_t *xframe;
xpacket_t *pack;
BUG_ON(!xbus);
//XBUS_DBG(SYNC, xbus, "\n");
XFRAME_NEW_CMD(xframe, pack, xbus, GLOBAL, RESET_SYNC_COUNTERS, 0);
RPACKET_FIELD(pack, GLOBAL, RESET_SYNC_COUNTERS, mask) = 0x10;
XFRAME_NEW_CMD(xframe, pack, xbus, GLOBAL, XBUS_RESET, 0);
RPACKET_FIELD(pack, GLOBAL, XBUS_RESET, mask) = reset_mask;
send_cmd_frame(xbus, xframe);
return 0;
}
/* 0x23 */ HOSTCMD(GLOBAL, RESET_SPI)
{
XBUS_DBG(DEVICES, xbus, "Sending SPI reset\n");
/* toggle reset line */
send_xbus_reset(xbus, 0x04);
send_xbus_reset(xbus, 0x00);
return 0;
}
/* 0x23 */ HOSTCMD(GLOBAL, RESET_SYNC_COUNTERS)
{
//XBUS_DBG(SYNC, xbus, "\n");
return send_xbus_reset(xbus, 0x10);
}
/*---------------- GLOBAL: Astribank Reply Handlers -----------------------*/
HANDLER_DEF(GLOBAL, NULL_REPLY)
@@ -526,6 +544,7 @@ HANDLER_DEF(GLOBAL, AB_DESCRIPTION) /* 0x08 */
list_add_tail(&card_desc->card_list, &worker->card_list);
spin_unlock_irqrestore(&worker->worker_lock, flags);
}
CALL_PROTO(GLOBAL, RESET_SPI, xbus, NULL);
if (!xbus_process_worker(xbus)) {
ret = -ENODEV;
goto out;

View File

@@ -38,7 +38,7 @@ enum global_opcodes {
XPROTO_NAME(GLOBAL, SYNC_REPLY) = 0x1A,
/**/
XPROTO_NAME(GLOBAL, ERROR_CODE) = 0x22,
XPROTO_NAME(GLOBAL, RESET_SYNC_COUNTERS) = 0x23,
XPROTO_NAME(GLOBAL, XBUS_RESET) = 0x23,
XPROTO_NAME(GLOBAL, NULL_REPLY) = 0xFE,
};
@@ -87,7 +87,7 @@ DEF_RPACKET_DATA(GLOBAL, SYNC_REPLY,
DEF_RPACKET_DATA(GLOBAL, REGISTER_REPLY,
reg_cmd_t regcmd;
);
DEF_RPACKET_DATA(GLOBAL, RESET_SYNC_COUNTERS,
DEF_RPACKET_DATA(GLOBAL, XBUS_RESET,
byte mask;
);
DEF_RPACKET_DATA(GLOBAL, ERROR_CODE,
@@ -98,6 +98,7 @@ DEF_RPACKET_DATA(GLOBAL, ERROR_CODE,
/* 0x07 */ DECLARE_CMD(GLOBAL, AB_REQUEST);
/* 0x19 */ DECLARE_CMD(GLOBAL, SYNC_SOURCE, enum sync_mode mode, int drift);
/* 0x23 */ DECLARE_CMD(GLOBAL, RESET_SPI);
/* 0x23 */ DECLARE_CMD(GLOBAL, RESET_SYNC_COUNTERS);
int xpp_register_request(xbus_t *xbus, xpd_t *xpd, xportno_t portno,

View File

@@ -80,7 +80,6 @@ static int pri_shutdown(struct dahdi_span *span);
static int pri_rbsbits(struct dahdi_chan *chan, int bits);
static int pri_lineconfig(xpd_t *xpd, int lineconfig);
static void send_idlebits(xpd_t *xpd, bool saveold);
static int apply_pri_protocol(xpd_t *xpd);
#define PROC_REGISTER_FNAME "slics"
@@ -91,29 +90,17 @@ enum pri_protocol {
PRI_PROTO_J1 = 3
};
static const char *protocol_names[] = {
[PRI_PROTO_0] = "??", /* unknown */
[PRI_PROTO_E1] = "E1",
[PRI_PROTO_T1] = "T1",
[PRI_PROTO_J1] = "J1"
};
static const char *pri_protocol_name(enum pri_protocol pri_protocol)
{
static const char *protocol_names[] = {
[PRI_PROTO_0] = "??", /* unknown */
[PRI_PROTO_E1] = "E1",
[PRI_PROTO_T1] = "T1",
[PRI_PROTO_J1] = "J1"
};
return protocol_names[pri_protocol];
}
static enum pri_protocol pri_protocol_bystr(const char *spantype)
{
int i;
for (i = 0; i < ARRAY_SIZE(protocol_names); i++) {
if (strcasecmp(protocol_names[i], spantype) == 0)
return i;
}
return PRI_PROTO_0;
}
static int pri_num_channels(enum pri_protocol pri_protocol)
{
static int num_channels[] = {
@@ -564,14 +551,12 @@ static int set_pri_proto(xpd_t *xpd, enum pri_protocol set_proto)
unsigned int dchan_num;
int default_lineconfig = 0;
int ret;
struct phonedev *phonedev;
BUG_ON(!xpd);
priv = xpd->priv;
phonedev = &PHONEDEV(xpd);
if (test_bit(DAHDI_FLAGBIT_REGISTERED, &phonedev->span.flags)) {
XPD_NOTICE(xpd, "%s: %s already assigned as span %d\n",
__func__, phonedev->span.name, phonedev->span.spanno);
if(SPAN_REGISTERED(xpd)) {
XPD_NOTICE(xpd, "Registered as span %d. Cannot do setup pri protocol (%s)\n",
PHONEDEV(xpd).span.spanno, __FUNCTION__);
return -EBUSY;
}
if(priv->pri_protocol != PRI_PROTO_0) {
@@ -611,8 +596,8 @@ static int set_pri_proto(xpd_t *xpd, enum pri_protocol set_proto)
}
priv->pri_protocol = set_proto;
priv->is_cas = -1;
phonedev->channels = pri_num_channels(set_proto);
phonedev->offhook_state = BITMASK(phonedev->channels);
PHONEDEV(xpd).channels = pri_num_channels(set_proto);
PHONEDEV(xpd).offhook_state = BITMASK(PHONEDEV(xpd).channels);
CALL_PHONE_METHOD(card_pcm_recompute, xpd, 0);
priv->deflaw = deflaw;
priv->dchan_num = dchan_num;
@@ -620,7 +605,7 @@ static int set_pri_proto(xpd_t *xpd, enum pri_protocol set_proto)
xpd->type_name = type_name(priv->pri_protocol);
XPD_DBG(GENERAL, xpd, "%s, channels=%d, dchan_num=%d, deflaw=%d\n",
pri_protocol_name(set_proto),
phonedev->channels,
PHONEDEV(xpd).channels,
priv->dchan_num,
priv->deflaw
);
@@ -633,7 +618,7 @@ static int set_pri_proto(xpd_t *xpd, enum pri_protocol set_proto)
XPD_NOTICE(xpd, "Failed setting PRI default line config\n");
return ret;
}
return apply_pri_protocol(xpd);
return 0;
}
static void dahdi_update_syncsrc(xpd_t *xpd)
@@ -1055,17 +1040,6 @@ bad_lineconfig:
return -EINVAL;
}
static int pri_set_spantype(struct dahdi_span *span, const char *spantype)
{
struct phonedev *phonedev = container_of(span, struct phonedev, span);
xpd_t *xpd = container_of(phonedev, struct xpd, phonedev);
enum pri_protocol set_proto = PRI_PROTO_0;
XPD_INFO(xpd, "%s: %s\n", __func__, spantype);
set_proto = pri_protocol_bystr(spantype);
return set_pri_proto(xpd, set_proto);
}
/*
* Called only for 'span' keyword in /etc/dahdi/system.conf
*/
@@ -1241,7 +1215,6 @@ static int pri_audio_notify(struct dahdi_chan *chan, int on)
static const struct dahdi_span_ops PRI_span_ops = {
.owner = THIS_MODULE,
.set_spantype = pri_set_spantype,
.spanconfig = pri_spanconfig,
.chanconfig = pri_chanconfig,
.startup = pri_startup,
@@ -1253,7 +1226,6 @@ static const struct dahdi_span_ops PRI_span_ops = {
.maint = xpp_maint,
.echocan_create = xpp_echocan_create,
.echocan_name = xpp_echocan_name,
.assigned = xpp_span_assigned,
#ifdef DAHDI_SYNC_TICK
.sync_tick = dahdi_sync_tick,
#endif
@@ -1266,7 +1238,7 @@ static const struct dahdi_span_ops PRI_span_ops = {
#endif
};
static int apply_pri_protocol(xpd_t *xpd)
static int PRI_card_dahdi_preregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct PRI_priv_data *priv;
@@ -1276,7 +1248,15 @@ static int apply_pri_protocol(xpd_t *xpd)
xbus = xpd->xbus;
priv = xpd->priv;
BUG_ON(!xbus);
XPD_DBG(GENERAL, xpd, "\n");
XPD_DBG(GENERAL, xpd, "%s (proto=%s, channels=%d, deflaw=%d)\n",
(on)?"on":"off",
pri_protocol_name(priv->pri_protocol),
PHONEDEV(xpd).channels,
priv->deflaw);
if(!on) {
/* Nothing to do yet */
return 0;
}
PHONEDEV(xpd).span.spantype = pri_protocol_name(priv->pri_protocol);
PHONEDEV(xpd).span.linecompat = pri_linecompat(priv->pri_protocol);
PHONEDEV(xpd).span.deflaw = priv->deflaw;
@@ -1299,32 +1279,9 @@ static int apply_pri_protocol(xpd_t *xpd)
}
PHONEDEV(xpd).offhook_state = PHONEDEV(xpd).wanted_pcm_mask;
PHONEDEV(xpd).span.ops = &PRI_span_ops;
PHONEDEV(xpd).span.channels = PHONEDEV(xpd).channels;
xpd_set_spanname(xpd);
return 0;
}
static int PRI_card_dahdi_preregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
struct PRI_priv_data *priv;
BUG_ON(!xpd);
xbus = xpd->xbus;
priv = xpd->priv;
BUG_ON(!xbus);
XPD_DBG(GENERAL, xpd, "%s (proto=%s, channels=%d, deflaw=%d)\n",
(on)?"on":"off",
pri_protocol_name(priv->pri_protocol),
PHONEDEV(xpd).channels,
priv->deflaw);
if(!on) {
/* Nothing to do yet */
return 0;
}
return apply_pri_protocol(xpd);
}
static int PRI_card_dahdi_postregistration(xpd_t *xpd, bool on)
{
xbus_t *xbus;
@@ -2271,20 +2228,19 @@ static DEVICE_ATTR_WRITER(pri_protocol_store, dev, buf, count)
BUG_ON(!dev);
xpd = dev_to_xpd(dev);
XPD_DBG(GENERAL, xpd, "%s\n", buf);
if (!xpd)
if(!xpd)
return -ENODEV;
i = strcspn(buf, " \r\n");
if (i != 2) {
if((i = strcspn(buf, " \r\n")) != 2) {
XPD_NOTICE(xpd,
"Protocol name '%s' has %d characters (should be 2). Ignored.\n",
buf, i);
return -EINVAL;
}
if (strnicmp(buf, "E1", 2) == 0)
if(strnicmp(buf, "E1", 2) == 0)
new_protocol = PRI_PROTO_E1;
else if (strnicmp(buf, "T1", 2) == 0)
else if(strnicmp(buf, "T1", 2) == 0)
new_protocol = PRI_PROTO_T1;
else if (strnicmp(buf, "J1", 2) == 0)
else if(strnicmp(buf, "J1", 2) == 0)
new_protocol = PRI_PROTO_J1;
else {
XPD_NOTICE(xpd,
@@ -2296,8 +2252,7 @@ static DEVICE_ATTR_WRITER(pri_protocol_store, dev, buf, count)
return (ret < 0) ? ret : count;
}
static DEVICE_ATTR(pri_protocol, S_IRUGO | S_IWUSR, pri_protocol_show,
pri_protocol_store);
static DEVICE_ATTR(pri_protocol, S_IRUGO | S_IWUSR, pri_protocol_show, pri_protocol_store);
static DEVICE_ATTR_READER(pri_localloop_show, dev, buf)
{

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,12 @@
# Install firmwares and initialization scripts for the Astribank
# drivers
FPGA_FW = FPGA_FXS.hex FPGA_1141.hex FPGA_1151.hex FPGA_1161.hex
USB_FW = USB_FW.hex USB_FW.201.hex USB_RECOV.hex
FPGA_FW = FPGA_FXS.hex FPGA_1141.hex FPGA_1151.hex FPGA_1161.hex \
FPGA_1161.201.hex
PIC_FW = PIC_TYPE_1.hex PIC_TYPE_2.hex PIC_TYPE_3.hex PIC_TYPE_4.hex
OCT_FW = $(wildcard OCT6104E-256D.ima)
FIRMWARES = USB_FW.hex $(FPGA_FW) $(PIC_FW) $(OCT_FW)
FIRMWARES = $(USB_FW) $(FPGA_FW) $(PIC_FW) $(OCT_FW)
PROTO_VER = 30
SCRIPTS_BASE = $(patsubst %,init_card_%_$(PROTO_VER),1 2 3 4 5)
SCRIPTS = $(SCRIPTS_BASE:%=../%)

View File

@@ -0,0 +1,578 @@
#
# $Id: USB_FW.201.hex 10402 2012-02-15 15:34:50Z dima $
#
:03004300021F0099
:03005300021F0089
:101F0000021E3100021E8E00021E7800021E4900D1
:081F1000021C2000021BA900C5
:101000001201000200000040AAAAAAAAAAAA01028C
:1010100003010A0600020000004001000902370037
:10102000020100C0000904000002FFFFFF040705E1
:101030000202000200070586020002000904010006
:1010400002FFFFFF050705040200020007058802F2
:10105000000200001201000200000040E4E451110F
:101060000000010203010A06000200000040010026
:1010700009023700020100C0320904000002FFFF2C
:10108000FF04070502024000000705860240000039
:101090000904010002FFFFFF0507050402400000EC
:1010A0000705880240000006040016001400120024
:1010B0000A00260004030904160358006F0072009A
:1010C00063006F006D0020004C00540044001403C6
:1010D00041007300740072006900620061006E00DC
:1010E0006B001203530065007200690061006C0020
:1010F0004E006F000A0346005000470041002603DF
:101100004D0061006E00610067006D0065006E00BB
:101110007400500072006F0063006500730073007C
:061120006F0072000000E8
:050FF6000300000000F3
:100F3C0041E0370041E0B60042E0B1000041E0384A
:100F4C0000021BE0850218E07943E0B30000004D7D
:0F0F5C00E03931303339354D202020202020005E
:101D71008B538A548955E5581558AE57700215573B
:101D81004E6014AB530555E555AA54700205541421
:081D9100F9ED12077780DF2253
:101BE6008B538A548955E55A155AAE5970021559C0
:101BF6004E6026AB560558E558AA5770020557148D
:101C0600F9120731FFAB530555E555AA5470020585
:0A1C16005414F9EF12077780CD2275
:101DC100D2B7E490E670F0F5B575B5E653B5E743E3
:101DD100B28853B2FCC2B3D2B1C2B2C2B67F32FE34
:061DE100121E07D2B6221B
:101E6100538EF75389FB5389F74389015389FDE465
:071E7100F58AF58CD2A922CD
:1018B2008C448D45AA06A9077556018A5789587521
:1018C2005900755A1C7B017AE0794C121BE690E0B4
:1018D20064E0FCA3E0FDA3E0FEA3E064D1FFEE64BC
:1018E2008DFEED644CFDEC6449FC90E064120853FB
:1018F2007EE07F4C7D1C7C001213707EE07F4C7B6F
:101902001C7A00AD45AC441214247D1C7C00AF450A
:10191200AE441211F57D1C7C00AF45AE44021C564C
:08183F008E448F458C468D4755
:10184700C20712001290E15BEFF0BF5004D207808D
:1018570057E490E15CF0A3F090E15CE0FEA3E0FFC9
:10186700C39410EE648094805030E5472FF582E5ED
:10187700463EF583E0FF90E15CE0FCA3E02545F5FB
:1018870082E5443CF583E0B5071090E15DE004F0A4
:1018970070C690E15CE004F080BE90E15CE070040B
:0A18A700A3E064107002D207A2074C
:0118B1002214
:020E12008F410E
:100E14001200128F42E4F546F547AD47AC46121472
:100E2400DA74692547F582E434E0F583E543F00597
:100E340047E54770020546C39408E54664809480FC
:100E440040D8E541600490E069F090E069E0B4C006
:100E540008754400754508800675441D754536754A
:100E64004600754708C3E5479410E54664809480BE
:100E740050231214D674692547F582E434E0F583CF
:100E8400E543F00547E547700205460545E545702D
:100E9400D4054480D07543FF75441D7545197546C6
:100EA40000754710C3E547942CE546648094805050
:100EB40033E542B4510E7B007A007943AD45AC442E
:100EC400FF1214E274692547F582E434E0F583E502
:100ED40043F00547E547700205460545E54570C4FE
:100EE400054480C075441D75453EE4F543F546F55B
:100EF40047C3E5479406E54664809480502FE54255
:100F0400B4510A90E069E0B4C2031214D6744625C1
:100F140047F582E434E0F583E543F00547E547709F
:100F24000205460545E54570C8054480C490E0695E
:070F3400E0B4C20374C0F039
:010F3B002293
:0A1988008E448F458B468A4789483C
:101992007E00E5452DF54DEE3544F54C1200128FD3
:1019A20049E5496451600BC3E5459410E544940050
:1019B200503585444A85454BC3E54B954DE54A95DF
:1019C2004C5024AB46AA47A948AD4BAC4AAF49128A
:1019D2001740054BE54B7002054A74012548F5484E
:0719E200E43547F54780D111
:0119E90022DB
:0617C7008B418A428943B8
:1017CD00D2067556017557E0755869755900755AE9
:1017DD00107B017AE07995121BE6E5432410F9E4BC
:1017ED003542854156F5578958755900755A0C7B08
:1017FD00017AE079A5121BE67EE07F957CE07D1AEB
:10180D001218B27EE07F1AE543241CF9E43542FC40
:10181D00AD0112183F5016AB41E5432410F9E435E4
:10182D0042FA7D1C7F197E1D1219888002C206A204
:01183D0006A4
:01183E002287
:101126007F03121D46EF2402FFE43EA90775410125
:10113600F542894390E06AE0FFE50C2408F582E475
:10114600350BF583EFF090E06BE0FFE50C2409F535
:1011560082E4350BF583EFF090E06CE0FFE50C24BC
:101166000AF582E4350BF583EFF090E06DE0FFE5DC
:101176000C240BF582E4350BF583EFF090E06EE07E
:10118600FFE50C240CF582E4350BF583EFF090E0D7
:101196006FE0FFE50C240DF582E4350BF583EFF0E7
:1011A6007F087E00E4FDEDC39408502874692FF58E
:1011B60082E434E0F583E0FCAB41AA42A94375F032
:1011C60002EDA4F58285F083EC1207890D0FBF00AE
:1011D600010E80D2E5192404F582E43518F583E082
:0E11E60030E0047F0180027F0090E037EFF0E0
:0111F40022D8
:101B250090E06CE02FFFE50C240AF582E4350BF517
:101B350083EFF0E50C240BF582E4350BF583E0FE2D
:101B4500E50C240AF582E4350BF583E0FDEDFF9005
:101B5500E0B1EEF0A3EFF0D206121CBD90E680E0F6
:041B650054F7F0221F
:1016200090E600E054E74410F090E60174C0F090BA
:10163000E6107420F000000090E611F00000009029
:10164000E6047480F0000000740FF0000000E4F085
:1016500000000090E6187410F0000000E490E61915
:10166000F000000090E61A7408F0000000E490E634
:101670001BF000000090E6497482F0000000F000CA
:10168000000090E6247402F0000000E490E625F0EB
:1016900000000090E6957480F0000000F00000006B
:1016A00043AF017B017AE07914755700755806E461
:0416B000FD021D71A9
:061E0100D2837F0A7E007F
:101E07007C007D181207ABEF1FAC0670011E4C70EB
:021E1700F622B1
:0A1A43008E418F428B438A4489458F
:101A4D00E4F546F547C3E5479542E54695415036E1
:101A5D00AB43AA44A94585478285468312074AFFB1
:101A6D00E4FBFAC2B2EF1392B1EFC313FFD2B20B84
:101A7D00BB00010AEB64084A70E9C2B20547E547AD
:071A8D0070C3054680BFD3C2
:011A9400222F
:101E190090E60174C0F0C2B67FC27E01121E07D2DD
:081E2900B67F327E00021E07A5
:101EA400D287121E01C287121E03C2837F0A7E00DC
:031EB400021E0704
:021B6900AB07C8
:101B6B00E4F9FAEBC413131354011392877F027E2B
:101B7B0000121E07D2837F057E00121E07E925E0A7
:101B8B00FFA2B3E4334FF97F057E00121E07EB254E
:0D1B9B00E0FBC283121E030ABA08C8AF01A6
:011BA800221A
:061A95008B558A568957AB
:101A9B00A2AFE433F55D121EA4E4F55CE55CC395DF
:101AAB005B5027AB55AA56A957855C8275830012EC
:101ABB00074AFF121B69AB58AA59A95A855C827554
:101ACB008300EF120789055C80D2120036E55D2496
:031ADB00FF92AFC8
:011ADE0022E5
:0B003600C287121E03121E01D2872297
:101DE70075418F8F42755800755900755A4B755B51
:0A1DF700027B007A007941021A9580
:101C8C0078417C007D007BFF7A0F79F67E007F0522
:101C9C0012070B30B415755800755900755A4175FB
:101CAC005B057B007A007941121A95E5435401FFDC
:011CBC002205
:100B4E007541007542007543007545017546E075A7
:100B5E0047007548017549E0754A08E4F551FFF5FF
:100B6E00527B017AE07900F557755808FD121D7118
:100B7E00AB45AA46A9477401120777E4F550E55034
:100B8E00C454F0AB45AA46A94790000112078985C7
:100B9E004858854959854A5A755B08121A95AB48CB
:100BAE00AA49A94A90000212074AFE5403FFEE54C6
:100BBE0070F55124E0602924F0604B24F0605D2430
:100BCE00F0606F24406003020C5675410185184297
:100BDE00851943EF24FE600624FE703B801C801FA7
:100BEE00E5192401FDE43518A905754101F5428981
:100BFE0043EF24FC60092402700A7552028052757C
:100C0E005206804D8011E5192402FDE43518A90520
:100C1E00754101F54289437552088035E519240363
:100C2E00FDE43518A905754101F542894375520455
:100C3E00801FE5192405FDE43518A905754101F558
:100C4E00428943755298800975410075420075437B
:100C5E0000E542454345416022AB41AA42A94312F9
:100C6E000731FED395524006AD52AE0580008E443C
:100C7E00120731C39544120777800CE55170047E3C
:100C8E000180027E008E44744B2550F8A644055018
:100C9E00E550C394055003020B8CAB45AA46A947F9
:100CAE007488120777AB45E5472401F9E43546FA17
:100CBE0075560075570075584B755900755A0512C3
:100CCE001BE6854858854959854A5A755B08AB45D8
:070CDE00AA46A947021A957E
:1019EA008F4190E0B1E0FEA3E054F064607003EE32
:1019FA00641160037F012290E037E070037F0F22B9
:101A0A00E5417003308108E541B401062080037F77
:101A1A00102290E0B6E0B541037F0122E4F511D22D
:101A2A0006121CBDAF4190E0B6EFF024FF92B590CC
:091A3A00E680E054F7F07F002281
:04000E0090FC04F06E
:1000120090E678E0541824F06008240870087F50B5
:0800220080067F518002E4FF1B
:01002A0022B3
:0C14D600AD45AC447B007A007943AF4286
:0C14E2008F488C498D4A8B4B8A4C894DF9
:1014EE00E4F54EF54F755003FDF551F552A2AF33AD
:1014FE00F553E54824AF600D047012754E00754F1C
:10150E00017D018008754E00754F02E4FDE54860CF
:10151E0051E54F454E604BE54990E0B3F0E54AA3E7
:10152E00F074B32DF582E434E0AD82FCAB4FAF48DE
:10153E001219227551008F527F0A7E00121ADFE5B2
:10154E0052455160107CE07D687B01AF4812157BDF
:10155E007551008F5290E068E0AB4BAA4CA94D122A
:0C156E000777E55324FF92AFAE51AF5257
:01157A00224E
:0C1740008F4E8C4F8D508B518A52895374
:10174C00E4F554F555755603FDF557F558A2AF332E
:10175C00F559E54E24AF600D0470127554007555A3
:10176C00027D018008755400755503E4FDE54E605B
:10177C003FE55545546039E54F90E0B3F0E550A393
:10178C00F0AB51AA52A95312073190E0B5F0C2B791
:10179C0074B32DF582E434E0AD82FCAB55AF4E1240
:1017AC0019227557008F587F0A7E00121ADFD2B7A4
:0A17BC00E55924FF92AFAE57AF5875
:0117C6002200
:10005600E4F531F532F535F53CF53DF53EF53FE590
:10006600AA5484600302063A90E694E0FE90E69570
:10007600E0FBEEF53CEBF53DC39405E53C94004012
:100086000790F404E0FD80027DFFED12085F00CECC
:100096000102C30503080703580903D80B011E0E06
:1000A60000E40F019411025E130541250401310499
:1000B6005732046A3404B23504C93604E63703E518
:1000C6004503F647000005BA75310075320790FC06
:1000D600047481F0A37414F0E4A3F00205DD7F0F2D
:1000E600121DE775310075320690FC047480F0E449
:1000F600A3F0753505F511FE74002535F9EE34F4D7
:10010600FA7B011217C7400690FC05740EF0E4FF57
:10011600120E127F8F0202BD7F0E121DE77531008F
:10012600753205748E12000E8F3F7B007A0079407F
:10013600E4FDFC1214E2E53F64516019E53F6450AA
:10014600601375310075320690FC047480F0A37458
:100156000BF00205DD90E0B7E0FF120E12740025E9
:1001660032F974FC3531FA7B01C0038B567557E0C2
:10017600755869755900755A2CD003121BE6742CF4
:100186002532F532E43531F5317F8E0202BD753107
:100196000075320790FC047491F090E678E090FCCC
:1001A60005F030B3047F0280027F0030B4047E0184
:1001B60080027E00EE4F90FC06F074002532F97442
:1001C600FC3531FA7B01755700755812E4FD121D96
:1001D6007174002532F974FC3531FA7B01C0038B4A
:1001E600567557E0755839755900755A06D0031279
:1001F6001BE674062532F532E43531F531FE74001E
:100206002532F974FC3EFA7B01C0038B567557E024
:10021600755814755900755A06D003121BE67406F4
:100226002532F532E43531F531FE74002532F974A4
:10023600FC3EFA7B01C0038B567557E07558467530
:100246005900755A06D003121BE674062532F5329C
:10025600E43531F5310205DD7F13121DE7753100F6
:1002660075321D749312000E8F3F75381D75390057
:10027600753600753705D3E5399418E538941D5061
:1002860034E53FB4510E7B007A007940AD39AC3885
:10029600FF1214E274002537F58274FC3536F583B7
:1002A600E540F00539E539700205380537E5377060
:1002B600C5053680C17F93121DE70205DD75310045
:1002C60075320690FC047480F0E4A3F090F405E027
:1002D60090E038F0E0147071121E1930B31B755699
:1002E600017557F4755806755900755A067B017ADB
:1002F600E07914121BE60205DD90FC057401F0029C
:1003060003D075310075320690FC047480F0E4A3C6
:10031600F0753507AF35FEC3E53D9FF534E53C9EE8
:10032600F53390E038E014702074002FF974F43E31
:10033600FA7B01AF34AE33121A435004E40204C20E
:1003460090FC05740CF00205DD90FC057403F002C8
:1003560005DD75310075320690FC047480F0E4A367
:10036600F090E038E014705CE4FFFE20B411C2B2F5
:10037600D2B1D2B20FBF00010EEF640A4E70EC305C
:10038600B43A90E6017403F07F647E00121E079073
:10039600E0B7E0FF120E127EE07F697CE07DB812C6
:1003A60018B27EE07FB8AD1CAC1B12183F50051288
:1003B6000B4E801690FC05740EF0800E90FC0574B2
:1003C6000DF0800690FC057403F0E490E038F0022E
:1003D60005DDE4F531F5327F02121B250205DDE469
:1003E600FF120E12121126E4FF1219EAE4FF800230
:1003F6007F01121B25121E190205DD7531007532AB
:100406000690FC047480F0E4A3F090F405E0F53E59
:10041600E4F511E53E64016004E53E703290E0B11A
:10042600E0FEA3E054F064607003EE6411600280A5
:100436007290E037E070028058E5116401600AE5C9
:1004460011700C121C8CEF6006853E110205DD80D2
:100456005275310075320690FC0474B2F0A3E511B2
:10046600F00205DD75310075320690FC047480F0EB
:10047600E4A3F090F405E0F53EFF1219EAEF24F14B
:10048600600F1460152410701AE4F531F532020578
:10049600DD90FC05740FF00205DD90FC057410F08C
:1004A6000205DD90FC057401F00205DD753100756D
:1004B600320690FC0474B5F090E0B6E090FC05F0CE
:1004C6000205DD75310075320690FC0474B6F0A2A3
:1004D60080E43325E0FFA281E4334FA3F00205DD7B
:1004E600853C31853D3290FC0474B7F0753505C303
:1004F600E53D9535F534E53C9400F5337400253536
:10050600F582E434F4F583E0648870030205DDAF18
:10051600357E0074002FF9EE34F4FA7B01C003C077
:100526000174002FF9EE34FC8B58F559895A85343D
:100536005BD001D003121A950205DD7531007532C4
:100546000590FC0474A5F01200128F3F7B007A0020
:100556007940E4FDFC1214E290E036E0FF0532E556
:1005660032AC3170020531142400F58274FC3CF57E
:1005760083EFF090E0B7E0FF0532E532AC31700270
:100586000531142400F58274FC3CF583EFF0053246
:10059600E532AE3170020531142400F58274FC3E5A
:1005A600F583E540F090E6017403F07F647E001267
:1005B6001E07802375310075320690FC047480F0A6
:1005C600C3E53D9405E53C94005006A37407F0800E
:1005D6000690FC057406F090F404E0B48004A3E0F1
:1005E600701290F404E06405600FE06407600AE0AE
:1005F60064096005E490E038F0E5324531602CE5A9
:1006060032FD90FC00F0E531FFA3F090F402E0909B
:10061600FC02F090F403E090FC03F090E69CEFF00F
:1006260000000090E69DEDF000000090E6957480D5
:04063600F0000000D0
:01063A00229D
:02004100D322C8
:0800030090E6BAE0F51DD322DE
:101ECA0090E740E51DF0E490E68AF090E68B04F096
:021EDA00D32211
:08002B0090E6BAE0F51AD322B9
:101EDC0090E740E51AF0E490E68AF090E68B04F087
:021EEC00D322FF
:101D990090E6B9E0242F600D04701990E604E0FF85
:101DA900430780800890E604E0FF53077F000000A6
:071DB900EFF08002D322C30A
:011DC0002200
:101E3100C0E0C083C082D2015391EF90E65D74018E
:081E4100F0D082D083D0E03222
:101E7800C0E0C083C0825391EF90E65D7404F0D057
:061E880082D083D0E0329D
:101E8E00C0E0C083C0825391EF90E65D7402F0D043
:061E9E0082D083D0E03287
:101C2000C0E0C083C08285120D85130E850E8285AB
:101C30000D83A37402F085090F850A108510828533
:101C40000F83A37407F05391EF90E65D7410F0D00A
:061C500082D083D0E032D7
:101E4900C0E0C083C082D2035391EF90E65D74086D
:081E5900F0D082D083D0E0320A
:101BA900C0E0C083C08290E680E030E72085090D5F
:101BB900850A0E850E82850D83A37402F085120FA6
:101BC900851310851082850F83A37407F05391EF55
:0D1BD90090E65D7420F0D082D083D0E03221
:101EB700000102020303040405050300000000C03B
:031EC700C2000056
:060F6B0001110001080065
:03000B000212BC22
:1012BC00C0E0C0F0C083C082C0D075D000C000C0F8
:0D12CC0001C002C003C004C005C006C00779
:1012D90078217C007D007BFF7A1E79C17E007F0525
:1012E90012070B90E0B6E0F526C204752700E50861
:1012F900600415088056750805E5117004C204805C
:1013090043A280308101B3500B3081047F008030CB
:101319007F01802C30B415755800755900755A2114
:10132900755B057B007A007921121A95E523540132
:10133900F527701090E0B6E060047F0080027F011D
:0C1349008F26D204300405AF261219EAEA
:10135500D007D006D005D004D003D002D001D000EC
:0B136500D0D0D082D083D0F0D0E03296
:100CE50078567CE17D017BFF7A1E79C67E007F0404
:100CF50012070BC203C200D202C201121DC1121E8D
:100D050061121620750B10750C00751410751512EF
:100D1500750910750A1C75121075137085120F85EB
:100D250013107516107517B412001290E154EFF0F8
:100D35007B017AE17955E4FDFC1214E290E155E07E
:100D4500FF90E036F0E490E0B7F0EF64C26059EF51
:100D550064C06054E490E15AF090E15AE0FFC39416
:100D650004504A74562FF582E434E1F583E0FF60C0
:100D75003C120E127EE07F697CE07DB81218B27ECF
:100D8500E07FB8AD1CAC1B12183F501490E15AE03F
:100D95002456F582E434E1F583E090E0B7F0800D68
:100DA50090E15AE004F080B1E4FF120E1212112610
:100DB500D2E843D82090E668E04409F090E65CE08C
:100DC500443DF012001290E154EFF07B017AE17995
:100DD50055E4FDFC1214E290E155E064C26007E4BD
:100DE50090E0B6F0C2B57F01121B25D2AFD28C536D
:100DF5008EF8C203C2AF120056D2AF3001051209F8
:0D0E050026C2013003EEC203121D1A80E761
:0B00460090E50DE030E402C322D3225D
:1009260090E6B9E070030209EB147003020A602432
:10093600FE7003020ADB24FB70030209E514700350
:100946000209DF1470030209D31470030209D924C3
:10095600056003020B3A1200414003020B4690E683
:10096600BBE024FE602714603E24FD60111460275E
:1009760024067056E50B90E6B3F0E50C80421200B3
:10098600465044E51490E6B3F0E5158033E50D9046
:10099600E6B3F0E50E802985120F851310E50F905A
:1009A600E6B3F0E510801990E6BAE0FF121D46AAFC
:1009B60006A9077B01EA494B600DEE90E6B3F0EF1E
:1009C60090E6B4F0020B46020B35020B35121EDC24
:1009D600020B4612002B020B46120003020B4612B4
:1009E6001ECA020B4690E6B8E0247F601514601913
:1009F60024027063A200E43325E0FFA202E4334F31
:100A06008041E490E740F0803F90E6BCE0547EFFF2
:100A16007E00E0D394807C0040047D0180027D004E
:100A2600EC4EFEED4F24B7F582741E3EF583E4933B
:100A3600FF3395E0FEEF24A1FFEE34E68F82F583C7
:100A4600E0540190E740F0E4A3F090E68AF090E6E7
:100A56008B7402F0020B46020B3590E6B8E024FEDA
:100A6600601624026003020B4690E6BAE0B4010564
:100A7600C200020B46020B3590E6BAE0705590E6CE
:100A8600BCE0547EFF7E00E0D394807C0040047D71
:100A96000180027D00EC4EFEED4F24B7F582741EF8
:100AA6003EF583E493FF3395E0FEEF24A1FFEE3499
:100AB600E68F82F583E054FEF090E6BCE0548013A6
:100AC6001313541FFFE0540F2F90E683F0E04420E9
:100AD600F0806D805A90E6B8E024FE60192402701A
:100AE6004E90E6BAE0B40104D200805490E6BAE033
:100AF6006402604C803990E6BCE0547EFF7E00E0E4
:100B0600D394807C0040047D0180027D00EC4EFE83
:100B1600ED4F24B7F582741E3EF583E493FF3395BB
:100B2600E0FEEF24A1FFEE34E68F82F583800D9080
:100B3600E6A08008121D99500790E6A0E04401F057
:070B460090E6A0E04480F0FE
:010B4D002285
:03003300020FFBBE
:040FFB0053D8EF32A6
:100F71006080E0D4292E43C9A2D87C013D3654A11A
:100F8100ECF0061362A705F3C0C7738C98932BD9B5
:100F9100BC4C82CA1E9B573CFDD4E01667426F18B9
:100FA1008A17E512BE4EC4D6DA9EDE49A0FBF58E45
:100FB100BB2FEE7AA968799115B2073F94C21089C7
:100FC1000B225F21807F5D9A5A903227353ECCE714
:100FD100BFF79703FF1930B348A5B5D1D75E922A61
:100FE100AC56AAC64FB838D296A47DB676FC6BE251
:040FF1009C7404F1F7
:081370008C468D47AB07AA066D
:10137800E4F548F549C3E5499547E5466480F8E54D
:1013880048648098400302141FE54925E0FFE548BA
:1013980033FE74D42FF58274E03EF583E0FF7E00BF
:1013A800AC46AD471207BD8C4A8D4BE54925E0FF99
:1013B800E54833FE74D52FF58274E03EF583E0FFEF
:1013C8007E00AC46AD471207BD8C4C8D4DE54B6594
:1013D8004D7004E54A654C6030EB254BF582EA35E3
:1013E8004AF583E0F9EB254DF582EA354CF583E0C3
:1013F800FFEB254BF582EA354AF583EFF0EB254DF7
:10140800F582EA354CF583E9F00549E549600302C0
:0B141800137D054802137D7E007F015C
:0114230022A6
:0C1424008E468F478C488D498A4A8B4BBE
:10143000E54745466006E54945487004E4FEFF225D
:10144000E4F54CF54DC3E54D954BE54A6480F8E570
:101450004C648098507BE4F54EF54FE549254DF5F9
:1014600082E548354CF583E4F0C3E54F954BE54AFA
:101470006480F8E54E6480985049E54F254D24D4AA
:10148000F582E434E0F583E0FFE547254FF582E59A
:1014900046354EF583E0FEEF8EF0A4FFE549254D7D
:1014A000F582E548354CF583E02FFFE549254DF5FC
:1014B00082E548354CF583EFF0054FE54F70AA05FE
:1014C0004E80A6054DE54D6003021445054C0214FF
:0514D000457E007F01D4
:0114D50022F4
:101CEC00120731FF90000312074A12077790000386
:101CFC00EF12078990000212074AFF9000011207A9
:0E1D0C004A900002120789900001EF02078939
:0811F5008E468F478C488D499E
:1011FD00E4F54AF54BE549AE487802CEA2E713CEA9
:10120D0013D8F8FFC3E54B9FEE6480F8E54A648080
:10121D009840030212B7E54BAE4A7802C333CE3382
:10122D00CED8F92547FFEE3546FAA9077B018B4C41
:10123D00F54D894E74D5254BF582E434E0F583E008
:10124D00541FFFE48F52F551F550F54F121CECABC6
:10125D004CAA4DA94E120819C374209552F9F812D3
:10126D000806C004C005C006C007A94E120819A97A
:10127D0052A8011207F3D003D002D001D000EF4BDA
:10128D00FFEE4AFEED49FDEC48FCAB4CAA4DA94ED4
:10129D00120839AB4CAA4DA94E121CEC054BE54B6F
:0E12AD006003021202054A0212027E007F0157
:0112BB002210
:101C5600D3ED9410EC64809480402AED1D70011C35
:101C6600142FF582EE3CF583E0FB547F24D4F582F5
:101C7600E434E0F583E0F9540F2FF582E43EF58372
:051C8600E06BF080CBD3
:011C8B002236
:101D1A0090E682E030E004E020E60B90E682E030D4
:101D2A00E119E030E71590E680E04401F07F147E87
:0C1D3A0000121ADF90E680E054FEF02258
:101CBD0030060990E680E0440AF0800790E680E067
:101CCD004408F07FDC7E05121ADF90E65D74FFF0AC
:0F1CDD0090E65FF05391EF90E680E054F7F0222D
:101ADF008E5A8F5B90E600E054187012E55B24017C
:101AEF00FFE4355AC313F55AEF13F55B801590E6F3
:101AFF0000E05418FFBF100BE55B25E0F55BE55ADE
:101B0F0033F55AE55B155BAE5A7002155A4E6005F8
:061B1F00121EEE80EE2212
:06157B008C548D55AE07F3
:10158100EB70037F012290E678E020E6F990E6789F
:101591007480F0EE25E0440190E679F090E678E081
:1015A10030E0F990E678E020E26BE030E167BB01E2
:1015B1000790E678E04420F090E679E0F5561BEBE1
:1015C100603090E678E030E0F990E678E020E2459E
:1015D100BB010790E678E04420F090E679E0FF0552
:1015E10055E555AC547002055414F5828C83EFF027
:1015F10080CC90E678E030E0F990E678E020E215E2
:1016010090E678E04440F090E679E0855582855493
:0E16110083F07F012290E678E04440F07F00F5
:01161F0022A8
:1019220090E678E020E6F990E6787480F0EF25E022
:1019320090E679F090E678E030E0F990E678E02001
:10194200E23AE030E136EBD3940040260DEDAE04EE
:1019520070010C14F5828E83E090E679F01B90E61C
:1019620078E030E0F990E678E020E210E020E1D67D
:10197200800A90E678E04440F07F012290E678E029
:051982004440F07F006D
:01198700223D
:021D4600A907EB
:101D4800AE16AF178F828E83A3E064037017AD01C0
:101D580019ED7001228F828E83E07C002FFDEC3E0E
:081D6800FEAF0580DFE4FEFF81
:011D70002250
:101EEE007400F58690FDA57C05A3E582458370F907
:011EFE0022C1
:030000000216B431
:0C16B400787FE4F6D8FD75815D0216FB1E
:10063B00E709F608DFFA8046E709F208DFFA803EA1
:10064B0088828C83E709F0A3DFFA8032E309F6088E
:10065B00DFFA8078E309F208DFFA807088828C83F6
:10066B00E309F0A3DFFA806489828A83E0A3F608AA
:10067B00DFFA805889828A83E0A3F208DFFA804C84
:10068B0080D280FA80C680D4806980F2803380105B
:10069B0080A680EA809A80A880DA80E280CA8033C4
:1006AB0089828A83ECFAE493A3C8C582C8CCC5833C
:1006BB00CCF0A3C8C582C8CCC583CCDFE9DEE7800C
:1006CB000D89828A83E493A3F608DFF9ECFAA9F08B
:1006DB00EDFB2289828A83ECFAE0A3C8C582C8CCE1
:1006EB00C583CCF0A3C8C582C8CCC583CCDFEADEFA
:1006FB00E880DB89828A83E493A3F208DFF980CC5C
:10070B0088F0EF60010E4E60C388F0ED2402B40454
:10071B000050B9F582EB2402B4040050AF232345FB
:06072B00822390068B738F
:10073100BB010689828A83E0225002E722BBFE02C6
:09074100E32289828A83E49322F9
:10074A00BB010CE58229F582E5833AF583E0225064
:10075A0006E92582F8E622BBFE06E92582F8E222AE
:0D076A00E58229F582E5833AF583E49322C8
:10077700BB010689828A83F0225002F722BBFE0161
:02078700F3225B
:10078900F8BB010DE58229F582E5833AF583E8F0A6
:10079900225006E92582C8F622BBFE05E92582C852
:0207A900F2223A
:1007AB00EF8DF0A4A8F0CF8CF0A428CE8DF0A42E62
:0207BB00FE221C
:1007BD00C2D5EC30E709B2D5E4C39DFDE49CFCEE57
:1007CD0030E715B2D5E4C39FFFE49EFE120885C342
:1007DD00E49DFDE49CFC800312088530D507C3E43D
:0607ED009FFFE49EFE22C6
:1007F300E8600FECC313FCED13FDEE13FEEF13FFE4
:03080300D8F12207
:10080600E8600FEFC333FFEE33FEED33FDEC33FC50
:03081600D8F122F4
:10081900BB010789828A830208E65005E9F80208C4
:10082900DABBFE05E9F80208F289828A830208FE2A
:10083900BB010789828A830208535005E9F8020936
:0A0849000EBBFE05E9F802091A22B1
:0C085300ECF0A3EDF0A3EEF0A3EFF02218
:10085F00D083D082F8E4937012740193700DA3A328
:10086F0093F8740193F5828883E47374029368603C
:06087F00EFA3A3A380DF3C
:1016C000020CE5E493A3F8E493A34003F68001F24F
:1016D00008DFF48029E493A3F85407240CC8C3332B
:1016E000C4540F4420C8834004F456800146F6DFFA
:1016F000E4800B0102040810204080900F3CE47E3F
:10170000019360BCA3FF543F30E509541FFEE493EE
:10171000A360010ECF54C025E060A840B8E493A3B5
:10172000FAE493A3F8E493A3C8C582C8CAC583CAE0
:10173000F0A3C8C582C8CAC583CADFE9DEE780BE98
:010FF50000FB
:10088500BC000BBE0029EF8DF084FFADF022E4CC57
:10089500F875F008EF2FFFEE33FEEC33FCEE9DEC20
:1008A500984005FCEE9DFE0FD5F0E9E4CEFD22ED66
:1008B500F8F5F0EE8420D21CFEADF075F008EF2FB0
:1008C500FFED33FD4007985006D5F0F222C398FDA1
:0508D5000FD5F0EA223E
:0C08DA00E6FC08E6FD08E6FE08E6FF224A
:0C08E600E0FCA3E0FDA3E0FEA3E0FF2285
:0C08F200E2FC08E2FD08E2FE08E2FF2242
:1008FE00E493FC740193FD740293FE740393FF2240
:0C090E00ECF608EDF608EEF608EFF62215
:0C091A00ECF208EDF208EEF208EFF22219
:00000001FF

View File

@@ -1,10 +1,10 @@
#
# $Id: USB_FW.hex 10085 2011-11-13 14:33:46Z dima $
# $Id: USB_FW.hex 10401 2012-02-15 15:30:24Z dima $
#
:03004300021E009A
:03005300021E008A
:101E0000021E3000021E8D00021E7700021E4800D6
:081E1000021C1B00021BA400D0
:03004300021F0099
:03005300021F0089
:101F0000021E3400021E9100021E7B00021E4C00C5
:081F1000021C1F00021BA800C7
:101000001201000200000040AAAAAAAAAAAA01028C
:1010100003010A0600020000004001000902370037
:10102000020100C0000904000002FFFFFF040705E1
@@ -24,197 +24,199 @@
:101100004D0061006E00610067006D0065006E00BB
:101110007400500072006F0063006500730073007C
:061120006F0072000000E8
:050FF7000300000000F2
:1011ED0041E0370041E0BB0042E0B6000041E0388D
:1011FD0000021BE08A0218E07E43E0B800000052B6
:10120D00E039393733343A393936344D50202020CE
:04121D00202020006D
:101D96008B508A518952E5551555AE54700215542B
:101DA6004E6014AB500552E552AA5170020551140B
:081DB600F9ED12077180DF2234
:101BE1008B508A518952E5571557AE5670021556DA
:101BF1004E6026AB530555E555AA547002055414A1
:101C0100F912072BFFAB500552E552AA517002059C
:0A1C11005114F9EF12077180CD2283
:101D6C00C2B5C2B7E490E670F075B5E653B5EE4374
:101D7C00B28053B2F4A2B53390E0BBF0C2B3C2B69A
:0A1D8C007F327E00121DECD2B62259
:101E6000538EF75389FB5389F74389015389FDE466
:071E7000F58AF58CD2A922CE
:1017B3008C428D43AA06A9077553018A548955752E
:1017C300560075571C7B017AE07951121BE190E0BA
:1017D30051E0B4C20374C0F090E069E0FCA3E0FD03
:1017E300A3E0FEA3E064D1FFEE648DFEED644CFD47
:1017F300EC6449FC90E06912084D7EE07F517D1C4A
:101803007C001213607EE07F517B1C7A00AD43ACF9
:10181300421214147D1C7C00AF43AE421211267D8C
:0A1823001C7C00AF43AE42021C51D2
:0818A5008E428F438C448D45F7
:1018AD00C20712001290E160EFF0BF5004D2078022
:1018BD0057E490E161F0A3F090E161E0FEA3E0FF59
:1018CD00C39410EE648094805030E5452FF582E589
:1018DD00443EF583E0FF90E161E0FCA3E02543F594
:1018ED0082E5423CF583E0B5071090E162E004F03B
:1018FD0070C690E161E004F080BE90E161E070049B
:0A190D00A3E064107002D207A207E5
:0119170022AD
:020DE4008F3F3F
:100DE6001200128F40E4F544F545AD45AC441214AB
:100DF600CA746E2545F582E434E0F583E541F005D5
:100E060045E54570020544C39408E5446480948032
:100E160040D8E53F600490E06EF090E06EE0B4C02C
:100E260008754200754308800675421D7543367580
:100E36004400754508C3E5459410E54464809480F4
:100E460050231214C6746E2545F582E434E0F5830A
:100E5600E541F00545E545700205440543E5437067
:100E6600D4054280D07541FF75421D7543197544FE
:100E760000754510C3E545942CE544648094805084
:100E860033E540B4510E7B007A007941AD43AC4264
:100E9600FF1214D2746E2545F582E434E0F583E53D
:100EA60041F00545E545700205440543E54370C438
:100EB600054280C075421D75433EE4F541F544F593
:100EC60045C3E5459406E54464809480502FE5408B
:100ED600B4510A90E06EE0B4C2031214C6744B25F6
:100EE60045F582E434E0F583E541F00545E54570D6
:100EF6000205440543E54370C8054280C490E06E90
:070F0600E0B4C20374C0F067
:010F0D0022C1
:0A197E008E428F438B448A45894650
:101988007E00E5432DF54BEE3542F54A1200128FE5
:1019980047E5476451600BC3E5439410E542940062
:1019A8005035854248854349C3E549954BE54895F7
:1019B8004A5024AB44AA45A946AD49AC48AF4712A2
:1019C80017300549E5497002054874012546F54672
:0719D800E43545F54580D11F
:0119DF0022E5
:06182D008B3F8A40894157
:10183300D2067553017554E075556E75560075578C
:10184300107B017AE0799A121BE1E5412410F9E457
:101853003540853F53F554895575560075570C7BB4
:10186300017AE079AA121BE17EE07F9A7CE07D1A7F
:101873001217B37EE07F1AE541241CF9E43540FCDE
:10188300AD011218A55016AB3FE5412410F9E4351C
:1018930040FA7D1C7F197E1D12197E8002C206A2AA
:0118A300063E
:0118A4002221
:100F0E007F03121D41EF2402FFE43EA907753F0146
:100F1E00F540894190E06FE0FFE50C2408F582E48E
:100F2E00350BF583EFF090E070E0FFE50C2409F54A
:100F3E0082E4350BF583EFF090E071E0FFE50C24D1
:100F4E000AF582E4350BF583EFF090E072E0FFE5F1
:100F5E000C240BF582E4350BF583EFF090E073E093
:100F6E00FFE50C240CF582E4350BF583EFF090E0F1
:100F7E0074E0FFE50C240DF582E4350BF583EFF0FC
:100F8E007F087E00E4FDEDC394085028746E2FF5A3
:100F9E0082E434E0F583E0FCAB3FAA40A94175F052
:100FAE0002EDA4F58285F083EC1207830D0FBF00CE
:100FBE00010E80D2E5192404F582E43518F583E09C
:0E0FCE0030E0047F0180027F0090E037EFF0FA
:010FDC0022F2
:101B200090E071E02FFFE50C240AF582E4350BF517
:101B300083EFF0E50C240BF582E4350BF583E0FE32
:101B4000E50C240AF582E4350BF583E0FDEDFF900A
:101B5000E0B6EEF0A3EFF0D206121CB890E680E0FB
:041B600054F7F02224
:1016100090E600E054E74410F090E60174C0F090CA
:10162000E6107420F000000090E611F00000009039
:10163000E6047480F0000000740FF0000000E4F095
:1016400000000090E6187410F0000000E490E61925
:10165000F000000090E61A7408F0000000E490E644
:101660001BF000000090E6497482F0000000F000DA
:10167000000090E6247402F0000000E490E625F0FB
:1016800000000090E6957480F0000000F00000007B
:1016900043AF017B017AE07914755400755506E477
:0416A000FD021D9694
:061DE600D2877F0A7E0097
:101DEC007C007D181207A5EF1FAC0670011E4C700D
:021DFC00F622CD
:0A1A39008E3F8F408B418A428943A3
:101A4300E4F544F545C3E5459540E544953F503BF2
:101A5300AB41AA42A943854582854483120744FFCB
:101A6300E4FBFAC2B2EF1392B7EFC313FFD2B20B88
:101A7300BB00010AEB64084A70E9C2B220B002C39A
:0C1A8300220545E54570BE054480BAD33D
:011A8F002234
:101E180090E60174C0F0C2B67F967E00121DECD227
:081E2800B67F327E00021DECC2
:101EA300D2B1121DE6C2B1121DE8C2877F0A7E00BD
:031EB300021DEC21
:021B6400AB07CD
:101B6600E4F9FAEBC413131354011392B17F027E06
:101B760000121DECD2877F057E00121DECE925E0E0
:101B8600FFA283E4334FF97F057E00121DECEB259F
:0D1B9600E0FBC287121DE80ABA08C8AF01C3
:011BA300221F
:061A90008B538A548955B6
:101A9600A2AFE433F55B121EA3E4F55AE55AC395EB
:101AA600595027AB53AA54A955855A8275830012FB
:101AB6000744FF121B64AB56AA57A958855A82756C
:101AC6008300EF120783055A80D2120036E55B24A5
:031AD600FF92AFCD
:011AD90022EA
:0B003600C2B1121DE8121DE6D2B1227B
:100FDD00753F8F8F40755600755700755849755977
:0A0FED00027B007A00793F021A909F
:101C8700783F7C007D007BFF7A0F79F77E007F0528
:101C970012070530B41575560075570075583F750E
:101CA70059057B007A00793F121A90E5415401FFEC
:011CB700220A
:051EF1000300000000E9
:1011F50041E0370041E0B70042E0B2000041E0388D
:1012050000021BE0860218E07A43E0B40000004EBD
:10121500E03931303339354D502020202020200051
:101D9A008B518A528953E5561556AE557002155520
:101DAA004E6014AB510553E553AA52700205521402
:081DBA00F9ED12077180DF2230
:101BE5008B518A528953E5581558AE5770021557CF
:101BF5004E6026AB540556E556AA55700205551498
:101C0500F912072BFFAB510553E553AA5270020594
:0A1C15005214F9EF12077180CD227E
:101D7000C2B5C2B7E490E670F075B5E653B5EE4370
:101D8000B28053B2F4A2B53390E0B7F0C2B3C2B69A
:0A1D90007F327E00121E0AD2B62236
:101E6400538EF75389FB5389F74389015389FDE462
:071E7400F58AF58CD2A922CA
:1017B7008C428D43AA06A9077554018A5589567527
:1017C700570075581C7B017AE0794D121BE590E0B4
:1017D7004DE0B4C20374C0F090E065E0FCA3E0FD07
:1017E700A3E0FEA3E064D1FFEE648DFEED644CFD43
:1017F700EC6449FC90E06512084D7EE07F4D7D1C4E
:101807007C001213647EE07F4D7B1C7A00AD43ACF5
:10181700421214187D1C7C00AF43AE42120F367D76
:0A1827001C7C00AF43AE42021C55CA
:0818A9008E428F438C448D45F3
:1018B100C20712001290E15CEFF0BF5004D2078022
:1018C10057E490E15DF0A3F090E15DE0FEA3E0FF5D
:1018D100C39410EE648094805030E5452FF582E585
:1018E100443EF583E0FF90E15DE0FCA3E02543F594
:1018F10082E5423CF583E0B5071090E15EE004F03B
:1019010070C690E15DE004F080BE90E15DE070049E
:0A191100A3E064107002D207A207E1
:01191B0022A9
:020E0C008F3F16
:100E0E001200128F40E4F544F545AD45AC44121482
:100E1E00CE746A2545F582E434E0F583E541F005AC
:100E2E0045E54570020544C39408E544648094800A
:100E3E0040D8E53F600490E06AF090E06AE0B4C00C
:100E4E0008754200754308800675421D7543367558
:100E5E004400754508C3E5459410E54464809480CC
:100E6E0050231214CA746A2545F582E434E0F583E2
:100E7E00E541F00545E545700205440543E543703F
:100E8E00D4054280D07541FF75421D7543197544D6
:100E9E0000754510C3E545942CE54464809480505C
:100EAE0033E540B4510E7B007A007941AD43AC423C
:100EBE00FF1214D6746A2545F582E434E0F583E515
:100ECE0041F00545E545700205440543E54370C410
:100EDE00054280C075421D75433EE4F541F544F56B
:100EEE0045C3E5459406E54464809480502FE54063
:100EFE00B4510A90E06AE0B4C2031214CA744725D2
:100F0E0045F582E434E0F583E541F00545E54570AD
:100F1E000205440543E54370C8054280C490E06A6B
:070F2E00E0B4C20374C0F03F
:010F35002299
:0A1982008E428F438B448A4589464C
:10198C007E00E5432DF54BEE3542F54A1200128FE1
:10199C0047E5476451600BC3E5439410E54294005E
:1019AC005035854248854349C3E549954BE54895F3
:1019BC004A5024AB44AA45A946AD49AC48AF47129E
:1019CC0017340549E5497002054874012546F5466A
:0719DC00E43545F54580D11B
:0119E30022E1
:061831008B3F8A40894153
:10183700D2067554017555E075566A755700755887
:10184700107B017AE07996121BE5E5412410F9E453
:101857003540853F54F555895675570075580C7BAB
:10186700017AE079A6121BE57EE07F967CE07D1A7F
:101877001217B77EE07F1AE541241CF9E43540FCD6
:10188700AD011218A95016AB3FE5412410F9E43514
:1018970040FA7D1C7F197E1D1219828002C206A2A2
:0118A700063A
:0118A800221D
:101126007F03121D45EF2402FFE43EA907753F0128
:10113600F540894190E06BE0FFE50C2408F582E478
:10114600350BF583EFF090E06CE0FFE50C2409F534
:1011560082E4350BF583EFF090E06DE0FFE50C24BB
:101166000AF582E4350BF583EFF090E06EE0FFE5DB
:101176000C240BF582E4350BF583EFF090E06FE07D
:10118600FFE50C240CF582E4350BF583EFF090E0D7
:1011960070E0FFE50C240DF582E4350BF583EFF0E6
:1011A6007F087E00E4FDEDC394085028746A2FF58D
:1011B60082E434E0F583E0FCAB3FAA40A94175F038
:1011C60002EDA4F58285F083EC1207830D0FBF00B4
:1011D600010E80D2E5192404F582E43518F583E082
:0E11E60030E0047F0180027F0090E037EFF0E0
:0111F40022D8
:101B240090E06DE02FFFE50C240AF582E4350BF517
:101B340083EFF0E50C240BF582E4350BF583E0FE2E
:101B4400E50C240AF582E4350BF583E0FDEDFF9006
:101B5400E0B2EEF0A3EFF0D206121CBC90E680E0F7
:041B640054F7F02220
:1016140090E600E054E74410F090E60174C0F090C6
:10162400E6107420F000000090E611F00000009035
:10163400E6047480F0000000740FF0000000E4F091
:1016440000000090E6187410F0000000E490E61921
:10165400F000000090E61A7408F0000000E490E640
:101664001BF000000090E6497482F0000000F000D6
:10167400000090E6247402F0000000E490E625F0F7
:1016840000000090E6957480F0000000F000000077
:1016940043AF017B017AE07914755500755606E471
:0416A400FD021D9A8C
:061E0400D2877F0A7E0078
:101E0A007C007D181207A5EF1FAC0670011E4C70EE
:021E1A00F622AE
:0A1A3D008E3F8F408B418A4289439F
:101A4700E4F544F545C3E5459540E544953F503BEE
:101A5700AB41AA42A943854582854483120744FFC7
:101A6700E4FBFAC2B2EF1392B7EFC313FFD2B20B84
:101A7700BB00010AEB64084A70E9C2B220B002C396
:0C1A8700220545E54570BE054480BAD339
:011A93002230
:101E1C0090E60174C0F0C2B67F967E00121E0AD204
:081E2C00B67F327E00021E0A9F
:101EA700D2B1121E04C2B1121E06C2877F0A7E007B
:031EB700021E0AFE
:021B6800AB07C9
:101B6A00E4F9FAEBC413131354011392B17F027E02
:101B7A0000121E0AD2877F057E00121E0AE925E09E
:101B8A00FFA283E4334FF97F057E00121E0AEB257C
:0D1B9A00E0FBC287121E060ABA08C8AF01A0
:011BA700221B
:061A94008B538A548955B2
:101A9A00A2AFE433F55B121EA7E4F55AE55AC395E3
:101AAA00595027AB53AA54A955855A8275830012F7
:101ABA000744FF121B68AB56AA57A958855A827564
:101ACA008300EF120783055A80D2120036E55B24A1
:031ADA00FF92AFC9
:011ADD0022E6
:0B003600C2B1121E06121E04D2B1223D
:101DEA00753F8F8F4075560075570075584975595C
:0A1DFA00027B007A00793F021A9480
:101C8B00783F7C007D007BFF7A1E79F17E007F051B
:101C9B0012070530B41575560075570075583F750A
:101CAB0059057B007A00793F121A94E5415401FFE4
:011CBB002206
:100B4800753F007540007541007543017544E075B7
:100B580045007546017547E0754808E4FFF54F7B89
:100B6800017AE07900F554755508FD121D96AB43DE
:100B7800AA44A9457401120771E4F54EE54EC45420
:100B8800F0AB43AA44A94590000112078385465655
:100B9800854757854858755908121A90AB46AA4791
:100BA800A948900002120744FF530770EF24E06041
:100BB8001B24F0602A24F0603C24F0604E2440702E
:100BC80060753F018518408519418024E519240185
:100BD800FDE43518A905753F01F54089418011E507
:100BE800192402FDE43518A905753F01F54089412E
:100BF800754F088035E5192403FDE43518A90575F6
:100C08003F01F5408941754F04801FE5192405FD12
:100C1800E43518A905753F01F5408941754F98805D
:100C280009753F00754000754100E5404541453F65
:100C38006022AB3FAA40A94112072BFED3954F4033
:100C480006AD4FAE0580008E4212072BC3954212A7
:100C58000771800BEF70047E0180027E008E427463
:100C680049254EF8A642054EE54EC39405500302A9
:100C78000B84AB43AA44A9457488120771AB43E5BA
:100C8800452401F9E43544FA755300755400755547
:100C980049755600755705121BE185465685475715
:0F0CA800854858755908AB43AA44A945021A90CC
:1019E0008F3F90E0B6E0FEA3E054F064607003EE39
:1019F000641160037F012290E037E070037F0F22C3
:101A0000E53F7003308108E53FB401062080037F85
:101A1000102290E0BBE0B53F037F0122E4F511D234
:101A200006121CB8AF3F90E0BBEFF024FF92B590D8
:091A3000E680E054F7F07F00228B
:100B580045007546017547E0754808E4F54FFFF50F
:100B6800507B017AE07900F555755608FD121D9AFB
:100B7800AB43AA44A9457401120771E4F54EE54E4A
:100B8800C454F0AB43AA44A94590000112078385D9
:100B98004656854757854858755908121A94AB46E2
:100BA800AA47A948900002120744FE5403FFEE54D6
:100BB80070F54F24E0602924F0604B24F0605D2438
:100BC800F0606F24406003020C50753F01851840A7
:100BD800851941EF24FE600624FE703B801C801FAF
:100BE800E5192401FDE43518A905753F01F540898B
:100BF80041EF24FC60092402700A75500280527586
:100C08005006804D8011E5192402FDE43518A90528
:100C1800753F01F54089417550088035E519240371
:100C2800FDE43518A905753F01F540894175500463
:100C3800801FE5192405FDE43518A905753F01F560
:100C48004089417550988009753F0075400075418D
:100C580000E5404541453F6022AB3FAA40A941120B
:100C6800072BFED395504006AD50AE0580008E424E
:100C780012072BC39542120771800CE54F70047E52
:100C88000180027E008E427449254EF8A642054E28
:100C9800E54EC394055003020B86AB43AA44A9450D
:100CA8007488120771AB43E5452401F9E43544FA29
:100CB80075540075550075564975570075580512D5
:100CC8001BE5854656854757854858755908AB43EF
:070CD800AA44A945021A9489
:1019E4008F3F90E0B2E0FEA3E054F064607003EE39
:1019F400641160037F012290E037E070037F0F22BF
:101A0400E53F7003308108E53FB401062080037F81
:101A1400102290E0B7E0B53F037F0122E4F511D234
:101A240006121CBCAF3F90E0B7EFF024FF92B590D4
:091A3400E680E054F7F07F002287
:04000E0090FC04F06E
:1000120090E678E0541824F06008240870087F50B5
:0800220080067F518002E4FF1B
:01002A0022B3
:0C14C600AD43AC427B007A007941AF409E
:0C14D2008F468C478D488B498A4A894B15
:1014DE00E4F54CF54D754E03FDF54FF550A2AF33C7
:1014EE00F551E54624AF600D047012754C00754D34
:1014FE00017D018008754C00754D02E4FDE54660E6
:10150E0051E54D454C604BE54790E0B8F0E548A3FA
:10151E00F074B82DF582E434E0AD82FCAB4DAF46ED
:10152E00121918754F008F507F0A7E00121ADAE5D5
:10153E0050454F60107CE07D6D7B01AF4612156B00
:10154E00754F008F5090E06DE0AB49AA4AA94B123F
:0C155E000771E55124FF92AFAE4FAF5073
:01156A00225E
:0C1730008F4C8C4D8D4E8B4F8A50895190
:10173C00E4F552F553755403FDF555F556A2AF3348
:10174C00F557E54C24AF600D0470127552007553BB
:10175C00027D018008755200755303E4FDE54C6071
:10176C003BE55345526035E54D90E0B8F0E54EA3AE
:10177C00F0AB4FAA50A95112072B90E0BAF074B8F5
:10178C002DF582E434E0AD82FCAB53AF4C1219184A
:10179C007555008F567F0A7E00121ADAE55724FF22
:0617AC0092AFAE55AF56EE
:0117B2002214
:0C14CA00AD43AC427B007A007941AF409A
:0C14D6008F468C478D488B498A4A894B11
:1014E200E4F54CF54D754E03FDF54FF550A2AF33C3
:1014F200F551E54624AF600D047012754C00754D30
:10150200017D018008754C00754D02E4FDE54660E1
:1015120051E54D454C604BE54790E0B4F0E548A3FA
:10152200F074B42DF582E434E0AD82FCAB4DAF46ED
:1015320012191C754F008F507F0A7E00121ADEE5C9
:1015420050454F60107CE07D697B01AF4612156FFC
:10155200754F008F5090E069E0AB49AA4AA94B123F
:0C1562000771E55124FF92AFAE4FAF506F
:01156E00225A
:0C1734008F4C8C4D8D4E8B4F8A5089518C
:10174000E4F552F553755403FDF555F556A2AF3344
:10175000F557E54C24AF600D0470127552007553B7
:10176000027D018008755200755303E4FDE54C606D
:101770003BE55345526035E54D90E0B4F0E54EA3AE
:10178000F0AB4FAA50A95112072B90E0B6F074B4F9
:101790002DF582E434E0AD82FCAB53AF4C12191C42
:1017A0007555008F567F0A7E00121ADEE55724FF1A
:0617B00092AFAE55AF56EA
:0117B6002210
:10005600E4F531F532F535F53AF53BF53CF53DE598
:10006600AA5484600302063490E694E0FE90E69576
:10007600E0FBEEF53AEBF53BC39405E53A94004018
@@ -224,67 +226,67 @@
:1000B6004732045A3404A23504B93604D63703D578
:1000C6004503E647000005B475310075320790FC1C
:1000D600047481F0A37414F0E4A3F00205D77F0F33
:1000E600120FDD75310075320690FC047480F0E461
:1000E600121DEA75310075320690FC047480F0E446
:1000F600A3F0753505F511FE74002535F9EE34F4D7
:10010600FA7B0112182D400690FC05740EF0E4FFF0
:10011600120DE47F8F0202B37F0E120FDD753100E0
:10010600FA7B01121831400690FC05740EF0E4FFEC
:10011600120E0C7F8F0202B37F0E121DEA7531009C
:10012600753205748E12000E8F3D7B007A00793E83
:10013600E4FDFC1214D2E53D64516019E53D6450BE
:10013600E4FDFC1214D6E53D64516019E53D6450BA
:10014600601375310075320690FC047480F0A37458
:100156000BF00205D790E0BCE0FF120DE474002519
:1001660032F974FC3531FA7B01C0038B537554E0C8
:1001760075556E75560075572CD003121BE1742CFD
:100156000BF00205D790E0B8E0FF120E0C740025F4
:1001660032F974FC3531FA7B01C0038B547555E0C6
:1001760075566A75570075582CD003121BE5742CFA
:100186002532F532E43531F5317F8E0202B3753111
:100196000075320790FC047491F090E678E090FCCC
:1001A60005F030B4047F0180027F0090FC06EFF07A
:1001B60074002532F974FC3531FA7B0175540075EB
:1001C6005512E4FD121D9674002532F974FC353182
:1001D600FA7B01C0038B537554E07555397556008B
:1001E600755706D003121BE174062532F532E43545
:1001B60074002532F974FC3531FA7B0175550075EA
:1001C6005612E4FD121D9A74002532F974FC35317D
:1001D600FA7B01C0038B547555E075563975570087
:1001E600755806D003121BE574062532F532E43540
:1001F60031F531FE74002532F974FC3EFA7B01C0FC
:10020600038B537554E0755514755600755706D013
:1002160003121BE174062532F532E43531F531FE61
:1002260074002532F974FC3EFA7B01C0038B5375CA
:1002360054E075554B755600755706D003121BE1F1
:10020600038B547555E0755614755700755806D00E
:1002160003121BE574062532F532E43531F531FE5D
:1002260074002532F974FC3EFA7B01C0038B5475C9
:1002360055E0755647755700755806D003121BE5ED
:1002460074062532F532E43531F5310205D77F13D0
:10025600120FDD75310075321D749312000E8F3D3D
:10025600121DEA75310075321D749312000E8F3D22
:1002660075381D753900753600753705D3E539942F
:1002760018E538941D5034E53DB4510E7B007A00E4
:10028600793EAD39AC38FF1214D274002537F582A9
:10028600793EAD39AC38FF1214D674002537F582A5
:1002960074FC3536F583E53EF00539E5397002051F
:1002A600380537E53770C5053680C17F93120FDDF7
:1002A600380537E53770C5053680C17F93121DEADC
:1002B6000205D775310075320690FC047480F0E4AF
:1002C600A3F090F405E090E038F0E014702A30B026
:1002D6001E121E187553017554F475550675560091
:1002E6007557067B017AE07914121BE10205D79057
:1002D6001E121E1C7554017555F475560675570089
:1002E6007558067B017AE07914121BE50205D79052
:1002F600FC057401F00203C08056753100753206A4
:1003060090FC047480F0E4A3F0753507AF35FEC3A6
:10031600E53B9FF534E53A9EF53390E038E01470FE
:100326002F20B00330B42074002FF974F43EFA7B0A
:1003360001AF34AE33121A395004E40204B290FC11
:1003360001AF34AE33121A3D5004E40204B290FC0D
:1003460005740CF00205D790FC057402F00205D77F
:1003560090FC057403F00205D775310075320690DE
:10036600FC047480F0E4A3F090E038E014704530AB
:10037600B43A90E6017403F07F647E00121DEC909F
:10038600E0BCE0FF120DE47EE07F6E7CE07DBD12F6
:1003960017B37EE07FBDAD1CAC1B1218A55005122D
:10037600B43A90E6017403F07F647E00121E0A9080
:10038600E0B8E0FF120E0C7EE07F6A7CE07DB912D9
:1003960017B77EE07FB9AD1CAC1B1218A950051229
:1003A6000B48801690FC05740EF0800E90FC0574C8
:1003B6000DF0800690FC057403F0E490E038F0023E
:1003C60005D7E4F531F5327F02121B200205D7E48A
:1003D600FF120DE4120F0EE4FF1219E0E4FF800293
:1003E6007F01121B20121E180205D77531007532C7
:1003C60005D7E4F531F5327F02121B240205D7E486
:1003D600FF120E0C121126E4FF1219E4E4FF80024C
:1003E6007F01121B24121E1C0205D77531007532BF
:1003F6000690FC047480F0E4A3F090F405E0F53C6C
:10040600E4F511E53C64016004E53C703290E0B629
:10040600E4F511E53C64016004E53C703290E0B22D
:10041600E0FEA3E054F064607003EE6411600280B5
:100426007290E037E070028058E5116401600AE5D9
:1004360011700C121C87EF6006853C110205D780EF
:1004360011700C121C8BEF6006853C110205D780EB
:100446005275310075320690FC0474B2F0A3E511C2
:10045600F00205D775310075320690FC047480F001
:10046600E4A3F090F405E0F53CFF1219E0EF24F167
:10046600E4A3F090F405E0F53CFF1219E4EF24F163
:10047600600F1460152410701AE4F531F532020588
:10048600D790FC05740FF00205D790FC057410F0A8
:100496000205D790FC057401F00205D77531007589
:1004A600320690FC0474B5F090E0BBE090FC05F0D9
:1004A600320690FC0474B5F090E0B7E090FC05F0DD
:1004B6000205D775310075320690FC0474B6F0A2B9
:1004C60080E43325E0FFA281E4334FA3F00205D791
:1004D600853A31853B3290FC0474B7F0753505C317
@@ -292,11 +294,11 @@
:1004F600F582E434F4F583E0648870030205D7AF2F
:10050600357E0074002FF9EE34F4FA7B01C003C087
:100516000174002FF9EE34FC8B56F5578958853453
:1005260059D001D003121A900205D77531007532E1
:1005260059D001D003121A940205D77531007532DD
:100536000590FC0474A5F01200128F3D7B007A0032
:10054600793EE4FDFC1214D290E036E0FF0532E578
:10054600793EE4FDFC1214D690E036E0FF0532E574
:1005560032AC3170020531142400F58274FC3CF58E
:1005660083EFF090E0BCE0FF0532E532AC3170027B
:1005660083EFF090E0B8E0FF0532E532AC3170027F
:100576000531142400F58274FC3CF583EFF0053256
:10058600E532AE3170020531142400F58274FC3E6A
:10059600F583E53EF00532E532AE317002053114E1
@@ -312,66 +314,66 @@
:0106340022A3
:02004100D322C8
:0800030090E6BAE0F51DD322DE
:101EC90090E740E51DF0E490E68AF090E68B04F097
:021ED900D32212
:101ECD0090E740E51DF0E490E68AF090E68B04F093
:021EDD00D3220E
:08002B0090E6BAE0F51AD322B9
:101EDB0090E740E51AF0E490E68AF090E68B04F088
:021EEB00D32200
:101DBE0090E6B9E0242F600D04701990E604E0FF60
:101DCE00430780800890E604E0FF53077F00000081
:071DDE00EFF08002D322C3E5
:011DE50022DB
:101E3000C0E0C083C082D2015391EF90E65D74018F
:081E4000F0D082D083D0E03223
:101E7700C0E0C083C0825391EF90E65D7404F0D058
:061E870082D083D0E0329E
:101E8D00C0E0C083C0825391EF90E65D7402F0D044
:061E9D0082D083D0E03288
:101C1B00C0E0C083C08285120D85130E850E8285B0
:101C2B000D83A37402F085090F850A108510828538
:101C3B000F83A37407F05391EF90E65D7410F0D00F
:061C4B0082D083D0E032DC
:101E4800C0E0C083C082D2035391EF90E65D74086E
:081E5800F0D082D083D0E0320B
:101BA400C0E0C083C08290E680E030E72085090D64
:101BB400850A0E850E82850D83A37402F085120FAB
:101BC400851310851082850F83A37407F05391EF5A
:0D1BD40090E65D7420F0D082D083D0E03226
:101EB600000102020303040405050300000000C03C
:031EC600C2000057
:06122100011100010800AC
:03000B000212AC32
:1012AC00C0E0C0F0C083C082C0D075D000C000C008
:0D12BC0001C002C003C004C005C006C00789
:1012C90078217C007D007BFF7A1E79C07E007F0536
:1012D90012070590E0BBE0F526C204752700E50872
:1012E900600415088056750805E5117004C204806C
:1012F90043A280308101B3500B3081047F008030DC
:101309007F01802C30B4157556007557007558212A
:101319007559057B007A007921121A90E523540149
:10132900F527701090E0BBE060047F0080027F0128
:0C1339008F26D204300405AF261219E004
:10134500D007D006D005D004D003D002D001D000FC
:0B135500D0D0D082D083D0F0D0E032A6
:100CB700785B7CE17D017BFF7A1E79C57E007F042E
:100CC700120705C203C200D202C201121D6C121E16
:100CD70060121610750B10750C007514107515122F
:100CE700750910750A1C75121075137085120F851A
:100CF70013107516107517B412001290E159EFF022
:100D07007B017AE1795AE4FDFC1214D290E15AE0B2
:100D1700FF90E036F0E490E0BCF0EF64C26059EF7A
:100D270064C06054E490E15FF090E15FE0FFC3943A
:100D370004504A745B2FF582E434E1F583E0FF60E9
:100D47003C120DE47EE07F6E7CE07DBD1217B37E22
:100D5700E07FBDAD1CAC1B1218A5501490E15FE0FD
:100D6700245BF582E434E1F583E090E0BCF0800D8C
:100D770090E15FE004F080B1E4FF120DE4120F0E82
:100D8700D2E843D82090E668E04409F090E65CE0BA
:100D9700443DF012001290E159EFF07B017AE179BE
:100DA7005AE4FDFC1214D290E15AE064C26007E4F1
:100DB70090E0BBF0C2B57F01121B20D2AFD28C539B
:100DC7008EF8C203C2AF120056D2AF300105120926
:0D0DD70020C2013003EEC203121D1580E79B
:101EDF0090E740E51AF0E490E68AF090E68B04F084
:021EEF00D322FC
:101DC20090E6B9E0242F600D04701990E604E0FF5C
:101DD200430780800890E604E0FF53077F0000007D
:071DE200EFF08002D322C3E1
:011DE90022D7
:101E3400C0E0C083C082D2015391EF90E65D74018B
:081E4400F0D082D083D0E0321F
:101E7B00C0E0C083C0825391EF90E65D7404F0D054
:061E8B0082D083D0E0329A
:101E9100C0E0C083C0825391EF90E65D7402F0D040
:061EA10082D083D0E03284
:101C1F00C0E0C083C08285120D85130E850E8285AC
:101C2F000D83A37402F085090F850A108510828534
:101C3F000F83A37407F05391EF90E65D7410F0D00B
:061C4F0082D083D0E032D8
:101E4C00C0E0C083C082D2035391EF90E65D74086A
:081E5C00F0D082D083D0E03207
:101BA800C0E0C083C08290E680E030E72085090D60
:101BB800850A0E850E82850D83A37402F085120FA7
:101BC800851310851082850F83A37407F05391EF56
:0D1BD80090E65D7420F0D082D083D0E03222
:101EBA00000102020303040405050300000000C038
:031ECA00C2000053
:06122500011100010800A8
:03000B000212B02E
:1012B000C0E0C0F0C083C082C0D075D000C000C004
:0D12C00001C002C003C004C005C006C00785
:1012CD0078217C007D007BFF7A1E79C47E007F052E
:1012DD0012070590E0B7E0F526C204752700E50872
:1012ED00600415088056750805E5117004C2048068
:1012FD0043A280308101B3500B3081047F008030D8
:10130D007F01802C30B41575560075570075582126
:10131D007559057B007A007921121A94E523540141
:10132D00F527701090E0B7E060047F0080027F0128
:0C133D008F26D204300405AF261219E4FC
:10134900D007D006D005D004D003D002D001D000F8
:0B135900D0D0D082D083D0F0D0E032A2
:100CDF0078577CE17D017BFF7A1E79C97E007F0406
:100CEF00120705C203C200D202C201121D70121EEA
:100CFF0064121614750B10750C00751410751512FF
:100D0F00750910750A1C75121075137085120F85F1
:100D1F0013107516107517B412001290E155EFF0FD
:100D2F007B017AE17956E4FDFC1214D690E156E08E
:100D3F00FF90E036F0E490E0B8F0EF64C26059EF56
:100D4F0064C06054E490E15BF090E15BE0FFC3941A
:100D5F0004504A74572FF582E434E1F583E0FF60C5
:100D6F003C120E0C7EE07F6A7CE07DB91217B77ED5
:100D7F00E07FB9AD1CAC1B1218A9501490E15BE0D9
:100D8F002457F582E434E1F583E090E0B8F0800D6C
:100D9F0090E15BE004F080B1E4FF120E0C1211261B
:100DAF00D2E843D82090E668E04409F090E65CE092
:100DBF00443DF012001290E155EFF07B017AE1799A
:100DCF0056E4FDFC1214D690E156E064C26007E4CD
:100DDF0090E0B7F0C2B57F01121B24D2AFD28C5373
:100DEF008EF8C203C2AF120056D2AF3001051209FE
:0D0DFF0020C2013003EEC203121D1980E76F
:0B00460090E50DE030E402C322D3225D
:1009200090E6B9E070030209E5147003020A5A2444
:10093000FE7003020AD524FB70030209DF14700362
@@ -381,22 +383,22 @@
:1009700024067056E50B90E6B3F0E50C80421200B9
:10098000465044E51490E6B3F0E5158033E50D904C
:10099000E6B3F0E50E802985120F851310E50F9060
:1009A000E6B3F0E510801990E6BAE0FF121D41AA07
:1009A000E6B3F0E510801990E6BAE0FF121D45AA03
:1009B00006A9077B01EA494B600DEE90E6B3F0EF24
:1009C00090E6B4F0020B40020B2F020B2F121EDB3D
:1009C00090E6B4F0020B40020B2F020B2F121EDF39
:1009D000020B4012002B020B40120003020B4012CC
:1009E0001EC9020B4090E6B8E0247F601514601920
:1009E0001ECD020B4090E6B8E0247F60151460191C
:1009F00024027063A200E43325E0FFA202E4334F37
:100A00008041E490E740F0803F90E6BCE0547EFFF8
:100A10007E00E0D394807C0040047D0180027D0054
:100A2000EC4EFEED4F24B6F582741E3EF583E49342
:100A2000EC4EFEED4F24BAF582741E3EF583E4933E
:100A3000FF3395E0FEEF24A1FFEE34E68F82F583CD
:100A4000E0540190E740F0E4A3F090E68AF090E6ED
:100A50008B7402F0020B40020B2F90E6B8E024FEEC
:100A6000601624026003020B4090E6BAE0B4010570
:100A7000C200020B40020B2F90E6BAE0705590E6E0
:100A8000BCE0547EFF7E00E0D394807C0040047D77
:100A90000180027D00EC4EFEED4F24B6F582741EFF
:100A90000180027D00EC4EFEED4F24BAF582741EFB
:100AA0003EF583E493FF3395E0FEEF24A1FFEE349F
:100AB000E68F82F583E054FEF090E6BCE0548013AC
:100AC0001313541FFFE0540F2F90E683F0E04420EF
@@ -404,110 +406,110 @@
:100AE0004E90E6BAE0B40104D200805490E6BAE039
:100AF0006402604C803990E6BCE0547EFF7E00E0EA
:100B0000D394807C0040047D0180027D00EC4EFE89
:100B1000ED4F24B6F582741E3EF583E493FF3395C2
:100B1000ED4F24BAF582741E3EF583E493FF3395BE
:100B2000E0FEEF24A1FFEE34E68F82F583800D9086
:100B3000E6A08008121DBE500790E6A0E04401F038
:100B3000E6A08008121DC2500790E6A0E04401F034
:070B400090E6A0E04480F004
:010B4700228B
:03003300020FFCBD
:040FFC0053D8EF32A5
:101227006080E0D9292E43C9A2D87C013D3654A15C
:10123700ECF0061362A705F3C0C7738C98932BD9FC
:10124700BC4C82CA1E9B573CFDD4E01667426F1800
:101257008A17E512BE4EC4D6DA9EDE49A0FBF58E8C
:10126700BB2FEE7AA968799115B2073F94C210890E
:101277000B225F21807F5D9A5A903227353ECCE75B
:10128700BFF79703FF1930B348A5B5D1D75E922AA8
:10129700AC56AAC64FB838D296A47DB676FC6BE298
:0412A7009C7404F13E
:081360008C448D45AB07AA0681
:10136800E4F546F547C3E5479545E5446480F8E567
:1013780046648098400302140FE54725E0FFE546E0
:1013880033FE74D92FF58274E03EF583E0FF7E00CA
:10139800AC44AD451207B78C488D49E54725E0FFB9
:1013A800E54633FE74DA2FF58274E03EF583E0FFFC
:1013B8007E00AC44AD451207B78C4A8D4BE54965B4
:1013C8004B7004E548654A6030EB2549F582EA35FB
:1013D80048F583E0F9EB254BF582EA354AF583E0D9
:1013E800FFEB2549F582EA3548F583EFF0EB254B0D
:1013F800F582EA354AF583E9F00547E547600302D7
:0B140800136D054602136D7E007F018E
:0114130022B6
:0C1414008E448F458C468D478A488B49DA
:10142000E54545446006E54745467004E4FEFF2275
:10143000E4F54AF54BC3E54B9549E5486480F8E58A
:101440004A648098507BE4F54CF54DE547254BF513
:1014500082E546354AF583E4F0C3E54D9549E54814
:101460006480F8E54C6480985049E54D254B24D9BB
:10147000F582E434E0F583E0FFE545254DF582E5AE
:1014800044354CF583E0FEEF8EF0A4FFE547254B95
:10149000F582E546354AF583E02FFFE547254BF514
:1014A00082E546354AF583EFF0054DE54D70AA0516
:1014B0004C80A6054BE54B6003021435054A021427
:0514C000357E007F01F4
:0114C5002204
:101CE70012072BFF9000031207441207719000039D
:101CF700EF120783900002120744FF9000011207BA
:0E1D070044900002120783900001EF02078350
:081126008E448F458C468D4775
:10112E00E4F548F549E547AE467802CEA2E713CE80
:10113E0013D8F8FFC3E5499FEE6480F8E548648054
:10114E009840030211E8E549AE487802C333CE3326
:10115E00CED8F92545FFEE3544FAA9077B018B4A17
:10116E00F54B894C74DA2549F582E434E0F583E0D9
:10117E00541FFFE48F50F54FF54EF54D121CE7ABA3
:10118E004AAA4BA94C120813C374209550F9F812B1
:10119E000800C004C005C006C007A94C120813A958
:1011AE0050A8011207EDD003D002D001D000EF4BB2
:1011BE00FFEE4AFEED49FDEC48FCAB4AAA4BA94CAA
:1011CE00120833AB4AAA4BA94C121CE70549E54954
:0E11DE00600302113305480211337E007F01C9
:0111EC0022E0
:101C5100D3ED9410EC64809480402AED1D70011C3A
:101C6100142FF582EE3CF583E0FB547F24D9F582F5
:101C7100E434E0F583E0F9540F2FF582E43EF58377
:051C8100E06BF080CBD8
:011C8600223B
:101D150090E682E030E004E020E60B90E682E030D9
:101D2500E119E030E71590E680E04401F07F147E8C
:0C1D350000121ADA90E680E054FEF02262
:101CB80030060990E680E0440AF0800790E680E06C
:101CC8004408F07FDC7E05121ADA90E65D74FFF0B6
:0F1CD80090E65FF05391EF90E680E054F7F02232
:101ADA008E588F5990E600E054187012E559240187
:101AEA00FFE43558C313F558EF13F559801590E6FE
:101AFA0000E05418FFBF100BE55925E0F559E558E9
:101B0A0033F558E5591559AE58700215584E600507
:061B1A00121EED80EE2218
:06156B008C528D53AE0707
:10157100EB70037F012290E678E020E6F990E678AF
:101581007480F0EE25E0440190E679F090E678E091
:1015910030E0F990E678E020E26BE030E167BB01F2
:1015A1000790E678E04420F090E679E0F5541BEBF3
:1015B100603090E678E030E0F990E678E020E245AE
:1015C100BB010790E678E04420F090E679E0FF0562
:1015D10053E553AC527002055214F5828C83EFF03F
:1015E10080CC90E678E030E0F990E678E020E215F2
:1015F10090E678E04440F090E679E08553828552A8
:0E16010083F07F012290E678E04440F07F0005
:01160F0022B8
:1019180090E678E020E6F990E6787480F0EF25E02C
:1019280090E679F090E678E030E0F990E678E0200B
:10193800E23AE030E136EBD3940040260DEDAE04F8
:1019480070010C14F5828E83E090E679F01B90E626
:1019580078E030E0F990E678E020E210E020E1D687
:10196800800A90E678E04440F07F012290E678E033
:051978004440F07F0077
:01197D002247
:021D4100A907F0
:101D4300AE16AF178F828E83A3E064037017AD01C5
:101D530019ED7001228F828E83E07C002FFDEC3E13
:081D6300FEAF0580DFE4FEFF86
:011D6B002255
:101EED007400F58690FDA57C05A3E582458370F908
:011EFD0022C2
:030000000216A441
:0C16A400787FE4F6D8FD75815B0216EB40
:03003300021EF6B4
:041EF60053D8EF329C
:10122B006080E0D5292E43C9A2D87C013D3654A15C
:10123B00ECF0061362A705F3C0C7738C98932BD9F8
:10124B00BC4C82CA1E9B573CFDD4E01667426F18FC
:10125B008A17E512BE4EC4D6DA9EDE49A0FBF58E88
:10126B00BB2FEE7AA968799115B2073F94C210890A
:10127B000B225F21807F5D9A5A903227353ECCE757
:10128B00BFF79703FF1930B348A5B5D1D75E922AA4
:10129B00AC56AAC64FB838D296A47DB676FC6BE294
:0412AB009C7404F13A
:081364008C448D45AB07AA067D
:10136C00E4F546F547C3E5479545E5446480F8E563
:10137C00466480984003021413E54725E0FFE546D8
:10138C0033FE74D52FF58274E03EF583E0FF7E00CA
:10139C00AC44AD451207B78C488D49E54725E0FFB5
:1013AC00E54633FE74D62FF58274E03EF583E0FFFC
:1013BC007E00AC44AD451207B78C4A8D4BE54965B0
:1013CC004B7004E548654A6030EB2549F582EA35F7
:1013DC0048F583E0F9EB254BF582EA354AF583E0D5
:1013EC00FFEB2549F582EA3548F583EFF0EB254B09
:1013FC00F582EA354AF583E9F00547E547600302D3
:0B140C00137105460213717E007F0182
:0114170022B2
:0C1418008E448F458C468D478A488B49D6
:10142400E54545446006E54745467004E4FEFF2271
:10143400E4F54AF54BC3E54B9549E5486480F8E586
:101444004A648098507BE4F54CF54DE547254BF50F
:1014540082E546354AF583E4F0C3E54D9549E54810
:101464006480F8E54C6480985049E54D254B24D5BB
:10147400F582E434E0F583E0FFE545254DF582E5AA
:1014840044354CF583E0FEEF8EF0A4FFE547254B91
:10149400F582E546354AF583E02FFFE547254BF510
:1014A40082E546354AF583EFF0054DE54D70AA0512
:1014B4004C80A6054BE54B6003021439054A02141F
:0514C400397E007F01EC
:0114C9002200
:101CEB0012072BFF90000312074412077190000399
:101CFB00EF120783900002120744FF9000011207B6
:0E1D0B0044900002120783900001EF0207834C
:080F36008E448F458C468D4767
:100F3E00E4F548F549E547AE467802CEA2E713CE72
:100F4E0013D8F8FFC3E5499FEE6480F8E548648046
:100F5E00984003020FF8E549AE487802C333CE330A
:100F6E00CED8F92545FFEE3544FAA9077B018B4A09
:100F7E00F54B894C74D62549F582E434E0F583E0CF
:100F8E00541FFFE48F50F54FF54EF54D121CEBAB91
:100F9E004AAA4BA94C120813C374209550F9F812A3
:100FAE000800C004C005C006C007A94C120813A94A
:100FBE0050A8011207EDD003D002D001D000EF4BA4
:100FCE00FFEE4AFEED49FDEC48FCAB4AAA4BA94C9C
:100FDE00120833AB4AAA4BA94C121CEB0549E54942
:0E0FEE006003020F430548020F437E007F019F
:010FFC0022D2
:101C5500D3ED9410EC64809480402AED1D70011C36
:101C6500142FF582EE3CF583E0FB547F24D5F582F5
:101C7500E434E0F583E0F9540F2FF582E43EF58373
:051C8500E06BF080CBD4
:011C8A002237
:101D190090E682E030E004E020E60B90E682E030D5
:101D2900E119E030E71590E680E04401F07F147E88
:0C1D390000121ADE90E680E054FEF0225A
:101CBC0030060990E680E0440AF0800790E680E068
:101CCC004408F07FDC7E05121ADE90E65D74FFF0AE
:0F1CDC0090E65FF05391EF90E680E054F7F0222E
:101ADE008E588F5990E600E054187012E559240183
:101AEE00FFE43558C313F558EF13F559801590E6FA
:101AFE0000E05418FFBF100BE55925E0F559E558E5
:101B0E0033F558E5591559AE58700215584E600503
:061B1E00121F1880EE22E8
:06156F008C528D53AE0703
:10157500EB70037F012290E678E020E6F990E678AB
:101585007480F0EE25E0440190E679F090E678E08D
:1015950030E0F990E678E020E26BE030E167BB01EE
:1015A5000790E678E04420F090E679E0F5541BEBEF
:1015B500603090E678E030E0F990E678E020E245AA
:1015C500BB010790E678E04420F090E679E0FF055E
:1015D50053E553AC527002055214F5828C83EFF03B
:1015E50080CC90E678E030E0F990E678E020E215EE
:1015F50090E678E04440F090E679E08553828552A4
:0E16050083F07F012290E678E04440F07F0001
:0116130022B4
:10191C0090E678E020E6F990E6787480F0EF25E028
:10192C0090E679F090E678E030E0F990E678E02007
:10193C00E23AE030E136EBD3940040260DEDAE04F4
:10194C0070010C14F5828E83E090E679F01B90E622
:10195C0078E030E0F990E678E020E210E020E1D683
:10196C00800A90E678E04440F07F012290E678E02F
:05197C004440F07F0073
:011981002243
:021D4500A907EC
:101D4700AE16AF178F828E83A3E064037017AD01C1
:101D570019ED7001228F828E83E07C002FFDEC3E0F
:081D6700FEAF0580DFE4FEFF82
:011D6F002251
:101F18007400F58690FDA57C05A3E582458370F9DC
:011F28002296
:030000000216A83D
:0C16A800787FE4F6D8FD75815B0216EF38
:10063500E709F608DFFA8046E709F208DFFA803EA7
:1006450088828C83E709F0A3DFFA8032E309F60894
:10065500DFFA8078E309F208DFFA807088828C83FC
@@ -552,15 +554,15 @@
:10085900D083D082F8E4937012740193700DA3A32E
:1008690093F8740193F5828883E473740293686042
:06087900EFA3A3A380DF42
:1016B000020CB7E493A3F8E493A34003F68001F28D
:1016C00008DFF48029E493A3F85407240CC8C3333B
:1016D000C4540F4420C8834004F456800146F6DF0A
:1016E000E4800B01020408102040809011EDE47E9C
:1016F000019360BCA3FF543F30E509541FFEE493FF
:10170000A360010ECF54C025E060A840B8E493A3C5
:10171000FAE493A3F8E493A3C8C582C8CAC583CAF0
:10172000F0A3C8C582C8CAC583CADFE9DEE780BEA8
:0112AB000042
:1016B400020CDFE493A3F8E493A34003F68001F261
:1016C40008DFF48029E493A3F85407240CC8C33337
:1016D400C4540F4420C8834004F456800146F6DF06
:1016E400E4800B01020408102040809011F5E47E90
:1016F400019360BCA3FF543F30E509541FFEE493FB
:10170400A360010ECF54C025E060A840B8E493A3C1
:10171400FAE493A3F8E493A3C8C582C8CAC583CAEC
:10172400F0A3C8C582C8CAC583CADFE9DEE780BEA4
:0112AF00003E
:10087F00BC000BBE0029EF8DF084FFADF022E4CC5D
:10088F00F875F008EF2FFFEE33FEEC33FCEE9DEC26
:10089F00984005FCEE9DFE0FD5F0E9E4CEFD22ED6C
@@ -574,4 +576,3 @@
:0C090800ECF608EDF608EEF608EFF6221B
:0C091400ECF208EDF208EEF208EFF2221F
:00000001FF


View File

@@ -0,0 +1,421 @@
#
# $Id: USB_RECOV.hex 9760 2011-09-05 12:33:27Z dima $
#
:03004300021600A2
:0300530002160092
:10160000021580000215C6000215B00002159800F0
:081610000213F20002137B003B
:100A00001201000200000040AAAAAAAAAAAA010292
:100A100003010A060002000000400100090237003D
:100A2000020100C0000904000002FFFFFF040705E7
:100A3000020200020007058602000200090401000C
:100A400002FFFFFF050705040200020007058802F8
:100A5000000200001201000200000040E4E4511115
:100A60000000010203010A0600020000004001002C
:100A700009023700020100C0320904000002FFFF32
:100A8000FF0407050202400000070586024000003F
:100A90000904010002FFFFFF0507050402400000F2
:100AA000070588024000000604001600140012002A
:100AB0000A00260004030904160358006F007200A0
:100AC00063006F006D0020004C00540044001403CC
:100AD00041007300740072006900620061006E00E2
:100AE0006B001203530065007200690061006C0026
:100AF0004E006F000A0346005000470041002603E5
:100B00004D0061006E00610067006D0065006E00C1
:100B10007400500072006F00630065007300730082
:060B20006F0072000000EE
:08164300584F52434F4D2000A7
:100E650041E0B20042E0AD0000021BE0810218E063
:100E75007543E0AF0000004CE036393734364D207D
:060E8500202020202000C7
:101517008B2A8A2B892CE52F152FAE2E7002152EBC
:101527004E6014AB2A052CE52CAA2B7002052B1450
:08153700F9ED12019280DF22A0
:1013B8008B328A338934E5391539AE3870021538DD
:1013C8004E6026AB350537E537AA36700205361468
:1013D800F912014CFFAB320534E534AA337002052B
:0A13E8003314F9EF12019280CD22B8
:1011FD008C2A8D2BAA06A9077535018A3689377574
:10120D00380075391C7B017AE079481213B890E0EB
:10121D0060E0FCA3E0FDA3E0FEA3E064D1FFEE647B
:10122D008DFEED644CFDEC6449FC90E06012026EA5
:10123D007EE07F487D1C7C00120CFF7EE07F487BAA
:10124D001C7A00AD2BAC2A120DB37D1C7C00AF2B8C
:10125D00AE2A120C387D1C7C00AF2BAE2A0214284E
:08099F008E2A8F2B8C2C8D2D6C
:1009A700C204121567BF5004D204803BE4F52EF54C
:1009B7002FE52D252FF582E52C352EF583E0FFE574
:1009C7002B252FF582E52A352EF583E0B5070E0591
:1009D7002FE52F7002052E6410452E70D4E52F6485
:0909E70010452E7002D204A20496
:0109F00022E4
:020875008F32C0
:100877001215678F33E4F537F538AD38AC37120FFB
:100887001474652538F582E434E0F583E534F00522
:1008970038E53870020537C39408E53764809480DB
:1008A70040D8E532600490E065F090E065E0B4C0C0
:1008B70008753500753608800675351D7536367529
:1008C7003700753808C3E5389410E537648094809D
:1008D7005023120F1074652538F582E434E0F58350
:1008E700E534F00538E538700205370536E536702A
:1008F700D4053580D07534FF75351D7536197537B4
:1009070000753810C3E538942CE53764809480501F
:1009170033E533B4510E7B007A007934AD36AC350C
:10092700FF120F1C74652538F582E434E0F583E582
:1009370034F00538E538700205370536E53670C4FA
:10094700053580C075351D75363EE4F534F537F548
:1009570038C3E5389406E53764809480502FE53333
:10096700B4510A90E065E0B4C203120F1074422537
:1009770038F582E434E0F583E534F00538E538707E
:100987000205370536E53670C8053580C490E06541
:07099700E0B4C20374C0F0DC
:01099E002236
:0A12D3008E2A8F2B8B2C8A2D892E7A
:1012DD007E00E52B2DF533EE352AF5321215678F8D
:1012ED002FE52F6451600BC3E52B9410E52A940074
:1012FD005035852A30852B31C3E5319533E5309551
:10130D00325024AB2CAA2DA92EAD31AC30AF2F12FB
:10131D00117A0531E531700205307401252EF52E57
:07132D00E4352DF52D80D100
:011334002296
:020B26008F320C
:100B28007F031214ECEF2402FFE43EA9077533019A
:100B3800F534893578367C007D007BFF7A16794359
:100B48007E007F08120126E532600464017054E5D6
:100B58000C2408F582E4350BF58374B4F0E50C2415
:100B680009F582E4350BF5837404F0E50C240AF5E5
:100B780082E4350BF5837413F0E50C240BF582E45D
:100B8800350BF5837486F0E50C240CF582E4350BFF
:100B9800F583E4F0E50C240DF582E4350BF583E4E8
:100BA800F0806C90E066E0FFE50C2408F582E435FF
:100BB8000BF583EFF090E067E0FFE50C2409F58280
:100BC800E4350BF583EFF090E068E0FFE50C240ACC
:100BD800F582E4350BF583EFF090E069E0FFE50C72
:100BE800240BF582E4350BF583EFF090E06AE0FF23
:100BF800E50C240CF582E4350BF583EFF090E06BFF
:100C0800E0FFE50C240DF582E4350BF583EFF0E405
:100C1800FF74362FF8E6FEAB33AA34A93575F00217
:0F0C2800EFA4F58285F083EE1201A40FBF08E25E
:010C3700229A
:10145E00E4F532E50C240BF582E4350BF583E0FE62
:10146E00E50C240AF582E4350BF583E0FDEDFF90E3
:10147E00E0ADEEF0A3EFF0D20412000390E680E0B0
:03148E0054F7F020
:011491002238
:10105A0090E600E054E74410F090E60174C0F09086
:10106A00E6107420F000000090E611F000000090F5
:10107A00E6047480F0000000740FF0000000E4F051
:10108A0000000090E6187410F0000000E490E619E1
:10109A00F000000090E61A7408F0000000E490E600
:1010AA001BF000000090E6497482F0000000F00096
:1010BA00000090E6247402F0000000E490E625F0B7
:1010CA0000000090E6957480F0000000F000000037
:1010DA0043AF017B017AE07914752E00752F06E47F
:0410EA00FD021517D7
:1015DC007C007D181201C6EF1FAC0670011E4C700A
:0215EC00F622E5
:1015670090E678E0541824F06008240870087F504B
:0815770080067F518002E4FFB1
:01157F002249
:0C0F1000AD36AC357B007A007934AF338D
:0C0F1C008F398C3A8D3B8B3C8A3D893E1E
:100F2800E4F53FF540754103FDF542F543A2AF33C3
:100F3800F544E53924AF600D047012753F00754023
:100F4800017D018008753F00754002E4FDE53960C8
:100F580051E540453F604BE53A90E0AFF0E53BA3F3
:100F6800F074AF2DF582E434E0AD82FCAB40AF39CC
:100F780012126D7542008F437F0A7E00121335E509
:100F880043454260107CE07D647B01AF39120FB5A8
:100F98007542008F4390E064E0AB3CAA3DA93E1245
:0C0FA8000192E54424FF92AFAE42AF433B
:010FB400221A
:0C117A008F348C358D368B378A388939DC
:10118600E4F53AF53B753C03FDF53DF53EA2AF337C
:10119600F53FE53424AF600D047012753A00753BD7
:1011A600027D018008753A00753B03E4FDE5346075
:1011B6003BE53B453A6035E53590E0AFF0E536A3D3
:1011C600F0AB37AA38A93912014C90E0B1F074AFF0
:1011D6002DF582E434E0AD82FCAB3BAF3412126DE8
:1011E600753D008F3E7F0A7E00121335E53F24FFD2
:0611F60092AFAE3DAF3EDA
:0111FC0022D0
:10054300E4F52AF52BF52CF52DF52EF52FF530E5F1
:10055300AA5484600302071190E694E0FE90E695A6
:10056300E0FBEEF52DEBF52EC39405E52D9400404D
:100573000790F404E0FD80027DFFED24F570030293
:10058300062524E6700302064F24E0700302062CBE
:1005930024FE7003020649243960030206B3752A58
:1005A30000752B0590FC04748EF01215678F30E5EF
:1005B3003064516019E53064506013752A00752B5F
:1005C3000690FC047480F0A3740BF00206D6121597
:1005D300678F307B007A007931E4FDFC120F1CAF8A
:1005E300311208757400252BF974FC352AFA7B0146
:1005F300C0038B357536E075376575380075392C52
:10060300D0031213B87400252BF58274FC352AF538
:1006130083E531F0742C252BF52BE4352AF52A02DA
:1006230006D6E4F52AF52B801D1215678F307B0063
:100633007A007931E4FDFC120F1CAF311208757F8B
:10064300C0120B26800012145E0206D6752A0075AE
:100653002B0590FC0474A5F01215678F307B007A8C
:10066300007931E4FDFC120F1C052BE52BAE2A703B
:1006730002052A142400F58274FC3EF583E508F094
:10068300052BE52BAE2A7002052A142400F582748B
:10069300FC3EF583E515F0052BE52BAE2A7002052C
:1006A3002A142400F58274FC3EF583E531F080239F
:1006B300752A00752B0690FC047480F0C3E52E9414
:1006C30005E52D94005006A37407F0800690FC0501
:1006D3007406F0E52B452A602CE52BFD90FC00F019
:1006E300E52AFFA3F090F402E090FC02F090F403FB
:1006F300E090FC03F090E69CEFF000000090E69D94
:0E070300EDF000000090E6957480F00000001C
:0107110022C5
:02004100D322C8
:0800460090E6BAE0F51DD3229B
:1015EE0090E740E51DF0E490E68AF090E68B04F07B
:0215FE00D322F6
:08163B0090E6BAE0F51AD32293
:1016180090E740E51AF0E490E68AF090E68B04F053
:02162800D322CB
:10153F0090E6B9E0242F600D04701990E604E0FFE7
:10154F00430780800890E604E0FF53077F00000008
:07155F00EFF08002D322C36C
:011566002262
:10158000C0E0C083C082D2015391EF90E65D740148
:08159000F0D082D083D0E032DC
:1015B000C0E0C083C0825391EF90E65D7404F0D028
:0615C00082D083D0E0326E
:1015C600C0E0C083C0825391EF90E65D7402F0D014
:0615D60082D083D0E03258
:1013F200C0E0C083C08285110D85120E850E8285E4
:101402000D83A37402F085090F850A108510828569
:101412000F83A37407F05391EF90E65D7410F0D040
:0614220082D083D0E0320D
:10159800C0E0C083C082D2035391EF90E65D740827
:0815A800F0D082D083D0E032C4
:10137B00C0E0C083C08290E680E030E72085090D95
:10138B00850A0E850E82850D83A37402F085110FDD
:10139B00851210851082850F83A37407F05391EF8C
:0D13AB0090E65D7420F0D082D083D0E03257
:0E09F10000010202030304040505C0C2000059
:1007120078237C007D007BFF7A0979FB7E007F04D1
:10072200120126C203C200D202C20112105A750B74
:100732000A750C0075130A75141275090A750A1CDC
:1007420075110A75127085110F85121075160A75CA
:1007520017B41215678F217B007A007922E4FDFC21
:10076200120F1C852208E4F515F52774232527F8B6
:10077200E6FF605C1208757EE07F657CE07DB31267
:1007820011FD7EE07FB3AD1CAC1B12099F50387483
:10079200232527F8E6F515652260277B007A007984
:1007A200157D01E4FFFE1212D37B007A007922E468
:1007B200FDFCAF21120F1CE52265156013751501B2
:1007C200800E7515FF80090527E527C39404409B19
:1007D200E5157059FB7A0079227D01FCAF21120FD9
:1007E2001CE522752900F5287B007A0079227D021A
:1007F2007C00AF21120F1CE5224229E52964E47036
:1008020004E52864E470267515C0FB7A0079157D2D
:1008120001FFFE1212D37B007A007922E4FDFCAFC5
:1008220021120F1CE52265156003751501AF151223
:100832000B26D2E843D82090E668E04409F090E61F
:100842005CE0443DF0E51564C06005E515B4C20303
:1008520012145ED2AF538EF8C203C2AF120543D256
:10086200AF30010512031BC2013003EEC2031214A2
:03087200C080E75C
:0B00360090E50DE030E402C322D3226D
:10031B0090E6B9E070030203E01470030204552465
:10032B00FE70030204D024FB70030203DA14700383
:10033B000203D41470030203C81470030203CE2407
:10034B0005600302052F120041400302053B90E6B6
:10035B00BBE024FE602714603E24FD60111460276F
:10036B0024067056E50B90E6B3F0E50C80421200C4
:10037B00365044E51390E6B3F0E5148033E50D9069
:10038B00E6B3F0E50E802985110F851210E50F906D
:10039B00E6B3F0E510801990E6BAE0FF1214ECAA70
:1003AB0006A9077B01EA494B600DEE90E6B3F0EF2F
:1003BB0090E6B4F002053B02052A02052A12161834
:1003CB0002053B12163B02053B12004602053B128F
:1003DB0015EE02053B90E6B8E0247F60151460191A
:1003EB0024027063A200E43325E0FFA202E4334F42
:1003FB008041E490E740F0803F90E6BCE0547EFF04
:10040B007E00E0D394807C0040047D0180027D005F
:10041B00EC4EFEED4F24F1F58274093EF583E49327
:10042B00FF3395E0FEEF24A1FFEE34E68F82F583D8
:10043B00E0540190E740F0E4A3F090E68AF090E6F8
:10044B008B7402F002053B02052A90E6B8E024FE0D
:10045B0060162402600302053B90E6BAE0B4010586
:10046B00C20002053B02052A90E6BAE0705590E601
:10047B00BCE0547EFF7E00E0D394807C0040047D82
:10048B000180027D00EC4EFEED4F24F1F5827409E4
:10049B003EF583E493FF3395E0FEEF24A1FFEE34AA
:1004AB00E68F82F583E054FEF090E6BCE0548013B7
:1004BB001313541FFFE0540F2F90E683F0E04420FA
:1004CB00F0806D805A90E6B8E024FE60192402702B
:1004DB004E90E6BAE0B40104D200805490E6BAE044
:1004EB006402604C803990E6BCE0547EFF7E00E0F5
:1004FB00D394807C0040047D0180027D00EC4EFE95
:10050B00ED4F24F1F58274093EF583E493FF3395A7
:10051B00E0FEEF24A1FFEE34E68F82F583800D9091
:10052B00E6A0800812153F500790E6A0E04401F0CA
:07053B0090E6A0E04480F00F
:010542002296
:0300330002004E7A
:04004E0053D8EF3262
:100E8B006080E0CF292E43C9A2D87C013D3654A106
:100E9B00ECF0061362A705F3C0C7738C98932BD99C
:100EAB00BC4C82CA1E9B573CFDD4E01667426F18A0
:100EBB008A17E512BE4EC4D6DA9EDE49A0FBF58E2C
:100ECB00BB2FEE7AA968799115B2073F94C21089AE
:100EDB000B225F21807F5D9A5A903227353ECCE7FB
:100EEB00BFF79703FF1930B348A5B5D1D75E922A48
:100EFB00AC56AAC64FB838D296A47DB676FC6BE238
:040F0B009C7404F1DD
:080CFF008C2C8D2DAB07AA0619
:100D0700E4F52EF52FC3E52F952DE52C6480F8E546
:100D17002E6480984003020DAEE52F25E0FFE52EF7
:100D270033FE74CF2FF58274E03EF583E0FF7E003B
:100D3700AC2CAD2D1201D88C308D31E52F25E0FF7D
:100D4700E52E33FE74D02FF58274E03EF583E0FF85
:100D57007E00AC2CAD2D1201D88C328D33E5316578
:100D6700337004E53065326030EB2531F582EA35C2
:100D770030F583E0F9EB2533F582EA3532F583E088
:100D8700FFEB2531F582EA3530F583EFF0EB2533BC
:100D9700F582EA3532F583E9F0052FE52F60030286
:0B0DA7000D0C052E020D0C7E007F01DC
:010DB200221E
:0C0DB3008E2C8F2D8C2E8D2F8A308B31D2
:100DBF00E52D452C6006E52F452E7004E4FEFF223D
:100DCF00E4F532F533C3E5339531E5306480F8E56A
:100DDF0032648098507BE4F534F535E52F2533F5F3
:100DEF0082E52E3532F583E4F0C3E5359531E530F4
:100DFF006480F8E5346480985049E535253324CF75
:100E0F00F582E434E0F583E0FFE52D2535F582E545
:100E1F002C3534F583E0FEEF8EF0A4FFE52F25335C
:100E2F00F582E52E3532F583E02FFFE52F2533F5DB
:100E3F0082E52E3532F583EFF00535E53570AA05DD
:100E4F003480A60533E5336003020DD40532020D5D
:050E5F00D47E007F01BC
:010E6400226B
:1014920012014CFF900003120165120192900003A9
:1014A200EF1201A4900002120165FF9000011201E7
:0E14B200659000021201A4900001EF0201A457
:080C38008E2C8F2D8C2E8D2FC8
:100C4000E4F530F531E52FAE2E7802CEA2E713CED3
:100C500013D8F8FFC3E5319FEE6480F8E530648077
:100C6000984003020CFAE531AE307802C333CE333C
:100C7000CED8F9252DFFEE352CFAA9077B018B3252
:100C8000F533893474D02531F582E434E0F583E01E
:100C9000541FFFE48F38F537F536F535121492AB53
:100CA00032AA33A934120234C374209538F9F812E9
:100CB0000221C004C005C006C007A934120234A92D
:100CC00038A80112020ED003D002D001D000EF4BA1
:100CD000FFEE4AFEED49FDEC48FCAB32AA33A934E5
:100CE000120254AB32AA33A9341214920531E53101
:0E0CF0006003020C450530020C457E007F01BA
:010CFE0022D3
:10142800D3ED9410EC64809480402AED1D70011C6B
:10143800142FF582EE3CF583E0FB547F24CFF58230
:10144800E434E0F583E0F9540F2FF582E43EF583A8
:05145800E06BF080CB09
:01145D00226C
:1014C00090E682E030E004E020E60B90E682E03037
:1014D000E119E030E71590E680E04401F07F147EEA
:0C14E0000012133590E680E054FEF0226C
:1000030030040990E680E0440AF0800790E680E03F
:100013004408F07FDC7E0512133590E65D74FFF033
:0F00230090E65FF05391EF90E680E054F7F02203
:101335008E458F4690E600E054187012E54624016C
:10134500FFE43545C313F545EF13F546801590E6E3
:1013550000E05418FFBF100BE54625E0F546E545CE
:1013650033F545E5461546AE45700215454E600513
:0613750012162A80EE2290
:060FB5008C458D46AE07DD
:100FBB00EB70037F012290E678E020E6F990E6786B
:100FCB007480F0EE25E0440190E679F090E678E04D
:100FDB0030E0F990E678E020E26BE030E167BB01AE
:100FEB000790E678E04420F090E679E0F5471BEBBC
:100FFB00603090E678E030E0F990E678E020E2456A
:10100B00BB010790E678E04420F090E679E0FF051D
:10101B0046E546AC457002054514F5828C83EFF02E
:10102B0080CC90E678E030E0F990E678E020E215AD
:10103B0090E678E04440F090E679E085468285457D
:0E104B0083F07F012290E678E04440F07F00C1
:011059002274
:10126D0090E678E020E6F990E6787480F0EF25E0DE
:10127D0090E679F090E678E030E0F990E678E020BD
:10128D00E23AE030E136EBD3940040260DEDAE04AA
:10129D0070010C14F5828E83E090E679F01B90E6D8
:1012AD0078E030E0F990E678E020E210E020E1D639
:1012BD00800A90E678E04440F07F012290E678E0E5
:0512CD004440F07F0029
:0112D20022F9
:0214EC00A9074E
:1014EE00AE16AF178F828E83A3E064037017AD0123
:1014FE0019ED7001228F828E83E07C002FFDEC3E71
:08150E00FEAF0580DFE4FEFFE3
:0115160022B2
:10162A007400F58690FDA57C05A3E582458370F9D3
:01163A00228D
:030000000210EEFD
:0C10EE00787FE4F6D8FD758147021135CB
:10005600E709F608DFFA8046E709F208DFFA803E8C
:1000660088828C83E709F0A3DFFA8032E309F60879
:10007600DFFA8078E309F208DFFA807088828C83E1
:10008600E309F0A3DFFA806489828A83E0A3F60895
:10009600DFFA805889828A83E0A3F208DFFA804C6F
:1000A60080D280FA80C680D4806980F28033801046
:1000B60080A680EA809A80A880DA80E280CA8033AF
:1000C60089828A83ECFAE493A3C8C582C8CCC58327
:1000D600CCF0A3C8C582C8CCC583CCDFE9DEE780F7
:1000E6000D89828A83E493A3F608DFF9ECFAA9F076
:1000F600EDFB2289828A83ECFAE0A3C8C582C8CCCC
:10010600C583CCF0A3C8C582C8CCC583CCDFEADEE4
:10011600E880DB89828A83E493A3F208DFF980CC46
:1001260088F0EF60010E4E60C388F0ED2402B4043F
:100136000050B9F582EB2402B4040050AF232345E6
:0601460082239000A67365
:10014C00BB010689828A83E0225002E722BBFE02B1
:09015C00E32289828A83E49322E4
:10016500BB010CE58229F582E5833AF583E022504F
:1001750006E92582F8E622BBFE06E92582F8E22299
:0D018500E58229F582E5833AF583E49322B3
:10019200BB010689828A83F0225002F722BBFE014C
:0201A200F32246
:1001A400F8BB010DE58229F582E5833AF583E8F091
:1001B400225006E92582C8F622BBFE05E92582C83D
:0201C400F22225
:1001C600EF8DF0A4A8F0CF8CF0A428CE8DF0A42E4D
:0201D600FE2207
:1001D800C2D5EC30E709B2D5E4C39DFDE49CFCEE42
:1001E80030E715B2D5E4C39FFFE49EFE12027AC33E
:1001F800E49DFDE49CFC800312027A30D507C3E439
:060208009FFFE49EFE22B0
:10020E00E8600FECC313FCED13FDEE13FEEF13FFCE
:03021E00D8F122F2
:10022100E8600FEFC333FFEE33FEED33FDEC33FC3B
:03023100D8F122DF
:10023400BB010789828A830202DB5005E9F80202C6
:10024400CFBBFE05E9F80202E789828A830202F342
:10025400BB010789828A8302026E5005E9F8020312
:0A02640003BBFE05E9F802030F22B8
:0C026E00ECF0A3EDF0A3EEF0A3EFF02203
:1010FA00020712E493A3F8E493A34003F68001F2F3
:10110A0008DFF48029E493A3F85407240CC8C333F6
:10111A00C4540F4420C8834004F456800146F6DFC5
:10112A00E4800B0102040810204080900E65E47EE2
:10113A00019360BCA3FF543F30E509541FFEE493BA
:10114A00A360010ECF54C025E060A840B8E493A381
:10115A00FAE493A3F8E493A3C8C582C8CAC583CAAC
:10116A00F0A3C8C582C8CAC583CADFE9DEE780BE64
:010F0F0000E1
:10027A00BC000BBE0029EF8DF084FFADF022E4CC68
:10028A00F875F008EF2FFFEE33FEEC33FCEE9DEC31
:10029A00984005FCEE9DFE0FD5F0E9E4CEFD22ED77
:1002AA00F8F5F0EE8420D21CFEADF075F008EF2FC1
:1002BA00FFED33FD4007985006D5F0F222C398FDB2
:0502CA000FD5F0EA224F
:0C02CF00E6FC08E6FD08E6FE08E6FF225B
:0C02DB00E0FCA3E0FDA3E0FEA3E0FF2296
:0C02E700E2FC08E2FD08E2FE08E2FF2253
:1002F300E493FC740193FD740293FE740393FF2251
:0C030300ECF608EDF608EEF608EFF62226
:0C030F00ECF208EDF208EEF208EFF2222A
:00000001FF

View File

@@ -61,8 +61,6 @@ extern int debug;
static DEF_PARM(uint, command_queue_length, 1500, 0444, "Maximal command queue length");
static DEF_PARM(uint, poll_timeout, 1000, 0644, "Timeout (in jiffies) waiting for units to reply");
static DEF_PARM_BOOL(rx_tasklet, 0, 0644, "Use receive tasklets");
static DEF_PARM_BOOL(dahdi_autoreg, 0, 0644,
"Register devices automatically (1) or not (0)");
#ifdef CONFIG_PROC_FS
static int xbus_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data);
@@ -778,6 +776,7 @@ static int xpd_initialize(xpd_t *xpd)
goto out;
}
XPD_INFO(xpd, "Initialized: %s\n", xpd->type_name);
xpd_post_init(xpd);
ret = 0;
out:
return ret;
@@ -872,100 +871,6 @@ err:
goto out;
}
int xbus_is_registered(xbus_t *xbus)
{
return xbus->ddev && xbus->ddev->dev.parent;
}
int xbus_register_dahdi_device(xbus_t *xbus)
{
int i;
int offset = 0;
XBUS_DBG(DEVICES, xbus, "Entering %s\n", __func__);
if (xbus_is_registered(xbus)) {
XBUS_ERR(xbus, "Already registered to DAHDI\n");
WARN_ON(1);
return -EINVAL;
}
xbus->ddev = dahdi_create_device();
/*
* This actually describe the dahdi_spaninfo version 3
* A bunch of unrelated data exported via a modified ioctl()
* What a bummer...
*/
xbus->ddev->manufacturer = "Xorcom Inc."; /* OK, that's obvious */
/* span->spantype = "...."; set in card_dahdi_preregistration() */
/*
* Yes, this basically duplicates information available
* from the description field. If some more is needed
* why not add it there?
* OK, let's add to the kernel more useless info.
*/
xbus->ddev->devicetype = kasprintf(GFP_KERNEL, "Astribank2");
if (!xbus->ddev->devicetype)
return -ENOMEM;
/*
* location is the only usefull new data item.
* For our devices it was available for ages via:
* - The legacy "/proc/xpp/XBUS-??/summary" (CONNECTOR=...)
* - The same info in "/proc/xpp/xbuses"
* - The modern "/sys/bus/astribanks/devices/xbus-??/connector" attribute
* So let's also export it via the newfangled "location" field.
*/
xbus->ddev->location = xbus->connector;
xbus->ddev->hardware_id = xbus->label;
/*
* Prepare the span list
*/
for (i = 0; i < MAX_XPDS; i++) {
xpd_t *xpd = xpd_of(xbus, i);
if (xpd && IS_PHONEDEV(xpd)) {
XPD_DBG(DEVICES, xpd, "offset=%d\n", offset);
xpd_dahdi_preregister(xpd, offset++);
}
}
if (dahdi_register_device(xbus->ddev, &xbus->astribank)) {
XBUS_ERR(xbus, "Failed to dahdi_register_device()\n");
return -ENODEV;
}
for (i = 0; i < MAX_XPDS; i++) {
xpd_t *xpd = xpd_of(xbus, i);
if (xpd && IS_PHONEDEV(xpd)) {
XPD_DBG(DEVICES, xpd, "\n");
xpd_dahdi_postregister(xpd);
}
}
return 0;
}
void xbus_unregister_dahdi_device(xbus_t *xbus)
{
int i;
XBUS_NOTICE(xbus, "%s\n", __func__);
for(i = 0; i < MAX_XPDS; i++) {
xpd_t *xpd = xpd_of(xbus, i);
xpd_dahdi_preunregister(xpd);
}
if (xbus->ddev) {
dahdi_unregister_device(xbus->ddev);
XBUS_NOTICE(xbus, "%s: finished dahdi_unregister_device()\n", __func__);
kfree(xbus->ddev->devicetype);
xbus->ddev->devicetype = NULL;
xbus->ddev->location = NULL;
xbus->ddev->hardware_id = NULL;
dahdi_free_device(xbus->ddev);
xbus->ddev = NULL;
}
for(i = 0; i < MAX_XPDS; i++) {
xpd_t *xpd = xpd_of(xbus, i);
xpd_dahdi_postunregister(xpd);
}
}
/*
* This must be called from synchronous (non-interrupt) context
* it returns only when all XPD's on the bus are detected and
@@ -1029,8 +934,6 @@ void xbus_populate(void *data)
*/
xbus_request_sync(xbus, SYNC_MODE_PLL);
elect_syncer("xbus_populate(end)"); /* FIXME: try to do it later */
if (dahdi_autoreg)
xbus_register_dahdi_device(xbus);
out:
XBUS_DBG(DEVICES, xbus, "Leaving\n");
wake_up_interruptible_all(&worker->wait_for_xpd_initialization);
@@ -1303,12 +1206,12 @@ void xbus_deactivate(xbus_t *xbus)
xbus_request_sync(xbus, SYNC_MODE_NONE); /* no more ticks */
elect_syncer("deactivate");
xbus_echocancel(xbus, 0);
xbus_request_removal(xbus);
XBUS_DBG(DEVICES, xbus, "[%s] Waiting for queues\n", xbus->label);
xbus_command_queue_clean(xbus);
xbus_command_queue_waitempty(xbus);
xbus_setstate(xbus, XBUS_STATE_DEACTIVATED);
worker_reset(xbus);
xbus_unregister_dahdi_device(xbus);
xbus_release_xpds(xbus); /* taken in xpd_alloc() [kref_init] */
}
@@ -1884,6 +1787,10 @@ err:
void xbus_core_shutdown(void)
{
int i;
for(i = 0; i < MAX_BUSES; i++)
BUG_ON(xbus_num(i));
xbus_core_cleanup();
xpp_driver_exit();
}

View File

@@ -190,7 +190,6 @@ struct xbus {
char label[LABEL_SIZE];
byte revision; /* Protocol revision */
struct xbus_transport transport;
struct dahdi_device *ddev;
int num;
struct xpd *xpds[MAX_XPDS];
@@ -343,10 +342,6 @@ int xpd_device_register(xbus_t *xbus, xpd_t *xpd);
void xpd_device_unregister(xpd_t *xpd);
int echocancel_xpd(xpd_t *xpd, int on);
int xbus_is_registered(xbus_t *xbus);
int xbus_register_dahdi_device(xbus_t *xbus);
void xbus_unregister_dahdi_device(xbus_t *xbus);
int xpp_driver_init(void);
void xpp_driver_exit(void);
int xbus_sysfs_transport_create(xbus_t *xbus);

View File

@@ -438,6 +438,16 @@ static void astribank_release(struct device *dev)
xbus_free(xbus);
}
static void toplevel_release(struct device *dev)
{
NOTICE("%s\n", __func__);
}
static struct device toplevel_device = {
.release = toplevel_release,
/* No Parent */
};
static struct bus_type toplevel_bus_type = {
.name = "astribanks",
.match = astribank_match,
@@ -613,10 +623,6 @@ static DEVICE_ATTR_READER(span_show, dev, buf)
return len;
}
/*
* For backward compatibility with old dahdi-tools
* Remove after dahdi_registration is upgraded
*/
static DEVICE_ATTR_WRITER(span_store, dev, buf, count)
{
xpd_t *xpd;
@@ -625,34 +631,19 @@ static DEVICE_ATTR_WRITER(span_store, dev, buf, count)
BUG_ON(!dev);
xpd = dev_to_xpd(dev);
if (!xpd)
if(!xpd)
return -ENODEV;
ret = sscanf(buf, "%d", &dahdi_reg);
if (ret != 1)
if(ret != 1)
return -EINVAL;
if (!XBUS_IS(xpd->xbus, READY))
if(!XBUS_IS(xpd->xbus, READY))
return -ENODEV;
XPD_DBG(DEVICES, xpd,
"%s -- deprecated (should use pinned-spans)\n",
(dahdi_reg) ? "register" : "unregister");
if (xbus_is_registered(xpd->xbus)) {
if (dahdi_reg) {
XPD_DBG(DEVICES, xpd,
"already registered %s. Ignored.\n",
xpd->xbus->busname);
} else {
xbus_unregister_dahdi_device(xpd->xbus);
}
} else {
if (!dahdi_reg) {
XPD_DBG(DEVICES, xpd,
"already unregistered %s. Ignored.\n",
xpd->xbus->busname);
} else {
xbus_register_dahdi_device(xpd->xbus);
}
}
return count;
XPD_DBG(GENERAL, xpd, "%s\n", (dahdi_reg) ? "register" : "unregister");
if(dahdi_reg)
ret = dahdi_register_xpd(xpd);
else
ret = dahdi_unregister_xpd(xpd);
return (ret < 0) ? ret : count;
}
static DEVICE_ATTR_READER(type_show, dev, buf)
@@ -973,7 +964,7 @@ int xbus_sysfs_create(xbus_t *xbus)
astribank = &xbus->astribank;
XBUS_DBG(DEVICES, xbus, "\n");
astribank->bus = &toplevel_bus_type;
astribank->parent = xbus->transport.transport_device;
astribank->parent = &toplevel_device;
dev_set_name(astribank, "xbus-%02d", xbus->num);
dev_set_drvdata(astribank, xbus);
astribank->release = astribank_release;
@@ -990,10 +981,16 @@ int __init xpp_driver_init(void)
int ret;
DBG(DEVICES, "SYSFS\n");
dev_set_name(&toplevel_device, "astribanks");
ret = device_register(&toplevel_device);
if (ret) {
ERR("%s: toplevel device_register failed: %d\n", __func__, ret);
goto failed_toplevel;
}
if((ret = bus_register(&toplevel_bus_type)) < 0) {
ERR("%s: bus_register(%s) failed. Error number %d",
__FUNCTION__, toplevel_bus_type.name, ret);
goto failed_toplevel;
goto failed_bus;
}
if((ret = driver_register(&xpp_driver)) < 0) {
ERR("%s: driver_register(%s) failed. Error number %d",
@@ -1010,6 +1007,8 @@ failed_xpd_bus:
driver_unregister(&xpp_driver);
failed_xpp_driver:
bus_unregister(&toplevel_bus_type);
failed_bus:
device_unregister(&toplevel_device);
failed_toplevel:
return ret;
}
@@ -1020,6 +1019,7 @@ void xpp_driver_exit(void)
bus_unregister(&xpd_type);
driver_unregister(&xpp_driver);
bus_unregister(&toplevel_bus_type);
device_unregister(&toplevel_device);
}
EXPORT_SYMBOL(xpd_driver_register);

View File

@@ -49,6 +49,7 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)
/*
* FIXME: Kludge for 2.6.19
* bool is now defined as a proper boolean type (gcc _Bool)
@@ -58,6 +59,12 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */
int name = init; \
module_param(name, bool, perm); \
MODULE_PARM_DESC(name, desc " [default " #init "]")
#else
#define DEF_PARM_BOOL(name, init, perm, desc) \
bool name = init; \
module_param(name, bool, perm); \
MODULE_PARM_DESC(name, desc " [default " #init "]")
#endif
#define DEF_PARM(type,name,init,perm,desc) \
type name = init; \

View File

@@ -57,6 +57,7 @@ struct proc_dir_entry *xpp_proc_toplevel = NULL;
#define DELAY_UNTIL_DIALTONE 3000
DEF_PARM(int, debug, 0, 0644, "Print DBG statements");
static DEF_PARM_BOOL(dahdi_autoreg, 0, 0644, "Register spans automatically (1) or not (0)");
static DEF_PARM_BOOL(prefmaster, 0, 0644, "Do we want to be dahdi preferred sync master");
// DEF_ARRAY(int, pcmtx, 4, 0, "Forced PCM values to transmit");
@@ -252,6 +253,13 @@ int create_xpd(xbus_t *xbus, const xproto_table_t *proto_table,
return 0;
}
void xpd_post_init(xpd_t *xpd)
{
XPD_DBG(DEVICES, xpd, "\n");
if(dahdi_autoreg)
dahdi_register_xpd(xpd);
}
#ifdef CONFIG_PROC_FS
/**
@@ -560,6 +568,46 @@ err:
return NULL;
}
/*
* Try our best to make asterisk close all channels related to
* this Astribank:
* - Set span state to DAHDI_ALARM_NOTOPEN in all relevant spans.
* - Notify dahdi afterwards about spans (so it can see all changes at once).
* - Also send DAHDI_EVENT_REMOVED on all channels.
*/
void xbus_request_removal(xbus_t *xbus)
{
unsigned long flags;
int i;
for(i = 0; i < MAX_XPDS; i++) {
xpd_t *xpd = xpd_of(xbus, i);
if(xpd) {
XPD_DBG(DEVICES, xpd, "\n");
spin_lock_irqsave(&xpd->lock, flags);
xpd->card_present = 0;
xpd_setstate(xpd, XPD_STATE_NOHW);
PHONEDEV(xpd).span.alarms = DAHDI_ALARM_NOTOPEN;
spin_unlock_irqrestore(&xpd->lock, flags);
}
}
/* Now notify dahdi */
for(i = 0; i < MAX_XPDS; i++) {
xpd_t *xpd = xpd_of(xbus, i);
if(xpd) {
if(SPAN_REGISTERED(xpd)) {
int j;
dahdi_alarm_notify(&PHONEDEV(xpd).span);
XPD_DBG(DEVICES, xpd, "Queuing DAHDI_EVENT_REMOVED on all channels to ask user to release them\n");
for (j=0; j<PHONEDEV(xpd).span.channels; j++) {
dahdi_qevent_lock(XPD_CHAN(xpd, j),DAHDI_EVENT_REMOVED);
}
}
}
}
}
/*
* The xpd isn't open by anyone, we can unregister it and free it
*/
@@ -567,6 +615,7 @@ void xpd_remove(xpd_t *xpd)
{
BUG_ON(!xpd);
XPD_INFO(xpd, "Remove\n");
dahdi_unregister_xpd(xpd);
CALL_XMETHOD(card_remove, xpd);
xpd_free(xpd);
}
@@ -685,6 +734,7 @@ int xpp_open(struct dahdi_chan *chan)
return -EINVAL;
}
xpd = chan->pvt;
xpd = get_xpd(__FUNCTION__, xpd); /* Returned in xpp_close() */
if (!xpd) {
NOTICE("open called on a chan with no pvt (xpd)\n");
BUG();
@@ -697,7 +747,6 @@ int xpp_open(struct dahdi_chan *chan)
pos = chan->chanpos - 1;
if(!xpd->card_present) {
LINE_NOTICE(xpd, pos, "Cannot open -- device not ready\n");
put_xpd(__FUNCTION__, xpd);
return -ENODEV;
}
spin_lock_irqsave(&xbus->lock, flags);
@@ -726,6 +775,7 @@ int xpp_close(struct dahdi_chan *chan)
current->comm, current->pid,
atomic_read(&PHONEDEV(xpd).open_counter));
atomic_dec(&PHONEDEV(xpd).open_counter); /* from xpp_open() */
put_xpd(__FUNCTION__, xpd); /* from xpp_open() */
return 0;
}
@@ -835,7 +885,7 @@ int xpp_maint(struct dahdi_span *span, int cmd)
* If the watchdog detects no received data, it will call the
* watchdog routine
*/
static int xpp_watchdog(struct dahdi_span *span, int cause)
int xpp_watchdog(struct dahdi_span *span, int cause)
{
static int rate_limit = 0;
@@ -843,6 +893,7 @@ static int xpp_watchdog(struct dahdi_span *span, int cause)
DBG(GENERAL, "\n");
return 0;
}
EXPORT_SYMBOL(xpp_watchdog);
#endif
/*
@@ -945,18 +996,53 @@ int xpp_echocan_create(struct dahdi_chan *chan,
}
EXPORT_SYMBOL(xpp_echocan_create);
void xpp_span_assigned(struct dahdi_span *span)
{
struct phonedev *phonedev = container_of(span, struct phonedev, span);
xpd_t *xpd = container_of(phonedev, struct xpd, phonedev);
XPD_INFO(xpd, "Span assigned: %d\n", span->spanno);
if (xpd->card_present) {
span->alarms &= ~DAHDI_ALARM_NOTOPEN;
dahdi_alarm_notify(&phonedev->span);
/**
* Unregister an xpd from dahdi and release related resources
* @xpd The xpd to be unregistered
* @returns 0 on success, errno otherwise
*
* Checks that nobody holds an open channel.
*
* Called by:
* - User action through /proc
* - During xpd_remove()
*/
int dahdi_unregister_xpd(xpd_t *xpd)
{
unsigned long flags;
BUG_ON(!xpd);
spin_lock_irqsave(&xpd->lock, flags);
if (!IS_PHONEDEV(xpd)) {
XPD_ERR(xpd, "Not a telephony device\n");
spin_unlock_irqrestore(&xpd->lock, flags);
return -EBADF;
}
if(!SPAN_REGISTERED(xpd)) {
XPD_NOTICE(xpd, "Already unregistered\n");
spin_unlock_irqrestore(&xpd->lock, flags);
return -EIDRM;
}
update_xpd_status(xpd, DAHDI_ALARM_NOTOPEN);
/* We should now have only a ref from the xbus (from create_xpd()) */
if(atomic_read(&PHONEDEV(xpd).open_counter)) {
XPD_NOTICE(xpd, "Busy (open_counter=%d). Skipping.\n", atomic_read(&PHONEDEV(xpd).open_counter));
spin_unlock_irqrestore(&xpd->lock, flags);
return -EBUSY;
}
mdelay(2); // FIXME: This is to give chance for transmit/receiveprep to finish.
spin_unlock_irqrestore(&xpd->lock, flags);
if(xpd->card_present)
CALL_PHONE_METHOD(card_dahdi_preregistration, xpd, 0);
atomic_dec(&PHONEDEV(xpd).dahdi_registered);
atomic_dec(&num_registered_spans);
dahdi_unregister(&PHONEDEV(xpd).span);
if(xpd->card_present)
CALL_PHONE_METHOD(card_dahdi_postregistration, xpd, 0);
return 0;
}
EXPORT_SYMBOL(xpp_span_assigned);
static const struct dahdi_span_ops xpp_span_ops = {
.owner = THIS_MODULE,
@@ -966,7 +1052,6 @@ static const struct dahdi_span_ops xpp_span_ops = {
.maint = xpp_maint,
.echocan_create = xpp_echocan_create,
.echocan_name = xpp_echocan_name,
.assigned = xpp_span_assigned,
};
static const struct dahdi_span_ops xpp_rbs_span_ops = {
@@ -978,54 +1063,14 @@ static const struct dahdi_span_ops xpp_rbs_span_ops = {
.maint = xpp_maint,
.echocan_create = xpp_echocan_create,
.echocan_name = xpp_echocan_name,
.assigned = xpp_span_assigned,
};
void xpd_set_spanname(xpd_t *xpd)
{
struct dahdi_span *span = &PHONEDEV(xpd).span;
snprintf(span->name, MAX_SPANNAME, "%s/%s", xpd->xbus->busname, xpd->xpdname);
/*
* The "Xorcom XPD" is a prefix in one of the regexes we
* use in our dahdi_genconf to match for PRI cards.
* FIXME: After moving completely to sysfs, we can remove
* this horseshit.
*/
snprintf(span->desc, MAX_SPANDESC, "Xorcom XPD [%s].%d: %s",
xpd->xbus->label, span->offset + 1, xpd->type_name);
}
EXPORT_SYMBOL(xpd_set_spanname);
static void xpd_init_span(xpd_t *xpd, unsigned offset, int cn)
int dahdi_register_xpd(xpd_t *xpd)
{
struct dahdi_span *span;
int i;
memset(&PHONEDEV(xpd).span, 0, sizeof(struct dahdi_span));
for (i = 0; i < cn; i++)
memset(XPD_CHAN(xpd, i), 0, sizeof(struct dahdi_chan));
span = &PHONEDEV(xpd).span;
span->deflaw = DAHDI_LAW_MULAW; /* default, may be overriden by card_* drivers */
span->channels = cn;
span->chans = PHONEDEV(xpd).chans;
span->flags = DAHDI_FLAG_RBS;
span->offset = offset;
if (PHONEDEV(xpd).phoneops->card_hooksig)
span->ops = &xpp_rbs_span_ops; /* Only with RBS bits */
else
span->ops = &xpp_span_ops;
xpd_set_spanname(xpd);
list_add_tail(&span->device_node, &xpd->xbus->ddev->spans);
}
int xpd_dahdi_preregister(xpd_t *xpd, unsigned offset)
{
xbus_t *xbus;
int cn;
struct phonedev *phonedev;
int i;
BUG_ON(!xpd);
@@ -1035,26 +1080,70 @@ int xpd_dahdi_preregister(xpd_t *xpd, unsigned offset)
XPD_ERR(xpd, "Not a telephony device\n");
return -EBADF;
}
phonedev = &PHONEDEV(xpd);
if (SPAN_REGISTERED(xpd)) {
XPD_ERR(xpd, "Already registered\n");
return -EEXIST;
}
cn = PHONEDEV(xpd).channels;
xpd_init_span(xpd, offset, cn);
XPD_DBG(DEVICES, xpd, "Preregister local span %d: %d channels.\n",
offset + 1, cn);
XPD_DBG(DEVICES, xpd, "Initializing span: %d channels.\n", cn);
memset(&PHONEDEV(xpd).span, 0, sizeof(struct dahdi_span));
for(i = 0; i < cn; i++) {
memset(XPD_CHAN(xpd, i), 0, sizeof(struct dahdi_chan));
}
span = &PHONEDEV(xpd).span;
snprintf(span->name, MAX_SPANNAME, "%s/%s", xbus->busname, xpd->xpdname);
span->deflaw = DAHDI_LAW_MULAW; /* default, may be overriden by card_* drivers */
span->channels = cn;
span->chans = PHONEDEV(xpd).chans;
span->flags = DAHDI_FLAG_RBS;
if(PHONEDEV(xpd).phoneops->card_hooksig)
span->ops = &xpp_rbs_span_ops; /* Only with RBS bits */
else
span->ops = &xpp_span_ops;
/*
* This actually describe the dahdi_spaninfo version 3
* A bunch of unrelated data exported via a modified ioctl()
* What a bummer...
*/
span->manufacturer = "Xorcom Inc."; /* OK, that's obvious */
/* span->spantype = "...."; set in card_dahdi_preregistration() */
/*
* Yes, this basically duplicates information available
* from the description field. If some more is needed
* why not add it there?
* OK, let's add to the kernel more useless info.
*/
snprintf(span->devicetype, sizeof(span->devicetype) - 1,
"Astribank: Unit %x Subunit %x: %s",
XBUS_UNIT(xpd->xbus_idx), XBUS_SUBUNIT(xpd->xbus_idx),
xpd->type_name);
/*
* location is the only usefull new data item.
* For our devices it was available for ages via:
* - The legacy "/proc/xpp/XBUS-??/summary" (CONNECTOR=...)
* - The same info in "/proc/xpp/xbuses"
* - The modern "/sys/bus/astribanks/devices/xbus-??/connector" attribute
* So let's also export it via the newfangled "location" field.
*/
snprintf(span->location, sizeof(span->location) - 1, "%s", xbus->connector);
/*
* Who said a span and irq have 1-1 relationship?
* Also exporting this low-level detail isn't too wise.
* No irq's for you today!
*/
span->irq = 0;
snprintf(PHONEDEV(xpd).span.desc, MAX_SPANDESC, "Xorcom XPD #%02d/%1d%1d: %s",
xbus->num, xpd->addr.unit, xpd->addr.subunit, xpd->type_name);
XPD_DBG(GENERAL, xpd, "Registering span '%s'\n", PHONEDEV(xpd).span.desc);
CALL_PHONE_METHOD(card_dahdi_preregistration, xpd, 1);
return 0;
}
int xpd_dahdi_postregister(xpd_t *xpd)
{
int cn;
if(dahdi_register(&PHONEDEV(xpd).span, prefmaster)) {
XPD_ERR(xpd, "Failed to dahdi_register span\n");
return -ENODEV;
}
atomic_inc(&num_registered_spans);
atomic_inc(&PHONEDEV(xpd).dahdi_registered);
CALL_PHONE_METHOD(card_dahdi_postregistration, xpd, 1);
@@ -1074,48 +1163,6 @@ int xpd_dahdi_postregister(xpd_t *xpd)
return 0;
}
/*
* Try our best to make asterisk close all channels related to
* this Astribank:
* - Set span state to DAHDI_ALARM_NOTOPEN in all relevant spans.
* - Notify dahdi afterwards about spans (so it can see all changes at once).
* - Also send DAHDI_EVENT_REMOVED on all channels.
*/
void xpd_dahdi_preunregister(xpd_t *xpd)
{
unsigned long flags;
if (!xpd)
return;
XPD_DBG(DEVICES, xpd, "\n");
spin_lock_irqsave(&xpd->lock, flags);
xpd->card_present = 0;
xpd_setstate(xpd, XPD_STATE_NOHW);
spin_unlock_irqrestore(&xpd->lock, flags);
update_xpd_status(xpd, DAHDI_ALARM_NOTOPEN);
if(xpd->card_present)
CALL_PHONE_METHOD(card_dahdi_preregistration, xpd, 0);
/* Now notify dahdi */
if(SPAN_REGISTERED(xpd)) {
int j;
dahdi_alarm_notify(&PHONEDEV(xpd).span);
XPD_DBG(DEVICES, xpd, "Queuing DAHDI_EVENT_REMOVED on all channels to ask user to release them\n");
for (j=0; j<PHONEDEV(xpd).span.channels; j++) {
dahdi_qevent_lock(XPD_CHAN(xpd, j),DAHDI_EVENT_REMOVED);
}
}
}
void xpd_dahdi_postunregister(xpd_t *xpd)
{
if (!xpd)
return;
atomic_dec(&PHONEDEV(xpd).dahdi_registered);
atomic_dec(&num_registered_spans);
if(xpd->card_present)
CALL_PHONE_METHOD(card_dahdi_postregistration, xpd, 0);
}
/*------------------------- Initialization -------------------------*/
static void do_cleanup(void)
@@ -1170,10 +1217,12 @@ static void __exit xpp_dahdi_cleanup(void)
EXPORT_SYMBOL(debug);
EXPORT_SYMBOL(create_xpd);
EXPORT_SYMBOL(xpd_post_init);
EXPORT_SYMBOL(get_xpd);
EXPORT_SYMBOL(put_xpd);
EXPORT_SYMBOL(xpd_alloc);
EXPORT_SYMBOL(xpd_free);
EXPORT_SYMBOL(xbus_request_removal);
EXPORT_SYMBOL(update_xpd_status);
EXPORT_SYMBOL(oht_pcm);
EXPORT_SYMBOL(mark_offhook);

View File

@@ -25,13 +25,12 @@
#include "xpd.h"
#include "xproto.h"
void xpd_set_spanname(xpd_t *xpd);
int xpd_dahdi_preregister(xpd_t *xpd, unsigned offset);
int xpd_dahdi_postregister(xpd_t *xpd);
void xpd_dahdi_preunregister(xpd_t *xpd);
void xpd_dahdi_postunregister(xpd_t *xpd);
int dahdi_register_xpd(xpd_t *xpd);
int dahdi_unregister_xpd(xpd_t *xpd);
void xbus_request_removal(xbus_t *xbus);
int create_xpd(xbus_t *xbus, const xproto_table_t *proto_table,
int unit, int subunit, byte type, byte subtype, int subunits, int subunit_ports, byte port_dir);
void xpd_post_init(xpd_t *xpd);
xpd_t *xpd_alloc(xbus_t *xbus, int unit, int subunit, int subtype, int subunits, size_t privsize, const xproto_table_t *proto_table, int channels);
void xpd_free(xpd_t *xpd);
void xpd_remove(xpd_t *xpd);
@@ -47,7 +46,7 @@ int xpp_close(struct dahdi_chan *chan);
int xpp_ioctl(struct dahdi_chan *chan, unsigned int cmd, unsigned long arg);
int xpp_hooksig(struct dahdi_chan *chan, enum dahdi_txsig txsig);
int xpp_maint(struct dahdi_span *span, int cmd);
void xpp_span_assigned(struct dahdi_span *span);
int xpp_watchdog(struct dahdi_span *span, int cause);
void report_bad_ioctl(const char *msg, xpd_t *xpd, int pos, unsigned int cmd);
int total_registered_spans(void);
void oht_pcm(xpd_t *xpd, int pos, bool pass);

View File

@@ -43,10 +43,11 @@ show_debug() {
list=''
for n in $dbg_names
do
if [ $(( val & (1 << j) )) -ne 0 ]; then
if (( val & (1 << j) ))
then
list="$list $n"
fi
j=$((j+1))
let j++
done
if [ "$list" = "" ]; then
list=' NONE'
@@ -66,19 +67,19 @@ calc_debug() {
for n in $dbg_names
do
if [ "$wanted" = "$n" ]; then
: $(( val |= (1 << j) ))
(( val |= (1 << j) ))
found=1
elif [ "$wanted" = -"$n" ]; then
: $(( val &= ~(1 << j) ))
(( val &= ~(1 << j) ))
found=1
elif [ "$wanted" = "ANY" ]; then
: $(( val = ~0 ))
(( val = ~0 ))
found=1
elif [ "$wanted" = -"ANY" -o "$wanted" = "NONE" ]; then
val=0
(( val = 0 ))
found=1
fi
j=$((j+1))
let j++
done
if [ "$found" -eq 0 ]; then
echo >&2 "$0: Unknown debug flag '$wanted'"

View File

@@ -75,6 +75,12 @@ static const xproto_table_t *xproto_table(xpd_type_t cardtype)
return xprotocol_tables[cardtype];
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
#define MODULE_REFCOUNT_FORMAT "%s refcount was %d\n"
#else
#define MODULE_REFCOUNT_FORMAT "%s refcount was %lu\n"
#endif
const xproto_table_t *xproto_get(xpd_type_t cardtype)
{
const xproto_table_t *xtable;
@@ -94,7 +100,8 @@ const xproto_table_t *xproto_get(xpd_type_t cardtype)
if(xtable) {
BUG_ON(!xtable->owner);
#ifdef CONFIG_MODULE_UNLOAD
DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
DBG(GENERAL, MODULE_REFCOUNT_FORMAT, xtable->name,
module_refcount(xtable->owner));
#endif
if(!try_module_get(xtable->owner)) {
ERR("%s: try_module_get for %s failed.\n", __FUNCTION__, xtable->name);
@@ -108,7 +115,8 @@ void xproto_put(const xproto_table_t *xtable)
{
BUG_ON(!xtable);
#ifdef CONFIG_MODULE_UNLOAD
DBG(GENERAL, "%s refcount was %d\n", xtable->name, module_refcount(xtable->owner));
DBG(GENERAL, MODULE_REFCOUNT_FORMAT, xtable->name,
module_refcount(xtable->owner));
BUG_ON(module_refcount(xtable->owner) <= 0);
#endif
module_put(xtable->owner);

View File

@@ -42,7 +42,7 @@
#include <linux/config.h>
#endif
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/kobject.h>
#include <linux/module.h>
#include <linux/ioctl.h>
@@ -55,8 +55,6 @@
#include <linux/skbuff.h>
#include <linux/interrupt.h>
#endif
#include <linux/device.h>
#include <linux/sysfs.h>
#include <linux/poll.h>
@@ -888,38 +886,6 @@ struct dahdi_span_ops {
/*! Opt: Provide the name of the echo canceller on a channel */
const char *(*echocan_name)(const struct dahdi_chan *chan);
/*! When using "pinned_spans", this function is called back when this
* span has been assigned with the system. */
void (*assigned)(struct dahdi_span *span);
/*! Called when the spantype / linemode is changed before the span is
* assigned a number. */
int (*set_spantype)(struct dahdi_span *span, const char *spantype);
};
/**
* dahdi_device - Represents a device that can contain one or more spans.
*
* @spans: List of child spans.
* @manufacturer: Device manufacturer.
* @location: The location of this device. This should not change if
* the device is replaced (e.g: in the same PCI slot)
* @hardware_id: The hardware_id of this device (NULL for devices without
* a hardware_id). This should not change if the device is
* relocated to a different location (e.g: different PCI slot)
* @devicetype: What type of device this is.
* @irqmisses: Count of "interrupt misses" for this device.
*
*/
struct dahdi_device {
struct list_head spans;
const char *manufacturer;
const char *location;
const char *hardware_id;
const char *devicetype;
struct device dev;
unsigned int irqmisses;
};
struct dahdi_span {
@@ -927,10 +893,14 @@ struct dahdi_span {
char name[40]; /*!< Span name */
char desc[80]; /*!< Span description */
const char *spantype; /*!< span type in text form */
const char *manufacturer; /*!< span's device manufacturer */
char devicetype[80]; /*!< span's device type */
char location[40]; /*!< span device's location in system */
int deflaw; /*!< Default law (DAHDI_MULAW or DAHDI_ALAW) */
int alarms; /*!< Pending alarms on span */
unsigned long flags;
u8 cannot_provide_timing:1;
int irq; /*!< IRQ for this span's hardware */
int lbo; /*!< Span Line-Buildout */
int lineconfig; /*!< Span line configuration */
int linecompat; /*!< Span line compatibility (0 for
@@ -944,6 +914,7 @@ struct dahdi_span {
int maintstat; /*!< Maintenance state */
int mainttimer; /*!< Maintenance timer */
int irqmisses; /*!< Interrupt misses */
int timingslips; /*!< Clock slips */
struct dahdi_chan **chans; /*!< Member channel structures */
@@ -963,11 +934,7 @@ struct dahdi_span {
#ifdef CONFIG_PROC_FS
struct proc_dir_entry *proc_entry;
#endif
struct list_head spans_node;
struct dahdi_device *parent;
struct list_head device_node;
struct device *span_device;
struct list_head node;
};
struct dahdi_transcoder_channel {
@@ -984,8 +951,6 @@ struct dahdi_transcoder_channel {
u32 srcfmt;
};
int dahdi_is_sync_master(const struct dahdi_span *span);
static inline int
dahdi_tc_is_built(struct dahdi_transcoder_channel *dtc) {
return test_bit(DAHDI_TC_FLAG_CHAN_BUILT, &dtc->flags);
@@ -1067,7 +1032,6 @@ struct dahdi_dynamic {
long rxjif;
unsigned short txcnt;
unsigned short rxcnt;
struct dahdi_device *ddev;
struct dahdi_span span;
struct dahdi_chan *chans[256];
struct dahdi_dynamic_driver *driver;
@@ -1075,7 +1039,6 @@ struct dahdi_dynamic {
int timing;
int master;
unsigned char *msgbuf;
struct device *dev;
struct list_head list;
};
@@ -1139,22 +1102,6 @@ static inline int dahdi_transmit(struct dahdi_span *span)
return ret;
}
static inline int dahdi_is_digital_span(const struct dahdi_span *s)
{
return (s->linecompat > 0);
}
static inline int dahdi_is_t1_span(const struct dahdi_span *s)
{
return (s->linecompat & (DAHDI_CONFIG_D4 | DAHDI_CONFIG_ESF |
DAHDI_CONFIG_B8ZS)) > 0;
}
static inline int dahdi_is_e1_span(const struct dahdi_span *s)
{
return dahdi_is_digital_span(s) && !dahdi_is_t1_span(s);
}
/*! Abort the buffer currently being receive with event "event" */
void dahdi_hdlc_abort(struct dahdi_chan *ss, int event);
@@ -1169,12 +1116,10 @@ void dahdi_hdlc_putbuf(struct dahdi_chan *ss, unsigned char *rxb, int bytes);
* and 1 if the currently transmitted message is now done */
int dahdi_hdlc_getbuf(struct dahdi_chan *ss, unsigned char *bufptr, unsigned int *size);
/*! Register a device. Returns 0 on success, -1 on failure. */
struct dahdi_device *dahdi_create_device(void);
int dahdi_register_device(struct dahdi_device *ddev, struct device *parent);
void dahdi_unregister_device(struct dahdi_device *ddev);
void dahdi_free_device(struct dahdi_device *ddev);
void dahdi_init_span(struct dahdi_span *span);
/*! Register a span. Returns 0 on success, -1 on failure. Pref-master is non-zero if
we should have preference in being the master device */
int dahdi_register(struct dahdi_span *span, int prefmaster);
/*! Allocate / free memory for a transcoder */
struct dahdi_transcoder *dahdi_transcoder_alloc(int numchans);
@@ -1189,6 +1134,9 @@ int dahdi_transcoder_unregister(struct dahdi_transcoder *tc);
/*! \brief Alert a transcoder */
int dahdi_transcoder_alert(struct dahdi_transcoder_channel *ztc);
/*! \brief Unregister a span */
int dahdi_unregister(struct dahdi_span *span);
/*! \brief Gives a name to an LBO */
const char *dahdi_lboname(int lbo);
@@ -1430,11 +1378,6 @@ static inline void list_replace(struct list_head *old, struct list_head *new)
} while (0)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 17)
#ifndef POLLRDHUP
#define POLLRDHUP 0
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
#define kzalloc(a, b) kcalloc(1, a, b)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 12)
@@ -1461,17 +1404,12 @@ typedef u32 __bitwise pm_message_t;
#endif /* 2.6.11 */
#endif /* 2.6.12 */
#endif /* 2.6.14 */
#endif /* 2.6.17 */
#endif /* 2.6.18 */
#endif /* 2.6.22 */
#endif /* 2.6.25 */
#endif /* 2.6.26 */
#endif /* 2.6.31 */
#ifndef CONFIG_TRACING
#define trace_printk printk
#endif
#ifndef DEFINE_SPINLOCK
#define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
#endif
@@ -1537,26 +1475,6 @@ struct mutex {
#define chan_err(chan, fmt, ...) chan_printk(ERR, "", chan, fmt, \
## __VA_ARGS__)
#ifndef pr_err
#define pr_err(fmt, ...) \
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
#endif
#ifndef pr_warning
#define pr_warning(fmt, ...) \
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
#endif
#ifndef pr_warn
#define pr_warn pr_warning
#endif
#ifndef pr_notice
#define pr_notice(fmt, ...) \
printk(KERN_NOTICE pr_fmt(fmt), ##__VA_ARGS__)
#endif
#ifndef pr_info
#define pr_info(fmt, ...) \
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
#endif
/* The dbg_* ones use a magical variable 'debug' and the user should be
* aware of that.
*/
@@ -1568,7 +1486,6 @@ struct mutex {
* be of the form DAHDI_DBG_*
*/
#define DAHDI_DBG_GENERAL BIT(0)
#define DAHDI_DBG_ASSIGN BIT(1)
#define DAHDI_DBG_DEVICES BIT(7) /* instantiation/destruction etc. */
#define dahdi_dbg(bits, fmt, ...) \
((void)((debug & (DAHDI_DBG_ ## bits)) && DAHDI_PRINTK(DEBUG, \
@@ -1581,10 +1498,6 @@ struct mutex {
((void)((debug & (DAHDI_DBG_ ## bits)) && \
chan_printk(DEBUG, "-" #bits, chan, \
"%s: " fmt, __func__, ## __VA_ARGS__)))
#define dahdi_dev_dbg(bits, dev, fmt, ...) \
((void)((debug & (DAHDI_DBG_ ## bits)) && \
dev_printk(KERN_DEBUG, dev, \
"DBG-%s(%s): " fmt, #bits, __func__, ## __VA_ARGS__)))
#endif /* DAHDI_PRINK_MACROS_USE_debug */
#endif /* _DAHDI_KERNEL_H */