1. 03 Aug, 2016 5 commits
    • Bryan O'Donoghue's avatar
      greybus: timesync: Printout strobe count on sync failure · ca9551f6
      Bryan O'Donoghue authored
      If we failed to synchronize the FrameTime it would be useful to know how
      many of the expected strobes arrived, for example a value of 0/5 would
      indicate the SVC was completely dead but a value of 4/5 would indicate one
      GPIO pulse got lost i.e. the AP was too slow reacting to an interrupt and
      completely missed one of the strobe events. In either case the actual
      number of strobes is a useful thing to print out.
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Reviewed-by: default avatarAlex Elder <elder@linaro.org>
      Reviewed-by: default avatarVaibhav Hiremath <vaibhav.hiremath@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      ca9551f6
    • Bryan O'Donoghue's avatar
      greybus: timesync: Ensure parallel synchronous calls succeed · 5cb74976
      Bryan O'Donoghue authored
      The guard for initiating a new synchronization operation should allow for
      that resync to happen in every single state except for INVALID. This patch
      fixes by ensuring the guard does just that. With local testing it was
      possible to break a sync to a Module. This hasn't been observed in a buglog
      but should be fixed anyway.
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Acked-by: default avatarDavid Lin <dtwlin@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      5cb74976
    • Bryan O'Donoghue's avatar
      greybus: timesync: Implement a retry mechanism · 7aa278b7
      Bryan O'Donoghue authored
      It's possible the AP could miss an incoming SVC timesync pulse i.e. the AP
      could have interrupts switched off for long enough that one SVC GPIO strobe
      ends up over-lapping another one. TimeSync should be able to deal with this
      type of transitory failure by retrying a failed synchronous TimeSync resync
      up to 'n' number of times. For this patch 'n' has been set to five, which
      is a hand-wavy choice that 'feels' right.
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      7aa278b7
    • David Lin's avatar
      greybus: svc_watchdog: use schedule_delayed_work helper · b6fc2876
      David Lin authored
      Instead of using the queue_delayed_work call for delayed work on
      system_wq, use the schedule_delayed_work helper to be more consistent on
      the style.
      
      Testing Done:
       - Check SVC watchdog is pining after the change.
      Signed-off-by: default avatarDavid Lin <dtwlin@google.com>
      Reviewed-by: default avatarVaibhav Hiremath <vaibhav.hiremath@linaro.org>
      Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      b6fc2876
    • David Lin's avatar
      greybus: interface: delete control device upon enable failure · ea2ff95a
      David Lin authored
      There is an issue that when an interface failed to be enabled due to
      timesync failure, a previously added control device is not deleted as
      part of the error clean-up. This causes a leak in the sysfs file when
      the interface is disabled. This would eventually cause this particular
      interface to be unable to register future control device even after
      unipro_reset. See failure logs below:
      
      [  906.495261] greybus 1-3.3: failed to add to timesync: -19
      [  906.516497] greybus 1-3.3: failed to re-enable interface: -19
      [  907.016016] greybus 1-3.3: Interface removed
      ...
      [ 1623.677343] ------------[ cut here ]------------
      [ 1623.681116] WARNING: at kernel/arche/fs/sysfs/dir.c:530 sysfs_add_one+0x98/0xb4()
      [ 1623.681128] sysfs: cannot create duplicate filename '/bus/greybus/devices/1-3.3.ctrl'
      [ 1623.681252] Call trace:
      [ 1623.681265] [<ffffffc000207b40>] dump_backtrace+0x0/0x268
      [ 1623.681272] [<ffffffc000207db8>] show_stack+0x10/0x1c
      [ 1623.681284] [<ffffffc000ccb890>] dump_stack+0x1c/0x28
      [ 1623.681295] [<ffffffc00021f9dc>] warn_slowpath_common+0x74/0x9c
      [ 1623.681301] [<ffffffc00021fa60>] warn_slowpath_fmt+0x5c/0x80
      [ 1623.681307] [<ffffffc000366624>] sysfs_add_one+0x94/0xb4
      [ 1623.681315] [<ffffffc0003670b4>] sysfs_do_create_link_sd+0x100/0x1c8
      [ 1623.681320] [<ffffffc0003671a8>] sysfs_create_link+0x2c/0x38
      [ 1623.681332] [<ffffffc0005d5890>] bus_add_device+0xd8/0x190
      [ 1623.681338] [<ffffffc0005d39ec>] device_add+0x2b4/0x604
      [ 1623.681349] [<ffffffbffc006dfc>] gb_control_add+0x10/0x40 [greybus]
      [ 1623.681362] [<ffffffbffc003dac>] gb_interface_enable+0x20c/0x3b8 [greybus]
      [ 1623.681373] [<ffffffbffc002a30>] gb_module_add+0x124/0x174 [greybus]
      [ 1623.681385] [<ffffffbffc0082cc>] gb_svc_intf_set_power_mode+0xdd4/0xfe8 [greybus]
      [ 1623.681394] [<ffffffc00023888c>] process_one_work+0x268/0x3c8
      [ 1623.681400] [<ffffffc000239a64>] worker_thread+0x204/0x358
      [ 1623.681410] [<ffffffc00023f43c>] kthread+0xb8/0xc4
      [ 1623.681414] ---[ end trace 44489577dd9220db ]---
      [ 1623.681818] greybus 1-3.3.ctrl: failed to register control device: -17
      
      Testing Done:
       - Continuous unipro_reset stress test
      Signed-off-by: default avatarDavid Lin <dtwlin@google.com>
      Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
      Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: default avatarJeffrey Carlyle <jcarlyle@google.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      ea2ff95a
  2. 28 Jul, 2016 7 commits
  3. 27 Jul, 2016 2 commits
  4. 26 Jul, 2016 9 commits
  5. 22 Jul, 2016 14 commits
  6. 21 Jul, 2016 3 commits