svn commit: r289155 - head/sys/dev/ntb/if_ntb

Conrad E. Meyer cem at FreeBSD.org
Sun Oct 11 20:59:41 UTC 2015


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


More information about the svn-src-head mailing list