]> git.baikalelectronics.ru Git - kernel.git/commit
NTB: switchtec: Add link event notifier callback
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 3 Aug 2017 18:19:43 +0000 (12:19 -0600)
committerJon Mason <jdmason@kudzu.us>
Sun, 19 Nov 2017 01:37:11 +0000 (20:37 -0500)
commit8c867184ccb609615119e1f636a0712270bf1f4d
tree5fd88d18529d648ca29527592fa1e51004f17cc0
parent6248849fdab58f563ae5532b11667e250582c9b3
NTB: switchtec: Add link event notifier callback

In order for the Switchtec NTB code to handle link change events we
create a notifier callback in the switchtec code which gets called
whenever an appropriate event interrupt occurs.

In order to preserve userspace's ability to follow these events,
we compare the event count with a stored copy from last time we
checked.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Stephen Bates <sbates@raithlin.com>
Reviewed-by: Kurt Schwemmer <kurt.schwemmer@microsemi.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/pci/switch/switchtec.c
include/linux/switchtec.h