aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mason <jon.mason@intel.com>2013-01-17 15:28:45 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-24 11:36:05 -0700
commit7e98a1733e34e1564a2668ea6210df94cf572a22 (patch)
tree6e53b4376bf9feaa657efd69273aec05291bf447
parentb85fffd687b4886e5f4b53ed6af86725fb838eae (diff)
downloadvexpress-lsk-7e98a1733e34e1564a2668ea6210df94cf572a22.tar.gz
NTB: memcpy lockup workaround
commit c336acd3331dcc191a97dbc66a557d47741657c7 upstream. The system will appear to lockup for long periods of time due to the NTB driver spending too much time in memcpy. Avoid this by reducing the number of packets that can be serviced on a given interrupt. Signed-off-by: Jon Mason <jon.mason@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/ntb/ntb_transport.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index cd9745b062e..583a7d3f0ce 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -1034,11 +1034,16 @@ out:
static void ntb_transport_rx(unsigned long data)
{
struct ntb_transport_qp *qp = (struct ntb_transport_qp *)data;
- int rc;
+ int rc, i;
- do {
+ /* Limit the number of packets processed in a single interrupt to
+ * provide fairness to others
+ */
+ for (i = 0; i < qp->rx_max_entry; i++) {
rc = ntb_process_rxc(qp);
- } while (!rc);
+ if (rc)
+ break;
+ }
}
static void ntb_transport_rxc_db(void *data, int db_num)