diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-26 14:37:42 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-26 14:37:42 -0400 |
| commit | b4cec5f66849872d2e9573bc95c2016cb8e530ec (patch) | |
| tree | 4510723798490e1eb1926d7c9ce1b5fce0c3d984 /include/linux | |
| parent | 895a1067d5b83065afbad3bb02c3c464b71f1b3f (diff) | |
| parent | 4f1b50c3e3082b31c94cee2b897bd9f5d0f3e7c8 (diff) | |
Merge tag 'ntb-4.6' of git://github.com/jonmason/ntb
Pull NTB bug fixes from Jon Mason:
"NTB bug fixes for tasklet from spinning forever, link errors,
translation window setup, NULL ptr dereference, and ntb-perf errors.
Also, a modification to the driver API that makes _addr functions
optional"
* tag 'ntb-4.6' of git://github.com/jonmason/ntb:
NTB: Remove _addr functions from ntb_hw_amd
NTB: Make _addr functions optional in the API
NTB: Fix incorrect clean up routine in ntb_perf
NTB: Fix incorrect return check in ntb_perf
ntb: fix possible NULL dereference
ntb: add missing setup of translation window
ntb: stop link work when we do not have memory
ntb: stop tasklet from spinning forever during shutdown.
ntb: perf test: fix address space confusion
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ntb.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/ntb.h b/include/linux/ntb.h index f798e2afba88..6f47562d477b 100644 --- a/include/linux/ntb.h +++ b/include/linux/ntb.h | |||
| @@ -284,7 +284,7 @@ static inline int ntb_dev_ops_is_valid(const struct ntb_dev_ops *ops) | |||
| 284 | /* ops->db_read_mask && */ | 284 | /* ops->db_read_mask && */ |
| 285 | ops->db_set_mask && | 285 | ops->db_set_mask && |
| 286 | ops->db_clear_mask && | 286 | ops->db_clear_mask && |
| 287 | ops->peer_db_addr && | 287 | /* ops->peer_db_addr && */ |
| 288 | /* ops->peer_db_read && */ | 288 | /* ops->peer_db_read && */ |
| 289 | ops->peer_db_set && | 289 | ops->peer_db_set && |
| 290 | /* ops->peer_db_clear && */ | 290 | /* ops->peer_db_clear && */ |
| @@ -295,7 +295,7 @@ static inline int ntb_dev_ops_is_valid(const struct ntb_dev_ops *ops) | |||
| 295 | ops->spad_count && | 295 | ops->spad_count && |
| 296 | ops->spad_read && | 296 | ops->spad_read && |
| 297 | ops->spad_write && | 297 | ops->spad_write && |
| 298 | ops->peer_spad_addr && | 298 | /* ops->peer_spad_addr && */ |
| 299 | /* ops->peer_spad_read && */ | 299 | /* ops->peer_spad_read && */ |
| 300 | ops->peer_spad_write && | 300 | ops->peer_spad_write && |
| 301 | 1; | 301 | 1; |
| @@ -757,6 +757,9 @@ static inline int ntb_peer_db_addr(struct ntb_dev *ntb, | |||
| 757 | phys_addr_t *db_addr, | 757 | phys_addr_t *db_addr, |
| 758 | resource_size_t *db_size) | 758 | resource_size_t *db_size) |
| 759 | { | 759 | { |
| 760 | if (!ntb->ops->peer_db_addr) | ||
| 761 | return -EINVAL; | ||
| 762 | |||
| 760 | return ntb->ops->peer_db_addr(ntb, db_addr, db_size); | 763 | return ntb->ops->peer_db_addr(ntb, db_addr, db_size); |
| 761 | } | 764 | } |
| 762 | 765 | ||
| @@ -948,6 +951,9 @@ static inline int ntb_spad_write(struct ntb_dev *ntb, int idx, u32 val) | |||
| 948 | static inline int ntb_peer_spad_addr(struct ntb_dev *ntb, int idx, | 951 | static inline int ntb_peer_spad_addr(struct ntb_dev *ntb, int idx, |
| 949 | phys_addr_t *spad_addr) | 952 | phys_addr_t *spad_addr) |
| 950 | { | 953 | { |
| 954 | if (!ntb->ops->peer_spad_addr) | ||
| 955 | return -EINVAL; | ||
| 956 | |||
| 951 | return ntb->ops->peer_spad_addr(ntb, idx, spad_addr); | 957 | return ntb->ops->peer_spad_addr(ntb, idx, spad_addr); |
| 952 | } | 958 | } |
| 953 | 959 | ||
