diff options
author | Alexander Motin <mav@FreeBSD.org> | 2018-02-02 23:19:20 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2018-02-02 23:19:20 +0000 |
commit | d3fd85191f0799c76371699dca30f452bd1e87e1 (patch) | |
tree | 7416775449e10c33e18136bbe874239acbab6a0c /sys/cam/scsi | |
parent | e29a582ab9fe5e010b2f979b1149e72af44a3bd2 (diff) | |
download | src-test2-d3fd85191f0799c76371699dca30f452bd1e87e1.tar.gz src-test2-d3fd85191f0799c76371699dca30f452bd1e87e1.zip |
Notes
Diffstat (limited to 'sys/cam/scsi')
-rw-r--r-- | sys/cam/scsi/scsi_xpt.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index a65066e7ba2e..badcdbfe814b 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -590,18 +590,29 @@ static void scsi_dev_async(u_int32_t async_code, static void scsi_action(union ccb *start_ccb); static void scsi_announce_periph(struct cam_periph *periph); -static struct xpt_xport scsi_xport = { +static struct xpt_xport_ops scsi_xport_ops = { .alloc_device = scsi_alloc_device, .action = scsi_action, .async = scsi_dev_async, .announce = scsi_announce_periph, }; - -struct xpt_xport * -scsi_get_xport(void) -{ - return (&scsi_xport); -} +#define SCSI_XPT_XPORT(x, X) \ +static struct xpt_xport scsi_xport_ ## x = { \ + .xport = XPORT_ ## X, \ + .name = #x, \ + .ops = &scsi_xport_ops, \ +}; \ +CAM_XPT_XPORT(scsi_xport_ ## x); + +SCSI_XPT_XPORT(spi, SPI); +SCSI_XPT_XPORT(sas, SAS); +SCSI_XPT_XPORT(fc, FC); +SCSI_XPT_XPORT(usb, USB); +SCSI_XPT_XPORT(iscsi, ISCSI); +SCSI_XPT_XPORT(srp, SRP); +SCSI_XPT_XPORT(ppb, PPB); + +#undef SCSI_XPORT_XPORT static void probe_periph_init() |