Page MenuHomeFreeBSD

D41264.diff
No OneTemporary

D41264.diff

diff --git a/sys/cam/ata/ata_xpt.c b/sys/cam/ata/ata_xpt.c
--- a/sys/cam/ata/ata_xpt.c
+++ b/sys/cam/ata/ata_xpt.c
@@ -188,16 +188,11 @@
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 @@
.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 @@
#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_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_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 @@
}
}
-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_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_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
--- a/sys/cam/cam_xpt_internal.h
+++ b/sys/cam/cam_xpt_internal.h
@@ -56,7 +56,6 @@
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_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
--- a/sys/cam/mmc/mmc_xpt.c
+++ b/sys/cam/mmc/mmc_xpt.c
@@ -73,7 +73,6 @@
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_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 @@
.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 @@
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 @@
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 @@
}
}
-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
--- a/sys/cam/nvme/nvme_xpt.c
+++ b/sys/cam/nvme/nvme_xpt.c
@@ -156,13 +156,10 @@
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 @@
.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 @@
#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 @@
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
--- a/sys/cam/scsi/scsi_xpt.c
+++ b/sys/cam/scsi/scsi_xpt.c
@@ -593,12 +593,9 @@
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 @@
.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 @@
#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 @@
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)
{

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 5:44 AM (21 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14653919
Default Alt Text
D41264.diff (13 KB)

Event Timeline