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

Conrad E. Meyer cem at FreeBSD.org
Thu Dec 3 17:22:47 UTC 2015


Author: cem
Date: Thu Dec  3 17:22:45 2015
New Revision: 291705
URL: https://svnweb.freebsd.org/changeset/base/291705

Log:
  if_ntb: Log error *before* zeroing relevant variables
  
  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	Thu Dec  3 17:21:10 2015	(r291704)
+++ head/sys/dev/ntb/if_ntb/if_ntb.c	Thu Dec  3 17:22:45 2015	(r291705)
@@ -1358,10 +1358,10 @@ ntb_set_mw(struct ntb_transport_ctx *nt,
 	mw->virt_addr = contigmalloc(mw->buff_size, M_NTB_IF, M_ZERO, 0,
 	    mw->addr_limit, mw->xlat_align, 0);
 	if (mw->virt_addr == NULL) {
+		ntb_printf(0, "Unable to allocate MW buffer of size %zu/%zu\n",
+		    mw->buff_size, mw->xlat_size);
 		mw->xlat_size = 0;
 		mw->buff_size = 0;
-		printf("ntb: Unable to allocate MW buffer of size %zu\n",
-		    mw->xlat_size);
 		return (ENOMEM);
 	}
 	/* TODO: replace with bus_space_* functions */


More information about the svn-src-head mailing list