backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] backports: Add return value to backport_pci_disable_link_state()
@ 2019-11-16 18:36 Hauke Mehrtens
  2019-11-16 18:36 ` [PATCH 2/3] backports: Adapt to changes to skb_get_hash_perturb() Hauke Mehrtens
  2019-11-16 18:36 ` [PATCH 3/3] backports: Add kvcalloc() Hauke Mehrtens
  0 siblings, 2 replies; 7+ messages in thread
From: Hauke Mehrtens @ 2019-11-16 18:36 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

Since Linux upstream commit 4cfd21885592 ("PCI: let
pci_disable_link_state propagate errors") The
backport_pci_disable_link_state() function can return an error. This
return code is now used by the mt76 driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/pci.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h
index 84c4e8f6..f0aacbf6 100644
--- a/backport/backport-include/linux/pci.h
+++ b/backport/backport-include/linux/pci.h
@@ -236,4 +236,13 @@ static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
 	(PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX)
 #endif
 
+#if LINUX_VERSION_IS_LESS(5,3,0)
+static inline int backport_pci_disable_link_state(struct pci_dev *pdev, int state)
+{
+	pci_disable_link_state(pdev, state);
+	return 0;
+}
+#define pci_disable_link_state LINUX_BACKPORT(pci_disable_link_state)
+#endif /* < 5.3 */
+
 #endif /* _BACKPORT_LINUX_PCI_H */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-11-19 19:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-16 18:36 [PATCH 1/3] backports: Add return value to backport_pci_disable_link_state() Hauke Mehrtens
2019-11-16 18:36 ` [PATCH 2/3] backports: Adapt to changes to skb_get_hash_perturb() Hauke Mehrtens
2019-11-19  9:00   ` Johannes Berg
2019-11-16 18:36 ` [PATCH 3/3] backports: Add kvcalloc() Hauke Mehrtens
2019-11-19  8:59   ` Johannes Berg
2019-11-19 19:12     ` Hauke Mehrtens
2019-11-19 19:38       ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).