From 6bc1dbffe9f77eb3c85a655ffeaff64d963c6b43 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Tue, 16 Oct 2007 17:55:05 +0000 Subject: xpp r4892: * Zaptel/Hardware perl modules: - Use sysfs directly. Don't rely on lspci/lsusb. - Each device has a description and driver name. - Zaptel::Hardware::drivers() to show the list of required drivers for this system (see zaptel_drivers). - zaptel_hardware shows a description and a (suggested?) driver. * zt_registration sorts by Serial first and only then by connector. * USB_FW.hex replaces all the USB_11x0.hex . - Separate USB interface for the management processor. - Hence fpga_load can now work even with drivers loaded. * Fix firmware upgrading. * Fix manual firmware loading while auto-loading. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3142 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- xpp/.version | 2 +- xpp/ChangeLog | 168 ------------------ xpp/Changelog_xpp | 190 ++++++++++++++++++++ xpp/README.Astribank | 10 +- xpp/card_fxo.c | 2 + xpp/card_fxs.c | 3 +- xpp/card_pri.c | 3 +- xpp/firmwares/USB_1130.hex | 311 --------------------------------- xpp/firmwares/USB_1140.hex | 311 --------------------------------- xpp/firmwares/USB_1150.hex | 311 --------------------------------- xpp/firmwares/USB_FW.hex | 223 +++++++++++++++++++++++ xpp/utils/fpga_load.c | 117 +++++++------ xpp/utils/xpp_fxloader | 12 +- xpp/utils/zaptel_drivers | 9 + xpp/utils/zaptel_hardware | 61 +++++-- xpp/utils/zconf/Zaptel/Hardware.pm | 11 ++ xpp/utils/zconf/Zaptel/Hardware/PCI.pm | 187 ++++++++++++++------ xpp/utils/zconf/Zaptel/Hardware/USB.pm | 81 ++++----- xpp/utils/zconf/Zaptel/Xpp.pm | 4 +- xpp/utils/zconf/Zaptel/Xpp/Xbus.pm | 7 +- xpp/utils/zt_registration | 53 +++--- xpp/xbus-core.c | 9 +- xpp/xdefs.h | 2 +- xpp/xpd.h | 9 +- xpp/xpp_usb.c | 60 +++++-- xpp/xpp_zap.c | 10 +- xpp/xproto.c | 38 ++-- xpp/xproto.h | 2 + 28 files changed, 860 insertions(+), 1346 deletions(-) delete mode 100644 xpp/ChangeLog create mode 100644 xpp/Changelog_xpp delete mode 100644 xpp/firmwares/USB_1130.hex delete mode 100644 xpp/firmwares/USB_1140.hex delete mode 100644 xpp/firmwares/USB_1150.hex create mode 100644 xpp/firmwares/USB_FW.hex create mode 100755 xpp/utils/zaptel_drivers diff --git a/xpp/.version b/xpp/.version index 30af102..a18df72 100644 --- a/xpp/.version +++ b/xpp/.version @@ -1 +1 @@ -trunk-r4786 +branch-rel-4816-r4892 diff --git a/xpp/ChangeLog b/xpp/ChangeLog deleted file mode 100644 index e9961df..0000000 --- a/xpp/ChangeLog +++ /dev/null @@ -1,168 +0,0 @@ -Wed Oct 3 2007 Oron Peled - xpp.r4786 - * New firmware protocol version: 2.9 . - * fpga_load: initial clean-ups before interface split. - * genzaptelconf: Don't leave an empty directory behind (4784) - * Increase xpp poll_timeout to 1000ms - useful for CentOS 4 (r4781). - * Fix initialization anoyance: if AB don't answer to polls, don't - waitfor_xpds, and show no waiting XPDs (r4725). - * Disable dtmf_detect by default once again (r4712). - * Don't check twice for asterisk to stop. The second test was done - while Asterisk was still stopping (r4708). - * Support building the kernel with M= instead of with SUBDIRS= , as - used in some newer build systems (r4677). - -Tue Sep 11 2007 Oron Peled - xpp.r4648 - * New firmware protocol version: 2.8 . - * New firmwares fix input ports offhook. - * Cleanup INFO() messages during module loading. - - * USB: Receive queue with TASKLETS [r4600]. Controlled by rx_tasklet - parameter to xpp_usb module (can be changed in runtime). - * The pcm_tasklet parameter in xpp module is deprecated: - - Does not actually do anything. - - If set during module loading, shows an ERR() message. - - Also appears in /proc/xpp/sync - - * FXS: Hardware DTMF detection by improved. Can be enabled (as before) - by setting dtmf_detection=1 parameter to xpd_fxs. - PCM is muted when DTMF key is pressed. - - * zapconf: - - Can now generate users.conf compatible with asterisk-gui. - - Optional command-line arguments denoting which files to generate. - Possible values are 'zaptel', 'zapata' and 'users'. - - Defaults to creating zaptel and zapata. - -Mon Sep 3 2007 Tzafrir Cohen - xpp.r4584 - * New firmware to fix FXS leds irregularities. - * Less noise at build time - don't echo version, test compile only once. - * zapconf can generate users.conf snippets. - * xpd_pri: initial version. - -Thu Aug 16 2007 Tzafrir Cohen - xpp.r4515 - * Don't use Astribanks connected to USB1 interfaces - Unless the user set the option usb1=1 for xpp_usb (r4504). - * Demote the messages about PCM in non-PCM from notice to debug (r4501). - * Fix sample BRI zapata.conf: NT instead of TE (r4498). - * Disable FXS hardware DTMF detection by default (r4492). - * Extra Zaptel PCI IDs (from Philipp Kempgen) (r4466). - -Thu Aug 2 2007 Oron Peled - xpp.r4464 - * BRI improvement: an 'nt_keepalive' parameter to xpd_bri forces - a BRI_NT to retry a connection indefinitely (this is our default). - When false it revert to the behaviour in changeset:4415 ("Bezeq like") - * Improvement in DBG macros. The print_dbg parameter is now set of - flags to debug. They are defined in zap_debug.h - -Thu Jul 30 2007 Oron Peled - xpp.r4415 - * Show Astribank 6+2 as 6/2 channels and not 8/8 channels. - - Added as a "subtype" to the device type (r4391). - * Fixed a panic in BRI span shutdown method (r4393). - * Changes to debug macros. - * Add proper sysfs support (r4406) - - A bus on whuch all of the Astribanks reside. - - Replaces useless sysfs code that existed in the module. - - Currently used to set the sync source automatically at device - adition / removal. - * BRI: We do need the T1 timer in NT. If it gets into G2 state (rr4407). - -Thu Jul 12 2007 Oron Peled - xpp.r4372 - * Update to zaptel-1.2.18 and zaptel-1.4.3 (r4308 onward) - * Fix a critical race with zaptel synchronization (r4362) - * Added a /proc/xpp/cmds for statistics about command timing (r4360) - * Fix a digit mapping bug with hardware dtmf detection (r4357) - * In xpp/utils/Makefile add perl syntax checks to our scripts (r4337) - * Better USB data error checking (r4336) - * udev rules (xpp.rules) avoid false calls from wrong nodes (r4331) - * Improve hardware detection and reporting in lszaptel, - zaptel_hardware. zapconf is basically functional. - * Leds are blinked synchronously on all Astribanks now (r4262) - * Fix a BRI bug if OPTIMIZE_CHANMUTE was compiled into zaptel (r4258) - (This feature was not yet accepted into official zaptel) - * Removed compile warning about HZ != 1000 (r4218) - * Firmware updates. - * fpga_load now supports USB pathes without zeros (r4211) - * XPD numbers have changed to '' (r4196) - * Proper support for ZT_VMWI ioctl, if used in zaptel (r4092) - * Fix FXO power denial detection (r4054) - * FXO could accidentally go off-hook with some compilers (r4048) - -Tue May 1 2007 Oron Peled - xpp.r3898 - * Tested with zaptel-1.2.17.1 - * Add D-Channel TX, RX and BAD frames count in /proc/xpp/XBUS-*/XPD-*/bri_info - * Adjust output of xpp_sync script. Pad for 8 port BRI. - * Added a debugging module parport_debug (not compiled by default). - * Added an optional patch to zaptel: - - compiles only if ZAPTEL_SYNC_TICK is defined - - Allow interested driver to register for "sync" notification. - - Does not affect drivers that do not use this feature. - * Added external synchronization feature: - - Only if ZAPTEL_SYNC_TICK feature is compiled in - - Than XPP may be synchronized by another card (e.g: an Astribank - with FXS can be synchronized by a Digium PRI card). - - May be enabled/disabled in runtime via the 'sync_tick_active' module - parameter to the xpp.ko module. - * Fixed a potential bug in D-Channel hexdump printing. - * New visual indications in BRI leds: - - Constant ON RED/GREEN: Shows the port type -- NT/TE. - - Very fast "double blink": Layer1 work, no D-Channel yet. - - Steady blinking (1/2 sec): D-Channel trafic detected. - * xpp_fxloader moved to /usr/share/zaptel . - * adj_clock removed: never really used. - -Thu, 19 Apr 2007 Tzafrir Cohen - xpp.r3814 - * No need for extra patch beyond bristuff for Astribank BRI. - * Protocol no. 2.6: syncing improvements. - * Default poll intervals changed: 500 in BRI and FXO. - * Allow changing FXS polls interval at run time. - * BRI initalization fixed on SUSE (path to logger). - * When using the SUSE zaptel rpm package, set modules_var=ZAPTEL_MODULES in - /etc/sysconfig/zaptel . - * zt_registration not verbose by default. - * xpp_sync warns if FXO is sync slave. - * Extra PCM metrics data in /proc/xpp/XBUS-NN/summary . - * Extra USB metrics data in /proc/xpp/XBUS-NN/usb_info . - -Wed, 11 Apr 2007 Tzafrir Cohen - xpp.r3768 - * Removed "go away" notice and solved sync of a restarted device. - * Resetting firmware: rmmod xpp_usb; /etc/hotplug/usb/xpp_fxloader reset - * Perl modules use strict. - * genzaptelconf -F will not generate zapata configuration for NT spans. - * genzaptelconf uses perl utilities to start. - * Initial support for 2nd XHFC (BRI) chip. - -Sun, 1 Apr 2007 Tzafrir Cohen - xpp.r3712 - * New protocol version (2.5). - * Luckily firmware unloading now works. - * Solves "multiple ticks" bug. No need for pcm_tasklets workaround. - * genzaptelconf -z will generate zapscan.conf for the asterisk-gui. - * Fixed hardware detection for the BRI. - -Wed, 14 Mar 2007 Tzafrir Cohen - xpp.r3608 - * Initial verssion of firmware unloading. - * PCM bugfixes. - * Defaults of kernel parameters are now part of parameter description. - * Removed zaptel sync code for now. - * genzaptelconf will detect vzaphfc. - * genzaptelconf defaults to ptmp for BRI. - * Documentation updates. - -Mon, 26 Feb 2007 Tzafrir Cohen - xpp.r3517 - * genzaptelconf now uses ls for FXS lines by default . - * World-readable kernel parameters. - -Thu, 22 Feb 2007 Tzafrir Cohen - xpp.r3440 - * /proc/xpp/sync: 'm 0' is, while depracated, can still be used. - * New firmware with PCM improvements. - * Improvements to the xpp helper scripts. - * Bug fixes. - * zaptel/perl is now installed by xpp/utils/Makefile. - -Wed, 14 Feb 2007 Tzafrir Cohen - xpp.r3365 - * Kewlstart support on the FXS ports (already existed on the FXO ports). - * The format of /proc/xpp/sync has changed (still self-documented). - * Better notification of FXS lines that were off-hook on registration time. - * Parallel polling of Astribanks (faster startup when there are multiple - devices) - * zconf: scripts and perl modules to automate the work with Zaptel and the - Astribank. Current scripts: zt_registration, xpp_sync. diff --git a/xpp/Changelog_xpp b/xpp/Changelog_xpp new file mode 100644 index 0000000..b206a53 --- /dev/null +++ b/xpp/Changelog_xpp @@ -0,0 +1,190 @@ +Wed Oct 16 2007 Tzafrir Cohen - xpp.r4892 + * Zaptel/Hardware perl modules: + - Use sysfs directly. Don't rely on lspci/lsusb. + - Each device has a description and driver name. + - Zaptel::Hardware::drivers() to show the list of required drivers + for this system (see zaptel_drivers). + - zaptel_hardware shows a description and a (suggested?) driver. + * zt_registration sorts by Serial first and only then by connector. + * USB_FW.hex replaces all the USB_11x0.hex . + - Separate USB interface for the management processor. + - Hence fpga_load can now work even with drivers loaded. + * Fix firmware upgrading. + * Fix manual firmware loading while auto-loading. + +Wed Oct 3 2007 Oron Peled - xpp.r4786 + * New firmware protocol version: 2.9 . + * fpga_load: initial clean-ups before interface split. + * genzaptelconf: Don't leave an empty directory behind (4784) + * Increase xpp poll_timeout to 1000ms - useful for CentOS 4 (r4781). + * Fix initialization anoyance: if AB don't answer to polls, don't + waitfor_xpds, and show no waiting XPDs (r4725). + * Disable dtmf_detect by default once again (r4712). + * Don't check twice for asterisk to stop. The second test was done + while Asterisk was still stopping (r4708). + * Support building the kernel with M= instead of with SUBDIRS= , as + used in some newer build systems (r4677). + +Tue Sep 11 2007 Oron Peled - xpp.r4648 + * New firmware protocol version: 2.8 . + * Cleanup INFO() messages during module loading. + + * USB: Receive queue with TASKLETS [r4600]. Controlled by rx_tasklet + parameter to xpp_usb module (can be changed in runtime). + * The pcm_tasklet parameter in xpp module is deprecated: + - Does not actually do anything. + - If set during module loading, shows an ERR() message. + - Also appears in /proc/xpp/sync + + * FXS: Hardware DTMF detection by default, can be disabled + by setting dtmf_detection=0 parameter to xpd_fxs. + PCM is muted when DTMF key is pressed. + + * zapconf: + - Can now generate users.conf compatible with asterisk-gui. + - Optional command-line arguments denoting which files to generate. + Possible values are 'zaptel', 'zapata' and 'users'. + - Defaults to creating zaptel and zapata. + + * Update to zaptel-1.4.5.1, zaptel-1.2.20.1 + * Fix building on kernel 2.6.23rc1, from Axel Thimm. + * New firmware to fix FXS leds irregularities. + * Less noise at build time - don't echo version, test compile ony once. + * zapconf can generate users.conf snippets. + +Thu Aug 16 2007 Tzafrir Cohen - xpp.r4515 + * Don't use Astribanks connected to USB1 interfaces + Unless the user set the option usb1=1 for xpp_usb (r4504). + * README.Astribank can now be generated from the makefile (r4503). + * Demote the messages about PCM in non-PCM from notice to debug (r4501). + * Fix sample BRI zapata.conf: NT instead of TE (r4498). + * Disable FXS hardware DTMF detection by default (r4492). + * Extra Zaptel PCI IDs (from Philipp Kempgen) (r4466). + +Thu Aug 2 2007 Oron Peled - xpp.r4464 + * Jump to zaptel-1.2.19 and zaptel-1.4.4 (with/without bristuff) + * BRI improvement: an 'nt_keepalive' parameter to xpd_bri forces + a BRI_NT to retry a connection indefinitely (this is our default). + When false it revert to the behaviour in changeset:4415 ("Bezeq like") + * Improvement in DBG macros. The print_dbg parameter is now set of + flags to debug. They are defined in zap_debug.h + * PRI configuration improvements (r4462): + - Hardcoded default (in init_card_9_26) is TE. + - The variable XPP_PRI_SETUP (in /etc/default/zaptel) may config + all PRI ports or some of them as we wish. Full docs are in + the utils/example_default_zaptel. + * PRI D-channel indication: Similar to BRI (r4464). + +Thu Jul 30 2007 Oron Peled - xpp.r4415 + * Show Astribank 6+2 as 6/2 channels and not 8/8 channels. + - Added as a "subtype" to the device type (r4391). + * Fixed a panic in BRI span shutdown method (r4393). + * Changes to debug macros. + * Add proper sysfs support (r4406) + - A bus on whuch all of the Astribanks reside. + - Replaces useless sysfs code that existed in the module. + - Currently used to set the sync source automatically at device + adition / removal. + * BRI: We do need the T1 timer in NT. If it gets into G2 state (rr4407). + +Thu Jul 12 2007 Oron Peled - xpp.r4372 + * Update to zaptel-1.2.18 and zaptel-1.4.3 (r4308 onward) + * Fix a critical race with zaptel synchronization (r4362) + * Added a /proc/xpp/cmds for statistics about command timing (r4360) + * Fix a digit mapping bug with hardware dtmf detection (r4357) + * In xpp/utils/Makefile add perl syntax checks to our scripts (r4337) + * Better USB data error checking (r4336) + * udev rules (xpp.rules) avoid false calls from wrong nodes (r4331) + * Improve hardware detection and reporting in lszaptel, + zaptel_hardware. zapconf is basically functional. + * Leds are blinked synchronously on all Astribanks now (r4262) + * Fix a BRI bug if OPTIMIZE_CHANMUTE was compiled into zaptel (r4258) + (This feature was not yet accepted into official zaptel) + * Removed compile warning about HZ != 1000 (r4218) + * Firmware updates. + * xpd_pri: the PRI module + * fpga_load now supports USB pathes without zeros (r4211) + * XPD numbers have changed to '' (r4196) + * Proper support for ZT_VMWI ioctl, if used in zaptel (r4092) + * Fix FXO power denial detection (r4054) + * FXO could accidentally go off-hook with some compilers (r4048) + +Tue May 1 2007 Oron Peled - xpp.r3898 + * Tested with zaptel-1.2.17.1 + * Add D-Channel TX, RX and BAD frames count in /proc/xpp/XBUS-*/XPD-*/bri_info + * Adjust output of xpp_sync script. Pad for 8 port BRI. + * Added a debugging module parport_debug (not compiled by default). + * Added an optional patch to zaptel: + - compiles only if ZAPTEL_SYNC_TICK is defined + - Allow interested driver to register for "sync" notification. + - Does not affect drivers that do not use this feature. + * Added external synchronization feature: + - Only if ZAPTEL_SYNC_TICK feature is compiled in + - Than XPP may be synchronized by another card (e.g: an Astribank + with FXS can be synchronized by a Digium PRI card). + - May be enabled/disabled in runtime via the 'sync_tick_active' module + parameter to the xpp.ko module. + * Fixed a potential bug in D-Channel hexdump printing. + * New visual indications in BRI leds: + - Constant ON RED/GREEN: Shows the port type -- NT/TE. + - Very fast "double blink": Layer1 work, no D-Channel yet. + - Steady blinking (1/2 sec): D-Channel trafic detected. + * xpp_fxloader moved to /usr/share/zaptel . + * adj_clock removed: never really used. + +Thu, 19 Apr 2007 Tzafrir Cohen - xpp.r3814 + * No need for extra patch beyond bristuff for Astribank BRI. + * Protocol no. 2.6: syncing improvements. + * Default poll intervals changed: 500 in BRI and FXO. + * Allow changing FXS polls interval at run time. + * BRI initalization fixed on SUSE (path to logger). + * When using the SUSE zaptel rpm package, set modules_var=ZAPTEL_MODULES in + /etc/sysconfig/zaptel . + * zt_registration not verbose by default. + * xpp_sync warns if FXO is sync slave. + * Extra PCM metrics data in /proc/xpp/XBUS-NN/summary . + * Extra USB metrics data in /proc/xpp/XBUS-NN/usb_info . + +Wed, 11 Apr 2007 Tzafrir Cohen - xpp.r3768 + * Removed "go away" notice and solved sync of a restarted device. + * Resetting firmware: rmmod xpp_usb; /etc/hotplug/usb/xpp_fxloader reset + * Perl modules use strict. + * genzaptelconf -F will not generate zapata configuration for NT spans. + * genzaptelconf uses perl utilities to start. + * Initial support for 2nd XHFC (BRI) chip. + +Sun, 1 Apr 2007 Tzafrir Cohen - xpp.r3712 + * New protocol version (2.5). + * Luckily firmware unloading now works. + * Solves "multiple ticks" bug. No need for pcm_tasklets workaround. + * genzaptelconf -z will generate zapscan.conf for the asterisk-gui. + * Fixed hardware detection for the BRI. + +Wed, 14 Mar 2007 Tzafrir Cohen - xpp.r3608 + * Initial verssion of firmware unloading. + * PCM bugfixes. + * Defaults of kernel parameters are now part of parameter description. + * Removed zaptel sync code for now. + * genzaptelconf will detect vzaphfc. + * genzaptelconf defaults to ptmp for BRI. + * Documentation updates. + +Mon, 26 Feb 2007 Tzafrir Cohen - xpp.r3517 + * genzaptelconf now uses ls for FXS lines by default . + * World-readable kernel parameters. + +Thu, 22 Feb 2007 Tzafrir Cohen - xpp.r3440 + * /proc/xpp/sync: 'm 0' is, while depracated, can still be used. + * New firmware with PCM improvements. + * Improvements to the xpp helper scripts. + * Bug fixes. + * zaptel/perl is now installed by xpp/utils/Makefile. + +Wed, 14 Feb 2007 Tzafrir Cohen - xpp.r3365 + * Kewlstart support on the FXS ports (already existed on the FXO ports). + * The format of /proc/xpp/sync has changed (still self-documented). + * Better notification of FXS lines that were off-hook on registration time. + * Parallel polling of Astribanks (faster startup when there are multiple + devices) + * zconf: scripts and perl modules to automate the work with Zaptel and the + Astribank. Current scripts: zt_registration, xpp_sync. diff --git a/xpp/README.Astribank b/xpp/README.Astribank index 17d4fba..af1c690 100644 --- a/xpp/README.Astribank +++ b/xpp/README.Astribank @@ -139,7 +139,7 @@ completed the Vendor ID is e4e4 and the Product ID is 1131. You can use the following command in order to load the "USB" firmware manually: - fxload -t fx2 -D /proc/bus/usb/MMM/NNN -I /usr/share/zaptel/USB_1130.hex + fxload -t fx2 -D /proc/bus/usb/MMM/NNN -I /usr/share/zaptel/USB_FW.hex where, @@ -163,9 +163,9 @@ which is built in the directory xpp/utils and then copied to folder /usr/sbin during Zaptel installation. The command syntax is similar to the syntax of fxload. You can use the -following command in order to load the "USB" firmware manually: +following command in order to load the FPGA firmware manually: - fpga_load -D /proc/bus/usb/MMM/NNN -I /usr/share/zaptel/FPGA_FXS.hex + fpga_load -D /proc/bus/usb/MMM/NNN -I /usr/share/zaptel/FPGA_1151.hex Please note, that NNN value differs from that that was used for the fxload command due to the fact that device has "reconnected" itself @@ -226,12 +226,10 @@ second time for FPGA firmware loading. Firmware Resetting ~~~~~~~~~~~~~~~~~~ Newer versions of the USB firmware can now be reset using 'fpga_load -r'. -This will only work when the device is not used by the driver, so you may -need to run 'rmmod xpp_usb' before. Also you can try the following: - rmmod xpp_usb; /usr/share/zaptel/xpp_fxloader reset + /usr/share/zaptel/xpp_fxloader reset # if asterisk was running: you may need to stop/restart it now. # if there are some "disconnected" spans in /proc/xpp/xbuses # wait a while, until you see the 1152 IDs again, and then: diff --git a/xpp/card_fxo.c b/xpp/card_fxo.c index ec44756..404407f 100644 --- a/xpp/card_fxo.c +++ b/xpp/card_fxo.c @@ -592,6 +592,8 @@ static int FXO_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long a unsigned char echotune_data[ARRAY_SIZE(echotune_regs)]; BUG_ON(!xpd); + if(!xpd->xbus->hardware_exists) + return -ENODEV; switch (cmd) { case WCTDM_SET_ECHOTUNE: XPD_DBG(GENERAL, xpd, "-- Setting echo registers: \n"); diff --git a/xpp/card_fxs.c b/xpp/card_fxs.c index 859cc6c..e7a4474 100644 --- a/xpp/card_fxs.c +++ b/xpp/card_fxs.c @@ -613,7 +613,8 @@ static int FXS_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long a BUG_ON(!priv); xbus = xpd->xbus; BUG_ON(!xbus); - + if(!xbus->hardware_exists) + return -ENODEV; if (pos < 0 || pos >= xpd->channels) { XPD_NOTICE(xpd, "Bad channel number %d in %s(), cmd=%u\n", pos, __FUNCTION__, cmd); diff --git a/xpp/card_pri.c b/xpp/card_pri.c index b290a93..1535cc2 100644 --- a/xpp/card_pri.c +++ b/xpp/card_pri.c @@ -528,7 +528,8 @@ static int PRI_card_init(xbus_t *xbus, xpd_t *xpd) } /* FIXME: now we need to fix channel number (E1/T1/J1) */ -#if 0 +#if 1 +#else /* * FPGA firmware limitation: * Force HOST sync *before* sending PCM diff --git a/xpp/firmwares/USB_1130.hex b/xpp/firmwares/USB_1130.hex deleted file mode 100644 index 9d14773..0000000 --- a/xpp/firmwares/USB_1130.hex +++ /dev/null @@ -1,311 +0,0 @@ -# -# $Id: USB_1130.hex 4314 2007-07-05 15:36:51Z zohar $ -# -:03004300020900AF -:030053000209009F -:10090000020DD200020E1800020E0200020DEA00D3 -:10091000020C04000208BE000200320002004A007D -:10092000020052000208FB000208FC000208FD0061 -:100930000208FE000208FF00020E7D00020E7E008B -:10094000020E7F0002004A00020E8000020E8100AB -:10095000020E8200020E8300020E8400020E850049 -:10096000020E860002004A0002004A0002004A000D -:10097000020E8700020E8800020E8900020E8A0015 -:10098000020E8B00020E8C00020E8D00020E8E00F5 -:10099000020E8F00020E9000020E9100020E9200D5 -:1009A000020E9300020E9400020E9500020E9600B5 -:0809B000020B9000020E9700FB -:100800001201000200000040E4E431110000010286 -:1008100003010A06000200000040010009022E0048 -:1008200001010080320904000004FF0000000705F8 -:10083000020200020007050402000200070586020A -:100840000002000705880200020009022E000101D3 -:100850000080320904000004FF00000007050202C6 -:100860004000000705040240000007058602400022 -:10087000000705880240000004030904180358001B -:100880006F00720063006F006D0020004C00740068 -:1008900064002E0028035800500044002000280067 -:1008A00020004200610073006500640020006F00BA -:0E08B0006E002000580050005000290000008B -:100C3A001201000200000040E4E432110000010247 -:100C4A0000011201000200000040E4E4301100003B -:100C5A0001020001000102030405060708090A0B44 -:040C6A000C0D0E0F50 -:080E5C004100100041001100EB -:1009B80090E600E054E74410F000000090E604746C -:1009C80080F00000007406F0000000E4F000000071 -:1009D80090E6107420F000000090E611F00000008E -:1009E80090E61274A2F000000090E61374A0F000E4 -:1009F800000090E61474E2F000000090E61574E040 -:100A0800F000000090E6047480F00000007404F028 -:100A1800000000E4F000000090E6497482F0000055 -:100A280000F000000090E6187410F000000090E656 -:100A38001A7408F000000090E619E054FEF0000077 -:100A48000090E61BE054FEF000000090E6917480F0 -:100A5800F0000000F000000090E695F0000000F0C3 -:070A680000000043AF012272 -:1005960078007C007D017BFF7A0C795E7E007F10FF -:1005A6001204F0C205E5AA30E2030206F1E5AA301C -:1005B600E7030206F175310075320490F400E02479 -:1005C600FE700302067124FA700302068D24F87089 -:1005D600030206B624F070030206C0241F6003025D -:1005E60006CA90FC007401F090F401E090FC01F062 -:1005F60090F402E090FC02F0D2B690F401E0701A9A -:10060600A3E0701630B01374C0120D78C2B67F081E -:10061600120D7ED2B67F08120D7E30B04690E6945B -:10062600E0FE90E695E07C002400FFEC3ECF24FC43 -:10063600CF34FFFE7B017AF47904120AFB501C903A -:10064600FC0330B4117408F07FD07E07120D80745D -:1006560003120D78807A7404F0807590FC0374029E -:10066600F0806D90FC037401F0806590FC007402CC -:10067600F0E4A3F0A3F030B406A37410F080069063 -:10068600FC037420F0804975310075321190FC002E -:100696007408F07A007B007D017F50120DB67F5002 -:1006A600120BCC7AFC7B017D107F50120D9A8020B4 -:1006B600750A0C750B3AD2028028750A0C750B4C1C -:1006C600D202801E75310075320190FC0074AAF0CA -:1006D600E53190E69CF0000000E53290E69DF000E2 -:0B06E600000090E6957480F00000001A -:0106F10022E6 -:0C0D780090E601F07F147E007D007C00FE -:100D84008F368E358D348C33783374FF120578ECBE -:060D94004D4E4F70F322EA -:0A0AFB008E338F348B358A3689372D -:100B0500E4F538F539C3E5399534E538953350338F -:100B1500AB35AA36A937853982853883120516FF84 -:100B2500E4FEC2B2EF1392B7EFC313FFD2B20EBE0B -:100B350008F0C2B220B002C3220539E53970C605F6 -:040B45003880C2D35F -:010B49002289 -:02004100D322C8 -:02004E00D322BB -:02005000D322B9 -:080E650090E6BAE0F51DD3226E -:100E2E0090E740E51DF0E490E68AF090E68B04F042 -:020E3E00D322BD -:080E6D0090E6BAE0F51CD32267 -:100E400090E740E51CF0E490E68AF090E68B04F031 -:020E5000D322AB -:0207FA00D32208 -:0207FC00D32206 -:0207FE00D32204 -:100D2B0090E6B9E0242F600D04701990E604E0FF03 -:100D3B00430780800890E604E0FF53077F00000024 -:070D4B00EFF08002D322C388 -:010D5200227E -:100DD200C0E0C083C082D2015391EF90E65D7401FE -:080DE200F0D082D083D0E03292 -:100E0200C0E0C083C0825391EF90E65D7404F0D0DD -:060E120082D083D0E03223 -:100E1800C0E0C083C0825391EF90E65D7402F0D0C9 -:060E280082D083D0E0320D -:100C0400C0E0C083C08285100C85110D850D8285DE -:100C14000C83A37402F085080E85090F850F828565 -:100C24000E83A37407F05391EF90E65D7410F0D037 -:060C340082D083D0E03203 -:100DEA00C0E0C083C082D2045391EF90E65D7408DC -:080DFA00F0D082D083D0E0327A -:1008BE00C0E0C083C08290E680E030E72085080C5F -:1008CE0085090D850D82850C83A37402F085100EAB -:1008DE0085110F850F82850E83A37407F05391EF58 -:0D08EE0090E65D7420F0D082D083D0E0321F -:01003200329B -:01004A003283 -:01005200327B -:0108FB0032CA -:0108FC0032C9 -:0108FD0032C8 -:0108FE0032C7 -:0108FF0032C6 -:010E7D003242 -:010E7E003241 -:010E7F003240 -:010E8000323F -:010E8100323E -:010E8200323D -:010E8300323C -:010E8400323B -:010E8500323A -:010E86003239 -:010E87003238 -:010E88003237 -:010E89003236 -:010E8A003235 -:010E8B003234 -:010E8C003233 -:010E8D003232 -:010E8E003231 -:010E8F003230 -:010E9000322F -:010E9100322E -:010E9200322D -:010E9300322C -:010E9400322B -:010E9500322A -:010E96003229 -:100B9000C0E0C083C08290E6D1E0900010F090E603 -:100BA000D0E4F000000090E6D17402F000000053A1 -:100BB00091BF00000090E66104F000000090E6990B -:0C0BC00004F075BB06D082D083D0E03278 -:010E97003228 -:0A0E52000001020203030404050579 -:10028D00E4F52CF52BF52AF529C204C200C203C2F0 -:10029D0001C202D2B675B5C4D2B61209B8120E7526 -:1002AD007E087F008E0A8F0B751208751312750864 -:1002BD000875091C75100875114A7514087515789F -:1002CD00EE54C0700302039A752D00752E808E2F8B -:1002DD008F30C374BC9FFF74089ECF2402CF3400AF -:1002ED00FEE48F288E27F526F525F524F523F52236 -:1002FD00F521AF28AE27AD26AC25AB24AA23A92224 -:10030D00A821C31205655033E5302524F582E52F6C -:10031D003523F583E0FFE52E2524F582E52D3523E4 -:10032D00F583EFF0E5242401F524E43523F523E4EA -:10033D003522F522E43521F52180B7852D0A852E4C -:10034D000B74002480FF740834FFFEC3E5139FF582 -:10035D0013E5129EF512C3E50D9FF50DE50C9EF507 -:10036D000CC3E50F9FF50FE50E9EF50EC3E5099F36 -:10037D00F509E5089EF508C3E5119FF511E5109EF9 -:10038D00F510C3E5159FF515E5149EF514D2E84358 -:10039D00D82090E668E0440BF090E65CE0443DF038 -:1003AD00000000E4F5A2000000D2AFD20512000358 -:1003BD0090E680E054F7F0538EF8C20412059630A3 -:1003CD00021B90E680E054FDF0E054F7F0D20512E8 -:1003DD00000390E680E04402F0C204C20230010541 -:1003ED00120056C2013004D412004150CFC2041283 -:1003FD000D5320001690E682E030E704E020E1EF97 -:10040D0090E682E030E604E020E0E4120CD4120025 -:03041D004E80A965 -:0B00360090E50DE030E402C322D3226D -:1000560090E6B9E0700302011514700302019224C0 -:10006600FE700302021524FB700302010F147003D5 -:100076000201091470030200FD1470030201032437 -:10008600056003020279120050400302028590E6E1 -:10009600BBE024FE602714603824FD60111460273D -:1000A60024067050E50A90E6B3F0E50B803C12009A -:1000B60036503EE51290E6B3F0E513802DE50C9040 -:1000C600E6B3F0E50D8023E50E90E6B3F0E50F808C -:1000D6001990E6BAE0FF120D00AA06A9077B01EA0D -:1000E600494B600DEE90E6B3F0EF90E6B4F00202F5 -:1000F60085020274020274120E40020285120E6D0F -:10010600020285120E65020285120E2E0202851269 -:1001160007FA400302028590E6B8E0247F601514D2 -:10012600601924027063A200E43325E0FFA203E411 -:10013600334F8041E490E740F0803F90E6BCE054C6 -:100146007EFF7E00E0D394807C0040047D01800227 -:100156007D00EC4EFEED4F2452F582740E3EF58383 -:10016600E493FF3395E0FEEF24A1FFEE34E68F82A1 -:10017600F583E0540190E740F0E4A3F090E68AF0BE -:1001860090E68B7402F00202850202741207FC40AC -:100196000302028590E6B8E024FE6016240260039E -:1001A60002028590E6BAE0B40105C20002028502A9 -:1001B600027490E6BAE0705590E6BCE0547EFF7E8D -:1001C60000E0D394807C0040047D0180027D00EC39 -:1001D6004EFEED4F2452F582740E3EF583E493FFF6 -:1001E6003395E0FEEF24A1FFEE34E68F82F583E03F -:1001F60054FEF090E6BCE05480131313541FFFE046 -:10020600540F2F90E683F0E04420F08072805F1256 -:1002160007FE506B90E6B8E024FE60192402704E8B -:1002260090E6BAE0B40104D200805490E6BAE064E5 -:1002360002604C803990E6BCE0547EFF7E00E0D33D -:1002460094807C0040047D0180027D00EC4EFEED32 -:100256004F2452F582740E3EF583E493FF3395E006 -:10026600FEEF24A1FFEE34E68F82F583800D90E643 -:10027600A08008120D2B500790E6A0E04401F090F4 -:06028600E6A0E04480F058 -:01028C00224F -:0300330002004682 -:0400460053D8EF326A -:100CD40090E682E030E004E020E60B90E682E0302B -:100CE400E119E030E71590E680E04401F07F147EDE -:0C0CF40000120B4A90E680E054FEF02253 -:1000030030050990E680E0440AF0800790E680E03E -:100013004408F07FDC7E05120B4A90E65D74FFF026 -:0F00230090E65FF05391EF90E680E054F7F02203 -:080E7500E4F51BD2E9D2AF2223 -:100BCC00AD0790E678E020E6F9C2E990E678E044DB -:100BDC0080F0ED25E090E679F090E678E030E0F9F1 -:100BEC0090E678E04440F090E678E020E6F990E674 -:080BFC0078E030E1D6D2E922D5 -:100CA200AC0790E678E020E6F9E51B702390E67841 -:100CB200E04480F0EC25E090E679F08D16AF03A9D0 -:100CC200077517018A188919E4F51A751B01D322D1 -:020CD200C3223B -:100C6E00AC0790E678E020E6F9E51B702590E67873 -:100C7E00E04480F0EC25E0440190E679F08D16AF6B -:100C8E0003A9077517018A188919E4F51A751B034C -:040C9E00D322C32278 -:03004B000206F2B8 -:1006F200C0E0C083C082C085C084C086758600C049 -:10070200D075D000C000C001C002C003C006C0073F -:1007120090E678E030E206751B060207DC90E67888 -:10072200E020E10CE51B64026006751B070207DC92 -:10073200E51B24FE605F14603624FE70030207CDC1 -:1007420024FC70030207D9240860030207DCAB17FC -:10075200AA18A919AF1A051A8F82758300120516F5 -:1007620090E679F0E51A65167070751B05806B903E -:10077200E679E0AB17AA18A919AE1A8E8275830022 -:10078200120543751B02E5166401704E90E678E08F -:100792004420F08045E51624FEB51A0790E678E07D -:1007A2004420F0E51614B51A0A90E678E04440F0C9 -:1007B200751B0090E679E0AB17AA18A919AE1A8E3C -:1007C20082758300120543051A800F90E678E04493 -:1007D20040F0751B008003751B005391DFD007D0DA -:1007E20006D003D002D001D000D0D0D086D084D0A1 -:0807F20085D082D083D0E032F3 -:020D0000A90741 -:100D0200AE14AF158F828E83A3E064037017AD011A -:100D120019ED7001228F828E83E07C002FFDEC3E64 -:080D2200FEAF0580DFE4FEFFD7 -:010D2A0022A6 -:100D9A00120C6EE51B24FA600E146006240770F329 -:0C0DAA00D322E4F51BD322E4F51BD32276 -:100DB600120CA2E51B24FA600E146006240770F3D9 -:0C0DC600D322E4F51BD322E4F51BD3225A -:100D530090E682E044C0F090E681F0438701000012 -:040D6300000000226A -:100B4A008E318F3290E600E054187012E53224019B -:100B5A00FFE43531C313F531EF13F532801590E612 -:100B6A0000E05418FFBF100BE53225E0F532E531FD -:100B7A0033F531E5321532AE31700215314E60056A -:060B8A00120D6780EE224F -:100D67007400F58690FDA57C05A3E582458370F99F -:010D77002259 -:03000000020A6F82 -:0C0A6F00787FE4F6D8FD758139020AB6E4 -:10042000E709F608DFFA8046E709F208DFFA803EBE -:1004300088828C83E709F0A3DFFA8032E309F608AB -:10044000DFFA8078E309F208DFFA807088828C8313 -:10045000E309F0A3DFFA806489828A83E0A3F608C7 -:10046000DFFA805889828A83E0A3F208DFFA804CA1 -:1004700080D280FA80C680D4806980F28033801078 -:1004800080A680EA809A80A880DA80E280CA8033E1 -:1004900089828A83ECFAE493A3C8C582C8CCC58359 -:1004A000CCF0A3C8C582C8CCC583CCDFE9DEE78029 -:1004B0000D89828A83E493A3F608DFF9ECFAA9F0A8 -:1004C000EDFB2289828A83ECFAE0A3C8C582C8CCFE -:1004D000C583CCF0A3C8C582C8CCC583CCDFEADE17 -:1004E000E880DB89828A83E493A3F208DFF980CC79 -:1004F00088F0EF60010E4E60C388F0ED2402B40472 -:100500000050B9F582EB2402B4040050AF23234518 -:06051000822390047073C9 -:10051600BB010CE58229F582E5833AF583E022509A -:1005260006E92582F8E622BBFE06E92582F8E222E4 -:0D053600E58229F582E5833AF583E49322FE -:10054300F8BB010DE58229F582E5833AF583E8F0EE -:10055300225006E92582C8F622BBFE05E92582C89A -:02056300F22282 -:10056500EB9FF5F0EA9E42F0E99D42F0E89C45F0EC -:010575002263 -:100576007401FF3395E0FEFDFC080808E6CF2FF670 -:1005860018E6CE3EF618E6CD3DF618E6CC3CF62249 -:100A7B0002028DE493A3F8E493A34003F68001F202 -:100A8B0008DFF48029E493A3F85407240CC8C3337C -:100A9B00C4540F4420C8834004F456800146F6DF4B -:100AAB00E4800B0102040810204080900E5CE47E71 -:100ABB00019360BCA3FF543F30E509541FFEE49340 -:100ACB00A360010ECF54C025E060A840B8E493A307 -:100ADB00FAE493A3F8E493A3C8C582C8CAC583CA32 -:100AEB00F0A3C8C582C8CAC583CADFE9DEE780BEEA -:010E6400008D -:00000001FF - \ No newline at end of file diff --git a/xpp/firmwares/USB_1140.hex b/xpp/firmwares/USB_1140.hex deleted file mode 100644 index fc62178..0000000 --- a/xpp/firmwares/USB_1140.hex +++ /dev/null @@ -1,311 +0,0 @@ -# -# $Id: USB_1140.hex 4314 2007-07-05 15:36:51Z zohar $ -# -:03004300020900AF -:030053000209009F -:10090000020DD200020E1800020E0200020DEA00D3 -:10091000020C04000208BE000200320002004A007D -:10092000020052000208FB000208FC000208FD0061 -:100930000208FE000208FF00020E7D00020E7E008B -:10094000020E7F0002004A00020E8000020E8100AB -:10095000020E8200020E8300020E8400020E850049 -:10096000020E860002004A0002004A0002004A000D -:10097000020E8700020E8800020E8900020E8A0015 -:10098000020E8B00020E8C00020E8D00020E8E00F5 -:10099000020E8F00020E9000020E9100020E9200D5 -:1009A000020E9300020E9400020E9500020E9600B5 -:0809B000020B9000020E9700FB -:100800001201000200000040E4E441110000010276 -:1008100003010A06000200000040010009022E0048 -:1008200001010080320904000004FF0000000705F8 -:10083000020200020007050402000200070586020A -:100840000002000705880200020009022E000101D3 -:100850000080320904000004FF00000007050202C6 -:100860004000000705040240000007058602400022 -:10087000000705880240000004030904180358001B -:100880006F00720063006F006D0020004C00740068 -:1008900064002E0028035800500044002000280067 -:1008A00020004200610073006500640020006F00BA -:0E08B0006E002000580050005000290000008B -:100C3A001201000200000040E4E442110000010237 -:100C4A0000011201000200000040E4E4401100002B -:100C5A0001020001000102030405060708090A0B44 -:040C6A000C0D0E0F50 -:080E5C004100100041001100EB -:1009B80090E600E054E74410F000000090E604746C -:1009C80080F00000007406F0000000E4F000000071 -:1009D80090E6107420F000000090E611F00000008E -:1009E80090E61274A2F000000090E61374A0F000E4 -:1009F800000090E61474E2F000000090E61574E040 -:100A0800F000000090E6047480F00000007404F028 -:100A1800000000E4F000000090E6497482F0000055 -:100A280000F000000090E6187410F000000090E656 -:100A38001A7408F000000090E619E054FEF0000077 -:100A48000090E61BE054FEF000000090E6917480F0 -:100A5800F0000000F000000090E695F0000000F0C3 -:070A680000000043AF012272 -:1005960078007C007D017BFF7A0C795E7E007F10FF -:1005A6001204F0C205E5AA30E2030206F1E5AA301C -:1005B600E7030206F175310075320490F400E02479 -:1005C600FE700302067124FA700302068D24F87089 -:1005D600030206B624F070030206C0241F6003025D -:1005E60006CA90FC007401F090F401E090FC01F062 -:1005F60090F402E090FC02F0D2B690F401E0701A9A -:10060600A3E0701630B01374C0120D78C2B67F081E -:10061600120D7ED2B67F08120D7E30B04690E6945B -:10062600E0FE90E695E07C002400FFEC3ECF24FC43 -:10063600CF34FFFE7B017AF47904120AFB501C903A -:10064600FC0330B4117408F07FD07E07120D80745D -:1006560003120D78807A7404F0807590FC0374029E -:10066600F0806D90FC037401F0806590FC007402CC -:10067600F0E4A3F0A3F030B406A37410F080069063 -:10068600FC037420F0804975310075321190FC002E -:100696007408F07A007B007D017F50120DB67F5002 -:1006A600120BCC7AFC7B017D107F50120D9A8020B4 -:1006B600750A0C750B3AD2028028750A0C750B4C1C -:1006C600D202801E75310075320190FC0074AAF0CA -:1006D600E53190E69CF0000000E53290E69DF000E2 -:0B06E600000090E6957480F00000001A -:0106F10022E6 -:0C0D780090E601F07F147E007D007C00FE -:100D84008F368E358D348C33783374FF120578ECBE -:060D94004D4E4F70F322EA -:0A0AFB008E338F348B358A3689372D -:100B0500E4F538F539C3E5399534E538953350338F -:100B1500AB35AA36A937853982853883120516FF84 -:100B2500E4FEC2B2EF1392B7EFC313FFD2B20EBE0B -:100B350008F0C2B220B002C3220539E53970C605F6 -:040B45003880C2D35F -:010B49002289 -:02004100D322C8 -:02004E00D322BB -:02005000D322B9 -:080E650090E6BAE0F51DD3226E -:100E2E0090E740E51DF0E490E68AF090E68B04F042 -:020E3E00D322BD -:080E6D0090E6BAE0F51CD32267 -:100E400090E740E51CF0E490E68AF090E68B04F031 -:020E5000D322AB -:0207FA00D32208 -:0207FC00D32206 -:0207FE00D32204 -:100D2B0090E6B9E0242F600D04701990E604E0FF03 -:100D3B00430780800890E604E0FF53077F00000024 -:070D4B00EFF08002D322C388 -:010D5200227E -:100DD200C0E0C083C082D2015391EF90E65D7401FE -:080DE200F0D082D083D0E03292 -:100E0200C0E0C083C0825391EF90E65D7404F0D0DD -:060E120082D083D0E03223 -:100E1800C0E0C083C0825391EF90E65D7402F0D0C9 -:060E280082D083D0E0320D -:100C0400C0E0C083C08285100C85110D850D8285DE -:100C14000C83A37402F085080E85090F850F828565 -:100C24000E83A37407F05391EF90E65D7410F0D037 -:060C340082D083D0E03203 -:100DEA00C0E0C083C082D2045391EF90E65D7408DC -:080DFA00F0D082D083D0E0327A -:1008BE00C0E0C083C08290E680E030E72085080C5F -:1008CE0085090D850D82850C83A37402F085100EAB -:1008DE0085110F850F82850E83A37407F05391EF58 -:0D08EE0090E65D7420F0D082D083D0E0321F -:01003200329B -:01004A003283 -:01005200327B -:0108FB0032CA -:0108FC0032C9 -:0108FD0032C8 -:0108FE0032C7 -:0108FF0032C6 -:010E7D003242 -:010E7E003241 -:010E7F003240 -:010E8000323F -:010E8100323E -:010E8200323D -:010E8300323C -:010E8400323B -:010E8500323A -:010E86003239 -:010E87003238 -:010E88003237 -:010E89003236 -:010E8A003235 -:010E8B003234 -:010E8C003233 -:010E8D003232 -:010E8E003231 -:010E8F003230 -:010E9000322F -:010E9100322E -:010E9200322D -:010E9300322C -:010E9400322B -:010E9500322A -:010E96003229 -:100B9000C0E0C083C08290E6D1E0900010F090E603 -:100BA000D0E4F000000090E6D17402F000000053A1 -:100BB00091BF00000090E66104F000000090E6990B -:0C0BC00004F075BB06D082D083D0E03278 -:010E97003228 -:0A0E52000001020203030404050579 -:10028D00E4F52CF52BF52AF529C204C200C203C2F0 -:10029D0001C202D2B675B5C4D2B61209B8120E7526 -:1002AD007E087F008E0A8F0B751208751312750864 -:1002BD000875091C75100875114A7514087515789F -:1002CD00EE54C0700302039A752D00752E808E2F8B -:1002DD008F30C374BC9FFF74089ECF2402CF3400AF -:1002ED00FEE48F288E27F526F525F524F523F52236 -:1002FD00F521AF28AE27AD26AC25AB24AA23A92224 -:10030D00A821C31205655033E5302524F582E52F6C -:10031D003523F583E0FFE52E2524F582E52D3523E4 -:10032D00F583EFF0E5242401F524E43523F523E4EA -:10033D003522F522E43521F52180B7852D0A852E4C -:10034D000B74002480FF740834FFFEC3E5139FF582 -:10035D0013E5129EF512C3E50D9FF50DE50C9EF507 -:10036D000CC3E50F9FF50FE50E9EF50EC3E5099F36 -:10037D00F509E5089EF508C3E5119FF511E5109EF9 -:10038D00F510C3E5159FF515E5149EF514D2E84358 -:10039D00D82090E668E0440BF090E65CE0443DF038 -:1003AD00000000E4F5A2000000D2AFD20512000358 -:1003BD0090E680E054F7F0538EF8C20412059630A3 -:1003CD00021B90E680E054FDF0E054F7F0D20512E8 -:1003DD00000390E680E04402F0C204C20230010541 -:1003ED00120056C2013004D412004150CFC2041283 -:1003FD000D5320001690E682E030E704E020E1EF97 -:10040D0090E682E030E604E020E0E4120CD4120025 -:03041D004E80A965 -:0B00360090E50DE030E402C322D3226D -:1000560090E6B9E0700302011514700302019224C0 -:10006600FE700302021524FB700302010F147003D5 -:100076000201091470030200FD1470030201032437 -:10008600056003020279120050400302028590E6E1 -:10009600BBE024FE602714603824FD60111460273D -:1000A60024067050E50A90E6B3F0E50B803C12009A -:1000B60036503EE51290E6B3F0E513802DE50C9040 -:1000C600E6B3F0E50D8023E50E90E6B3F0E50F808C -:1000D6001990E6BAE0FF120D00AA06A9077B01EA0D -:1000E600494B600DEE90E6B3F0EF90E6B4F00202F5 -:1000F60085020274020274120E40020285120E6D0F -:10010600020285120E65020285120E2E0202851269 -:1001160007FA400302028590E6B8E0247F601514D2 -:10012600601924027063A200E43325E0FFA203E411 -:10013600334F8041E490E740F0803F90E6BCE054C6 -:100146007EFF7E00E0D394807C0040047D01800227 -:100156007D00EC4EFEED4F2452F582740E3EF58383 -:10016600E493FF3395E0FEEF24A1FFEE34E68F82A1 -:10017600F583E0540190E740F0E4A3F090E68AF0BE -:1001860090E68B7402F00202850202741207FC40AC -:100196000302028590E6B8E024FE6016240260039E -:1001A60002028590E6BAE0B40105C20002028502A9 -:1001B600027490E6BAE0705590E6BCE0547EFF7E8D -:1001C60000E0D394807C0040047D0180027D00EC39 -:1001D6004EFEED4F2452F582740E3EF583E493FFF6 -:1001E6003395E0FEEF24A1FFEE34E68F82F583E03F -:1001F60054FEF090E6BCE05480131313541FFFE046 -:10020600540F2F90E683F0E04420F08072805F1256 -:1002160007FE506B90E6B8E024FE60192402704E8B -:1002260090E6BAE0B40104D200805490E6BAE064E5 -:1002360002604C803990E6BCE0547EFF7E00E0D33D -:1002460094807C0040047D0180027D00EC4EFEED32 -:100256004F2452F582740E3EF583E493FF3395E006 -:10026600FEEF24A1FFEE34E68F82F583800D90E643 -:10027600A08008120D2B500790E6A0E04401F090F4 -:06028600E6A0E04480F058 -:01028C00224F -:0300330002004682 -:0400460053D8EF326A -:100CD40090E682E030E004E020E60B90E682E0302B -:100CE400E119E030E71590E680E04401F07F147EDE -:0C0CF40000120B4A90E680E054FEF02253 -:1000030030050990E680E0440AF0800790E680E03E -:100013004408F07FDC7E05120B4A90E65D74FFF026 -:0F00230090E65FF05391EF90E680E054F7F02203 -:080E7500E4F51BD2E9D2AF2223 -:100BCC00AD0790E678E020E6F9C2E990E678E044DB -:100BDC0080F0ED25E090E679F090E678E030E0F9F1 -:100BEC0090E678E04440F090E678E020E6F990E674 -:080BFC0078E030E1D6D2E922D5 -:100CA200AC0790E678E020E6F9E51B702390E67841 -:100CB200E04480F0EC25E090E679F08D16AF03A9D0 -:100CC200077517018A188919E4F51A751B01D322D1 -:020CD200C3223B -:100C6E00AC0790E678E020E6F9E51B702590E67873 -:100C7E00E04480F0EC25E0440190E679F08D16AF6B -:100C8E0003A9077517018A188919E4F51A751B034C -:040C9E00D322C32278 -:03004B000206F2B8 -:1006F200C0E0C083C082C085C084C086758600C049 -:10070200D075D000C000C001C002C003C006C0073F -:1007120090E678E030E206751B060207DC90E67888 -:10072200E020E10CE51B64026006751B070207DC92 -:10073200E51B24FE605F14603624FE70030207CDC1 -:1007420024FC70030207D9240860030207DCAB17FC -:10075200AA18A919AF1A051A8F82758300120516F5 -:1007620090E679F0E51A65167070751B05806B903E -:10077200E679E0AB17AA18A919AE1A8E8275830022 -:10078200120543751B02E5166401704E90E678E08F -:100792004420F08045E51624FEB51A0790E678E07D -:1007A2004420F0E51614B51A0A90E678E04440F0C9 -:1007B200751B0090E679E0AB17AA18A919AE1A8E3C -:1007C20082758300120543051A800F90E678E04493 -:1007D20040F0751B008003751B005391DFD007D0DA -:1007E20006D003D002D001D000D0D0D086D084D0A1 -:0807F20085D082D083D0E032F3 -:020D0000A90741 -:100D0200AE14AF158F828E83A3E064037017AD011A -:100D120019ED7001228F828E83E07C002FFDEC3E64 -:080D2200FEAF0580DFE4FEFFD7 -:010D2A0022A6 -:100D9A00120C6EE51B24FA600E146006240770F329 -:0C0DAA00D322E4F51BD322E4F51BD32276 -:100DB600120CA2E51B24FA600E146006240770F3D9 -:0C0DC600D322E4F51BD322E4F51BD3225A -:100D530090E682E044C0F090E681F0438701000012 -:040D6300000000226A -:100B4A008E318F3290E600E054187012E53224019B -:100B5A00FFE43531C313F531EF13F532801590E612 -:100B6A0000E05418FFBF100BE53225E0F532E531FD -:100B7A0033F531E5321532AE31700215314E60056A -:060B8A00120D6780EE224F -:100D67007400F58690FDA57C05A3E582458370F99F -:010D77002259 -:03000000020A6F82 -:0C0A6F00787FE4F6D8FD758139020AB6E4 -:10042000E709F608DFFA8046E709F208DFFA803EBE -:1004300088828C83E709F0A3DFFA8032E309F608AB -:10044000DFFA8078E309F208DFFA807088828C8313 -:10045000E309F0A3DFFA806489828A83E0A3F608C7 -:10046000DFFA805889828A83E0A3F208DFFA804CA1 -:1004700080D280FA80C680D4806980F28033801078 -:1004800080A680EA809A80A880DA80E280CA8033E1 -:1004900089828A83ECFAE493A3C8C582C8CCC58359 -:1004A000CCF0A3C8C582C8CCC583CCDFE9DEE78029 -:1004B0000D89828A83E493A3F608DFF9ECFAA9F0A8 -:1004C000EDFB2289828A83ECFAE0A3C8C582C8CCFE -:1004D000C583CCF0A3C8C582C8CCC583CCDFEADE17 -:1004E000E880DB89828A83E493A3F208DFF980CC79 -:1004F00088F0EF60010E4E60C388F0ED2402B40472 -:100500000050B9F582EB2402B4040050AF23234518 -:06051000822390047073C9 -:10051600BB010CE58229F582E5833AF583E022509A -:1005260006E92582F8E622BBFE06E92582F8E222E4 -:0D053600E58229F582E5833AF583E49322FE -:10054300F8BB010DE58229F582E5833AF583E8F0EE -:10055300225006E92582C8F622BBFE05E92582C89A -:02056300F22282 -:10056500EB9FF5F0EA9E42F0E99D42F0E89C45F0EC -:010575002263 -:100576007401FF3395E0FEFDFC080808E6CF2FF670 -:1005860018E6CE3EF618E6CD3DF618E6CC3CF62249 -:100A7B0002028DE493A3F8E493A34003F68001F202 -:100A8B0008DFF48029E493A3F85407240CC8C3337C -:100A9B00C4540F4420C8834004F456800146F6DF4B -:100AAB00E4800B0102040810204080900E5CE47E71 -:100ABB00019360BCA3FF543F30E509541FFEE49340 -:100ACB00A360010ECF54C025E060A840B8E493A307 -:100ADB00FAE493A3F8E493A3C8C582C8CAC583CA32 -:100AEB00F0A3C8C582C8CAC583CADFE9DEE780BEEA -:010E6400008D -:00000001FF - \ No newline at end of file diff --git a/xpp/firmwares/USB_1150.hex b/xpp/firmwares/USB_1150.hex deleted file mode 100644 index 00d39cb..0000000 --- a/xpp/firmwares/USB_1150.hex +++ /dev/null @@ -1,311 +0,0 @@ -# -# $Id: USB_1150.hex 4314 2007-07-05 15:36:51Z zohar $ -# -:03004300020900AF -:030053000209009F -:10090000020DD200020E1800020E0200020DEA00D3 -:10091000020C04000208BE000200320002004A007D -:10092000020052000208FB000208FC000208FD0061 -:100930000208FE000208FF00020E7D00020E7E008B -:10094000020E7F0002004A00020E8000020E8100AB -:10095000020E8200020E8300020E8400020E850049 -:10096000020E860002004A0002004A0002004A000D -:10097000020E8700020E8800020E8900020E8A0015 -:10098000020E8B00020E8C00020E8D00020E8E00F5 -:10099000020E8F00020E9000020E9100020E9200D5 -:1009A000020E9300020E9400020E9500020E9600B5 -:0809B000020B9000020E9700FB -:100800001201000200000040E4E451110000010266 -:1008100003010A06000200000040010009022E0048 -:1008200001010080320904000004FF0000000705F8 -:10083000020200020007050402000200070586020A -:100840000002000705880200020009022E000101D3 -:100850000080320904000004FF00000007050202C6 -:100860004000000705040240000007058602400022 -:10087000000705880240000004030904180358001B -:100880006F00720063006F006D0020004C00740068 -:1008900064002E0028035800500044002000280067 -:1008A00020004200610073006500640020006F00BA -:0E08B0006E002000580050005000290000008B -:100C3A001201000200000040E4E452110000010227 -:100C4A0000011201000200000040E4E4501100001B -:100C5A0001020001000102030405060708090A0B44 -:040C6A000C0D0E0F50 -:080E5C004100100041001100EB -:1009B80090E600E054E74410F000000090E604746C -:1009C80080F00000007406F0000000E4F000000071 -:1009D80090E6107420F000000090E611F00000008E -:1009E80090E61274A2F000000090E61374A0F000E4 -:1009F800000090E61474E2F000000090E61574E040 -:100A0800F000000090E6047480F00000007404F028 -:100A1800000000E4F000000090E6497482F0000055 -:100A280000F000000090E6187410F000000090E656 -:100A38001A7408F000000090E619E054FEF0000077 -:100A48000090E61BE054FEF000000090E6917480F0 -:100A5800F0000000F000000090E695F0000000F0C3 -:070A680000000043AF012272 -:1005960078007C007D017BFF7A0C795E7E007F10FF -:1005A6001204F0C205E5AA30E2030206F1E5AA301C -:1005B600E7030206F175310075320490F400E02479 -:1005C600FE700302067124FA700302068D24F87089 -:1005D600030206B624F070030206C0241F6003025D -:1005E60006CA90FC007401F090F401E090FC01F062 -:1005F60090F402E090FC02F0D2B690F401E0701A9A -:10060600A3E0701630B01374C0120D78C2B67F081E -:10061600120D7ED2B67F08120D7E30B04690E6945B -:10062600E0FE90E695E07C002400FFEC3ECF24FC43 -:10063600CF34FFFE7B017AF47904120AFB501C903A -:10064600FC0330B4117408F07FD07E07120D80745D -:1006560003120D78807A7404F0807590FC0374029E -:10066600F0806D90FC037401F0806590FC007402CC -:10067600F0E4A3F0A3F030B406A37410F080069063 -:10068600FC037420F0804975310075321190FC002E -:100696007408F07A007B007D017F50120DB67F5002 -:1006A600120BCC7AFC7B017D107F50120D9A8020B4 -:1006B600750A0C750B3AD2028028750A0C750B4C1C -:1006C600D202801E75310075320190FC0074AAF0CA -:1006D600E53190E69CF0000000E53290E69DF000E2 -:0B06E600000090E6957480F00000001A -:0106F10022E6 -:0C0D780090E601F07F147E007D007C00FE -:100D84008F368E358D348C33783374FF120578ECBE -:060D94004D4E4F70F322EA -:0A0AFB008E338F348B358A3689372D -:100B0500E4F538F539C3E5399534E538953350338F -:100B1500AB35AA36A937853982853883120516FF84 -:100B2500E4FEC2B2EF1392B7EFC313FFD2B20EBE0B -:100B350008F0C2B220B002C3220539E53970C605F6 -:040B45003880C2D35F -:010B49002289 -:02004100D322C8 -:02004E00D322BB -:02005000D322B9 -:080E650090E6BAE0F51DD3226E -:100E2E0090E740E51DF0E490E68AF090E68B04F042 -:020E3E00D322BD -:080E6D0090E6BAE0F51CD32267 -:100E400090E740E51CF0E490E68AF090E68B04F031 -:020E5000D322AB -:0207FA00D32208 -:0207FC00D32206 -:0207FE00D32204 -:100D2B0090E6B9E0242F600D04701990E604E0FF03 -:100D3B00430780800890E604E0FF53077F00000024 -:070D4B00EFF08002D322C388 -:010D5200227E -:100DD200C0E0C083C082D2015391EF90E65D7401FE -:080DE200F0D082D083D0E03292 -:100E0200C0E0C083C0825391EF90E65D7404F0D0DD -:060E120082D083D0E03223 -:100E1800C0E0C083C0825391EF90E65D7402F0D0C9 -:060E280082D083D0E0320D -:100C0400C0E0C083C08285100C85110D850D8285DE -:100C14000C83A37402F085080E85090F850F828565 -:100C24000E83A37407F05391EF90E65D7410F0D037 -:060C340082D083D0E03203 -:100DEA00C0E0C083C082D2045391EF90E65D7408DC -:080DFA00F0D082D083D0E0327A -:1008BE00C0E0C083C08290E680E030E72085080C5F -:1008CE0085090D850D82850C83A37402F085100EAB -:1008DE0085110F850F82850E83A37407F05391EF58 -:0D08EE0090E65D7420F0D082D083D0E0321F -:01003200329B -:01004A003283 -:01005200327B -:0108FB0032CA -:0108FC0032C9 -:0108FD0032C8 -:0108FE0032C7 -:0108FF0032C6 -:010E7D003242 -:010E7E003241 -:010E7F003240 -:010E8000323F -:010E8100323E -:010E8200323D -:010E8300323C -:010E8400323B -:010E8500323A -:010E86003239 -:010E87003238 -:010E88003237 -:010E89003236 -:010E8A003235 -:010E8B003234 -:010E8C003233 -:010E8D003232 -:010E8E003231 -:010E8F003230 -:010E9000322F -:010E9100322E -:010E9200322D -:010E9300322C -:010E9400322B -:010E9500322A -:010E96003229 -:100B9000C0E0C083C08290E6D1E0900010F090E603 -:100BA000D0E4F000000090E6D17402F000000053A1 -:100BB00091BF00000090E66104F000000090E6990B -:0C0BC00004F075BB06D082D083D0E03278 -:010E97003228 -:0A0E52000001020203030404050579 -:10028D00E4F52CF52BF52AF529C204C200C203C2F0 -:10029D0001C202D2B675B5C4D2B61209B8120E7526 -:1002AD007E087F008E0A8F0B751208751312750864 -:1002BD000875091C75100875114A7514087515789F -:1002CD00EE54C0700302039A752D00752E808E2F8B -:1002DD008F30C374BC9FFF74089ECF2402CF3400AF -:1002ED00FEE48F288E27F526F525F524F523F52236 -:1002FD00F521AF28AE27AD26AC25AB24AA23A92224 -:10030D00A821C31205655033E5302524F582E52F6C -:10031D003523F583E0FFE52E2524F582E52D3523E4 -:10032D00F583EFF0E5242401F524E43523F523E4EA -:10033D003522F522E43521F52180B7852D0A852E4C -:10034D000B74002480FF740834FFFEC3E5139FF582 -:10035D0013E5129EF512C3E50D9FF50DE50C9EF507 -:10036D000CC3E50F9FF50FE50E9EF50EC3E5099F36 -:10037D00F509E5089EF508C3E5119FF511E5109EF9 -:10038D00F510C3E5159FF515E5149EF514D2E84358 -:10039D00D82090E668E0440BF090E65CE0443DF038 -:1003AD00000000E4F5A2000000D2AFD20512000358 -:1003BD0090E680E054F7F0538EF8C20412059630A3 -:1003CD00021B90E680E054FDF0E054F7F0D20512E8 -:1003DD00000390E680E04402F0C204C20230010541 -:1003ED00120056C2013004D412004150CFC2041283 -:1003FD000D5320001690E682E030E704E020E1EF97 -:10040D0090E682E030E604E020E0E4120CD4120025 -:03041D004E80A965 -:0B00360090E50DE030E402C322D3226D -:1000560090E6B9E0700302011514700302019224C0 -:10006600FE700302021524FB700302010F147003D5 -:100076000201091470030200FD1470030201032437 -:10008600056003020279120050400302028590E6E1 -:10009600BBE024FE602714603824FD60111460273D -:1000A60024067050E50A90E6B3F0E50B803C12009A -:1000B60036503EE51290E6B3F0E513802DE50C9040 -:1000C600E6B3F0E50D8023E50E90E6B3F0E50F808C -:1000D6001990E6BAE0FF120D00AA06A9077B01EA0D -:1000E600494B600DEE90E6B3F0EF90E6B4F00202F5 -:1000F60085020274020274120E40020285120E6D0F -:10010600020285120E65020285120E2E0202851269 -:1001160007FA400302028590E6B8E0247F601514D2 -:10012600601924027063A200E43325E0FFA203E411 -:10013600334F8041E490E740F0803F90E6BCE054C6 -:100146007EFF7E00E0D394807C0040047D01800227 -:100156007D00EC4EFEED4F2452F582740E3EF58383 -:10016600E493FF3395E0FEEF24A1FFEE34E68F82A1 -:10017600F583E0540190E740F0E4A3F090E68AF0BE -:1001860090E68B7402F00202850202741207FC40AC -:100196000302028590E6B8E024FE6016240260039E -:1001A60002028590E6BAE0B40105C20002028502A9 -:1001B600027490E6BAE0705590E6BCE0547EFF7E8D -:1001C60000E0D394807C0040047D0180027D00EC39 -:1001D6004EFEED4F2452F582740E3EF583E493FFF6 -:1001E6003395E0FEEF24A1FFEE34E68F82F583E03F -:1001F60054FEF090E6BCE05480131313541FFFE046 -:10020600540F2F90E683F0E04420F08072805F1256 -:1002160007FE506B90E6B8E024FE60192402704E8B -:1002260090E6BAE0B40104D200805490E6BAE064E5 -:1002360002604C803990E6BCE0547EFF7E00E0D33D -:1002460094807C0040047D0180027D00EC4EFEED32 -:100256004F2452F582740E3EF583E493FF3395E006 -:10026600FEEF24A1FFEE34E68F82F583800D90E643 -:10027600A08008120D2B500790E6A0E04401F090F4 -:06028600E6A0E04480F058 -:01028C00224F -:0300330002004682 -:0400460053D8EF326A -:100CD40090E682E030E004E020E60B90E682E0302B -:100CE400E119E030E71590E680E04401F07F147EDE -:0C0CF40000120B4A90E680E054FEF02253 -:1000030030050990E680E0440AF0800790E680E03E -:100013004408F07FDC7E05120B4A90E65D74FFF026 -:0F00230090E65FF05391EF90E680E054F7F02203 -:080E7500E4F51BD2E9D2AF2223 -:100BCC00AD0790E678E020E6F9C2E990E678E044DB -:100BDC0080F0ED25E090E679F090E678E030E0F9F1 -:100BEC0090E678E04440F090E678E020E6F990E674 -:080BFC0078E030E1D6D2E922D5 -:100CA200AC0790E678E020E6F9E51B702390E67841 -:100CB200E04480F0EC25E090E679F08D16AF03A9D0 -:100CC200077517018A188919E4F51A751B01D322D1 -:020CD200C3223B -:100C6E00AC0790E678E020E6F9E51B702590E67873 -:100C7E00E04480F0EC25E0440190E679F08D16AF6B -:100C8E0003A9077517018A188919E4F51A751B034C -:040C9E00D322C32278 -:03004B000206F2B8 -:1006F200C0E0C083C082C085C084C086758600C049 -:10070200D075D000C000C001C002C003C006C0073F -:1007120090E678E030E206751B060207DC90E67888 -:10072200E020E10CE51B64026006751B070207DC92 -:10073200E51B24FE605F14603624FE70030207CDC1 -:1007420024FC70030207D9240860030207DCAB17FC -:10075200AA18A919AF1A051A8F82758300120516F5 -:1007620090E679F0E51A65167070751B05806B903E -:10077200E679E0AB17AA18A919AE1A8E8275830022 -:10078200120543751B02E5166401704E90E678E08F -:100792004420F08045E51624FEB51A0790E678E07D -:1007A2004420F0E51614B51A0A90E678E04440F0C9 -:1007B200751B0090E679E0AB17AA18A919AE1A8E3C -:1007C20082758300120543051A800F90E678E04493 -:1007D20040F0751B008003751B005391DFD007D0DA -:1007E20006D003D002D001D000D0D0D086D084D0A1 -:0807F20085D082D083D0E032F3 -:020D0000A90741 -:100D0200AE14AF158F828E83A3E064037017AD011A -:100D120019ED7001228F828E83E07C002FFDEC3E64 -:080D2200FEAF0580DFE4FEFFD7 -:010D2A0022A6 -:100D9A00120C6EE51B24FA600E146006240770F329 -:0C0DAA00D322E4F51BD322E4F51BD32276 -:100DB600120CA2E51B24FA600E146006240770F3D9 -:0C0DC600D322E4F51BD322E4F51BD3225A -:100D530090E682E044C0F090E681F0438701000012 -:040D6300000000226A -:100B4A008E318F3290E600E054187012E53224019B -:100B5A00FFE43531C313F531EF13F532801590E612 -:100B6A0000E05418FFBF100BE53225E0F532E531FD -:100B7A0033F531E5321532AE31700215314E60056A -:060B8A00120D6780EE224F -:100D67007400F58690FDA57C05A3E582458370F99F -:010D77002259 -:03000000020A6F82 -:0C0A6F00787FE4F6D8FD758139020AB6E4 -:10042000E709F608DFFA8046E709F208DFFA803EBE -:1004300088828C83E709F0A3DFFA8032E309F608AB -:10044000DFFA8078E309F208DFFA807088828C8313 -:10045000E309F0A3DFFA806489828A83E0A3F608C7 -:10046000DFFA805889828A83E0A3F208DFFA804CA1 -:1004700080D280FA80C680D4806980F28033801078 -:1004800080A680EA809A80A880DA80E280CA8033E1 -:1004900089828A83ECFAE493A3C8C582C8CCC58359 -:1004A000CCF0A3C8C582C8CCC583CCDFE9DEE78029 -:1004B0000D89828A83E493A3F608DFF9ECFAA9F0A8 -:1004C000EDFB2289828A83ECFAE0A3C8C582C8CCFE -:1004D000C583CCF0A3C8C582C8CCC583CCDFEADE17 -:1004E000E880DB89828A83E493A3F208DFF980CC79 -:1004F00088F0EF60010E4E60C388F0ED2402B40472 -:100500000050B9F582EB2402B4040050AF23234518 -:06051000822390047073C9 -:10051600BB010CE58229F582E5833AF583E022509A -:1005260006E92582F8E622BBFE06E92582F8E222E4 -:0D053600E58229F582E5833AF583E49322FE -:10054300F8BB010DE58229F582E5833AF583E8F0EE -:10055300225006E92582C8F622BBFE05E92582C89A -:02056300F22282 -:10056500EB9FF5F0EA9E42F0E99D42F0E89C45F0EC -:010575002263 -:100576007401FF3395E0FEFDFC080808E6CF2FF670 -:1005860018E6CE3EF618E6CD3DF618E6CC3CF62249 -:100A7B0002028DE493A3F8E493A34003F68001F202 -:100A8B0008DFF48029E493A3F85407240CC8C3337C -:100A9B00C4540F4420C8834004F456800146F6DF4B -:100AAB00E4800B0102040810204080900E5CE47E71 -:100ABB00019360BCA3FF543F30E509541FFEE49340 -:100ACB00A360010ECF54C025E060A840B8E493A307 -:100ADB00FAE493A3F8E493A3C8C582C8CAC583CA32 -:100AEB00F0A3C8C582C8CAC583CADFE9DEE780BEEA -:010E6400008D -:00000001FF - \ No newline at end of file diff --git a/xpp/firmwares/USB_FW.hex b/xpp/firmwares/USB_FW.hex new file mode 100644 index 0000000..01f7ce9 --- /dev/null +++ b/xpp/firmwares/USB_FW.hex @@ -0,0 +1,223 @@ +# +# $Id:$ +# +:100600001201000200000040E4E451110000010268 +:1006100003010A0600020000004001000902370041 +:1006200002010080320904000002FF0000040705F7 +:100630000202000200070586020002000904010010 +:1006400002FF0000050705040200020007058802FA +:100650000002000902370002010080320904000094 +:1006600002FF0000040705020240000007058602A1 +:100670004000000904010002FF0000050705040214 +:100680004000000705880240000004030904160327 +:1006900058006F00720063006F006D0020004C0076 +:1006A0005400440014034100730074007200690098 +:1006B000620061006E006B001203490053004E009F +:1006C00075006D006200650072000A03460050006C +:1006D000470041002A034D0061006E006100670081 +:1006E00065006D0065006E0074002000500072000F +:1006F0006F0063006500730073006F0072000000FC +:0B0B6C00C2B675B5C4120B18D2B62239 +:100A6300E4901010F07A107B107D017F50120A9FE2 +:100A73007F501208567A107B007D107F50020A8344 +:1008F8007F031209EBEF2402FFE43EFEE516C394E2 +:1009080008501F74082516F582E43410F583E0FDBD +:100918008F828E8375F002E5161205E8EDF0051654 +:0209280080DA73 +:01092A0022AA +:10092B00E50B240AFDE4350AFC901003E02FFF0DC4 +:10093B00EDAA0470010C14F5828A83EFF090100479 +:10094B00E08D828C83F0D20512099090E680E05402 +:02095B00F7F0B3 +:01095D002277 +:1007000090E600E054E74410F090E60174C0F090E9 +:10071000E6107420F000000090E611F00000009058 +:10072000E6047480F0000000740FF0000000E4F0B4 +:1007300000000090E6187410F0000000E490E61944 +:10074000F000000090E61A7408F0000000E490E663 +:100750001BF000000090E6497482F0000000F000F9 +:10076000000090E6247402F0000000E490E625F01A +:1007700000000090E6957480F0000000F00000009A +:0407800043AF012260 +:040B18007F327E00AA +:100B1C007C007D181205D6EF1FAC0670011E4C70C0 +:020B2C00F622AF +:0A0784008E188F198B1A8A1B891C2E +:10078E00E4F51DF51EC3E51E9519E51D95185033AC +:10079E00AB1AAA1BA91C851E82851D83120587FF15 +:1007AE00E4FEC2B2EF1392B7EFC313FFD2B20EBE86 +:1007BE0008F0C2B220B002C322051EE51E70C605A7 +:0407CE001D80C2D3F5 +:0107D2002204 +:10029200E4901010F0F516F517C204E5AA54846034 +:1002A200030203F990F400E024FE700302036524C4 +:1002B200FA700302038724F870030203B324F07078 +:1002C200030203BD24E070030203D824C0700302BA +:1002D20003D8247F60030203CC75160075170490BF +:1002E200FC007401F090F401E090FC01F090F40243 +:1002F200E090FC02F090F401E07017A3E07013307C +:10030200B01090E60174C0F0C2B6120B18D2B61249 +:100312000B1820B00330B44390E694E0FE90E695CB +:10032200E07C002400FFEC3ECF24FCCF34FFFE7BB8 +:10033200017AF47904120784501990FC0330B40D49 +:100342007408F07FE87E03120B1C0203D87404F0D9 +:100352000203D890FC037402F0807B90FC037401CA +:10036200F0807375160075170490FC007402F0E4B7 +:10037200A3F0A3F030B406A37410F0805990FC03EC +:100382007420F0805175160075171190FC007408E6 +:10039200F0E4FF74002FF582E43410F583E0FE747C +:1003A200012FF582E434FCF583EEF00FBF10E480F8 +:1003B2002590E6017403F07F02800A90E60174C082 +:1003C200F0C2B6E4FF12092B800C751600751701F6 +:1003D20090FC0074AAF0E51745166012E51690E647 +:1003E2009CF0000000E51790E69DF000000090E60A +:0703F200957480F00000008B +:0103F90022E1 +:020AFD00D32202 +:080B8C0090E6BAE0F528D3223F +:100AEB0090E740E528F0E490E68AF090E68B04F07E +:020AFB00D32204 +:080B940090E6BAE0F527D32238 +:100B5A0090E740E527F0E490E68AF090E68B04F00F +:020B6A00D32294 +:100A160090E6B9E0242F600D04701990E604E0FF1B +:100A2600430780800890E604E0FF53077F0000003C +:070A3600EFF08002D322C3A0 +:010A3D002296 +:100ABB00C0E0C083C082D2015391EF90E65D740118 +:080ACB00F0D082D083D0E032AC +:100B2E00C0E0C083C0825391EF90E65D7404F0D0B4 +:060B3E0082D083D0E032FA +:100B4400C0E0C083C0825391EF90E65D7402F0D0A0 +:060B540082D083D0E032E4 +:10088E00C0E0C083C08285100C85110D850D828558 +:10089E000C83A37402F085080E85090F850F8285DF +:1008AE000E83A37407F05391EF90E65D7410F0D0B1 +:0608BE0082D083D0E0327D +:100AD300C0E0C083C082D2035391EF90E65D7408F7 +:080AE300F0D082D083D0E03294 +:10081900C0E0C083C08290E680E030E72085080C04 +:1008290085090D850D82850C83A37402F085100E50 +:1008390085110F850F82850E83A37407F05391EFFD +:0D08490090E65D7420F0D082D083D0E032C4 +:0A0B8200000102020303040405054C +:10050200C203C200C202C201120B6C120700120B1C +:100512009C120A63750A06750B0075120675131292 +:1005220075080675091C7510067511537514067544 +:10053200158AD2E843D82090E668E04409F090E6B4 +:100542005CE0443DF0D2AF1208F87F0112092B5350 +:100552008EF8C203120292300105120070C20130FD +:1005620003F2C203120A3E20001690E682E030E750 +:1005720004E020E1EF90E682E030E604E020E0E4EF +:050582001209BF80CF4B +:0B0B770090E50DE030E402C322D32221 +:1000700090E6B9E0700302012F1470030201A4247A +:10008000FE700302021F24FB700302012914700397 +:1000900002012314700302011714700302011D24CE +:1000A00005600302027E120AFD400302028A90E606 +:1000B000BBE024FE602714603824FD601114602723 +:1000C00024067050E50A90E6B3F0E50B803C120B75 +:1000D00077503EE51290E6B3F0E513802DE50C90E5 +:1000E000E6B3F0E50D8023E50E90E6B3F0E50F8072 +:1000F0001990E6BAE0FF1209EBAA06A9077B01EA0C +:10010000494B600DEE90E6B3F0EF90E6B4F00202DA +:100110008A020279020279120B5A02028A120B94A5 +:1001200002028A120B8C02028A120AEB02028A90E5 +:10013000E6B8E0247F601514601924027063A20001 +:10014000E43325E0FFA202E4334F8041E490E7402E +:10015000F0803F90E6BCE0547EFF7E00E0D39480C8 +:100160007C0040047D0180027D00EC4EFEED4F24BA +:1001700082F582740B3EF583E493FF3395E0FEEF46 +:1001800024A1FFEE34E68F82F583E0540190E7402E +:10019000F0E4A3F090E68AF090E68B7402F002029D +:1001A0008A02027990E6B8E024FE60162402600319 +:1001B00002028A90E6BAE0B40105C20002028A0295 +:1001C000027990E6BAE0705590E6BCE0547EFF7E7E +:1001D00000E0D394807C0040047D0180027D00EC2F +:1001E0004EFEED4F2482F582740B3EF583E493FFBF +:1001F0003395E0FEEF24A1FFEE34E68F82F583E035 +:1002000054FEF090E6BCE05480131313541FFFE03B +:10021000540F2F90E683F0E04420F0806D805A90D8 +:10022000E6B8E024FE60192402704E90E6BAE0B40D +:100230000104D200805490E6BAE06402604C803938 +:1002400090E6BCE0547EFF7E00E0D394807C0040CA +:10025000047D0180027D00EC4EFEED4F2482F5828C +:10026000740B3EF583E493FF3395E0FEEF24A1FF8A +:10027000EE34E68F82F583800D90E6A08008120AA6 +:1002800016500790E6A0E04401F090E6A0E044801C +:01029000F07D +:01029100224A +:03003300020BA419 +:040BA40053D8EF3201 +:03004300020B00AD +:03005300020B009D +:100B0000020ABB00020B4400020B2E00020AD300B3 +:080B100002088E000208190022 +:1009BF0090E682E030E004E020E60B90E682E03043 +:1009CF00E119E030E71590E680E04401F07F147EF6 +:0C09DF00001207D390E680E054FEF022E6 +:1009900030050990E680E0440AF0800790E680E0A8 +:1009A0004408F07FDC7E051207D390E65D74FFF00B +:0F09B00090E65FF05391EF90E680E054F7F0226D +:080B9C00E4F526D2E9D2AF22F4 +:10085600AD0790E678E020E6F9C2E990E678E04454 +:1008660080F0ED25E090E679F090E678E030E0F96A +:1008760090E678E04440F090E678E020E6F990E6ED +:0808860078E030E1D6D2E9224E +:10095E00AC0790E678E020E6F9E526702390E6787D +:10096E00E04480F0EC25E090E679F08D21AF03A90C +:10097E00077522018A238924E4F525752601D322E1 +:02098E00C32282 +:1008C400AC0790E678E020E6F9E526702590E67816 +:1008D400E04480F0EC25E0440190E679F08D21AF0E +:1008E40003A9077522018A238924E4F525752603C3 +:0408F400D322C32226 +:03004B000203FAB3 +:1003FA00C0E0C083C082C085C084C086758600C044 +:10040A00D075D000C000C001C002C003C006C0073A +:10041A0090E678E030E2067526060204E490E67873 +:10042A00E020E10CE526640260067526070204E472 +:10043A00E52624FE605F14603624FE70030204D5AC +:10044A0024FC70030204E1240860030204E4AB22E2 +:10045A00AA23A924AF2505258F8275830012058753 +:10046A0090E679F0E52565217070752605806B9018 +:10047A00E679E0AB22AA23A924AE258E82758300F1 +:10048A001205B4752602E5216401704E90E678E003 +:10049A004420F08045E52124FEB5250790E678E062 +:1004AA004420F0E52114B5250A90E678E04440F0AE +:1004BA0075260090E679E0AB22AA23A924AE258E00 +:1004CA00827583001205B40525800F90E678E04412 +:1004DA0040F075260080037526005391DFD007D0BF +:1004EA0006D003D002D001D000D0D0D086D084D09C +:0804FA0085D082D083D0E032EE +:0209EB00A9075A +:1009ED00AE14AF158F828E83A3E064037017AD0133 +:1009FD0019ED7001228F828E83E07C002FFDEC3E7D +:080A0D00FEAF0580DFE4FEFFEF +:010A150022BE +:100A83001208C4E52624FA600E146006240770F3E6 +:0C0A9300D322E4F526D322E4F526D3227A +:100A9F0012095EE52624FA600E146006240770F32F +:0C0AAF00D322E4F526D322E4F526D3225E +:100A3E0090E682E044C0F090E681F043870100002A +:040A4E000000002282 +:1007D3008E188F1990E600E054187012E519240161 +:1007E300FFE43518C313F518EF13F519801590E6D8 +:1007F30000E05418FFBF100BE51925E0F519E518C3 +:1008030033F518E5191519AE18700215184E600561 +:06081300120A5280EE22E1 +:100A52007400F58690FDA57C05A3E582458370F9B7 +:010A62002271 +:030000000205F402 +:0C05F400787FE4F6D8FD7581280205022E +:10058700BB010CE58229F582E5833AF583E0225029 +:1005970006E92582F8E622BBFE06E92582F8E22273 +:0D05A700E58229F582E5833AF583E493228D +:1005B400F8BB010DE58229F582E5833AF583E8F07D +:1005C400225006E92582C8F622BBFE05E92582C829 +:0205D400F22211 +:1005D600EF8DF0A4A8F0CF8CF0A428CE8DF0A42E39 +:0205E600FE22F3 +:0C05E800A42582F582E5F03583F583221E +:00000001FF + \ No newline at end of file diff --git a/xpp/utils/fpga_load.c b/xpp/utils/fpga_load.c index c7ce907..e28f9a8 100644 --- a/xpp/utils/fpga_load.c +++ b/xpp/utils/fpga_load.c @@ -33,6 +33,52 @@ static char *progname; #define PACKET_SIZE 512 #define EEPROM_SIZE 16 #define SERIAL_SIZE 8 +#define TIMEOUT 5000 + + +/* My device parameters */ +#define MY_EP_OUT 0x04 +#define MY_EP_IN 0x88 + +#define FPGA_EP_OUT 0x02 +#define FPGA_EP_IN 0x86 + +/* USB firmware types */ +#define USB_11xx 0 +#define USB_FIRMWARE_II 1 + +#define TYPE_ENTRY(t,ni,n,ne,out,in,...) \ + [t] = { \ + .type_code = (t), \ + .num_interfaces = (ni), \ + .my_interface_num = (n), \ + .num_endpoints = (ne), \ + .my_ep_in = (in), \ + .my_ep_out = (out), \ + .name = #t, \ + .endpoints = { __VA_ARGS__ }, \ + } + +static const struct astribank_type { + int type_code; + int num_interfaces; + int my_interface_num; + int num_endpoints; + int my_ep_out; + int my_ep_in; + char *name; + int endpoints[4]; /* for matching */ +} astribank_types[] = { + TYPE_ENTRY(USB_11xx, 1, 0, 4, MY_EP_OUT, MY_EP_IN, + FPGA_EP_OUT, + MY_EP_OUT, + FPGA_EP_IN, + MY_EP_IN), + TYPE_ENTRY(USB_FIRMWARE_II, 2, 1, 2, MY_EP_OUT, MY_EP_IN, + MY_EP_OUT, + MY_EP_IN), +}; +#undef TYPE_ENTRY enum fpga_load_packet_types { PT_STATUS_REPLY = 0x01, @@ -98,6 +144,7 @@ struct my_usb_device { char iInterface[BUFSIZ]; int is_usb2; struct myeeprom eeprom; + const struct astribank_type *abtype; }; const char *load_status2str(enum fpga_load_status s) @@ -191,52 +238,6 @@ int get_usb_string(char *buf, unsigned int len, uint16_t item, usb_dev_handle *h return snprintf(buf, len, "%s", tmp); } -/* My device parameters */ -#define MY_EP_OUT 0x04 -#define MY_EP_IN 0x88 - -#define FPGA_EP_OUT 0x02 -#define FPGA_EP_IN 0x86 - -/* USB firmware types */ -#define USB_11xx 0 -#define USB_FIRMWARE_II 1 - -#define TYPE_ENTRY(t,ni,n,ne,out,in,...) \ - [t] = { \ - .type_code = (t), \ - .num_interfaces = (ni), \ - .my_interface_num = (n), \ - .num_endpoints = (ne), \ - .my_ep_in = (in), \ - .my_ep_out = (out), \ - .name = #t, \ - .endpoints = { __VA_ARGS__ }, \ - } - -static const struct astribank_type { - int type_code; - int num_interfaces; - int my_interface_num; - int num_endpoints; - int my_ep_out; - int my_ep_in; - char *name; - int endpoints[4]; /* for matching */ -} astribank_types[] = { - TYPE_ENTRY(USB_11xx, 1, 0, 4, MY_EP_OUT, MY_EP_IN, - FPGA_EP_OUT, - MY_EP_OUT, - FPGA_EP_IN, - MY_EP_IN), - TYPE_ENTRY(USB_FIRMWARE_II, 2, 1, 2, MY_EP_OUT, MY_EP_IN, - MY_EP_OUT, - MY_EP_IN), -}; -#undef TYPE_ENTRY - -#define TIMEOUT 5000 - void my_usb_device_cleanup(struct my_usb_device *mydev, const struct astribank_type *abtype) { assert(mydev != NULL); @@ -260,6 +261,7 @@ static void show_device_info(const struct my_usb_device *mydev) eeprom = &mydev->eeprom; memset(data, 0, SERIAL_SIZE + 1); memcpy(data, eeprom->serial, SERIAL_SIZE); + printf("USB Firmware Type: [%s]\n", mydev->abtype->name); printf("USB iManufacturer: [%s]\n", mydev->iManufacturer); printf("USB iProduct: [%s]\n", mydev->iProduct); printf("USB iSerialNumber: [%s]\n", mydev->iSerialNumber); @@ -556,10 +558,6 @@ int my_usb_device_init(const char devpath[], struct my_usb_device *mydev, const ERR("usb_claim_interface: %s\n", usb_strerror()); return 0; } - if(usb_reset(mydev->handle) != 0) { - ERR("usb_reset: %s\n", usb_strerror()); - return 0; - } dev_desc = &mydev->dev->descriptor; config_desc = mydev->dev->config; interface = &config_desc->interface[abtype->my_interface_num]; @@ -578,6 +576,7 @@ int my_usb_device_init(const char devpath[], struct my_usb_device *mydev, const } } } + mydev->abtype = abtype; mydev->my_ep_in = abtype->my_ep_in; mydev->my_ep_out = abtype->my_ep_out; ret = get_usb_string(mydev->iManufacturer, BUFSIZ, dev_desc->iManufacturer, mydev->handle); @@ -591,12 +590,12 @@ int my_usb_device_init(const char devpath[], struct my_usb_device *mydev, const mydev->iProduct, mydev->iSerialNumber, mydev->iInterface); - if(usb_resetep(mydev->handle, mydev->my_ep_out) != 0) { - ERR("Failed to reset usb output endpoint: %s\n", usb_strerror()); + if(usb_clear_halt(mydev->handle, mydev->my_ep_out) != 0) { + ERR("Clearing output endpoint: %s\n", usb_strerror()); return 0; } - if(usb_resetep(mydev->handle, mydev->my_ep_in) != 0) { - ERR("Failed to reset usb input endpoint: %s\n", usb_strerror()); + if(usb_clear_halt(mydev->handle, mydev->my_ep_in) != 0) { + ERR("Clearing input endpoint: %s\n", usb_strerror()); return 0; } return 1; @@ -614,6 +613,16 @@ int renumerate_device(struct my_usb_device *mydev, enum fpga_load_packet_types p ret = send_usb("renumerate[W]", mydev, phead, 1, TIMEOUT); if(ret < 0) return ret; +#if 0 + /* + * FIXME: we count on our USB firmware to reset the device... should we? + */ + ret = usb_reset(mydev->handle); + if(ret < 0) { + ERR("usb_reset: %s\n", usb_strerror()); + return -ENODEV; + } +#endif return 0; } diff --git a/xpp/utils/xpp_fxloader b/xpp/utils/xpp_fxloader index 3000718..27eec1c 100644 --- a/xpp/utils/xpp_fxloader +++ b/xpp/utils/xpp_fxloader @@ -71,6 +71,7 @@ FIRM_FXS=$FIRMWARE_DIR/FPGA_FXS.hex REENUM_SLEEP_TIME=3 # only used on manual runs FPGA_LOAD=${FPGA_LOAD:-/usr/sbin/fpga_load} +USB_FW="${USB_FW:-USB_FW.hex}" if [ -r "$DEFAULTS" ]; then . "$DEFAULTS" @@ -182,10 +183,9 @@ reset) xppdetect|load|usb) echo "--------- FIRMWARE LOADING: ($1)" - load_fw 04b4 8613 USB_8613.hex - load_fw e4e4 1130 USB_1130.hex - load_fw e4e4 1140 USB_1140.hex - load_fw e4e4 1150 USB_1150.hex + load_fw e4e4 1130 $USB_FW + load_fw e4e4 1140 $USB_FW + load_fw e4e4 1150 $USB_FW if [ "$1" != 'usb' ] then load_fpga e4e4 1131 FPGA_FXS.hex @@ -225,8 +225,8 @@ then $LOGGER "Trying to find what to do for product $PRODUCT, device $DEVICE" prod_id=`echo "$PRODUCT" | cut -d/ -f2` case "$PRODUCT" in - 4b4/8613/*|e4e4/11[345]0/*) - FIRM_USB="$FIRMWARE_DIR/USB_$prod_id.hex" + e4e4/11[345]0/*) + FIRM_USB="$FIRMWARE_DIR/$USB_FW" $LOGGER "Loading firmware '$FIRM_USB' into '$DEVICE'" do_fxload -D "$DEVICE" -I "$FIRM_USB" ;; diff --git a/xpp/utils/zaptel_drivers b/xpp/utils/zaptel_drivers new file mode 100755 index 0000000..5cd890d --- /dev/null +++ b/xpp/utils/zaptel_drivers @@ -0,0 +1,9 @@ +#! /usr/bin/perl -w +use strict; +use File::Basename; +BEGIN { my $dir = dirname($0); unshift(@INC, "$dir", "$dir/zconf"); } + +use Zaptel::Hardware; + +Zaptel::Hardware->scan_hardware(); +print join("\n", Zaptel::Hardware->drivers),"\n"; diff --git a/xpp/utils/zaptel_hardware b/xpp/utils/zaptel_hardware index 91fcb2e..473be1f 100755 --- a/xpp/utils/zaptel_hardware +++ b/xpp/utils/zaptel_hardware @@ -33,8 +33,7 @@ sub show_xbus($) { my @xpds = $xbus->xpds; my $serialnum = $xbus->serial(); my $connector = ($xbus->status eq 'CONNECTED') ? $xbus->connector : "MISSING"; - $connector = "(" . $connector . ")"; - printf "%-10s %-20s\n", $serialnum, $connector; + printf " SERIAL=%-10s CONNECTOR=%-20s\n", $serialnum, $connector; foreach my $xpd (sort { $a->num <=> $b->num } @xpds) { my $reg = $xpd->zt_registration; my $span; @@ -53,15 +52,18 @@ sub show_xbus($) { } my %seen; -my $format = "%-20s\t%4s:%4s %-12s "; +my $format = "%-20s %-12s %4s:%4s %s\n"; foreach my $dev (@hardware) { my $xbus = $dev->xbus; my $driver = $dev->driver || ""; - $driver = "[$driver]"; - printf $format, $dev->hardware_name, $dev->vendor, $dev->product, $driver; + my $loaded = $dev->loaded; + die "driver should be '$driver' but is actually '$loaded'" + if defined($loaded) && $driver ne $loaded; + $driver = "$driver" . (($loaded) ? "+" : "-"); + my $description = $dev->description || ""; + printf $format, $dev->hardware_name, $driver, $dev->vendor, $dev->product, $description; if(!$xbus) { - printf "\n"; next; } $seen{$xbus->name} = 1; @@ -78,12 +80,11 @@ foreach my $xbus (Zaptel::Xpp::xbuses('SORT_CONNECTOR')) { } } - __END__ =head1 NAME -zaptel_hardware - Shows Zaptel hardware devices. +zaptel_hardware - Shows Zaptel hardware devices. =head1 SYNOPSIS @@ -91,10 +92,44 @@ zaptel_hardware =head1 DESCRIPTION -Show all zaptel hardware devices, both used and unused. +Show all zaptel hardware devices. Devices are recognized according to +lists of PCI and USB IDs in Zaptel::Hardware::PCI.pm and +Zaptel::Hardware::USB.pm . For PCI it is possible to detect by +sub-vendor and sub-product ID as well. + +The first output column is the connector: a bus specific field that +shows where this device is. + +The second field shows which driver should handle the device. a "-" sign +marks that the device is not yet handled by this driver. A "+" sign +means that the device is handled by the driver. + +For the Xorcom Astribank (and in the future: for other Zaptel devices) +some further information is provided from the driver. Those extra lines +always begin with spaces. + +Example output: + +Without drivers loaded: + + usb:001/002 xpp_usb- e4e4:1152 Astribank-multi FPGA-firmware + usb:001/003 xpp_usb- e4e4:1152 Astribank-multi FPGA-firmware + pci:0000:01:0b.0 wctdm- e159:0001 Wildcard TDM400P REV H + +With drivers loaded: + + usb:001/002 xpp_usb+ e4e4:1152 Astribank-multi FPGA-firmware + SERIAL=[usb:123] CONNECTOR=usb-0000:00:1d.7-1 + XBUS-00/XPD-00: FXS Span 2 + XBUS-00/XPD-10: FXS Span 3 + XBUS-00/XPD-20: FXS Span 4 + XBUS-00/XPD-30: FXS Span 5 + usb:001/003 xpp_usb+ e4e4:1152 Astribank-multi FPGA-firmware + SERIAL=[usb:4567] CONNECTOR=usb-0000:00:1d.7-4 + XBUS-01/XPD-00: FXS Span 6 XPP-SYNC + XBUS-01/XPD-10: FXO Span 7 + XBUS-01/XPD-20: FXO Span 8 + XBUS-01/XPD-30: FXO Span 9 + pci:0000:01:0b.0 wctdm+ e159:0001 Wildcard TDM400P REV E/F -=head1 BUGS -Assumes a bit too much about the output of lspci and sysfs. Currently -the PCI scanning will not work on e.g. CentOS 4. This should be fixed in -Zaptel::Hardware::PCI.pm diff --git a/xpp/utils/zconf/Zaptel/Hardware.pm b/xpp/utils/zconf/Zaptel/Hardware.pm index 39305fb..8423c18 100644 --- a/xpp/utils/zconf/Zaptel/Hardware.pm +++ b/xpp/utils/zconf/Zaptel/Hardware.pm @@ -18,6 +18,7 @@ sub device_detected($$) { my $name = shift || die; warn "Device '$name' already known\n" if grep { $_->hardware_name eq $name } @zaptel_devices; + $dev->{'HARDWARE_NAME'} = $name; push(@zaptel_devices, $dev); } @@ -34,6 +35,16 @@ sub devices($) { return @zaptel_devices; } +sub drivers($) { + my $pack = shift or die "Wasn't called as a class method\n"; + my @devs = $pack->devices(); + my @drvs = map { $_->{DRIVER} } @devs; + # Make unique + my %drivers; + @drivers{@drvs} = 1; + return sort keys %drivers; +} + sub scan_hardware($) { my $pack = shift || die; diff --git a/xpp/utils/zconf/Zaptel/Hardware/PCI.pm b/xpp/utils/zconf/Zaptel/Hardware/PCI.pm index 9e916f6..bd6f6e3 100644 --- a/xpp/utils/zconf/Zaptel/Hardware/PCI.pm +++ b/xpp/utils/zconf/Zaptel/Hardware/PCI.pm @@ -10,29 +10,89 @@ package Zaptel::Hardware::PCI; use strict; use Zaptel::Hardware; -my @idlist = qw( - 0B0B:0206 - 1397:16B8 - 1397:08B4 - 1057:5608 - 10B5:3001 - 10B5:4000 - 10B5:9030 - 10B5:D00D - D161:0800 - D161:2400 - D161:0120 - D161:0205 - D161:0210 - D161:0220 - D161:0405 - D161:0410 - D161:0420 - E159:0001 +our @ISA = qw(Zaptel::Hardware); + +# Lookup algorithm: +# First match 'vendor:product/subvendor:subproduct' key +# Else match 'vendor:product/subvendor' key +# Else match 'vendor:product' key +# Else not a zaptel hardware. +my %pci_ids = ( + # from wct4xxp + '10ee:0314' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE410P/TE405P (1st Gen)' }, + 'd161:0420/0004' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE420 (4th Gen)' }, + 'd161:0410/0004' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE410P (4th Gen)' }, + 'd161:0405/0004' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE405P (4th Gen)' }, + 'd161:0410/0003' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE410P (3rd Gen)' }, + 'd161:0405/0003' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE405P (3rd Gen)' }, + 'd161:0410' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE410P (2nd Gen)' }, + 'd161:0405' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE405P (2nd Gen)' }, + 'd161:0220/0004' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE220 (4th Gen)' }, + 'd161:0205/0004' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE205P (4th Gen)' }, + 'd161:0210/0004' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE210P (4th Gen)' }, + 'd161:0205/0003' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE205P (3rd Gen)' }, + 'd161:0210/0003' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE210P (3rd Gen)' }, + 'd161:0205' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE205P ' }, + 'd161:0210' => { DRIVER => 'wct4xxp', DESCRIPTION => 'Wildcard TE210P ' }, + + # from wctdm24xxp + 'd161:2400' => { DRIVER => 'wctdm24xxp', DESCRIPTION => 'Wildcard TDM2400P' }, + 'd161:0800' => { DRIVER => 'wctdm24xxp', DESCRIPTION => 'Wildcard TDM800P' }, + 'd161:8002' => { DRIVER => 'wctdm24xxp', DESCRIPTION => 'Wildcard AEX800' }, + 'd161:8003' => { DRIVER => 'wctdm24xxp', DESCRIPTION => 'Wildcard AEX2400' }, + + # from pciradio + 'e159:0001/e16b' => { DRIVER => 'pciradio', DESCRIPTION => 'PCIRADIO' }, + + # from wcfxo + 'e159:0001/8085' => { DRIVER => 'wcfxo', DESCRIPTION => 'Wildcard X101P' }, + 'e159:0001/8086' => { DRIVER => 'wcfxo', DESCRIPTION => 'Generic Clone' }, + 'e159:0001/8087' => { DRIVER => 'wcfxo', DESCRIPTION => 'Generic Clone' }, + '1057:5608' => { DRIVER => 'wcfxo', DESCRIPTION => 'Wildcard X100P' }, + + # from wct1xxp + 'e159:0001/6159' => { DRIVER => 'wct1xxp', DESCRIPTION => 'Digium Wildcard T100P T1/PRI or E100P E1/PRA Board' }, + + # from wctdm + 'e159:0001/a159' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard S400P Prototype' }, + 'e159:0001/e159' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard S400P Prototype' }, + 'e159:0001/b100' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV E/F' }, + 'e159:0001/b1d9' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV I' }, + 'e159:0001/b118' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV I' }, + 'e159:0001/b119' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV I' }, + 'e159:0001/a9fd' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV H' }, + 'e159:0001/a8fd' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV H' }, + 'e159:0001/a800' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV H' }, + 'e159:0001/a801' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV H' }, + 'e159:0001/a908' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV H' }, + 'e159:0001/a901' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV H' }, + #'e159:0001' => { DRIVER => 'wctdm', DESCRIPTION => 'Wildcard TDM400P REV H' }, + + # from wcte11xp + 'e159:0001/71fe' => { DRIVER => 'wcte11xp', DESCRIPTION => 'Digium Wildcard TE110P T1/E1 Board' }, + 'e159:0001/79fe' => { DRIVER => 'wcte11xp', DESCRIPTION => 'Digium Wildcard TE110P T1/E1 Board' }, + 'e159:0001/795e' => { DRIVER => 'wcte11xp', DESCRIPTION => 'Digium Wildcard TE110P T1/E1 Board' }, + 'e159:0001/79de' => { DRIVER => 'wcte11xp', DESCRIPTION => 'Digium Wildcard TE110P T1/E1 Board' }, + 'e159:0001/797e' => { DRIVER => 'wcte11xp', DESCRIPTION => 'Digium Wildcard TE110P T1/E1 Board' }, + + # from wcte12xp + 'd161:0120' => { DRIVER => 'wcte12xp', DESCRIPTION => 'Wildcard TE12xP' }, + + # from tor2 + '10b5:9030' => { DRIVER => 'tor2', DESCRIPTION => 'PLX 9030' }, + '10b5:3001' => { DRIVER => 'tor2', DESCRIPTION => 'PLX Development Board' }, + '10b5:D00D' => { DRIVER => 'tor2', DESCRIPTION => 'Tormenta 2 Quad T1/PRI or E1/PRA' }, + '10b5:4000' => { DRIVER => 'tor2', DESCRIPTION => 'Tormenta 2 Quad T1/E1 (non-Digium clone)' }, + + # Cologne Chips: + # (Still a partial list) + '1397:08b4/b556' => { DRIVER => 'qozap', DESCRIPTION => 'Junghanns DuoBRI ISDN card' }, + '1397:08b4' => { DRIVER => 'qozap', DESCRIPTION => 'Junghanns QuadBRI ISDN card' }, + '1397:16b8' => { DRIVER => 'qozap', DESCRIPTION => 'Junghanns OctoBRI ISDN card' }, + '1397:2bd0' => { DRIVER => 'zaphfc', DESCRIPTION => 'HFC-S ISDN BRI card' }, ); $ENV{PATH} .= ":/usr/sbin:/sbin:/usr/bin:/bin"; -my $prog = 'lspci'; # Accessors (miniperl does not have Class:Accessor) our $AUTOLOAD; @@ -49,25 +109,16 @@ sub AUTOLOAD { my @devices; -sub pci_sorter() { - return - sprintf("%03d/%03d", $a->bus, $a->dev) cmp - sprintf("%03d/%03d", $b->bus, $b->dev); +sub pci_sorter { + return $a->priv_device_name() cmp $b->priv_device_name(); } sub new($$) { my $pack = shift or die "Wasn't called as a class method\n"; my $self = { @_ }; bless $self, $pack; - my $hardware_name = sprintf("pci:%s:%s:%s", $self->{DOMAIN}, $self->{BUS}, $self->{DEV}); - $self->{HARDWARE_NAME} = $hardware_name; - Zaptel::Hardware::device_detected($self, $hardware_name); - my $sysfile = sprintf "/sys/bus/pci/devices/%s:%s:%s/driver/module", $self->{DOMAIN}, $self->{BUS}, $self->{DEV}; - my $module = readlink($sysfile); - if(defined $module) { - $module =~ s:^.*/::; - $self->{DRIVER} = $module; - } + Zaptel::Hardware::device_detected($self, + sprintf("pci:%s", $self->{PRIV_DEVICE_NAME})); return $self; } @@ -76,38 +127,58 @@ sub devices($) { return sort pci_sorter @devices; } -my $domain_support = 1; # Optimistic... +my %pci_devs; + +sub readfile($) { + my $name = shift || die; + open(F, $name) || die "Failed to open '$name': $!"; + my $str = ; + close F; + chomp($str); + return $str; +} sub scan_devices($) { - my $pack = shift || die; - if(!open(F, "$prog -Dn 2> /dev/null |")) { - $domain_support = 0; - open(F, "$prog -n|") || die "$0: Failed running $prog: $!"; + while() { + m,([^/]+)$,,; + my $name = $1; + my $l = readlink $_ || die; + $pci_devs{$name}{PRIV_DEVICE_NAME} = $name; + $pci_devs{$name}{DEVICE} = $l; + $pci_devs{$name}{VENDOR} = readfile "$_/vendor"; + $pci_devs{$name}{PRODUCT} = readfile "$_/device"; + $pci_devs{$name}{SUBVENDOR} = readfile "$_/subsystem_vendor"; + $pci_devs{$name}{SUBPRODUCT} = readfile "$_/subsystem_device"; + my $dev = $pci_devs{$name}; + grep(s/0x//, $dev->{VENDOR}, $dev->{PRODUCT}, $dev->{SUBVENDOR}, $dev->{SUBPRODUCT}); + $pci_devs{$name}{DRIVER} = ''; } - while() { - chomp; - my ($phys,$id) = (split(/\s+/))[0,2]; - my $domain; - my $bus; - my $dev; - if($domain_support) { - ($domain,$bus,$dev) = split(/:/, $phys); - } else { - ($bus,$dev) = split(/:/, $phys); - $domain = '0000'; - } - next unless grep { uc($id) eq $_ } @idlist; - my($vendor,$product) = split(/:/, $id); + + while() { + m,([^/]+)/([^/]+)$,,; + $pci_devs{$2}{LOADED} = $1; + } + foreach (sort keys %pci_devs) { + my $dev = $pci_devs{$_}; + my $key; + # Try to match + $key = "$dev->{VENDOR}:$dev->{PRODUCT}/$dev->{SUBVENDOR}:$dev->{SUBPRODUCT}"; + $key = "$dev->{VENDOR}:$dev->{PRODUCT}/$dev->{SUBVENDOR}" if !defined($pci_ids{$key}); + $key = "$dev->{VENDOR}:$dev->{PRODUCT}" if !defined($pci_ids{$key}); + next unless defined $pci_ids{$key}; + my $d = Zaptel::Hardware::PCI->new( - DOMAIN => $domain, - BUS => $bus, - DEV => $dev, - VENDOR => $vendor, - PRODUCT => $product, + PRIV_DEVICE_NAME => $dev->{PRIV_DEVICE_NAME}, + VENDOR => $dev->{VENDOR}, + PRODUCT => $dev->{PRODUCT}, + SUBVENDOR => $dev->{SUBVENDOR}, + SUBPRODUCT => $dev->{SUBPRODUCT}, + LOADED => $dev->{LOADED}, + DRIVER => $pci_ids{$key}{DRIVER}, + DESCRIPTION => $pci_ids{$key}{DESCRIPTION}, ); push(@devices, $d); } - close F; } 1; diff --git a/xpp/utils/zconf/Zaptel/Hardware/USB.pm b/xpp/utils/zconf/Zaptel/Hardware/USB.pm index bbf00fe..0f2024b 100644 --- a/xpp/utils/zconf/Zaptel/Hardware/USB.pm +++ b/xpp/utils/zconf/Zaptel/Hardware/USB.pm @@ -12,21 +12,28 @@ use Zaptel::Hardware; use Zaptel::Xpp; use Zaptel::Xpp::Xbus; -my @idlist = qw( - e4e4:1130 - e4e4:1131 - e4e4:1132 - e4e4:1140 - e4e4:1141 - e4e4:1142 - e4e4:1150 - e4e4:1151 - e4e4:1152 +our @ISA = qw(Zaptel::Hardware); + +my %usb_ids = ( + # from wcusb + '06e6:831c' => { DRIVER => 'wcusb', DESCRIPTION => 'Wildcard S100U USB FXS Interface' }, + '06e6:831e' => { DRIVER => 'wcusb2', DESCRIPTION => 'Wildcard S110U USB FXS Interface' }, + '06e6:b210' => { DRIVER => 'wc_usb_phone', DESCRIPTION => 'Wildcard Phone Test driver' }, + + # from xpp_usb + 'e4e4:1130' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-8/16 no-firmware' }, + 'e4e4:1131' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-8/16 USB-firmware' }, + 'e4e4:1132' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-8/16 FPGA-firmware' }, + 'e4e4:1140' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-BRI no-firmware' }, + 'e4e4:1141' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-BRI USB-firmware' }, + 'e4e4:1142' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-BRI FPGA-firmware' }, + 'e4e4:1150' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-multi no-firmware' }, + 'e4e4:1151' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-multi USB-firmware' }, + 'e4e4:1152' => { DRIVER => 'xpp_usb', DESCRIPTION => 'Astribank-multi FPGA-firmware' }, ); $ENV{PATH} .= ":/usr/sbin:/sbin:/usr/bin:/bin"; -my $prog = 'lsusb'; # Accessors (miniperl does not have Class:Accessor) our $AUTOLOAD; @@ -45,21 +52,14 @@ my @devices; my @xbuses = Zaptel::Xpp::xbuses('SORT_CONNECTOR'); sub usb_sorter() { - return - sprintf("%03d/%03d", $a->bus, $a->dev) cmp - sprintf("%03d/%03d", $b->bus, $b->dev); + return $a->hardware_name cmp $b->hardware_name; } -sub xbus_of_usb($$) { - my $bus = shift; +sub xbus_of_usb($) { + my $priv_device_name = shift; my $dev = shift; - my ($wanted) = grep { - my $b = $_->usb_bus; - my $d = $_->usb_dev; - defined($b) && $b == $bus && - defined($d) && $d == $dev - } @xbuses; + my ($wanted) = grep { $priv_device_name eq $_->usb_devname } @xbuses; return $wanted; } @@ -67,14 +67,13 @@ sub new($$) { my $pack = shift or die "Wasn't called as a class method\n"; my $self = { @_ }; bless $self, $pack; - my $xbus = xbus_of_usb($self->bus, $self->dev); + my $xbus = xbus_of_usb($self->priv_device_name); if(defined $xbus) { $self->{XBUS} = $xbus; - $self->{DRIVER} = 'xpp_usb'; + $self->{LOADED} = 'xpp_usb'; } - my $hardware_name = sprintf("usb:%03d/%03d", $self->{BUS}, $self->{DEV}); - $self->{HARDWARE_NAME} = $hardware_name; - Zaptel::Hardware::device_detected($self, $hardware_name); + Zaptel::Hardware::device_detected($self, + sprintf("usb:%s", $self->{PRIV_DEVICE_NAME})); return $self; } @@ -85,20 +84,24 @@ sub devices($) { sub scan_devices($) { my $pack = shift || die; - open(F, "$prog|") || die "$0: Failed running $prog: $!"; + my $usb_device_list = "/proc/bus/usb/devices"; + open(F, $usb_device_list) || die "Failed to open $usb_device_list: $!"; + $/ = ''; while() { - chomp; - my ($bus,$dev,$id) = (split(/\s+/))[1,3,5]; - $dev =~ s/://; - $bus =~ s/^0*//; - $dev =~ s/^0*//; - next unless grep { lc($id) eq $_ } @idlist; - my($vendor,$product) = split(/:/, $id); + my @lines = split(/\n/); + my ($tline) = grep(/^T/, @lines); + my ($pline) = grep(/^P/, @lines); + my ($busnum,$devnum) = ($tline =~ /Bus=(\w+)\W.*Dev#=\s*(\w+)\W/); + my $devname = sprintf("%03d/%03d", $busnum, $devnum); + my ($vendor,$product) = ($pline =~ /Vendor=(\w+)\W.*ProdID=(\w+)\W/); + my $model = $usb_ids{"$vendor:$product"}; + next unless defined $model; my $d = Zaptel::Hardware::USB->new( - BUS => $bus, - DEV => $dev, - VENDOR => $vendor, - PRODUCT => $product, + PRIV_DEVICE_NAME => $devname, + VENDOR => $vendor, + PRODUCT => $product, + DESCRIPTION => $model->{DESCRIPTION}, + DRIVER => $model->{DRIVER}, ); push(@devices, $d); } diff --git a/xpp/utils/zconf/Zaptel/Xpp.pm b/xpp/utils/zconf/Zaptel/Xpp.pm index ff0008a..db9add6 100644 --- a/xpp/utils/zconf/Zaptel/Xpp.pm +++ b/xpp/utils/zconf/Zaptel/Xpp.pm @@ -24,7 +24,9 @@ sub by_connector { } sub by_serial { - return $a->serial cmp $b->serial; + my $cmp = $a->serial cmp $b->serial; + return $cmp if $cmp != 0; + return $a->connector cmp $b->connector; } sub xbuses { diff --git a/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm b/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm index 0dd6d84..7951d98 100644 --- a/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm +++ b/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm @@ -70,12 +70,7 @@ sub new($$) { chomp $head; close F; $head =~ s/^device: +([^, ]+)/$1/i or die; - my ($usb_bus, $usb_dev) = split('/', $head); - die unless defined($usb_bus) && defined($usb_dev); - $usb_bus =~ s/^0*//; - $usb_dev =~ s/^0*//; - $self->{USB_BUS} = $usb_bus; - $self->{USB_DEV} = $usb_dev; + $self->{USB_DEVNAME} = $head; } @{$self->{XPDS}} = (); foreach my $fqn (glob "$prefix/XPD-??") { diff --git a/xpp/utils/zt_registration b/xpp/utils/zt_registration index fdcf33e..1b26f74 100755 --- a/xpp/utils/zt_registration +++ b/xpp/utils/zt_registration @@ -74,11 +74,16 @@ zt_registration [on|off] =head1 DESCRIPTION -Without parameters, show all connected XPDs sorted by physical connector order. -Each one is show to be unregistered (off), or registered to a specific zaptel span -(the span number is shown). +Without parameters, show all connected XPDs sorted by serial number and +physical connector order. Each one is show to be unregistered (off), or +registered to a specific zaptel span (the span number is shown). -All registerations/deregisterations are sorted by physical connector string. +All registerations/deregisterations are sorted by serial number and +(lacking that) physical connector string. + +Span registration should generally always succeed. Span unregistration may +fail if channels from the span are in use by e.g. asterisk. In such a case +you'll also see those channels as '(In use)' in the output of lszaptel(8). =head2 Parameters @@ -88,22 +93,27 @@ on -- registers all XPD's to zaptel. =head2 Sample Output - $ zt_registration - XBUS-02 usb-0000:00:1d.7-3 - XBUS-02/XPD-00: on Span 9 - XBUS-02/XPD-10: on Span 10 - XBUS-02/XPD-20: on Span 11 - XBUS-02/XPD-30: on Span 12 - XBUS-01 usb-0000:00:1d.7-4 - XBUS-01/XPD-00: on Span 13 - XBUS-01/XPD-10: on Span 14 - XBUS-01/XPD-20: on Span 15 - XBUS-01/XPD-30: on Span 16 - XBUS-00 usb-0000:00:1d.7-5 - XBUS-00/XPD-00: on Span 17 - XBUS-00/XPD-10: on Span 18 - XBUS-00/XPD-20: on Span 19 - XBUS-00/XPD-30: on Span 20 +An example of the output of zt_registration for some registered +Astribanks: + + $ zt_registration + XBUS-02 [] usb-0000:00:1d.7-4 + XBUS-00/XPD-00: on Span 1 + XBUS-00/XPD-10: on Span 2 + XBUS-00 [usb:00000126] usb-0000:00:1d.7-2 + XBUS-02/XPD-00: on Span 3 + XBUS-02/XPD-10: on Span 4 + XBUS-02/XPD-20: on Span 5 + XBUS-02/XPD-30: on Span 6 + XBUS-01 [usb:00000128] usb-0000:00:1d.7-1 + XBUS-01/XPD-00: on Span 7 + XBUS-01/XPD-10: on Span 8 + XBUS-01/XPD-20: on Span 9 + XBUS-01/XPD-30: on Span 10 + +In this example the XBUS-02 has an empty serial number and thus +becomes the first Astribank. The other two are sorted according to their +serial numbers. =head1 FILES @@ -117,7 +127,4 @@ registered. Writing to it 0 or 1 registers / unregisters the device. This should allow you to register / unregister a specific XPD rather than all of them. -Unregistering an XPD will fail if the span is in use (has some channels -that are in use by e.g. Asterisk). - =back diff --git a/xpp/xbus-core.c b/xpp/xbus-core.c index 6daa3ff..3935571 100644 --- a/xpp/xbus-core.c +++ b/xpp/xbus-core.c @@ -298,7 +298,6 @@ void dump_xframe(const char msg[], const xbus_t *xbus, const xframe_t *xframe) uint16_t nextpos; int num = 1; bool do_print; - static int rate_limit; unsigned long flags; spin_lock_irqsave(&serialize_dump_xframe, flags); @@ -341,8 +340,12 @@ void dump_xframe(const char msg[], const xbus_t *xbus, const xframe_t *xframe) if(XPACKET_OP(pack) != XPROTO_NAME(GLOBAL,PCM_READ) && XPACKET_OP(pack) != XPROTO_NAME(GLOBAL,PCM_WRITE)) do_print = 1; - if((print_dbg & DBG_PCM) && ((rate_limit % 1003) == 0)) - do_print = 1; + else if(print_dbg & DBG_PCM) { + static int rate_limit; + + if((rate_limit++ % 1003) == 0) + do_print = 1; + } if(do_print) { if(num == 1) { XBUS_DBG(ANY, xbus, "%s: frame_len=%d. %s\n", diff --git a/xpp/xdefs.h b/xpp/xdefs.h index 23719f6..078e5a3 100644 --- a/xpp/xdefs.h +++ b/xpp/xdefs.h @@ -70,7 +70,7 @@ struct list_head { struct list_head *next; struct list_head *prev; }; #define XPD_DESCLEN 20 #define XBUS_NAMELEN 20 /* must be <= from maximal workqueue name */ #define XBUS_DESCLEN 40 -#define SERIAL_SIZE 8 /* our EEPROM limit */ +#define SERIALNUM_SIZE 20 #define UNIT_BITS 3 /* Bit for Astribank unit number */ #define SUBUNIT_BITS 3 /* Bit for Astribank subunit number */ diff --git a/xpp/xpd.h b/xpp/xpd.h index 6027ee1..3949adb 100644 --- a/xpp/xpd.h +++ b/xpp/xpd.h @@ -185,9 +185,12 @@ struct xbus_poller { * An xbus is a transport layer for Xorcom Protocol commands */ struct xbus { - char busname[XBUS_NAMELEN]; /* only xbus_new set this */ - char busdesc[XBUS_DESCLEN]; /* lowlevel drivers set this */ - char serialnum[SERIAL_SIZE]; /* lowlevel drivers set this */ + char busname[XBUS_NAMELEN]; /* set by xbus_new() */ + + /* low-level bus drivers set these 2 fields */ + char busdesc[XBUS_DESCLEN]; + char serialnum[SERIALNUM_SIZE]; + int num; xbus_ops_t *ops; struct xpd *xpds[MAX_XPDS]; diff --git a/xpp/xpp_usb.c b/xpp/xpp_usb.c index 6ed7a39..5d34554 100644 --- a/xpp/xpp_usb.c +++ b/xpp/xpp_usb.c @@ -28,6 +28,24 @@ # undef USB_FIELDS_MISSING #else # define USB_FIELDS_MISSING + +# define USB_MAX_STRING 128 +# define USB_GET_STRING(udev,field,buf) \ + do { \ + if((udev)->descriptor.field) { \ + char tmp[USB_MAX_STRING]; \ + if(usb_string((udev), (udev)->descriptor.field, tmp, sizeof(tmp)) > 0) \ + snprintf((buf), USB_MAX_STRING, "%s", tmp); \ + } \ + } while(0); +# define USB_GET_IFACE_NAME(udev,iface,buf) \ + do { \ + if((iface)->desc.iInterface) { \ + char tmp[USB_MAX_STRING]; \ + if(usb_string((udev), (iface)->desc.iInterface, tmp, sizeof(tmp)) > 0) \ + snprintf((buf), USB_MAX_STRING, "%s", tmp); \ + } \ + } while(0); #endif #include @@ -173,6 +191,20 @@ typedef struct xpp_usb_bus { /* metrics */ struct timeval last_tx; unsigned int max_tx_delay; + +#ifdef USB_FIELDS_MISSING + /* storage for missing strings in old kernels */ + char manufacturer[USB_MAX_STRING]; + char product[USB_MAX_STRING]; + char serial[USB_MAX_STRING]; + char interface_name[USB_MAX_STRING]; +#else + const char *manufacturer; + const char *product; + const char *serial; + const char *interface_name; +#endif + } xusb_t; static spinlock_t xusb_lock = SPIN_LOCK_UNLOCKED; @@ -657,9 +689,18 @@ static int xusb_probe(struct usb_interface *interface, const struct usb_device_i goto probe_failed; } #ifndef USB_FIELDS_MISSING - INFO("XUSB: manufacturer=[%s] product=[%s] serial=[%s] interface=[%s]\n", - udev->manufacturer, udev->product, udev->serial, iface_desc->string); + xusb->serial = udev->serial; + xusb->manufacturer = udev->manufacturer; + xusb->product = udev->product; + xusb->interface_name = iface_desc->string; +#else + USB_GET_STRING(udev, iSerialNumber, xusb->serial); + USB_GET_STRING(udev, iManufacturer, xusb->manufacturer); + USB_GET_STRING(udev, iProduct, xusb->product); + USB_GET_IFACE_NAME(udev, iface_desc, xusb->interface_name); #endif + INFO("XUSB: manufacturer=[%s] product=[%s] serial=[%s] interface=[%s]\n", + xusb->manufacturer, xusb->product, xusb->serial, xusb->interface_name); /* allow device read, write and ioctl */ xusb->present = 1; @@ -704,11 +745,8 @@ static int xusb_probe(struct usb_interface *interface, const struct usb_device_i usb_make_path(udev, path, XBUS_DESCLEN); // May trunacte... ignore snprintf(xbus->busdesc, XBUS_DESCLEN, "%s", path); } -#ifndef USB_FIELDS_MISSING - if(udev->serial) - memcpy(xbus->serialnum, udev->serial, SERIAL_SIZE); -#endif - + if(xusb->serial && xusb->serial[0]) + snprintf(xbus->serialnum, SERIALNUM_SIZE, "usb:%s", xusb->serial); DBG(GENERAL, "GOT XPP USB BUS #%d: %s (type=%d)\n", i, xbus->busdesc, xbus->bus_type); xusb_array[i] = xusb; @@ -992,11 +1030,9 @@ static int xusb_read_proc(char *page, char **start, off_t off, int count, int *e xusb->udev->bus->busnum, xusb->udev->devnum ); -#ifndef USB_FIELDS_MISSING - len += sprintf(page + len, "USB: manufacturer=%s\n", xusb->udev->manufacturer); - len += sprintf(page + len, "USB: product=%s\n", xusb->udev->product); - len += sprintf(page + len, "USB: serial=%s\n", xusb->udev->serial); -#endif + len += sprintf(page + len, "USB: manufacturer=%s\n", xusb->manufacturer); + len += sprintf(page + len, "USB: product=%s\n", xusb->product); + len += sprintf(page + len, "USB: serial=%s\n", xusb->serial); len += sprintf(page + len, "Minor: %d\n" "Model Info: Bus Type=%d (%s)\n", xusb->minor, diff --git a/xpp/xpp_zap.c b/xpp/xpp_zap.c index 8f63360..67de877 100644 --- a/xpp/xpp_zap.c +++ b/xpp/xpp_zap.c @@ -1491,11 +1491,11 @@ int xpp_ioctl(struct zt_chan *chan, unsigned int cmd, unsigned long arg) if (ret != -ENOTTY) return ret; } - DBG(GENERAL, "ENOTTY: chan=%d cmd=0x%x\n", pos, cmd); - DBG(GENERAL, " IOC_TYPE=0x%02X\n", _IOC_TYPE(cmd)); - DBG(GENERAL, " IOC_DIR=0x%02X\n", _IOC_DIR(cmd)); - DBG(GENERAL, " IOC_NR=0x%02X\n", _IOC_NR(cmd)); - DBG(GENERAL, " IOC_SIZE=0x%02X\n", _IOC_SIZE(cmd)); + XPD_DBG(GENERAL, xpd, "ENOTTY: chan=%d cmd=0x%x\n", pos, cmd); + XPD_DBG(GENERAL, xpd, " IOC_TYPE=0x%02X\n", _IOC_TYPE(cmd)); + XPD_DBG(GENERAL, xpd, " IOC_DIR=0x%02X\n", _IOC_DIR(cmd)); + XPD_DBG(GENERAL, xpd, " IOC_NR=0x%02X\n", _IOC_NR(cmd)); + XPD_DBG(GENERAL, xpd, " IOC_SIZE=0x%02X\n", _IOC_SIZE(cmd)); return -ENOTTY; } return 0; diff --git a/xpp/xproto.c b/xpp/xproto.c index 45ab125..89417b8 100644 --- a/xpp/xproto.c +++ b/xpp/xproto.c @@ -142,8 +142,12 @@ int packet_process(xbus_t *xbus, xpacket_t *pack) BUG_ON(!pack); if(!valid_xpd_addr(&XPACKET_ADDR(pack))) { - if(printk_ratelimit()) + if(printk_ratelimit()) { + XBUS_NOTICE(xbus, "%s: from %d%d: bad address.\n", + __FUNCTION__, + XPACKET_ADDR(pack).unit, XPACKET_ADDR(pack).subunit); dump_packet("packet_process -- bad address", pack, print_dbg); + } goto out; } op = XPACKET_OP(pack); @@ -213,6 +217,10 @@ int xframe_receive(xbus_t *xbus, xframe_t *xframe) struct timeval now; int usec; + if(!down_read_trylock(&xbus->in_use)) { + XBUS_DBG(GENERAL, xbus, "Dropped xframe. Is in_use\n"); + return -ENODEV; + } p = xpacket_start = xframe->packets; xframe_end = xpacket_start + XFRAME_LEN(xframe); if(XFRAME_LEN(xframe) < RPACKET_HEADERSIZE) { @@ -228,22 +236,27 @@ int xframe_receive(xbus_t *xbus, xframe_t *xframe) * We want to check that xframes do not mix PCM and other commands */ is_pcm = XPACKET_IS_PCM((xpacket_t *)p); - if(print_dbg & DBG_PCM) { - static int rate_limit; - - if(is_pcm && ((rate_limit++ % 1003) == 0)) - dump_xframe("RX_XFRAME_PCM", xbus, xframe); - } + if(is_pcm && (print_dbg & DBG_PCM)) + dump_xframe("RX_XFRAME_PCM", xbus, xframe); do { pack = (xpacket_t *)p; len = XPACKET_LEN(pack); /* Sanity checks */ - if(unlikely(is_pcm && XPACKET_OP(pack) != XPROTO_NAME(GLOBAL,PCM_READ) && printk_ratelimit())) { - XBUS_DBG(GENERAL, xbus, "Non-PCM packet within a PCM xframe\n"); - dump_xframe("In PCM xframe", xbus, xframe); + if(unlikely(is_pcm && XPACKET_OP(pack) != XPROTO_NAME(GLOBAL,PCM_READ))) { + static int rate_limit; + + if((rate_limit++ % 1003) == 0) { + XBUS_DBG(GENERAL, xbus, "Non-PCM packet within a PCM xframe\n"); + dump_xframe("In PCM xframe", xbus, xframe); + } // goto bad_proto; - } else if(unlikely(!is_pcm && XPACKET_OP(pack) == XPROTO_NAME(GLOBAL,PCM_READ) && printk_ratelimit())) { - XBUS_DBG(GENERAL, xbus, "A PCM packet within a Non-PCM xframe\n"); + } else if(unlikely(!is_pcm && XPACKET_OP(pack) == XPROTO_NAME(GLOBAL,PCM_READ))) { + static int rate_limit; + + if((rate_limit++ % 1003) == 0) { + XBUS_DBG(GENERAL, xbus, "A PCM packet within a Non-PCM xframe\n"); + dump_xframe("In Non-PCM xframe", xbus, xframe); + } // goto bad_proto; } p += len; @@ -270,6 +283,7 @@ out: if(usec > xbus->max_rx_process) xbus->max_rx_process = usec; xbus->ops->xframe_free(xbus, xframe); + up_read(&xbus->in_use); return ret; bad_proto: ret = -EPROTO; diff --git a/xpp/xproto.h b/xpp/xproto.h index 2eb6d18..93ce3a8 100644 --- a/xpp/xproto.h +++ b/xpp/xproto.h @@ -127,6 +127,8 @@ void xpd_set_addr(struct xpd_addr *addr, int xpd_num); do { \ int len = RPACKET_SIZE(card,op); \ \ + if(!xbus->hardware_exists) \ + return -ENODEV; \ frm = xbus->ops->xframe_new(xbus, GFP_ATOMIC); \ if(!frm) \ return -ENOMEM; \ -- cgit v1.2.3