From owner-p4-projects@FreeBSD.ORG Tue Dec 5 07:57:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3CD5116A412; Tue, 5 Dec 2006 07:57:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1238A16A407 for ; Tue, 5 Dec 2006 07:57:28 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D7F243CA6 for ; Tue, 5 Dec 2006 07:56:50 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kB57vRWj092769 for ; Tue, 5 Dec 2006 07:57:27 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kB57vQYt092766 for perforce@freebsd.org; Tue, 5 Dec 2006 07:57:26 GMT (envelope-from mjacob@freebsd.org) Date: Tue, 5 Dec 2006 07:57:26 GMT Message-Id: <200612050757.kB57vQYt092766@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 111127 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2006 07:57:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=111127 Change 111127 by mjacob@newisp on 2006/12/05 07:57:04 Messy IFC. Affected files ... .. //depot/projects/newisp/cam/cam_periph.c#3 integrate .. //depot/projects/newisp/cam/cam_xpt.c#14 integrate .. //depot/projects/newisp/cam/cam_xpt.h#2 integrate .. //depot/projects/newisp/cam/scsi/scsi_cd.c#2 integrate .. //depot/projects/newisp/cam/scsi/scsi_ch.c#2 integrate .. //depot/projects/newisp/cam/scsi/scsi_da.c#8 integrate .. //depot/projects/newisp/cam/scsi/scsi_pass.c#2 integrate .. //depot/projects/newisp/cam/scsi/scsi_pt.c#2 integrate .. //depot/projects/newisp/cam/scsi/scsi_sa.c#2 integrate .. //depot/projects/newisp/cam/scsi/scsi_ses.c#2 integrate .. //depot/projects/newisp/cam/scsi/scsi_targ_bh.c#2 integrate .. //depot/projects/newisp/cam/scsi/scsi_target.c#2 integrate .. //depot/projects/newisp/dev/isp/isp.c#41 integrate .. //depot/projects/newisp/dev/isp/isp_freebsd.c#32 integrate .. //depot/projects/newisp/dev/isp/isp_stds.h#8 integrate .. //depot/projects/newisp/dev/isp/isp_target.c#13 integrate .. //depot/projects/newisp/dev/isp/ispvar.h#20 integrate .. //depot/projects/newisp/dev/mpt/mpt_cam.c#18 integrate .. //depot/projects/newisp/sun4v/sun4v/hcall.S#4 integrate Differences ... ==== //depot/projects/newisp/cam/cam_periph.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.63 2006/10/01 20:23:50 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.64 2006/12/05 07:45:27 mjacob Exp $"); #include #include @@ -334,12 +334,12 @@ if (periph != NULL && periph->unit_number == newunit) { if (wired != 0) { - xpt_print_path(periph->path); - printf("Duplicate Wired Device entry!\n"); - xpt_print_path(periph->path); - printf("Second device (%s device at scbus%d " - "target %d lun %d) will not be wired\n", - periph_name, pathid, target, lun); + xpt_print(periph->path, "Duplicate Wired " + "Device entry!\n"); + xpt_print(periph->path, "Second device (%s " + "device at scbus%d target %d lun %d) will " + "not be wired\n", periph_name, pathid, + target, lun); wired = 0; } continue; @@ -995,8 +995,8 @@ saved_ccb->ccb_h.status |= CAM_AUTOSNS_VALID; #if 0 - xpt_print_path(saved_ccb->ccb_h.path); - printf("Recovered Sense\n"); + xpt_print(saved_ccb->ccb_h.path, + "Recovered Sense\n"); scsi_sense_print(&saved_ccb->csio); cam_error_print(saved_ccb, CAM_ESF_ALL, CAM_EPF_ALL); @@ -1287,8 +1287,7 @@ *timeout = 0; error = ERESTART; if (bootverbose) { - xpt_print_path(ccb->ccb_h.path); - printf("Queue Full\n"); + xpt_print(ccb->ccb_h.path, "Queue Full\n"); } break; } @@ -1300,8 +1299,7 @@ * command completes or a 1 second timeout. */ if (bootverbose) { - xpt_print_path(ccb->ccb_h.path); - printf("Device Busy\n"); + xpt_print(ccb->ccb_h.path, "Device Busy\n"); } if (ccb->ccb_h.retry_count > 0) { ccb->ccb_h.retry_count--; @@ -1314,13 +1312,12 @@ } break; case SCSI_STATUS_RESERV_CONFLICT: - xpt_print_path(ccb->ccb_h.path); - printf("Reservation Conflict\n"); + xpt_print(ccb->ccb_h.path, "Reservation Conflict\n"); error = EIO; break; default: - xpt_print_path(ccb->ccb_h.path); - printf("SCSI Status 0x%x\n", ccb->csio.scsi_status); + xpt_print(ccb->ccb_h.path, "SCSI Status 0x%x\n", + ccb->csio.scsi_status); error = EIO; break; } @@ -1574,42 +1571,38 @@ &timeout); break; case CAM_AUTOSENSE_FAIL: - xpt_print_path(ccb->ccb_h.path); - printf("AutoSense Failed\n"); + xpt_print(ccb->ccb_h.path, "AutoSense Failed\n"); error = EIO; /* we have to kill the command */ break; case CAM_REQ_CMP_ERR: if (bootverbose && printed == 0) { - xpt_print_path(ccb->ccb_h.path); - printf("Request completed with CAM_REQ_CMP_ERR\n"); + xpt_print(ccb->ccb_h.path, + "Request completed with CAM_REQ_CMP_ERR\n"); printed++; } /* FALLTHROUGH */ case CAM_CMD_TIMEOUT: if (bootverbose && printed == 0) { - xpt_print_path(ccb->ccb_h.path); - printf("Command timed out\n"); + xpt_print(ccb->ccb_h.path, "Command timed out\n"); printed++; } /* FALLTHROUGH */ case CAM_UNEXP_BUSFREE: if (bootverbose && printed == 0) { - xpt_print_path(ccb->ccb_h.path); - printf("Unexpected Bus Free\n"); + xpt_print(ccb->ccb_h.path, "Unexpected Bus Free\n"); printed++; } /* FALLTHROUGH */ case CAM_UNCOR_PARITY: if (bootverbose && printed == 0) { - xpt_print_path(ccb->ccb_h.path); - printf("Uncorrected Parity Error\n"); + xpt_print(ccb->ccb_h.path, + "Uncorrected Parity Error\n"); printed++; } /* FALLTHROUGH */ case CAM_DATA_RUN_ERR: if (bootverbose && printed == 0) { - xpt_print_path(ccb->ccb_h.path); - printf("Data Overrun\n"); + xpt_print(ccb->ccb_h.path, "Data Overrun\n"); printed++; } error = EIO; /* we have to kill the command */ @@ -1638,8 +1631,8 @@ ccb->ccb_h.retry_count--; error = ERESTART; if (bootverbose && printed == 0) { - xpt_print_path(ccb->ccb_h.path); - printf("Selection Timeout\n"); + xpt_print(ccb->ccb_h.path, + "Selection Timeout\n"); printed++; } @@ -1701,8 +1694,7 @@ /* Unconditional requeue */ error = ERESTART; if (bootverbose && printed == 0) { - xpt_print_path(ccb->ccb_h.path); - printf("Request Requeued\n"); + xpt_print(ccb->ccb_h.path, "Request Requeued\n"); printed++; } break; @@ -1723,8 +1715,8 @@ ccb->ccb_h.retry_count--; error = ERESTART; if (bootverbose && printed == 0) { - xpt_print_path(ccb->ccb_h.path); - printf("CAM Status 0x%x\n", status); + xpt_print(ccb->ccb_h.path, "CAM Status 0x%x\n", + status); printed++; } } else { @@ -1763,11 +1755,9 @@ if (action_string == NULL) action_string = "Unretryable Error"; if (error != ERESTART) { - xpt_print_path(ccb->ccb_h.path); - printf("error %d\n", error); + xpt_print(ccb->ccb_h.path, "error %d\n", error); } - xpt_print_path(ccb->ccb_h.path); - printf("%s\n", action_string); + xpt_print(ccb->ccb_h.path, "%s\n", action_string); } return (error); ==== //depot/projects/newisp/cam/cam_xpt.c#14 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.169 2006/12/04 23:04:13 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.170 2006/12/05 07:45:27 mjacob Exp $"); #include #include @@ -63,6 +63,7 @@ #include #include #include +#include /* for xpt_print below */ #include "opt_cam.h" /* Datastructures internal to the xpt layer */ @@ -3407,10 +3408,9 @@ crs->openings); if (bootverbose) { - xpt_print_path(crs->ccb_h.path); - printf("tagged openings " - "now %d\n", - crs->openings); + xpt_print(crs->ccb_h.path, + "tagged openings now %d\n", + crs->openings); } } } @@ -3513,8 +3513,8 @@ cam_dflags = CAM_DEBUG_NONE; } else { start_ccb->ccb_h.status = CAM_REQ_CMP; - xpt_print_path(cam_dpath); - printf("debugging flags now %x\n", cam_dflags); + xpt_print(cam_dpath, "debugging flags now %x\n", + cam_dflags); } } else { cam_dpath = NULL; @@ -4160,6 +4160,16 @@ } } +void +xpt_print(struct cam_path *path, const char *fmt, ...) +{ + va_list ap; + xpt_print_path(path); + va_start(ap, fmt); + vprintf(fmt, ap); + va_end(ap); +} + int xpt_path_string(struct cam_path *path, char *str, size_t str_len) { @@ -5529,16 +5539,14 @@ if (request_ccb == NULL) { request_ccb = malloc(sizeof(union ccb), M_TEMP, M_NOWAIT); if (request_ccb == NULL) { - xpt_print_path(path); - printf("xpt_scan_lun: can't allocate CCB, can't " - "continue\n"); + xpt_print(path, "xpt_scan_lun: can't allocate CCB, " + "can't continue\n"); return; } new_path = malloc(sizeof(*new_path), M_TEMP, M_NOWAIT); if (new_path == NULL) { - xpt_print_path(path); - printf("xpt_scan_lun: can't allocate path, can't " - "continue\n"); + xpt_print(path, "xpt_scan_lun: can't allocate path, " + "can't continue\n"); free(request_ccb, M_TEMP); return; } @@ -5548,9 +5556,8 @@ path->device->lun_id); if (status != CAM_REQ_CMP) { - xpt_print_path(path); - printf("xpt_scan_lun: can't compile path, can't " - "continue\n"); + xpt_print(path, "xpt_scan_lun: can't compile path, " + "can't continue\n"); free(request_ccb, M_TEMP); free(new_path, M_TEMP); return; @@ -5576,9 +5583,8 @@ request_ccb); if (status != CAM_REQ_CMP) { - xpt_print_path(path); - printf("xpt_scan_lun: cam_alloc_periph returned an " - "error, can't continue probe\n"); + xpt_print(path, "xpt_scan_lun: cam_alloc_periph " + "returned an error, can't continue probe\n"); request_ccb->ccb_h.status = status; xpt_done(request_ccb); } @@ -5763,8 +5769,8 @@ inq_buf = malloc(inquiry_len, M_TEMP, M_NOWAIT); } if (inq_buf == NULL) { - xpt_print_path(periph->path); - printf("malloc failure- skipping Basic Domain Validation\n"); + xpt_print(periph->path, "malloc failure- skipping Basic" + "Domain Validation\n"); softc->action = PROBE_DV_EXIT; scsi_test_unit_ready(csio, /*retries*/4, @@ -5809,8 +5815,8 @@ /*timeout*/60000); break; } - xpt_print_path(periph->path); - printf("Unable to mode sense control page - malloc failure\n"); + xpt_print(periph->path, "Unable to mode sense control page - " + "malloc failure\n"); softc->action = PROBE_SERIAL_NUM; } /* FALLTHROUGH */ @@ -5887,15 +5893,14 @@ xpt_action((union ccb *)&cts); if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { if (bootverbose) { - xpt_print_path(periph->path); - printf("failed to get current settings\n"); + xpt_print(periph->path, + "failed to get current device settings\n"); } return (0); } if (cts.transport != XPORT_SPI) { if (bootverbose) { - xpt_print_path(periph->path); - printf("not SPI transport\n"); + xpt_print(periph->path, "not SPI transport\n"); } return (0); } @@ -5906,8 +5911,7 @@ */ if ((spi->valid & CTS_SPI_VALID_SYNC_RATE) == 0) { if (bootverbose) { - xpt_print_path(periph->path); - printf("no sync rate known\n"); + xpt_print(periph->path, "no sync rate known\n"); } return (0); } @@ -5925,8 +5929,7 @@ if ((spi->valid & CTS_SPI_VALID_SYNC_OFFSET) == 0 || spi->sync_offset == 0 || spi->sync_period == 0) { if (bootverbose) { - xpt_print_path(periph->path); - printf("no sync rate available\n"); + xpt_print(periph->path, "no sync rate available\n"); } return (0); } @@ -6285,8 +6288,8 @@ csio = &done_ccb->csio; nbuf = (struct scsi_inquiry_data *)csio->data_ptr; if (bcmp(nbuf, &path->device->inq_data, SHORT_INQUIRY_LENGTH)) { - xpt_print_path(path); - printf("inquiry fails comparison at DV%d step\n", + xpt_print(path, + "inquiry data fails comparison at DV%d step\n", softc->action == PROBE_INQUIRY_BASIC_DV1? 1 : 2); if (proberequestbackoff(periph, path->device)) { path->device->flags &= ~CAM_DEV_IN_DV; @@ -6484,17 +6487,16 @@ cts->protocol_version = device->protocol_version; if (cts->protocol != device->protocol) { - xpt_print_path(cts->ccb_h.path); - printf("Uninitialized Protocol %x:%x?\n", + xpt_print(cts->ccb_h.path, "Uninitialized Protocol %x:%x?\n", cts->protocol, device->protocol); cts->protocol = device->protocol; } if (cts->protocol_version > device->protocol_version) { if (bootverbose) { - xpt_print_path(cts->ccb_h.path); - printf("Down reving Protocol Version from %d to %d?\n", - cts->protocol_version, device->protocol_version); + xpt_print(cts->ccb_h.path, "Down reving Protocol " + "Version from %d to %d?\n", cts->protocol_version, + device->protocol_version); } cts->protocol_version = device->protocol_version; } @@ -6510,18 +6512,16 @@ cts->transport_version = device->transport_version; if (cts->transport != device->transport) { - xpt_print_path(cts->ccb_h.path); - printf("Uninitialized Transport %x:%x?\n", - cts->transport, device->transport); + xpt_print(cts->ccb_h.path, "Uninitialized Transport %x:%x?\n", + cts->transport, device->transport); cts->transport = device->transport; } if (cts->transport_version > device->transport_version) { if (bootverbose) { - xpt_print_path(cts->ccb_h.path); - printf("Down reving Transport Version from %d to %d?\n", - cts->transport_version, - device->transport_version); + xpt_print(cts->ccb_h.path, "Down reving Transport " + "Version from %d to %d?\n", cts->transport_version, + device->transport_version); } cts->transport_version = device->transport_version; } ==== //depot/projects/newisp/cam/cam_xpt.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cam/cam_xpt.h,v 1.5 2005/01/05 22:34:34 imp Exp $ + * $FreeBSD: src/sys/cam/cam_xpt.h,v 1.6 2006/12/05 07:45:27 mjacob Exp $ */ #ifndef _CAM_CAM_XPT_H @@ -62,6 +62,7 @@ int xpt_path_comp(struct cam_path *path1, struct cam_path *path2); void xpt_print_path(struct cam_path *path); +void xpt_print(struct cam_path *path, const char *fmt, ...); int xpt_path_string(struct cam_path *path, char *str, size_t str_len); path_id_t xpt_path_path_id(struct cam_path *path); ==== //depot/projects/newisp/cam/scsi/scsi_cd.c#2 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.96 2006/07/14 13:58:32 delphij Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.97 2006/12/05 07:45:27 mjacob Exp $"); #include "opt_cd.h" @@ -408,8 +408,7 @@ camq_remove(&softc->changer->devq, softc->pinfo.index); disk_gone(softc->disk); - xpt_print_path(periph->path); - printf("lost device\n"); + xpt_print(periph->path, "lost device\n"); } static void @@ -420,13 +419,11 @@ softc = (struct cd_softc *)periph->softc; - xpt_print_path(periph->path); - printf("removing device entry\n"); + xpt_print(periph->path, "removing device entry\n"); if ((softc->flags & CD_FLAG_SCTX_INIT) != 0 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { - xpt_print_path(periph->path); - printf("can't remove sysctl context\n"); + xpt_print(periph->path, "can't remove sysctl context\n"); } s = splsoftcam(); @@ -494,8 +491,7 @@ STAILQ_REMOVE(&changerq, softc->changer, cdchanger, changer_links); - xpt_print_path(periph->path); - printf("removing changer entry\n"); + xpt_print(periph->path, "removing changer entry\n"); free(softc->changer, M_DEVBUF); num_changers--; } @@ -1568,8 +1564,8 @@ M_TEMP, M_NOWAIT); if (rcap == NULL) { - xpt_print_path(periph->path); - printf("cdstart: Couldn't malloc read_capacity data\n"); + xpt_print(periph->path, + "cdstart: Couldn't malloc read_capacity data\n"); /* cd_free_periph??? */ break; } @@ -1631,8 +1627,8 @@ if (error != 0) { int s; - xpt_print_path(periph->path); - printf("cddone: got error %#x back\n", error); + xpt_print(periph->path, + "cddone: got error %#x back\n", error); s = splbio(); bioq_flush(&softc->bio_queue, NULL, EIO); splx(s); @@ -1813,14 +1809,12 @@ scsi_sense_print( &done_ccb->csio); else { - xpt_print_path(periph->path); - printf("got CAM status %#x\n", - done_ccb->ccb_h.status); + xpt_print(periph->path, + "got CAM status %#x\n", + done_ccb->ccb_h.status); } - xpt_print_path(periph->path); - printf("fatal error, failed" - " to attach to device\n"); - + xpt_print(periph->path, "fatal error, " + "failed to attach to device\n"); /* * Invalidate this peripheral. */ @@ -2955,16 +2949,16 @@ * cdsetmode()! */ if (found == 0) { - xpt_print_path(periph->path); - printf("mode buffer not found in mode queue!\n"); + xpt_print(periph->path, + "mode buffer not found in mode queue!\n"); return (0); } params->cdb_size = 10; softc->minimum_command_size = 10; - xpt_print_path(ccb->ccb_h.path); - printf("%s(6) failed, increasing minimum CDB size to 10 bytes\n", - (cdb[0] == MODE_SENSE_6) ? "MODE_SENSE" : "MODE_SELECT"); + xpt_print(ccb->ccb_h.path, + "%s(6) failed, increasing minimum CDB size to 10 bytes\n", + (cdb[0] == MODE_SENSE_6) ? "MODE_SENSE" : "MODE_SELECT"); if (cdb[0] == MODE_SENSE_6) { struct scsi_mode_sense_10 ms10; @@ -3296,10 +3290,9 @@ * the data length incorrectly. */ if (data_len > data->alloc_len) { - xpt_print_path(periph->path); - printf("allocated modepage %d length %d < returned " - "length %d\n", page, data->alloc_len, data_len); - + xpt_print(periph->path, "allocated modepage %d length " + "%d < returned length %d\n", page, data->alloc_len, + data_len); error = ENOSPC; } } @@ -3757,9 +3750,8 @@ goto bailout; if (ccb->csio.resid != 0) { - xpt_print_path(periph->path); - printf("warning, residual for report key command is %d\n", - ccb->csio.resid); + xpt_print(periph->path, "warning, residual for report key " + "command is %d\n", ccb->csio.resid); } switch(authinfo->format) { ==== //depot/projects/newisp/cam/scsi/scsi_ch.c#2 (text+ko) ==== @@ -68,7 +68,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.42 2005/03/26 04:21:11 ken Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.43 2006/12/05 07:45:28 mjacob Exp $"); #include #include @@ -273,8 +273,7 @@ softc->flags |= CH_FLAG_INVALID; - xpt_print_path(periph->path); - printf("lost device\n"); + xpt_print(periph->path, "lost device\n"); } @@ -287,8 +286,7 @@ devstat_remove_entry(softc->device_stats); destroy_dev(softc->dev); - xpt_print_path(periph->path); - printf("removing device entry\n"); + xpt_print(periph->path, "removing device entry\n"); free(softc, M_DEVBUF); } @@ -647,13 +645,12 @@ == CAM_SCSI_STATUS_ERROR) scsi_sense_print(&done_ccb->csio); else { - xpt_print_path(periph->path); - printf("got CAM status %#x\n", - done_ccb->ccb_h.status); + xpt_print(periph->path, + "got CAM status %#x\n", + done_ccb->ccb_h.status); } - xpt_print_path(periph->path); - printf("fatal error, failed to attach to" - " device\n"); + xpt_print(periph->path, "fatal error, failed " + "to attach to device\n"); cam_periph_invalidate(periph); @@ -1162,8 +1159,8 @@ avail = scsi_2btoul(st_hdr->count); if (avail != cesr->cesr_element_count) { - xpt_print_path(periph->path); - printf("warning, READ ELEMENT STATUS avail != count\n"); + xpt_print(periph->path, + "warning, READ ELEMENT STATUS avail != count\n"); } user_data = (struct changer_element_status *) @@ -1403,9 +1400,9 @@ } if (error) { - xpt_print_path(periph->path); - printf("chgetparams: error getting element " - "address page\n"); + xpt_print(periph->path, + "chgetparams: error getting element " + "address page\n"); xpt_release_ccb(ccb); free(mode_buffer, M_TEMP); return(error); @@ -1466,9 +1463,9 @@ } if (error) { - xpt_print_path(periph->path); - printf("chgetparams: error getting device " - "capabilities page\n"); + xpt_print(periph->path, + "chgetparams: error getting device " + "capabilities page\n"); xpt_release_ccb(ccb); free(mode_buffer, M_TEMP); return(error); ==== //depot/projects/newisp/cam/scsi/scsi_da.c#8 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.199 2006/11/26 17:18:31 maxim Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.200 2006/12/05 07:45:28 mjacob Exp $"); #include @@ -654,11 +654,10 @@ if (sense_key != SSD_KEY_ILLEGAL_REQUEST) scsi_sense_print(&ccb->csio); } else { - xpt_print_path(periph->path); - printf("Synchronize cache failed, status " - "== 0x%x, scsi status == 0x%x\n", - ccb->csio.ccb_h.status, - ccb->csio.scsi_status); + xpt_print(periph->path, "Synchronize cache " + "failed, status == 0x%x, scsi status == " + "0x%x\n", ccb->csio.ccb_h.status, + ccb->csio.scsi_status); } } @@ -826,10 +825,10 @@ if (sense_key != SSD_KEY_ILLEGAL_REQUEST) scsi_sense_print(&csio); } else { - xpt_print_path(periph->path); - printf("Synchronize cache failed, status " - "== 0x%x, scsi status == 0x%x\n", - csio.ccb_h.status, csio.scsi_status); + xpt_print(periph->path, "Synchronize cache " + "failed, status == 0x%x, scsi status == " + "0x%x\n", csio.ccb_h.status, + csio.scsi_status); } } } @@ -923,8 +922,7 @@ SLIST_REMOVE(&softc_list, softc, da_softc, links); disk_gone(softc->disk); - xpt_print_path(periph->path); - printf("lost device\n"); + xpt_print(periph->path, "lost device\n"); } static void @@ -934,15 +932,13 @@ softc = (struct da_softc *)periph->softc; - xpt_print_path(periph->path); - printf("removing device entry\n"); + xpt_print(periph->path, "removing device entry\n"); /* * If we can't free the sysctl tree, oh well... */ if ((softc->flags & DA_FLAG_SCTX_INIT) != 0 && sysctl_ctx_free(&softc->sysctl_ctx) != 0) { - xpt_print_path(periph->path); - printf("can't remove sysctl context\n"); + xpt_print(periph->path, "can't remove sysctl context\n"); } disk_destroy(softc->disk); free(softc, M_DEVBUF); @@ -1401,9 +1397,8 @@ (*cdb != READ_6 && *cdb != WRITE_6)) return 0; - xpt_print_path(ccb->ccb_h.path); - printf("READ(6)/WRITE(6) not supported, " - "increasing minimum_cmd_size to 10.\n"); + xpt_print(ccb->ccb_h.path, "READ(6)/WRITE(6) not supported, " + "increasing minimum_cmd_size to 10.\n"); softc = (struct da_softc *)xpt_path_periph(ccb->ccb_h.path)->softc; softc->minimum_cmd_size = 10; @@ -1473,11 +1468,12 @@ * Catastrophic error. Mark our pack as * invalid. */ - /* XXX See if this is really a media - * change first. + /* + * XXX See if this is really a media + * XXX change first? */ - xpt_print_path(periph->path); - printf("Invalidating pack\n"); + xpt_print(periph->path, + "Invalidating pack\n"); softc->flags |= DA_FLAG_PACK_INVALID; } @@ -1575,9 +1571,9 @@ * here. */ if (block_size >= MAXPHYS || block_size == 0) { - xpt_print_path(periph->path); - printf("unsupportable block size %ju\n", - (uintmax_t) block_size); + xpt_print(periph->path, + "unsupportable block size %ju\n", + (uintmax_t) block_size); announce_buf[0] = '\0'; cam_periph_invalidate(periph); } else { @@ -1672,14 +1668,13 @@ scsi_sense_print( &done_ccb->csio); else { - xpt_print_path(periph->path); - printf("got CAM status %#x\n", - done_ccb->ccb_h.status); + xpt_print(periph->path, + "got CAM status %#x\n", + done_ccb->ccb_h.status); } - xpt_print_path(periph->path); - printf("fatal error, failed" - " to attach to device\n"); + xpt_print(periph->path, "fatal error, " + "failed to attach to device\n"); /* * Free up resources. @@ -2024,10 +2019,10 @@ if (sense_key != SSD_KEY_ILLEGAL_REQUEST) scsi_sense_print(&ccb.csio); } else { - xpt_print_path(periph->path); - printf("Synchronize cache failed, status " - "== 0x%x, scsi status == 0x%x\n", - ccb.ccb_h.status, ccb.csio.scsi_status); + xpt_print(periph->path, "Synchronize " + "cache failed, status == 0x%x, scsi status " + "== 0x%x\n", ccb.ccb_h.status, + ccb.csio.scsi_status); } } ==== //depot/projects/newisp/cam/scsi/scsi_pass.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.44 2006/08/14 19:29:45 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.45 2006/12/05 07:45:28 mjacob Exp $"); #include #include @@ -174,8 +174,7 @@ */ if (bootverbose) { - xpt_print_path(periph->path); - printf("lost device\n"); + xpt_print(periph->path, "lost device\n"); } } @@ -192,8 +191,7 @@ destroy_dev(softc->dev); if (bootverbose) { - xpt_print_path(periph->path); - printf("removing device entry\n"); + xpt_print(periph->path, "removing device entry\n"); } free(softc, M_DEVBUF); } @@ -360,8 +358,7 @@ * We don't allow nonblocking access. */ if ((flags & O_NONBLOCK) != 0) { - xpt_print_path(periph->path); - printf("can't do nonblocking access\n"); + xpt_print(periph->path, "can't do nonblocking access\n"); splx(s); return(EINVAL); } @@ -476,9 +473,9 @@ * through the transport layer device. */ if (inccb->ccb_h.func_code & XPT_FC_XPT_ONLY) { - xpt_print_path(periph->path); - printf("CCB function code %#x is restricted to the " - "XPT device\n", inccb->ccb_h.func_code); + xpt_print(periph->path, "CCB function code %#x is " + "restricted to the XPT device\n", + inccb->ccb_h.func_code); error = ENODEV; break; } @@ -504,8 +501,7 @@ } if (ccb == NULL) { - xpt_print_path(periph->path); - printf("unable to allocate CCB\n"); + xpt_print(periph->path, "unable to allocate CCB\n"); error = ENOMEM; break; } ==== //depot/projects/newisp/cam/scsi/scsi_pt.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.43 2005/01/05 22:34:34 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.44 2006/12/05 07:45:28 mjacob Exp $"); #include #include @@ -387,8 +387,7 @@ splx(s); - xpt_print_path(periph->path); - printf("lost device\n"); + xpt_print(periph->path, "lost device\n"); } static void @@ -402,8 +401,7 @@ destroy_dev(softc->dev); - xpt_print_path(periph->path); - printf("removing device entry\n"); + xpt_print(periph->path, "removing device entry\n"); free(softc, M_DEVBUF); } @@ -577,8 +575,8 @@ * Catastrophic error. Mark our device * as invalid. */ - xpt_print_path(periph->path); - printf("Invalidating device\n"); + xpt_print(periph->path, + "Invalidating device\n"); softc->flags |= PT_FLAG_DEVICE_INVALID; } ==== //depot/projects/newisp/cam/scsi/scsi_sa.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.106 2006/01/14 14:32:41 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.107 2006/12/05 07:45:28 mjacob Exp $"); #include #include @@ -566,8 +566,8 @@ */ error = sacheckeod(periph); if (error) { - xpt_print_path(periph->path); - printf("failed to write terminating filemark(s)\n"); + xpt_print(periph->path, + "failed to write terminating filemark(s)\n"); softc->flags |= SA_FLAG_TAPE_FROZEN; } @@ -622,19 +622,18 @@ if (error == 0 && writing && (softc->quirks & SA_QUIRK_2FM)) { tmp = saspace(periph, -1, SS_FILEMARKS); if (tmp) { - xpt_print_path(periph->path); - printf("unable to backspace over one of double" - " filemarks at end of tape\n"); - xpt_print_path(periph->path); - printf("it is possible that this device" - " needs a SA_QUIRK_1FM quirk set for it\n"); + xpt_print(periph->path, "unable to backspace " + "over one of double filemarks at end of " + "tape\n"); + xpt_print(periph->path, "it is possible that " + "this device needs a SA_QUIRK_1FM quirk set" + "for it\n"); softc->flags |= SA_FLAG_TAPE_FROZEN; } } break; default: - xpt_print_path(periph->path); - panic("unknown mode 0x%x in saclose", mode); + xpt_print(periph->path, "unknown mode 0x%x in saclose\n", mode); /* NOTREACHED */ break; } @@ -654,9 +653,8 @@ * Inform users if tape state if frozen.... */ if (softc->flags & SA_FLAG_TAPE_FROZEN) { - xpt_print_path(periph->path); - printf("tape is now frozen- use an OFFLINE, REWIND or MTEOM " - "command to clear this state.\n"); + xpt_print(periph->path, "tape is now frozen- use an OFFLINE, " + "REWIND or MTEOM command to clear this state.\n"); } /* release the device if it is no longer mounted */ @@ -749,10 +747,9 @@ ((bp->bio_bcount & softc->blk_mask) != 0)) || ((softc->blk_mask == ~0) && ((bp->bio_bcount % softc->min_blk) != 0))) { - xpt_print_path(periph->path); - printf("Invalid request. Fixed block device " - "requests must be a multiple " - "of %d bytes\n", softc->min_blk); >>> TRUNCATED FOR MAIL (1000 lines) <<<