Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Oct 2015 20:59:40 +0000 (UTC)
From:      "Conrad E. Meyer" <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r289155 - head/sys/dev/ntb/if_ntb
Message-ID:  <201510112059.t9BKxeS9087048@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Sun Oct 11 20:59:40 2015
New Revision: 289155
URL: https://svnweb.freebsd.org/changeset/base/289155

Log:
  NTB: MFV 90f9e934: reset tx_index on link toggle
  
  If the NTB link toggles, the driver could stop receiving due to the
  tx_index not being set to 0 on the transmitting size on a link-up event.
  This is due to the driver expecting the incoming data to start at the
  beginning of the receive buffer and not at a random place.
  
  Authored by:	Jon Mason
  Obtained from:	Linux
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/sys/dev/ntb/if_ntb/if_ntb.c

Modified: head/sys/dev/ntb/if_ntb/if_ntb.c
==============================================================================
--- head/sys/dev/ntb/if_ntb/if_ntb.c	Sun Oct 11 20:59:02 2015	(r289154)
+++ head/sys/dev/ntb/if_ntb/if_ntb.c	Sun Oct 11 20:59:40 2015	(r289155)
@@ -562,7 +562,6 @@ ntb_transport_init_queue(struct ntb_netd
 	qp->tx_max_frame = min(transport_mtu + sizeof(struct ntb_payload_header),
 	    tx_size);
 	qp->tx_max_entry = tx_size / qp->tx_max_frame;
-	qp->tx_index = 0;
 
 	callout_init(&qp->link_work, 0);
 	callout_init(&qp->queue_full, 1);
@@ -1192,7 +1191,6 @@ ntb_transport_setup_qp_mw(struct ntb_net
 	    rx_size);
 	qp->rx_max_entry = rx_size / qp->rx_max_frame;
 	qp->rx_index = 0;
-	qp->tx_index = 0;
 
 	qp->remote_rx_info->entry = qp->rx_max_entry;
 
@@ -1206,6 +1204,7 @@ ntb_transport_setup_qp_mw(struct ntb_net
 
 	qp->rx_pkts = 0;
 	qp->tx_pkts = 0;
+	qp->tx_index = 0;
 }
 
 static void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510112059.t9BKxeS9087048>