1. Sep 15, 2015
    • Viresh Kumar's avatar
      greybus: manifest: don't reject the interface on failing to initialize a cport · 98d7fbca
      Viresh Kumar authored
      
      
      A 'bundle' represents a device in greybus. It may require multiple
      cports for its functioning. If we fail to setup any cport of a bundle,
      we better reject the complete bundle as the device may not be able to
      function properly then.
      
      But, failing to setup a cport of bundle X doesn't mean that the device
      corresponding to bundle Y will not work properly. Bundles should be
      treated as separate independent devices.
      
      While parsing manifest for an interface, treat bundles as separate
      entities and don't reject entire interface and its bundles on failing to
      initialize a cport. But make sure the bundle which needs the cport, gets
      destroyed properly.
      
      We now release the bundle descriptor before parsing the cports, but that
      shouldn't make any difference.
      
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      98d7fbca
  2. Sep 05, 2015
  3. Sep 04, 2015
    • Viresh Kumar's avatar
      greybus: spi: Allow spi-core to allocate bus numbers dynamically · 2111134f
      Viresh Kumar authored
      
      
      And that fixes these warnings generated with BDB:
      
      WARNING: at /home/viresh/ara/jetson-kernel-build/tegra/fs/sysfs/dir.c:530 sysfs_add_one+0xa4/0xb4()
      sysfs: cannot create duplicate filename '/class/spi_master/spi0'
      Modules linked in: gb_es2(O) gb_phy(O) greybus(O)
      CPU: 2 PID: 111 Comm: kworker/u8:3 Tainted: G        W  O 3.10.40-gf32f9c5ca7e8 #2
      Workqueue: events_unbound svc_process_hotplug [greybus]
      [<c0016844>] (unwind_backtrace+0x0/0x13c) from [<c0012fc4>] (show_stack+0x18/0x1c)
      [<c0012fc4>] (show_stack+0x18/0x1c) from [<c0067d4c>] (warn_slowpath_common+0x5c/0x74)
      [<c0067d4c>] (warn_slowpath_common+0x5c/0x74) from [<c0067d9c>] (warn_slowpath_fmt+0x38/0x48)
      [<c0067d9c>] (warn_slowpath_fmt+0x38/0x48) from [<c01bc218>] (sysfs_add_one+0xa4/0xb4)
      [<c01bc218>] (sysfs_add_one+0xa4/0xb4) from [<c01bcc24>] (sysfs_do_create_link_sd+0xc0/0x20c)
      [<c01bcc24>] (sysfs_do_create_link_sd+0xc0/0x20c) from [<c042e088>] (device_add+0x2e8/0x5f4)
      [<c042e088>] (device_add+0x2e8/0x5f4) from [<c04ae008>] (spi_register_master+0x15c/0x654)
      [<c04ae008>] (spi_register_master+0x15c/0x654) from [<bf015df4>] (gb_spi_connection_init+0x164/0x19c [gb_phy])
      [<bf015df4>] (gb_spi_connection_init+0x164/0x19c [gb_phy]) from [<bf002604>] (gb_connection_bind_protocol+0x160/0x1b4 [greybus])
      [<bf002604>] (gb_connection_bind_protocol+0x160/0x1b4 [greybus]) from [<bf002880>] (gb_connection_create_range+0x228/0x2fc [greybus])
      [<bf002880>] (gb_connection_create_range+0x228/0x2fc [greybus]) from [<bf002994>] (gb_connection_create+0x40/0x48 [greybus])
      [<bf002994>] (gb_connection_create+0x40/0x48 [greybus]) from [<bf000be0>] (gb_manifest_parse+0x61c/0x628 [greybus])
      [<bf000be0>] (gb_manifest_parse+0x61c/0x628 [greybus]) from [<bf0019ac>] (gb_interface_init+0x130/0x170 [greybus])
      [<bf0019ac>] (gb_interface_init+0x130/0x170 [greybus]) from [<bf003bf0>] (svc_process_hotplug+0x214/0x258 [greybus])
      [<bf003bf0>] (svc_process_hotplug+0x214/0x258 [greybus]) from [<c0087ecc>] (process_one_work+0x13c/0x454)
      [<c0087ecc>] (process_one_work+0x13c/0x454) from [<c0088c20>] (worker_thread+0x140/0x3dc)
      [<c0088c20>] (worker_thread+0x140/0x3dc) from [<c008f20c>] (kthread+0xe0/0xe4)
      [<c008f20c>] (kthread+0xe0/0xe4) from [<c000f098>] (ret_from_fork+0x14/0x20)
      
      Reported-by: default avatarMitchell Tasman <tasman@leaflabs.com>
      Suggested-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
      Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
      2111134f
  4. Sep 03, 2015
  5. Sep 02, 2015
  6. Sep 01, 2015
  7. Aug 19, 2015