Deleted Added
full compact
ctl_tpc_local.c (269296) ctl_tpc_local.c (275493)
1/*-
2 * Copyright (c) 2014 Alexander Motin <mav@FreeBSD.org>
3 * Copyright (c) 2004, 2005 Silicon Graphics International Corp.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2014 Alexander Motin <mav@FreeBSD.org>
3 * Copyright (c) 2004, 2005 Silicon Graphics International Corp.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_tpc_local.c 269296 2014-07-30 07:18:32Z mav $");
29__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_tpc_local.c 275493 2014-12-05 07:23:25Z mav $");
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/types.h>
35#include <sys/lock.h>
36#include <sys/module.h>
37#include <sys/mutex.h>

--- 44 unchanged lines hidden (view full) ---

82 .init = tpcl_init,
83 .shutdown = tpcl_shutdown,
84};
85CTL_FRONTEND_DECLARE(ctltpc, tpcl_frontend);
86
87static int
88tpcl_init(void)
89{
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/types.h>
35#include <sys/lock.h>
36#include <sys/module.h>
37#include <sys/mutex.h>

--- 44 unchanged lines hidden (view full) ---

82 .init = tpcl_init,
83 .shutdown = tpcl_shutdown,
84};
85CTL_FRONTEND_DECLARE(ctltpc, tpcl_frontend);
86
87static int
88tpcl_init(void)
89{
90 struct ctl_softc *softc = control_softc;
91 struct tpcl_softc *tsoftc = &tpcl_softc;
92 struct ctl_port *port;
93 struct scsi_transportid_spi *tid;
94 int len;
95
96 memset(tsoftc, 0, sizeof(*tsoftc));
97
98 port = &tsoftc->port;

--- 8 unchanged lines hidden (view full) ---

107 port->lun_disable = tpcl_lun_disable;
108 port->targ_lun_arg = tsoftc;
109 port->fe_datamove = tpcl_datamove;
110 port->fe_done = tpcl_done;
111 port->max_targets = 1;
112 port->max_target_id = 0;
113 port->max_initiators = 1;
114
90 struct tpcl_softc *tsoftc = &tpcl_softc;
91 struct ctl_port *port;
92 struct scsi_transportid_spi *tid;
93 int len;
94
95 memset(tsoftc, 0, sizeof(*tsoftc));
96
97 port = &tsoftc->port;

--- 8 unchanged lines hidden (view full) ---

106 port->lun_disable = tpcl_lun_disable;
107 port->targ_lun_arg = tsoftc;
108 port->fe_datamove = tpcl_datamove;
109 port->fe_done = tpcl_done;
110 port->max_targets = 1;
111 port->max_target_id = 0;
112 port->max_initiators = 1;
113
115 if (ctl_port_register(port, (softc->flags & CTL_FLAG_MASTER_SHELF)) != 0)
114 if (ctl_port_register(port) != 0)
116 {
117 printf("%s: tpc frontend registration failed\n", __func__);
118 return (0);
119 }
120
121 len = sizeof(struct scsi_transportid_spi);
122 port->init_devid = malloc(sizeof(struct ctl_devid) + len,
123 M_CTL, M_WAITOK | M_ZERO);

--- 264 unchanged lines hidden ---
115 {
116 printf("%s: tpc frontend registration failed\n", __func__);
117 return (0);
118 }
119
120 len = sizeof(struct scsi_transportid_spi);
121 port->init_devid = malloc(sizeof(struct ctl_devid) + len,
122 M_CTL, M_WAITOK | M_ZERO);

--- 264 unchanged lines hidden ---