1. 17 Sep, 2015 2 commits
  2. 15 Sep, 2015 34 commits
  3. 04 Sep, 2015 4 commits
    • Bryan O'Donoghue's avatar
      greybus: loopback: make sure to list_del on connection_exit · ff477d07
      Bryan O'Donoghue authored
      gb_loopback_connection_exit does a kfree on a data structure associated
      with a loopback connection but fails to do a corresponding list_del(). On
      subsequent enumerations this can lead to a NULL pointer dereference. Each
      list_add in gb_loopback_connection_init() must have a corresponding
      list_del in gb_loopback_connection_exit(), this patch adds the relevant
      list_del() and ensures that an appropriate mutex protecting gb_dev.list is
      held while doing so.
      Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
      Reported-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      ff477d07
    • Alexandre Bailon's avatar
      greybus: es2: update the bulk_ep_set value accepted by map_to_cpor_ep() · 566830fd
      Alexandre Bailon authored
      The endpoint set 0 is currently considered as invalid.
      But 0 mean muxed cports on ep1 and ep2,
      then it must not return -EINVAL.
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      566830fd
    • Alexandre Bailon's avatar
      greybus: Greybus driver: add a new callbacks to driver · 8afd831e
      Alexandre Bailon authored
      Add connection_create and connection_destroy callbacks.
      
      ES2 can map a cport to a pair of endpoints.
      Because ES2 have only a few pair of endpoints, ES2 need to have
      access to some high level connection information such as protocol id
      to effectively map the cports.
      These callback will provide these information and help ES2 to map cports.
      Signed-off-by: default avatarAlexandre Bailon <abailon@baylibre.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      8afd831e
    • 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