From nobody Tue Aug 1 22:26:13 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RFqTQ4HRFz4pwYb; Tue, 1 Aug 2023 22:26:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RFqT14MmTz3hZK; Tue, 1 Aug 2023 22:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g/U2Ne4hC5L1/O806r8nYi+VEtaCkRajTgGxKG53cJc=; b=aHMRdM2WgAWqrIFgfMbt+RS3U8bBO0mlYX7C/XKN+bcmCBm5/2l7NTmjpYFD+nCaSiCZkY zWQWfYFx3lZSW2JwwKQPutHOpJe4pWB0qmd7Obi9KZsdqx5lm/kd3wLo1Q6JLR1XIEJJ/S xiBS5CMla5sUKFMcM7bzIYN59mLtQTtq0RD62c+VPyxKBBlgLKCcV4LWwwHOqWRVw3P1IU plLnGXfd0KJUoRnSs3ihficA461mfS+NpO8klshO/cmc1dZdZ92Xy5Ht/9m+J/clPoPRp5 i8+cDlUcWFW+xOreBQk1X1WUJKs9q6vGciyG76jrVuxePDXcHkFue4vsmsDvAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690928773; a=rsa-sha256; cv=none; b=w/mfCzGL79HYKwyG71XCJhTOmhgljauhNFfnf7TmPhlCqfMvrJK858SokqtPIyhz96ak55 nx4D97WngZFB8dKc7987TMxtSebxMTi5HVvRuuZQcxubYnxZcb5Rq2wdD0WIShuDyEVvHg oi2C+O0AywQI/DE1oG1MIG61aZfHVZLIofzobVNO+7YPn5fWQHlo2xBxxdmlLxRKbSeQ4U 4bg7vJHRGI4PF2/7WcweVUwQTCsE+4dt6gq+BRur3cXle35nfI8QQBnZGFmE8HVE6y9ABS nT7Aoi9oPT8j/w20JCO5YEZkz5twp0uBOXX/nlvpk3XWDdspsUIIlb1NOwO8Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690928773; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g/U2Ne4hC5L1/O806r8nYi+VEtaCkRajTgGxKG53cJc=; b=bFlJxns0tghAbdPeC1wzg2NdJQtTqluIApHkZ4aVBfIM7Z1t1HDRwCCtJAdTB2ouQicVY7 cChPdC/eA14coALUF0wHodXTojB5RF7FTHLZ/ENdtYdsgfD2Z6+x6v3bab/zwiEStrr4E3 LilKVtueaQOnMJ+WfVUktHyVh+FooPr0p/p4qzrnE4c4oUMQjr1EAGm9cltlOZ6MQEQv5R MFd+XIse5TPRkheu95XEG2xTu1hYFZHuyThR/tyzEV9eVQ6JEshiisaLZHeIY87qZJ6c21 g9OadtEaUWSeWX2hADK+KV0Xe02LJqX5WfKUfgOaBIp+qno894wsqdp0yb8s9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RFqT13F3lzvkt; Tue, 1 Aug 2023 22:26:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 371MQDO2045668; Tue, 1 Aug 2023 22:26:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 371MQDVJ045667; Tue, 1 Aug 2023 22:26:13 GMT (envelope-from git) Date: Tue, 1 Aug 2023 22:26:13 GMT Message-Id: <202308012226.371MQDVJ045667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: b2c44f1fc1c6 - main - cam: Remove non-sbuf announce/denounce proto and xport ops List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2c44f1fc1c68dfb8a0a1f14f035241f6b96f30f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b2c44f1fc1c68dfb8a0a1f14f035241f6b96f30f commit b2c44f1fc1c68dfb8a0a1f14f035241f6b96f30f Author: John Baldwin AuthorDate: 2023-08-01 22:25:38 +0000 Commit: John Baldwin CommitDate: 2023-08-01 22:25:38 +0000 cam: Remove non-sbuf announce/denounce proto and xport ops Reviewed by: mav, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41264 --- sys/cam/ata/ata_xpt.c | 89 ---------------------------------------------- sys/cam/cam_xpt_internal.h | 3 -- sys/cam/mmc/mmc_xpt.c | 48 ------------------------- sys/cam/nvme/nvme_xpt.c | 42 ---------------------- sys/cam/scsi/scsi_xpt.c | 75 -------------------------------------- 5 files changed, 257 deletions(-) diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c index 2b2fec06a06a..55aa5e346daa 100644 --- a/sys/cam/ata/ata_xpt.c +++ b/sys/cam/ata/ata_xpt.c @@ -188,16 +188,11 @@ static void ata_dev_async(uint32_t async_code, struct cam_ed *device, void *async_arg); static void ata_action(union ccb *start_ccb); -static void ata_announce_periph(struct cam_periph *periph); static void ata_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb); -static void ata_proto_announce(struct cam_ed *device); static void ata_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void ata_proto_denounce(struct cam_ed *device); static void ata_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void ata_proto_debug_out(union ccb *ccb); -static void semb_proto_announce(struct cam_ed *device); static void semb_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void semb_proto_denounce(struct cam_ed *device); static void semb_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static int ata_dma = 1; @@ -210,7 +205,6 @@ static struct xpt_xport_ops ata_xport_ops = { .alloc_device = ata_alloc_device, .action = ata_action, .async = ata_dev_async, - .announce = ata_announce_periph, .announce_sbuf = ata_announce_periph_sbuf, }; #define ATA_XPT_XPORT(x, X) \ @@ -227,9 +221,7 @@ ATA_XPT_XPORT(sata, SATA); #undef ATA_XPORT_XPORT static struct xpt_proto_ops ata_proto_ops_ata = { - .announce = ata_proto_announce, .announce_sbuf = ata_proto_announce_sbuf, - .denounce = ata_proto_denounce, .denounce_sbuf = ata_proto_denounce_sbuf, .debug_out = ata_proto_debug_out, }; @@ -240,9 +232,7 @@ static struct xpt_proto ata_proto_ata = { }; static struct xpt_proto_ops ata_proto_ops_satapm = { - .announce = ata_proto_announce, .announce_sbuf = ata_proto_announce_sbuf, - .denounce = ata_proto_denounce, .denounce_sbuf = ata_proto_denounce_sbuf, .debug_out = ata_proto_debug_out, }; @@ -253,9 +243,7 @@ static struct xpt_proto ata_proto_satapm = { }; static struct xpt_proto_ops ata_proto_ops_semb = { - .announce = semb_proto_announce, .announce_sbuf = semb_proto_announce_sbuf, - .denounce = semb_proto_denounce, .denounce_sbuf = semb_proto_denounce_sbuf, .debug_out = ata_proto_debug_out, }; @@ -2133,59 +2121,6 @@ _ata_announce_periph(struct cam_periph *periph, struct ccb_trans_settings *cts, } } -static void -ata_announce_periph(struct cam_periph *periph) -{ - struct ccb_trans_settings cts; - u_int speed, mb; - - bzero(&cts, sizeof(cts)); - _ata_announce_periph(periph, &cts, &speed); - if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) - return; - - mb = speed / 1000; - if (mb > 0) - printf("%s%d: %d.%03dMB/s transfers", - periph->periph_name, periph->unit_number, - mb, speed % 1000); - else - printf("%s%d: %dKB/s transfers", periph->periph_name, - periph->unit_number, speed); - /* Report additional information about connection */ - if (cts.transport == XPORT_ATA) { - struct ccb_trans_settings_pata *pata = - &cts.xport_specific.ata; - - printf(" ("); - if (pata->valid & CTS_ATA_VALID_MODE) - printf("%s, ", ata_mode2string(pata->mode)); - if ((pata->valid & CTS_ATA_VALID_ATAPI) && pata->atapi != 0) - printf("ATAPI %dbytes, ", pata->atapi); - if (pata->valid & CTS_ATA_VALID_BYTECOUNT) - printf("PIO %dbytes", pata->bytecount); - printf(")"); - } - if (cts.transport == XPORT_SATA) { - struct ccb_trans_settings_sata *sata = - &cts.xport_specific.sata; - - printf(" ("); - if (sata->valid & CTS_SATA_VALID_REVISION) - printf("SATA %d.x, ", sata->revision); - else - printf("SATA, "); - if (sata->valid & CTS_SATA_VALID_MODE) - printf("%s, ", ata_mode2string(sata->mode)); - if ((sata->valid & CTS_ATA_VALID_ATAPI) && sata->atapi != 0) - printf("ATAPI %dbytes, ", sata->atapi); - if (sata->valid & CTS_SATA_VALID_BYTECOUNT) - printf("PIO %dbytes", sata->bytecount); - printf(")"); - } - printf("\n"); -} - static void ata_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) { @@ -2245,18 +2180,6 @@ ata_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) ata_print_ident_sbuf(&device->ident_data, sb); } -static void -ata_proto_announce(struct cam_ed *device) -{ - ata_print_ident(&device->ident_data); -} - -static void -ata_proto_denounce(struct cam_ed *device) -{ - ata_print_ident_short(&device->ident_data); -} - static void ata_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { @@ -2269,18 +2192,6 @@ semb_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) semb_print_ident_sbuf((struct sep_identify_data *)&device->ident_data, sb); } -static void -semb_proto_announce(struct cam_ed *device) -{ - semb_print_ident((struct sep_identify_data *)&device->ident_data); -} - -static void -semb_proto_denounce(struct cam_ed *device) -{ - semb_print_ident_short((struct sep_identify_data *)&device->ident_data); -} - static void semb_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { diff --git a/sys/cam/cam_xpt_internal.h b/sys/cam/cam_xpt_internal.h index f30ef2aa81b5..0e8302cb74ed 100644 --- a/sys/cam/cam_xpt_internal.h +++ b/sys/cam/cam_xpt_internal.h @@ -56,7 +56,6 @@ struct xpt_xport_ops { xpt_release_device_func reldev; xpt_action_func action; xpt_dev_async_func async; - xpt_announce_periph_func announce; xpt_announce_periph_sbuf_func announce_sbuf; }; @@ -75,9 +74,7 @@ typedef void (*xpt_proto_announce_sbuf_func)(struct cam_ed *, struct sbuf *); typedef void (*xpt_proto_debug_out_func)(union ccb *); struct xpt_proto_ops { - xpt_proto_announce_func announce; xpt_proto_announce_sbuf_func announce_sbuf; - xpt_proto_announce_func denounce; xpt_proto_announce_sbuf_func denounce_sbuf; xpt_proto_debug_out_func debug_out; }; diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 0930717b0a2a..406b91df2e35 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -73,7 +73,6 @@ static void mmc_dev_async(uint32_t async_code, struct cam_eb *bus, struct cam_et *target, struct cam_ed *device, void *async_arg); static void mmc_action(union ccb *start_ccb); static void mmc_dev_advinfo(union ccb *start_ccb); -static void mmc_announce_periph(struct cam_periph *periph); static void mmc_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb); static void mmc_scan_lun(struct cam_periph *periph, @@ -85,9 +84,7 @@ static void mmcprobe_start(struct cam_periph *periph, union ccb *start_ccb); static void mmcprobe_cleanup(struct cam_periph *periph); static void mmcprobe_done(struct cam_periph *periph, union ccb *done_ccb); -static void mmc_proto_announce(struct cam_ed *device); static void mmc_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void mmc_proto_denounce(struct cam_ed *device); static void mmc_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void mmc_proto_debug_out(union ccb *ccb); @@ -151,7 +148,6 @@ static struct xpt_xport_ops mmc_xport_ops = { .alloc_device = mmc_alloc_device, .action = mmc_action, .async = mmc_dev_async, - .announce = mmc_announce_periph, .announce_sbuf = mmc_announce_periph_sbuf, }; @@ -166,9 +162,7 @@ static struct xpt_xport_ops mmc_xport_ops = { MMC_XPT_XPORT(mmc, MMCSD); static struct xpt_proto_ops mmc_proto_ops = { - .announce = mmc_proto_announce, .announce_sbuf = mmc_proto_announce_sbuf, - .denounce = mmc_proto_denounce, .denounce_sbuf = mmc_proto_denounce_sbuf, .debug_out = mmc_proto_debug_out, }; @@ -383,29 +377,6 @@ mmc_dev_advinfo(union ccb *start_ccb) start_ccb->ccb_h.status = CAM_REQ_CMP; } -static void -mmc_announce_periph(struct cam_periph *periph) -{ - struct ccb_pathinq cpi; - struct ccb_trans_settings cts; - struct cam_path *path = periph->path; - - cam_periph_assert(periph, MA_OWNED); - - CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("mmc_announce_periph")); - - memset(&cts, 0, sizeof(cts)); - xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NORMAL); - cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; - cts.type = CTS_TYPE_CURRENT_SETTINGS; - xpt_action((union ccb*)&cts); - if ((cts.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) - return; - xpt_path_inq(&cpi, periph->path); - CAM_DEBUG(path, CAM_DEBUG_INFO, - ("XPT info: CLK %04d, ...\n", cts.proto_specific.mmc.ios.clock)); -} - static void mmc_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) { @@ -498,31 +469,12 @@ mmc_print_ident(struct mmc_params *ident_data, struct sbuf *sb) } } -static void -mmc_proto_announce(struct cam_ed *device) -{ - struct sbuf sb; - char buffer[256]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - mmc_print_ident(&device->mmc_ident_data, &sb); - sbuf_finish(&sb); - sbuf_putbuf(&sb); -} - static void mmc_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) { mmc_print_ident(&device->mmc_ident_data, sb); } -static void -mmc_proto_denounce(struct cam_ed *device) -{ - - mmc_proto_announce(device); -} - static void mmc_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c index d2968d1019d1..ad0718bfcf3b 100644 --- a/sys/cam/nvme/nvme_xpt.c +++ b/sys/cam/nvme/nvme_xpt.c @@ -156,13 +156,10 @@ static void nvme_dev_async(uint32_t async_code, struct cam_ed *device, void *async_arg); static void nvme_action(union ccb *start_ccb); -static void nvme_announce_periph(struct cam_periph *periph); static void nvme_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb); -static void nvme_proto_announce(struct cam_ed *device); static void nvme_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void nvme_proto_denounce(struct cam_ed *device); static void nvme_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void nvme_proto_debug_out(union ccb *ccb); @@ -171,7 +168,6 @@ static struct xpt_xport_ops nvme_xport_ops = { .alloc_device = nvme_alloc_device, .action = nvme_action, .async = nvme_dev_async, - .announce = nvme_announce_periph, .announce_sbuf = nvme_announce_periph_sbuf, }; #define NVME_XPT_XPORT(x, X) \ @@ -187,9 +183,7 @@ NVME_XPT_XPORT(nvme, NVME); #undef NVME_XPT_XPORT static struct xpt_proto_ops nvme_proto_ops = { - .announce = nvme_proto_announce, .announce_sbuf = nvme_proto_announce_sbuf, - .denounce = nvme_proto_denounce, .denounce_sbuf = nvme_proto_denounce_sbuf, .debug_out = nvme_proto_debug_out, }; @@ -827,48 +821,12 @@ nvme_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) sbuf_printf(sb, "\n"); } -static void -nvme_announce_periph(struct cam_periph *periph) -{ - struct sbuf sb; - char buffer[120]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - nvme_announce_periph_sbuf(periph, &sb); - sbuf_finish(&sb); - sbuf_putbuf(&sb); -} - -static void -nvme_proto_announce(struct cam_ed *device) -{ - struct sbuf sb; - char buffer[120]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - nvme_print_ident(device->nvme_cdata, device->nvme_data, &sb); - sbuf_finish(&sb); - sbuf_putbuf(&sb); -} - static void nvme_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) { nvme_print_ident(device->nvme_cdata, device->nvme_data, sb); } -static void -nvme_proto_denounce(struct cam_ed *device) -{ - struct sbuf sb; - char buffer[120]; - - sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); - nvme_print_ident_short(device->nvme_cdata, device->nvme_data, &sb); - sbuf_finish(&sb); - sbuf_putbuf(&sb); -} - static void nvme_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 619841720bb3..734668995299 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -593,12 +593,9 @@ static void scsi_dev_async(uint32_t async_code, struct cam_ed *device, void *async_arg); static void scsi_action(union ccb *start_ccb); -static void scsi_announce_periph(struct cam_periph *periph); static void scsi_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb); -static void scsi_proto_announce(struct cam_ed *device); static void scsi_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb); -static void scsi_proto_denounce(struct cam_ed *device); static void scsi_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb); static void scsi_proto_debug_out(union ccb *ccb); @@ -608,7 +605,6 @@ static struct xpt_xport_ops scsi_xport_ops = { .alloc_device = scsi_alloc_device, .action = scsi_action, .async = scsi_dev_async, - .announce = scsi_announce_periph, .announce_sbuf = scsi_announce_periph_sbuf, }; #define SCSI_XPT_XPORT(x, X) \ @@ -630,9 +626,7 @@ SCSI_XPT_XPORT(ppb, PPB); #undef SCSI_XPORT_XPORT static struct xpt_proto_ops scsi_proto_ops = { - .announce = scsi_proto_announce, .announce_sbuf = scsi_proto_announce_sbuf, - .denounce = scsi_proto_denounce, .denounce_sbuf = scsi_proto_denounce_sbuf, .debug_out = scsi_proto_debug_out, }; @@ -3150,87 +3144,18 @@ scsi_announce_periph_sbuf(struct cam_periph *periph, struct sbuf *sb) sbuf_printf(sb, "\n"); } -static void -scsi_announce_periph(struct cam_periph *periph) -{ - struct ccb_trans_settings cts; - u_int speed, freq, mb; - - memset(&cts, 0, sizeof(cts)); - _scsi_announce_periph(periph, &speed, &freq, &cts); - if (cam_ccb_status((union ccb *)&cts) != CAM_REQ_CMP) - return; - - mb = speed / 1000; - if (mb > 0) - printf("%s%d: %d.%03dMB/s transfers", - periph->periph_name, periph->unit_number, - mb, speed % 1000); - else - printf("%s%d: %dKB/s transfers", periph->periph_name, - periph->unit_number, speed); - /* Report additional information about SPI connections */ - if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SPI) { - struct ccb_trans_settings_spi *spi; - - spi = &cts.xport_specific.spi; - if (freq != 0) { - printf(" (%d.%03dMHz%s, offset %d", freq / 1000, - freq % 1000, - (spi->ppr_options & MSG_EXT_PPR_DT_REQ) != 0 - ? " DT" : "", - spi->sync_offset); - } - if ((spi->valid & CTS_SPI_VALID_BUS_WIDTH) != 0 - && spi->bus_width > 0) { - if (freq != 0) { - printf(", "); - } else { - printf(" ("); - } - printf("%dbit)", 8 * (0x01 << spi->bus_width)); - } else if (freq != 0) { - printf(")"); - } - } - if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_FC) { - struct ccb_trans_settings_fc *fc; - - fc = &cts.xport_specific.fc; - if (fc->valid & CTS_FC_VALID_WWNN) - printf(" WWNN 0x%llx", (long long) fc->wwnn); - if (fc->valid & CTS_FC_VALID_WWPN) - printf(" WWPN 0x%llx", (long long) fc->wwpn); - if (fc->valid & CTS_FC_VALID_PORT) - printf(" PortID 0x%x", fc->port); - } - printf("\n"); -} - static void scsi_proto_announce_sbuf(struct cam_ed *device, struct sbuf *sb) { scsi_print_inquiry_sbuf(sb, &device->inq_data); } -static void -scsi_proto_announce(struct cam_ed *device) -{ - scsi_print_inquiry(&device->inq_data); -} - static void scsi_proto_denounce_sbuf(struct cam_ed *device, struct sbuf *sb) { scsi_print_inquiry_short_sbuf(sb, &device->inq_data); } -static void -scsi_proto_denounce(struct cam_ed *device) -{ - scsi_print_inquiry_short(&device->inq_data); -} - static void scsi_proto_debug_out(union ccb *ccb) {