PERFORCE change 101447 for review

John Birrell jb at FreeBSD.org
Thu Jul 13 09:24:38 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=101447

Change 101447 by jb at jb_freebsd2 on 2006/07/13 09:24:02

	Remove all my debugging cruft now that mpt works on sun4v.
	
	We have disks! We have disks! We have disks! We have disks!
	
	(and the crowd cheered!)

Affected files ...

.. //depot/projects/kmacy_sun4v_stable/src/sys/dev/mpt/mpt_cam.c#6 edit

Differences ...

==== //depot/projects/kmacy_sun4v_stable/src/sys/dev/mpt/mpt_cam.c#6 (text+ko) ====

@@ -188,7 +188,6 @@
 	if ((mpt->mpt_proto_flags & MPI_PORTFACTS_PROTOCOL_INITIATOR) != 0
 	 || (mpt->mpt_proto_flags & MPI_PORTFACTS_PROTOCOL_TARGET) != 0
 	 || (mpt->ioc_page2 != NULL && mpt->ioc_page2->MaxPhysDisks != 0)) {
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 		return (0);
 	}
 	return (ENODEV);
@@ -202,12 +201,10 @@
 	int		 maxq;
 	int		 error;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	TAILQ_INIT(&mpt->request_timeout_list);
 	maxq = (mpt->mpt_global_credits < MPT_MAX_REQUESTS(mpt))?
 	    mpt->mpt_global_credits : MPT_MAX_REQUESTS(mpt);
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	handler.reply_handler = mpt_scsi_reply_handler;
 	error = mpt_register_handler(mpt, MPT_HANDLER_REPLY, handler,
 				     &scsi_io_handler_id);
@@ -215,7 +212,6 @@
 		goto cleanup0;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	handler.reply_handler = mpt_scsi_tmf_reply_handler;
 	error = mpt_register_handler(mpt, MPT_HANDLER_REPLY, handler,
 				     &scsi_tmf_handler_id);
@@ -223,7 +219,6 @@
 		goto cleanup0;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * If we're fibre channel and could support target mode, we register
 	 * an ELS reply handler and give it resources.
@@ -242,7 +237,6 @@
 		maxq -= mpt->els_cmds_allocated;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * If we support target mode, we register a reply handler for it,
 	 * but don't add resources until we actually enable target mode.
@@ -256,7 +250,6 @@
 		}
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * We keep one request reserved for timeout TMF requests.
 	 */
@@ -267,7 +260,6 @@
 		goto cleanup0;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * Mark the request as free even though not on the free list.
 	 * There is only one TMF request allowed to be outstanding at
@@ -283,7 +275,6 @@
 		goto cleanup0;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * The rest of this is CAM foo, for which we need to drop our lock
 	 */
@@ -299,7 +290,6 @@
 		goto cleanup;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * Construct our SIM entry.
 	 */
@@ -312,7 +302,6 @@
 		goto cleanup;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * Register exactly this bus.
 	 */
@@ -322,7 +311,6 @@
 		goto cleanup;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (xpt_create_path(&mpt->path, NULL, cam_sim_path(mpt->sim),
 	    CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
 		mpt_prt(mpt, "Unable to allocate Path!\n");
@@ -330,18 +318,15 @@
 		goto cleanup;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * Only register a second bus for RAID physical
 	 * devices if the controller supports RAID.
 	 */
 	if (mpt->ioc_page2 == NULL || mpt->ioc_page2->MaxPhysDisks == 0) {
 		CAMLOCK_2_MPTLOCK(mpt);
-mpt_prt(mpt, "%s(%d): success\n",__FUNCTION__,__LINE__);
 		return (0);
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * Create a "bus" to export all hidden disks to CAM.
 	 */
@@ -353,7 +338,6 @@
 		goto cleanup;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * Register this bus.
 	 */
@@ -363,7 +347,6 @@
 		goto cleanup;
 	}
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (xpt_create_path(&mpt->phydisk_path, NULL,
 	    cam_sim_path(mpt->phydisk_sim),
 	    CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
@@ -372,7 +355,6 @@
 		goto cleanup;
 	}
 	CAMLOCK_2_MPTLOCK(mpt);
-mpt_prt(mpt, "%s(%d): success\n",__FUNCTION__,__LINE__);
 	return (0);
 
 cleanup:
@@ -454,7 +436,6 @@
 static int
 mpt_set_initial_config_fc(struct mpt_softc *mpt)
 {
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 #if	0
 	CONFIG_PAGE_FC_PORT_1 fc;
 	U32 fl;
@@ -507,7 +488,6 @@
 static int
 mpt_read_config_info_sas(struct mpt_softc *mpt)
 {
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	return (0);
 }
 
@@ -517,7 +497,6 @@
 static int
 mpt_set_initial_config_sas(struct mpt_softc *mpt)
 {
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	return (0);
 }
 
@@ -529,7 +508,6 @@
 {
 	int rv, i;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	rv = mpt_read_cfg_header(mpt, MPI_CONFIG_PAGETYPE_SCSI_PORT, 0, 0,
 	    &mpt->mpt_port_page0.Header, FALSE, 5000);
 	if (rv) {
@@ -676,7 +654,6 @@
 	int i, j, pp1val = ((1 << mpt->mpt_ini_id) << 16) | mpt->mpt_ini_id;
 	int error;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	mpt->mpt_disc_enable = 0xff;
 	mpt->mpt_tag_enable = 0;
 
@@ -734,7 +711,6 @@
 int
 mpt_cam_enable(struct mpt_softc *mpt)
 {
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (mpt->is_fc) {
 		if (mpt_read_config_info_fc(mpt)) {
 			return (EIO);
@@ -757,7 +733,6 @@
 			return (EIO);
 		}
 	}
-mpt_prt(mpt, "%s(%d): succeeded\n",__FUNCTION__,__LINE__);
 	return (0);
 }
 
@@ -766,7 +741,6 @@
 {
 	mpt_handler_t handler;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	mpt_terminate_recovery_thread(mpt); 
 
 	handler.reply_handler = mpt_scsi_reply_handler;
@@ -1887,7 +1861,6 @@
 	uint16_t status;
 	uint8_t response;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	error = mpt_scsi_send_tmf(mpt,
 	    (tgt != CAM_TARGET_WILDCARD || lun != CAM_LUN_WILDCARD) ?
 	    MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET :
@@ -1947,7 +1920,6 @@
 	request_t *req;
 	PTR_MSG_FC_PRIMITIVE_SEND_REQUEST fc;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
  	req = mpt_get_request(mpt, FALSE);
 	if (req == NULL) {
 		return (ENOMEM);
@@ -1976,7 +1948,6 @@
 
 	data0 = le32toh(msg->Data[0]);
 	data1 = le32toh(msg->Data[1]);
-printf("%s(%d): msg->Event 0x%x\n",__FUNCTION__,__LINE__,le32toh(msg->Event));
 	switch(msg->Event & 0xFF) {
 	case MPI_EVENT_UNIT_ATTENTION:
 		mpt_prt(mpt, "Bus: 0x%02x TargetID: 0x%02x\n",
@@ -2205,7 +2176,6 @@
 	MSG_SCSI_TASK_MGMT_REPLY *tmf_reply;
 
 	KASSERT(req == mpt->tmf_req, ("TMF Reply not using mpt->tmf_req"));
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 #ifdef	INVARIANTS
 	mpt_req_not_spcl(mpt, req, "mpt_scsi_tmf_reply_handler", __LINE__);
 #endif
@@ -2252,7 +2222,6 @@
 	PTR_MSG_LINK_SERVICE_RSP_REQUEST rsp;
 	uint32_t fl;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * We are going to reuse the ELS request to send this response back.
 	 */
@@ -2322,7 +2291,6 @@
 	int ioindex;
 	int do_refresh = TRUE;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 #ifdef	INVARIANTS
 	KASSERT(mpt_req_on_free_list(mpt, req) == 0,
 	    ("fc_els_reply_handler: req %p:%u for function %x on freelist!",
@@ -2562,7 +2530,6 @@
 static void
 mpt_cam_ioc_reset(struct mpt_softc *mpt, int type)
 {
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * The pending list is already run down by
 	 * the generic handler.  Perform the same
@@ -3214,7 +3181,6 @@
 	uint8_t dval, pval, oval;
 	int rv;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (xpt_path_sim(cts->ccb_h.path) == mpt->phydisk_sim) {
 		if (mpt_map_physdisk(mpt, (union ccb *)cts, &tgt)) {
 			return (-1);
@@ -3326,7 +3292,6 @@
 {
 	PTR_CONFIG_PAGE_SCSI_DEVICE_1 ptr;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	ptr = &mpt->mpt_dev_page1[tgt];
 	if (onoff) {
 		ptr->RequestedParameters |= MPI_SCSIDEVPAGE1_RP_WIDE;
@@ -3340,7 +3305,6 @@
 {
 	PTR_CONFIG_PAGE_SCSI_DEVICE_1 ptr;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	ptr = &mpt->mpt_dev_page1[tgt];
 	ptr->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK;
 	ptr->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_MAX_SYNC_OFFSET_MASK;
@@ -3409,7 +3373,6 @@
 {
 	int error;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	error = mpt_kthread_create(mpt_recovery_thread, mpt,
 	    &mpt->recovery_thread, /*flags*/0,
 	    /*altstack*/0, "mpt_recovery%d", mpt->unit);
@@ -3419,7 +3382,6 @@
 static void
 mpt_terminate_recovery_thread(struct mpt_softc *mpt)
 {
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (mpt->recovery_thread == NULL) {
 		return;
 	}
@@ -3469,7 +3431,6 @@
 	MSG_SCSI_TASK_MGMT *tmf_req;
 	int		    error;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * Wait for any current TMF request to complete.
 	 * We're only allowed to issue one TMF at a time.
@@ -3538,7 +3499,6 @@
 	union ccb	   *ccb;
 	int		    error;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (TAILQ_EMPTY(&mpt->request_timeout_list) != 0) {
 		/*
 		 * No work to do- leave.
@@ -3668,7 +3628,6 @@
 	bus_addr_t paddr;
 	uint32_t fl;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	paddr = req->req_pbuf;
 	paddr += MPT_RQSL(mpt);
 
@@ -3717,7 +3676,6 @@
 	PTR_CMD_BUFFER_DESCRIPTOR cb;
 	bus_addr_t paddr;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	paddr = req->req_pbuf;
 	paddr += MPT_RQSL(mpt);
 	memset(req->req_vbuf, 0, MPT_REQUEST_AREA);
@@ -3741,7 +3699,6 @@
 {
 	int i;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (mpt->is_fc == 0) {
 		return (TRUE);
 	}
@@ -3789,7 +3746,6 @@
 {
 	int i, max;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (mpt->tgt_cmd_ptrs) {
 		return (TRUE);
 	}
@@ -3851,7 +3807,6 @@
 static int
 mpt_enable_lun(struct mpt_softc *mpt, target_id_t tgt, lun_id_t lun)
 {
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (tgt == CAM_TARGET_WILDCARD && lun == CAM_LUN_WILDCARD) {
 		mpt->twildcard = 1;
 	} else if (lun >= MPT_MAX_LUNS) {
@@ -3884,7 +3839,6 @@
 mpt_disable_lun(struct mpt_softc *mpt, target_id_t tgt, lun_id_t lun)
 {
 	int i;
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (tgt == CAM_TARGET_WILDCARD && lun == CAM_LUN_WILDCARD) {
 		mpt->twildcard = 0;
 	} else if (lun >= MPT_MAX_LUNS) {
@@ -3923,7 +3877,6 @@
 	request_t *cmd_req = MPT_TAG_2_REQ(mpt, csio->tag_id);
 	mpt_tgt_state_t *tgt = MPT_TGT_STATE(mpt, cmd_req);
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	switch (tgt->state) {
 	case TGT_STATE_IN_CAM:
 		break;
@@ -4164,7 +4117,6 @@
 	request_t *req;
 	PTR_MSG_TARGET_MODE_ABORT abtp;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	req = mpt_get_request(mpt, FALSE);
 	if (req == NULL) {
 		return (-1);
@@ -4209,7 +4161,6 @@
 	uint32_t fl;
 	int resplen = 0;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	cmd_vbuf = cmd_req->req_vbuf;
 	cmd_vbuf += MPT_RQSL(mpt);
 	tgt = MPT_TGT_STATE(mpt, cmd_req);
@@ -4358,7 +4309,6 @@
 	struct ccb_immed_notify *inot;
 	mpt_tgt_state_t *tgt;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	tgt = MPT_TGT_STATE(mpt, req);
 	inot = (struct ccb_immed_notify *) STAILQ_FIRST(&trtp->inots);
 	if (inot == NULL) {
@@ -4421,7 +4371,6 @@
 	mpt_task_mgmt_t fct = MPT_NIL_TMT_VALUE;
 	uint8_t *cdbp;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	/*
 	 * First, DMA sync the received command- which is in the *request*
 	 * phys area.
@@ -4646,7 +4595,6 @@
 	union ccb *ccb;
 	U16 status;
 
-mpt_prt(mpt, "%s(%d):\n",__FUNCTION__,__LINE__);
 	if (reply_frame == NULL) {
 		/*
 		 * Figure out what the state of the command is.


More information about the p4-projects mailing list