Date: Sun, 3 Dec 2006 00:32:43 GMT From: Matt Jacob <mjacob@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 110895 for review Message-ID: <200612030032.kB30Whsf084163@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110895 Change 110895 by mjacob@newisp on 2006/12/03 00:31:58 Sync changes with CVS. Affected files ... .. //depot/projects/newisp/dev/mpt/mpt.h#6 edit .. //depot/projects/newisp/dev/mpt/mpt_cam.c#15 edit Differences ... ==== //depot/projects/newisp/dev/mpt/mpt.h#6 (text+ko) ==== @@ -1193,7 +1193,6 @@ PageAddress, hdr, len, sleep_ok, timeout_ms)); } - /* mpt_debug.c functions */ void mpt_print_reply(void *vmsg); void mpt_print_db(uint32_t mb); ==== //depot/projects/newisp/dev/mpt/mpt_cam.c#15 (text+ko) ==== @@ -1879,12 +1879,14 @@ * Do a *short* print here if we're set to MPT_PRT_DEBUG */ if (mpt->verbose == MPT_PRT_DEBUG) { + U32 df; mpt_prt(mpt, "mpt_start: %s op 0x%x ", (mpt_req->Function == MPI_FUNCTION_SCSI_IO_REQUEST)? "SCSI_IO_REQUEST" : "SCSI_IO_PASSTHRU", mpt_req->CDB[0]); - if (mpt_req->Control != MPI_SCSIIO_CONTROL_NODATATRANSFER) { + df = mpt_req->Control & MPI_SCSIIO_CONTROL_DATADIRECTION_MASK; + if (df != MPI_SCSIIO_CONTROL_NODATATRANSFER) { mpt_prtc(mpt, "(%s %u byte%s ", - (mpt_req->Control == MPI_SCSIIO_CONTROL_READ)? + (df == MPI_SCSIIO_CONTROL_READ)? "read" : "write", csio->dxfer_len, (csio->dxfer_len == 1)? ")" : "s)"); } @@ -2862,7 +2864,8 @@ tgt = ccb->ccb_h.target_id; lun = ccb->ccb_h.target_lun; - if (raid_passthru && ccb->ccb_h.func_code != XPT_PATH_INQ && + if (raid_passthru && + ccb->ccb_h.func_code != XPT_PATH_INQ && ccb->ccb_h.func_code != XPT_RESET_BUS && ccb->ccb_h.func_code != XPT_RESET_DEV) { CAMLOCK_2_MPTLOCK(mpt); @@ -2908,11 +2911,9 @@ break; } case XPT_RESET_DEV: - xpt_print_path(ccb->ccb_h.path); printf("reset %s\n", ccb->ccb_h.func_code == XPT_RESET_BUS? "bus" : "device"); - CAMLOCK_2_MPTLOCK(mpt); (void) mpt_bus_reset(mpt, tgt, lun, FALSE); MPTLOCK_2_CAMLOCK(mpt); @@ -3330,19 +3331,28 @@ return (rv); } MPTLOCK_2_CAMLOCK(mpt); + mpt_lprt(mpt, MPT_PRT_DEBUG, + "mpt_get_spi_settings[%d]: current NP %x Info %x\n", tgt, + tmp.NegotiatedParameters, tmp.Information); dval |= (tmp.NegotiatedParameters & MPI_SCSIDEVPAGE0_NP_WIDE) ? DP_WIDE : DP_NARROW; dval |= (mpt->mpt_disc_enable & (1 << tgt)) ? DP_DISC_ENABLE : DP_DISC_DISABL; dval |= (mpt->mpt_tag_enable & (1 << tgt)) ? DP_TQING_ENABLE : DP_TQING_DISABL; - oval = (tmp.NegotiatedParameters >> 16) & 0xff; - pval = (tmp.NegotiatedParameters >> 8) & 0xff; + oval = tmp.NegotiatedParameters; + oval &= MPI_SCSIDEVPAGE0_NP_NEG_SYNC_OFFSET_MASK; + oval >>= MPI_SCSIDEVPAGE0_NP_SHIFT_SYNC_OFFSET; + pval = tmp.NegotiatedParameters; + pval &= MPI_SCSIDEVPAGE0_NP_NEG_SYNC_PERIOD_MASK; + pval >>= MPI_SCSIDEVPAGE0_NP_SHIFT_SYNC_PERIOD; mpt->mpt_dev_page0[tgt] = tmp; } else { dval = DP_WIDE|DP_DISC_ENABLE|DP_TQING_ENABLE; - oval = (mpt->mpt_port_page0.Capabilities >> 16) & 0xff; - pval = (mpt->mpt_port_page0.Capabilities >> 8) & 0xff; + oval = mpt->mpt_port_page0.Capabilities; + oval = MPI_SCSIPORTPAGE0_CAP_GET_MAX_SYNC_OFFSET(oval); + pval = mpt->mpt_port_page0.Capabilities; + pval = MPI_SCSIPORTPAGE0_CAP_GET_MIN_SYNC_PERIOD(pval); } spi->valid = 0; @@ -3376,9 +3386,10 @@ scsi->valid = 0; } mpt_lprt(mpt, MPT_PRT_NEGOTIATION, - "mpt_get_spi_settings[%d]:%s per=%x off=%d spv=%x scv=%x\n", + "mpt_get_spi_settings[%d]:%s per=%x off=%d SPF=%x SPV=%x SCF=%x SCV" + "=%x bw=%x\n", tgt, IS_CURRENT_SETTINGS(cts)? "ACTIVE" : "NVRAM ", pval, oval, - spi->valid, scsi->valid); + spi->flags, spi->valid, scsi->flags, scsi->valid, spi->bus_width); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612030032.kB30Whsf084163>