Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2015 17:22:46 +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: r291705 - head/sys/dev/ntb/if_ntb
Message-ID:  <201512031722.tB3HMk1g075276@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 */



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