1. 18 9月, 2020 1 次提交
  2. 22 8月, 2020 1 次提交
  3. 30 7月, 2020 2 次提交
  4. 25 7月, 2020 1 次提交
  5. 23 7月, 2020 1 次提交
  6. 10 7月, 2020 5 次提交
  7. 18 6月, 2020 1 次提交
  8. 27 5月, 2020 1 次提交
    • S
      driver core: Update device link status correctly for SYNC_STATE_ONLY links · 8c3e315d
      Saravana Kannan 提交于
      When SYNC_STATE_ONLY support was added in commit 05ef983e ("driver
      core: Add device link support for SYNC_STATE_ONLY flag"),
      SYNC_STATE_ONLY links were treated similar to STATELESS links in terms
      of not blocking consumer probe if the supplier hasn't probed yet.
      
      That caused a SYNC_STATE_ONLY device link's status to not get updated.
      Since SYNC_STATE_ONLY device link is no longer useful once the
      consumer probes, commit 21c27f06 ("driver core: Fix
      SYNC_STATE_ONLY device link implementation") addresses the status
      update issue by deleting the SYNC_STATE_ONLY device link instead of
      complicating the status update code.
      
      However, there are still some cases where we need to update the status
      of a SYNC_STATE_ONLY device link. This is because a SYNC_STATE_ONLY
      device link can later get converted into a normal MANAGED device link
      when a normal MANAGED device link is created between a supplier and
      consumer that already have a SYNC_STATE_ONLY device link between them.
      
      If a SYNC_STATE_ONLY device link's status isn't maintained correctly
      till it's converted to a normal MANAGED device link, then the normal
      MANAGED device link will end up with a wrong link status. This can cause
      a warning stack trace[1] when the consumer device probes successfully.
      
      This commit fixes the SYNC_STATE_ONLY device link status update issue
      where it wouldn't transition correctly from DL_STATE_DORMANT or
      DL_STATE_AVAILABLE to DL_STATE_CONSUMER_PROBE. It also resets the status
      back to DL_STATE_DORMANT or DL_STATE_AVAILABLE if the consumer probe
      fails.
      
      [1] - https://lore.kernel.org/lkml/20200522204120.3b3c9ed6@apollo/
      Fixes: 05ef983e ("driver core: Add device link support for SYNC_STATE_ONLY flag")
      Fixes: 21c27f06 ("driver core: Fix SYNC_STATE_ONLY device link implementation")
      Reported-by: NMichael Walle <michael@walle.cc>
      Tested-by: NMichael Walle <michael@walle.cc>
      Signed-off-by: NSaravana Kannan <saravanak@google.com>
      Reviewed-by: NRafael J. Wysocki <rrafael.j.wysocki@intel.com>
      Link: https://lore.kernel.org/r/20200526220928.49939-1-saravanak@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8c3e315d
  9. 21 5月, 2020 2 次提交
  10. 19 5月, 2020 1 次提交
    • S
      driver core: Fix SYNC_STATE_ONLY device link implementation · 21c27f06
      Saravana Kannan 提交于
      When SYNC_STATE_ONLY support was added in commit 05ef983e ("driver
      core: Add device link support for SYNC_STATE_ONLY flag"),
      device_link_add() incorrectly skipped adding the new SYNC_STATE_ONLY
      device link to the supplier's and consumer's "device link" list.
      
      This causes multiple issues:
      - The device link is lost forever from driver core if the caller
        didn't keep track of it (caller typically isn't expected to). This is
        a memory leak.
      - The device link is also never visible to any other code path after
        device_link_add() returns.
      
      If we fix the "device link" list handling, that exposes a bunch of
      issues.
      
      1. The device link "status" state management code rightfully doesn't
      handle the case where a DL_FLAG_MANAGED device link exists between a
      supplier and consumer, but the consumer manages to probe successfully
      before the supplier. The addition of DL_FLAG_SYNC_STATE_ONLY links break
      this assumption. This causes device_links_driver_bound() to throw a
      warning when this happens.
      
      Since DL_FLAG_SYNC_STATE_ONLY device links are mainly used for creating
      proxy device links for child device dependencies and aren't useful once
      the consumer device probes successfully, this patch just deletes
      DL_FLAG_SYNC_STATE_ONLY device links once its consumer device probes.
      This way, we avoid the warning, free up some memory and avoid
      complicating the device links "status" state management code.
      
      2. Creating a DL_FLAG_STATELESS device link between two devices that
      already have a DL_FLAG_SYNC_STATE_ONLY device link will result in the
      DL_FLAG_STATELESS flag not getting set correctly. This patch also fixes
      this.
      
      Lastly, this patch also fixes minor whitespace issues.
      
      Cc: stable@vger.kernel.org
      Fixes: 05ef983e ("driver core: Add device link support for SYNC_STATE_ONLY flag")
      Signed-off-by: NSaravana Kannan <saravanak@google.com>
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Link: https://lore.kernel.org/r/20200519063000.128819-1-saravanak@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      21c27f06
  11. 15 5月, 2020 3 次提交
  12. 10 5月, 2020 1 次提交
  13. 05 5月, 2020 1 次提交
  14. 28 4月, 2020 1 次提交
  15. 21 4月, 2020 1 次提交
  16. 20 4月, 2020 1 次提交
  17. 27 3月, 2020 1 次提交
    • G
      Revert "driver core: Set fw_devlink to "permissive" behavior by default" · 18555cb6
      Greg Kroah-Hartman 提交于
      This reverts commit c442a0d1 as it
      breaks some of the Raspberry Pi devices.  Marek writes:
      	This patch has just landed in linux-next 20200326. Sadly it
      	breaks booting of the Raspberry Pi3b and Pi4 boards, either in
      	32bit or 64bit mode. There is no warning nor panic message, just
      	a silent freeze. The last message shown on the earlycon is:
      
      	[    0.893217] Serial: 8250/16550 driver, 1 ports, IRQ sharing enabled
      
      so revert it for now and let's try again and add it to linux-next after
      5.7-rc1 is out so that we can try to get more debugging/testing
      happening.
      Reported-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Cc: Rob Herring <robh+dt@kernel.org>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: Saravana Kannan <saravanak@google.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      18555cb6
  18. 24 3月, 2020 1 次提交
  19. 21 3月, 2020 1 次提交
    • S
      driver core: Add device links from fwnode only for the primary device · 4dbe191c
      Saravana Kannan 提交于
      Sometimes, more than one (generally two) device can point to the same
      fwnode.  However, only one device is set as the fwnode's device
      (fwnode->dev) and can be looked up from the fwnode.
      
      Typically, only one of these devices actually have a driver and actually
      probe. If we create device links for all these devices, then the
      suppliers' of these devices (with the same fwnode) will never get a
      sync_state() call because one of their consumer devices will never probe
      (because they don't have a driver).
      
      So, create device links only for the device that is considered as the
      fwnode's device.
      
      One such example of this is the PCI bridge platform_device and the
      corresponding pci_bus device. Both these devices will have the same
      fwnode. It's the platform_device that is registered first and is set as
      the fwnode's device. Also the platform_device is the one that actually
      probes. Without this patch none of the suppliers of a PCI bridge
      platform_device would get a sync_state() callback.
      
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: linux-pci@vger.kernel.org
      Reviewed-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NSaravana Kannan <saravanak@google.com>
      Link: https://lore.kernel.org/r/20200321045448.15192-1-saravanak@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4dbe191c
  20. 05 3月, 2020 5 次提交
  21. 04 3月, 2020 2 次提交
  22. 27 2月, 2020 2 次提交
  23. 15 11月, 2019 1 次提交
  24. 03 11月, 2019 3 次提交