Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jun 2009 06:23:00 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 164934 for review
Message-ID:  <200906230623.n5N6N0Ug047083@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=164934

Change 164934 by mav@mav_mavbook on 2009/06/23 06:22:23

	Remove extra debugging.

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#34 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sys/dev/ahci/ahci.c#34 (text+ko) ====

@@ -359,7 +359,6 @@
 	int unit;
 
 	is = ATA_INL(ctlr->r_mem, AHCI_IS);
-//device_printf(ctlr->dev, "%s is %08x inum %d\n", __func__, is, irq->r_irq_rid);
 	if (irq->mode == AHCI_IRQ_MODE_ALL)
 		unit = 0;
 	else	/* AHCI_IRQ_MODE_AFTER */
@@ -381,13 +380,10 @@
 {
 	struct ahci_controller_irq *irq = data;
 	struct ahci_controller *ctlr = irq->ctlr;
-//	u_int32_t is;
 	void *arg;
 	int unit;
 
 	unit = irq->r_irq_rid - 1;
-//		is = ATA_INL(ctlr->r_mem, AHCI_IS);
-//device_printf(ctlr->dev, "%s is %08x one %d\n", __func__, is, irq->r_irq_rid);
 	if ((arg = ctlr->interrupt[unit].argument))
 	    ctlr->interrupt[unit].function(arg);
 }
@@ -851,7 +847,6 @@
 	/* Read command statuses. */
 	cstatus = ATA_INL(ch->r_mem, AHCI_P_CI);
 	sstatus = ATA_INL(ch->r_mem, AHCI_P_SACT);
-//device_printf(dev, "%s is %08x cs %08x ss %08x rslots %08x\n", __func__, istatus, cstatus, sstatus, ch->rslots);
 	/* Process PHY events */
 	if (istatus & (AHCI_P_IX_PRC | AHCI_P_IX_PC))
 		ahci_phy_check_events(dev);
@@ -971,7 +966,6 @@
 	ch->lastslot = tag;
 	/* Occupy chosen slot. */
 	slot = &ch->slot[tag];
-//device_printf(slot->dev, "%s slot %d\n", __func__, slot->slot);
 	slot->ccb = ccb;
 	/* Update channel stats. */
 	ch->numrslots++;
@@ -1013,7 +1007,6 @@
 	struct ahci_dma_prd *prd;
 	int i;
 
-//device_printf(slot->dev, "%s slot %d\n", __func__, slot->slot);
 	if (error) {
 		device_printf(slot->dev, "DMA load error\n");
 		if (!ch->readlog)
@@ -1050,7 +1043,6 @@
 	int port = ccb->ccb_h.target_id & 0x0f;
 	int fis_size;
 
-//device_printf(dev, "%s slot %d\n", __func__, slot->slot);
 	/* Get a piece of the workspace for this request */
 	ctp = (struct ahci_cmd_tab *)
 		(ch->dma.work + AHCI_CT_OFFSET + (AHCI_CT_SIZE * slot->slot));
@@ -1097,21 +1089,6 @@
 	slot->state = AHCI_SLOT_RUNNING;
 	ch->rslots |= (1 << slot->slot);
 	ATA_OUTL(ch->r_mem, AHCI_P_CI, (1 << slot->slot));
-/*
-printf("ci %08x is %08x tfd %08x serr %08x sign %08x\n",
-    ATA_INL(ch->r_mem, AHCI_P_CI),
-    ATA_INL(ch->r_mem, AHCI_P_IS),
-    ATA_INL(ch->r_mem, AHCI_P_TFD),
-    ATA_INL(ch->r_mem, AHCI_P_SERR),
-    ATA_INL(ch->r_mem, AHCI_P_SIG));
-DELAY(100000);
-printf("ci %08x is %08x tfd %08x serr %08x sign %08x\n",
-    ATA_INL(ch->r_mem, AHCI_P_CI),
-    ATA_INL(ch->r_mem, AHCI_P_IS),
-    ATA_INL(ch->r_mem, AHCI_P_TFD),
-    ATA_INL(ch->r_mem, AHCI_P_SERR),
-    ATA_INL(ch->r_mem, AHCI_P_SIG));
-*/
 	/* Device reset commands doesn't interrupt. Poll them. */
 	if (ccb->ccb_h.func_code == XPT_ATA_IO &&
 	    (ccb->ataio.cmd.command == ATA_DEVICE_RESET ||
@@ -1159,8 +1136,7 @@
 	struct ahci_channel *ch = device_get_softc(dev);
 	int i;
 
-device_printf(dev, "Timeout on slot %d\n", slot->slot);
-
+	device_printf(dev, "Timeout on slot %d\n", slot->slot);
 	/* Kick controller into sane state. */
 	ahci_stop(ch->dev);
 	ahci_start(ch->dev);
@@ -1192,7 +1168,6 @@
 	struct ahci_channel *ch = device_get_softc(dev);
 	union ccb *ccb = slot->ccb;
 
-//device_printf(dev, "%s slot %d\n", __func__, slot->slot);
 	/* Cancel command execution timeout */
 	callout_stop(&slot->timeout);
 	bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map,
@@ -1297,7 +1272,6 @@
 	/* Unfreeze frozen command. */
 	if (ch->frozen && ch->numrslots == 0) {
 		union ccb *fccb = ch->frozen;
-//device_printf(dev, "Unfreeze\n");
 		ch->frozen = NULL;
 		ahci_begin_transaction(dev, fccb);
 		xpt_release_simq(ch->sim, TRUE);
@@ -1312,7 +1286,6 @@
 	struct ccb_ataio *ataio;
 	int i;
 
-//device_printf(dev, "%s\n", __func__);
 	ch->readlog = 1;
 	/* Find some holden command. */
 	for (i = 0; i < ch->numslots; i++) {
@@ -1355,7 +1328,6 @@
 	struct ata_res *res;
 	int i;
 
-//device_printf(dev, "%s\n", __func__);
 	ch->readlog = 0;
 
 	data = ccb->ataio.data_ptr;
@@ -1365,7 +1337,6 @@
 			if (!ch->hold[i])
 				continue;
 			if ((data[0] & 0x1F) == i) {
-device_printf(dev, "READ LOG EXT: TAG %d MATCH\n", i);
 				res = &ch->hold[i]->ataio.res;
 				res->status = data[2];
 				res->error = data[3];
@@ -1696,7 +1667,6 @@
 
 	ch = (struct ahci_channel *)cam_sim_softc(sim);
 	dev = ch->dev;
-//device_printf(ch->dev, "ccb func 0x%x %d:%d\n", ccb->ccb_h.func_code,  ccb->ccb_h.target_id, ccb->ccb_h.target_lun);
 	switch (ccb->ccb_h.func_code) {
 	/* Common cases first */
 	case XPT_ATA_IO:	/* Execute the requested I/O operation */
@@ -1708,7 +1678,6 @@
 		}
 		/* Check for command collision. */
 		if (ahci_check_collision(dev, ccb)) {
-//device_printf(dev, "Freeze\n");
 			/* Freeze command. */
 			ch->frozen = ccb;
 			/* We have only one frozen slot, so freeze simq also. */



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