diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-13 03:16:39 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-13 03:16:39 +0400 |
commit | 07f5fef981bd89e92d67a69370c6487679cf66e4 (patch) | |
tree | 172a3f5862ae54d5a4b24a5e9173be8fad44f1c0 /drivers/ntb/ntb_transport.c | |
parent | 96c57ade7e9ba2d1deba635a5989cc111f185dca (diff) | |
parent | f220baad08963a75c78c80cdc1c9e9492ca0eb2a (diff) | |
download | linux-07f5fef981bd89e92d67a69370c6487679cf66e4.tar.xz |
Merge tag 'ntb-3.15' of git://github.com/jonmason/ntb
Pull PCIe non-transparent bridge fixes and features from Jon Mason:
"NTB driver bug fixes to address issues in list traversal, skb leak in
ntb_netdev, a typo, and a leak of msix entries in the error path.
Clean ups of the event handling logic, as well as a overall style
cleanup. Finally, the driver was converted to use the new
pci_enable_msix_range logic (and the refactoring to go along with it)"
* tag 'ntb-3.15' of git://github.com/jonmason/ntb:
ntb: Use pci_enable_msix_range() instead of pci_enable_msix()
ntb: Split ntb_setup_msix() into separate BWD/SNB routines
ntb: Use pci_msix_vec_count() to obtain number of MSI-Xs
NTB: Code Style Clean-up
NTB: client event cleanup
ntb: Fix leakage of ntb_device::msix_entries[] array
NTB: Fix typo in setting one translation register
ntb_netdev: Fix skb free issue in open
ntb_netdev: Fix list_for_each_entry exit issue
Diffstat (limited to 'drivers/ntb/ntb_transport.c')
-rw-r--r-- | drivers/ntb/ntb_transport.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c index 3217f394d45b..9dd63b822025 100644 --- a/drivers/ntb/ntb_transport.c +++ b/drivers/ntb/ntb_transport.c @@ -56,7 +56,6 @@ #include <linux/pci.h> #include <linux/slab.h> #include <linux/types.h> -#include <linux/ntb.h> #include "ntb_hw.h" #define NTB_TRANSPORT_VERSION 3 @@ -107,8 +106,8 @@ struct ntb_transport_qp { struct ntb_rx_info __iomem *rx_info; struct ntb_rx_info *remote_rx_info; - void (*tx_handler) (struct ntb_transport_qp *qp, void *qp_data, - void *data, int len); + void (*tx_handler)(struct ntb_transport_qp *qp, void *qp_data, + void *data, int len); struct list_head tx_free_q; spinlock_t ntb_tx_free_q_lock; void __iomem *tx_mw; @@ -117,8 +116,8 @@ struct ntb_transport_qp { unsigned int tx_max_entry; unsigned int tx_max_frame; - void (*rx_handler) (struct ntb_transport_qp *qp, void *qp_data, - void *data, int len); + void (*rx_handler)(struct ntb_transport_qp *qp, void *qp_data, + void *data, int len); struct list_head rx_pend_q; struct list_head rx_free_q; spinlock_t ntb_rx_pend_q_lock; @@ -129,7 +128,7 @@ struct ntb_transport_qp { unsigned int rx_max_frame; dma_cookie_t last_cookie; - void (*event_handler) (void *data, int status); + void (*event_handler)(void *data, int status); struct delayed_work link_work; struct work_struct link_cleanup; @@ -480,7 +479,7 @@ static void ntb_list_add(spinlock_t *lock, struct list_head *entry, } static struct ntb_queue_entry *ntb_list_rm(spinlock_t *lock, - struct list_head *list) + struct list_head *list) { struct ntb_queue_entry *entry; unsigned long flags; @@ -839,7 +838,7 @@ static void ntb_qp_link_work(struct work_struct *work) } static int ntb_transport_init_queue(struct ntb_transport *nt, - unsigned int qp_num) + unsigned int qp_num) { struct ntb_transport_qp *qp; unsigned int num_qps_mw, tx_size; @@ -1055,7 +1054,7 @@ static void ntb_async_rx(struct ntb_queue_entry *entry, void *offset, if (!chan) goto err; - if (len < copy_bytes) + if (len < copy_bytes) goto err_wait; device = chan->device; @@ -1190,8 +1189,7 @@ out: return 0; err: - ntb_list_add(&qp->ntb_rx_pend_q_lock, &entry->entry, - &qp->rx_pend_q); + ntb_list_add(&qp->ntb_rx_pend_q_lock, &entry->entry, &qp->rx_pend_q); /* Ensure that the data is fully copied out before clearing the flag */ wmb(); hdr->flags = 0; |