diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2017-08-03 21:19:43 +0300 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2017-11-19 04:37:11 +0300 |
commit | 48c302dc8f3acc1b0ef56a28569bc6a35b9b0e60 (patch) | |
tree | 5fd88d18529d648ca29527592fa1e51004f17cc0 /include | |
parent | c082b04c9d40f69dacd93a151db114299f5de6eb (diff) | |
download | linux-48c302dc8f3acc1b0ef56a28569bc6a35b9b0e60.tar.xz |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/switchtec.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h index 9c2be7631257..d8159944f013 100644 --- a/include/linux/switchtec.h +++ b/include/linux/switchtec.h @@ -353,6 +353,10 @@ struct switchtec_dev { wait_queue_head_t event_wq; atomic_t event_cnt; + + struct work_struct link_event_work; + void (*link_notifier)(struct switchtec_dev *stdev); + u8 link_event_count[SWITCHTEC_MAX_PFF_CSR]; }; static inline struct switchtec_dev *to_stdev(struct device *dev) |