[zaptel-commits] tzafrir: branch 1.2 r3142 - in /branches/1.2/xpp: ./ firmwares/ utils/ utils/...

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Tue Oct 16 12:55:06 CDT 2007


Author: tzafrir
Date: Tue Oct 16 12:55:05 2007
New Revision: 3142

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3142
Log:
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.

Added:
    branches/1.2/xpp/Changelog_xpp
      - copied, changed from r3139, branches/1.2/xpp/ChangeLog
    branches/1.2/xpp/firmwares/USB_FW.hex
      - copied, changed from r3139, branches/1.2/xpp/firmwares/USB_1130.hex
    branches/1.2/xpp/utils/zaptel_drivers   (with props)
Removed:
    branches/1.2/xpp/ChangeLog
    branches/1.2/xpp/firmwares/USB_1130.hex
    branches/1.2/xpp/firmwares/USB_1140.hex
    branches/1.2/xpp/firmwares/USB_1150.hex
Modified:
    branches/1.2/xpp/.version
    branches/1.2/xpp/README.Astribank
    branches/1.2/xpp/card_fxo.c
    branches/1.2/xpp/card_fxs.c
    branches/1.2/xpp/card_pri.c
    branches/1.2/xpp/utils/fpga_load.c
    branches/1.2/xpp/utils/xpp_fxloader
    branches/1.2/xpp/utils/zaptel_hardware
    branches/1.2/xpp/utils/zconf/Zaptel/Hardware.pm
    branches/1.2/xpp/utils/zconf/Zaptel/Hardware/PCI.pm
    branches/1.2/xpp/utils/zconf/Zaptel/Hardware/USB.pm
    branches/1.2/xpp/utils/zconf/Zaptel/Xpp.pm
    branches/1.2/xpp/utils/zconf/Zaptel/Xpp/Xbus.pm
    branches/1.2/xpp/utils/zt_registration
    branches/1.2/xpp/xbus-core.c
    branches/1.2/xpp/xdefs.h
    branches/1.2/xpp/xpd.h
    branches/1.2/xpp/xpp_usb.c
    branches/1.2/xpp/xpp_zap.c
    branches/1.2/xpp/xproto.c
    branches/1.2/xpp/xproto.h

Modified: branches/1.2/xpp/.version
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/.version?view=diff&rev=3142&r1=3141&r2=3142
==============================================================================
--- branches/1.2/xpp/.version (original)
+++ branches/1.2/xpp/.version Tue Oct 16 12:55:05 2007
@@ -1,1 +1,1 @@
-trunk-r4786
+branch-rel-4816-r4892

Copied: branches/1.2/xpp/Changelog_xpp (from r3139, branches/1.2/xpp/ChangeLog)
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/Changelog_xpp?view=diff&rev=3142&p1=branches/1.2/xpp/ChangeLog&r1=3139&p2=branches/1.2/xpp/Changelog_xpp&r2=3142
==============================================================================
--- branches/1.2/xpp/ChangeLog (original)
+++ branches/1.2/xpp/Changelog_xpp Tue Oct 16 12:55:05 2007
@@ -1,3 +1,17 @@
+Wed Oct 16 2007 Tzafrir Cohen <tzafrir.cohen at xorcom.com> - 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 <oron at actcom.co.il> - xpp.r4786
   * New firmware protocol version: 2.9 .
   * fpga_load: initial clean-ups before interface split.
@@ -13,7 +27,6 @@
 
 Tue Sep 11 2007 Oron Peled <oron at actcom.co.il> - 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
@@ -23,8 +36,8 @@
     - 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.
+  * 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:
@@ -33,26 +46,34 @@
       Possible values are 'zaptel', 'zapata' and 'users'.
     - Defaults to creating zaptel and zapata.
 
-Mon Sep  3 2007 Tzafrir Cohen <tzafrir.cohen at xorcom.com> - xpp.r4584
+  * 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 only once.
+  * Less noise at build time - don't echo version, test compile ony once.
   * zapconf can generate users.conf snippets.
-  * xpd_pri: initial version.
 
 Thu Aug 16 2007 Tzafrir Cohen <tzafrir.cohen at xorcom.com> - 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 <oron at actcom.co.il> - 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 <oron at actcom.co.il> - xpp.r4415
   * Show Astribank 6+2 as 6/2 channels and not 8/8 channels.
@@ -81,6 +102,7 @@
     (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 '<Unit><Subunit>' (r4196)
   * Proper support for ZT_VMWI ioctl, if used in zaptel (r4092)

Modified: branches/1.2/xpp/README.Astribank
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/README.Astribank?view=diff&rev=3142&r1=3141&r2=3142
==============================================================================
--- branches/1.2/xpp/README.Astribank (original)
+++ branches/1.2/xpp/README.Astribank Tue Oct 16 12:55:05 2007
@@ -139,7 +139,7 @@
 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 @@
 /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:
-
-  fpga_load -D /proc/bus/usb/MMM/NNN -I /usr/share/zaptel/FPGA_FXS.hex
+following command in order to load the FPGA firmware manually:
+
+  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 @@
 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:

Modified: branches/1.2/xpp/card_fxo.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_fxo.c?view=diff&rev=3142&r1=3141&r2=3142
==============================================================================
--- branches/1.2/xpp/card_fxo.c (original)
+++ branches/1.2/xpp/card_fxo.c Tue Oct 16 12:55:05 2007
@@ -592,6 +592,8 @@
 	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");

Modified: branches/1.2/xpp/card_fxs.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_fxs.c?view=diff&rev=3142&r1=3141&r2=3142
==============================================================================
--- branches/1.2/xpp/card_fxs.c (original)
+++ branches/1.2/xpp/card_fxs.c Tue Oct 16 12:55:05 2007
@@ -613,7 +613,8 @@
 	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);

Modified: branches/1.2/xpp/card_pri.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/card_pri.c?view=diff&rev=3142&r1=3141&r2=3142
==============================================================================
--- branches/1.2/xpp/card_pri.c (original)
+++ branches/1.2/xpp/card_pri.c Tue Oct 16 12:55:05 2007
@@ -528,7 +528,8 @@
 	}
 	/* 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

Copied: branches/1.2/xpp/firmwares/USB_FW.hex (from r3139, branches/1.2/xpp/firmwares/USB_1130.hex)
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/firmwares/USB_FW.hex?view=diff&rev=3142&p1=branches/1.2/xpp/firmwares/USB_1130.hex&r1=3139&p2=branches/1.2/xpp/firmwares/USB_FW.hex&r2=3142
==============================================================================
--- branches/1.2/xpp/firmwares/USB_1130.hex (original)
+++ branches/1.2/xpp/firmwares/USB_FW.hex Tue Oct 16 12:55:05 2007
@@ -1,311 +1,223 @@
 # 
-# $Id: USB_1130.hex 4314 2007-07-05 15:36:51Z zohar $ 
+# $Id:$ 
 # 
-: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
+: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
 

Modified: branches/1.2/xpp/utils/fpga_load.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/fpga_load.c?view=diff&rev=3142&r1=3141&r2=3142
==============================================================================
--- branches/1.2/xpp/utils/fpga_load.c (original)
+++ branches/1.2/xpp/utils/fpga_load.c Tue Oct 16 12:55:05 2007
@@ -33,6 +33,52 @@
 #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 @@
 	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 @@
 	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 @@
 	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 @@
 		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 @@
 			}
 		}
 	}
+	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 @@
 		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 @@
 	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;
 }
 

Modified: branches/1.2/xpp/utils/xpp_fxloader
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/xpp_fxloader?view=diff&rev=3142&r1=3141&r2=3142
==============================================================================
--- branches/1.2/xpp/utils/xpp_fxloader (original)
+++ branches/1.2/xpp/utils/xpp_fxloader Tue Oct 16 12:55:05 2007
@@ -71,6 +71,7 @@
 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 @@
 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 @@
 	$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"
 		;;

Added: branches/1.2/xpp/utils/zaptel_drivers
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zaptel_drivers?view=auto&rev=3142
==============================================================================
--- branches/1.2/xpp/utils/zaptel_drivers (added)
+++ branches/1.2/xpp/utils/zaptel_drivers Tue Oct 16 12:55:05 2007
@@ -1,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";

Propchange: branches/1.2/xpp/utils/zaptel_drivers
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: branches/1.2/xpp/utils/zaptel_drivers
------------------------------------------------------------------------------
    svn:executable = *

Propchange: branches/1.2/xpp/utils/zaptel_drivers
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: branches/1.2/xpp/utils/zaptel_drivers
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: branches/1.2/xpp/utils/zaptel_hardware
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zaptel_hardware?view=diff&rev=3142&r1=3141&r2=3142
==============================================================================
--- branches/1.2/xpp/utils/zaptel_hardware (original)
+++ branches/1.2/xpp/utils/zaptel_hardware Tue Oct 16 12:55:05 2007
@@ -33,8 +33,7 @@
 	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 @@
 }
 
 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 @@
 	}
 }
 
-
 __END__
 
 =head1 NAME
 
-zaptel_hardware - Shows Zaptel hardware devices.
+zaptel_hardware - Shows Zaptel hardware devices. 
 
 =head1 SYNOPSIS
 
@@ -91,10 +92,44 @@
 
 =head1 DESCRIPTION
 
-Show all zaptel hardware devices, both used and unused.

[... 835 lines stripped ...]



More information about the zaptel-commits mailing list