Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2012 23:24:57 +0000 (UTC)
From:      Matt Jacob <mjacob@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r236426 - head/sys/cam/ctl
Message-ID:  <201206012324.q51NOvuT050561@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjacob
Date: Fri Jun  1 23:24:56 2012
New Revision: 236426
URL: http://svn.freebsd.org/changeset/base/236426

Log:
  Print FC PortID as a hex number. This makes it easy to
  figure out domain, etc..
  
  Zero ATIO and INOTify allocations. It makes for much
  less guesswork when looking at the structure and
  seeing 'deadc0de' present.
  
  Reviewed by:	kdm
  MFC after:	2 weeks
  Sponsored by:	Spectralogic

Modified:
  head/sys/cam/ctl/scsi_ctl.c

Modified: head/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- head/sys/cam/ctl/scsi_ctl.c	Fri Jun  1 23:19:39 2012	(r236425)
+++ head/sys/cam/ctl/scsi_ctl.c	Fri Jun  1 23:24:56 2012	(r236426)
@@ -490,7 +490,7 @@ ctlfeasync(void *callback_arg, uint32_t 
 
 			dev_chg = (struct ac_device_changed *)ac->contract_data;
 
-			printf("%s: WWPN %#jx port %u path %u target %u %s\n",
+			printf("%s: WWPN %#jx port 0x%06x path %u target %u %s\n",
 			       __func__, dev_chg->wwpn, dev_chg->port,
 			       xpt_path_path_id(path), dev_chg->target,
 			       (dev_chg->arrived == 0) ?  "left" : "arrived");
@@ -582,7 +582,7 @@ ctlferegister(struct cam_periph *periph,
 		union ccb *new_ccb;
 
 		new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE,
-					      M_NOWAIT);
+					      M_ZERO|M_NOWAIT);
 		if (new_ccb == NULL) {
 			status = CAM_RESRC_UNAVAIL;
 			break;
@@ -616,7 +616,7 @@ ctlferegister(struct cam_periph *periph,
 		union ccb *new_ccb;
 
 		new_ccb = (union ccb *)malloc(sizeof(*new_ccb), M_CTLFE,
-					      M_NOWAIT);
+					      M_ZERO|M_NOWAIT);
 		if (new_ccb == NULL) {
 			status = CAM_RESRC_UNAVAIL;
 			break;



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