ctl_frontend.c (271529) | ctl_frontend.c (275493) |
---|---|
1/*- 2 * Copyright (c) 2003 Silicon Graphics International Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 */ 32/* 33 * CAM Target Layer front end interface code 34 * 35 * Author: Ken Merry <ken@FreeBSD.org> 36 */ 37 38#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Silicon Graphics International Corp. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 22 unchanged lines hidden (view full) --- 31 */ 32/* 33 * CAM Target Layer front end interface code 34 * 35 * Author: Ken Merry <ken@FreeBSD.org> 36 */ 37 38#include <sys/cdefs.h> |
39__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend.c 271529 2014-09-13 17:08:27Z mav $"); | 39__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend.c 275493 2014-12-05 07:23:25Z mav $"); |
40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> 44#include <sys/types.h> 45#include <sys/malloc.h> 46#include <sys/lock.h> 47#include <sys/mutex.h> --- 83 unchanged lines hidden (view full) --- 131 return (fe); 132 } 133 } 134 mtx_unlock(&ctl_softc->ctl_lock); 135 return (NULL); 136} 137 138int | 40 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> 44#include <sys/types.h> 45#include <sys/malloc.h> 46#include <sys/lock.h> 47#include <sys/mutex.h> --- 83 unchanged lines hidden (view full) --- 131 return (fe); 132 } 133 } 134 mtx_unlock(&ctl_softc->ctl_lock); 135 return (NULL); 136} 137 138int |
139ctl_port_register(struct ctl_port *port, int master_shelf) | 139ctl_port_register(struct ctl_port *port) |
140{ 141 struct ctl_io_pool *pool; 142 int port_num; 143 int retval; 144 145 retval = 0; 146 147 KASSERT(control_softc != NULL, ("CTL is not initialized")); --- 40 unchanged lines hidden (view full) --- 188 return (retval); 189 } 190 port->ctl_pool_ref = pool; 191 192 if (port->options.stqh_first == NULL) 193 STAILQ_INIT(&port->options); 194 195 mtx_lock(&control_softc->ctl_lock); | 140{ 141 struct ctl_io_pool *pool; 142 int port_num; 143 int retval; 144 145 retval = 0; 146 147 KASSERT(control_softc != NULL, ("CTL is not initialized")); --- 40 unchanged lines hidden (view full) --- 188 return (retval); 189 } 190 port->ctl_pool_ref = pool; 191 192 if (port->options.stqh_first == NULL) 193 STAILQ_INIT(&port->options); 194 195 mtx_lock(&control_softc->ctl_lock); |
196 port->targ_port = port_num + (master_shelf != 0 ? 0 : CTL_MAX_PORTS); | 196 port->targ_port = port_num + control_softc->port_offset; |
197 STAILQ_INSERT_TAIL(&port->frontend->port_list, port, fe_links); 198 STAILQ_INSERT_TAIL(&control_softc->port_list, port, links); 199 control_softc->ctl_ports[port_num] = port; 200 mtx_unlock(&control_softc->ctl_lock); 201 202 return (retval); 203} 204 --- 110 unchanged lines hidden --- | 197 STAILQ_INSERT_TAIL(&port->frontend->port_list, port, fe_links); 198 STAILQ_INSERT_TAIL(&control_softc->port_list, port, links); 199 control_softc->ctl_ports[port_num] = port; 200 mtx_unlock(&control_softc->ctl_lock); 201 202 return (retval); 203} 204 --- 110 unchanged lines hidden --- |