[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819

Michael 'Mickey' Lauer mickey at vanille-media.de
Sat Aug 6 08:19:58 UTC 2011


The following commit has been merged in the debian branch:
commit 3dbf67db352d8b8f72e84a92165d595291d46666
Author: Antonio Ospite <ospite at studenti.unina.it>
Date:   Fri May 21 14:13:54 2010 +0200

    ogsmd: freescale_neptune, fix init for gen2 EzX phones
    
    Gen2 EzX phones need to open a different set of dlci lines to make BP
    finish its initialization. By using the union of the gen1 and gen2 dlci
    lines sets, and ignoring errors about invalid lines for a given
    generation, we can make init work on both with the same code.
    
    Signed-off-by: Antonio Ospite <ospite at studenti.unina.it>

diff --git a/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py b/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py
index 11a3dbf..ce25ff6 100644
--- a/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py
+++ b/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py
@@ -136,19 +136,20 @@ class FreescaleNeptune( AbstractModem ):
         subprocess.check_call(['modprobe', 'ts27010mux'])
 
         N_TS2710 = 19
-        dlci_lines = [0, 1, 2, 3, 4, 5, 6, 7, 8]
+        dlci_lines = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
         devpath  = "/dev/ttyIPC0"
         counter = 10
 
         # Loop when opening /dev/ttyIPC0 to have some tolerance
         ipc = None
         while True:
-            logger.debug("Trying to open %s..." % devpath)
+            logger.debug("Trying to open %s... (%d)" % (devpath, counter))
             counter -= 1
             try:
                 ipc = os.open(devpath, os.O_RDWR)
             except OSError as e:
-                if e.errno == errno.ENODEV:
+                if e.errno == errno.ENODEV and counter > 0:
+                    time.sleep(2)
                     continue
 
             if ipc or counter == 0:
@@ -171,7 +172,7 @@ class FreescaleNeptune( AbstractModem ):
                 fd = os.open(devpath, os.O_RDWR | os.O_NOCTTY)
             except OSError as e:
                 logger.error("%s: %s" % (devpath, e.strerror))
-                return False
+                #return False
 
             logger.debug("Opened %s" % devpath)
             muxfds.append(fd)

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list