scsi_pt.c (168752) | scsi_pt.c (168872) |
---|---|
1/*- 2 * Implementation of SCSI Processor Target Peripheral driver for CAM. 3 * 4 * Copyright (c) 1998 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> | 1/*- 2 * Implementation of SCSI Processor Target Peripheral driver for CAM. 3 * 4 * Copyright (c) 1998 Justin T. Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 13 unchanged lines hidden (view full) --- 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_pt.c 168752 2007-04-15 08:49:19Z scottl $"); | 30__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_pt.c 168872 2007-04-19 18:14:33Z scottl $"); |
31 32#include <sys/param.h> 33#include <sys/queue.h> 34#include <sys/systm.h> 35#include <sys/kernel.h> 36#include <sys/types.h> 37#include <sys/bio.h> 38#include <sys/devicestat.h> --- 259 unchanged lines hidden (view full) --- 298 periph->softc = softc; 299 300 softc->device_stats = devstat_new_entry("pt", 301 periph->unit_number, 0, 302 DEVSTAT_NO_BLOCKSIZE, 303 SID_TYPE(&cgd->inq_data) | DEVSTAT_TYPE_IF_SCSI, 304 DEVSTAT_PRIORITY_OTHER); 305 | 31 32#include <sys/param.h> 33#include <sys/queue.h> 34#include <sys/systm.h> 35#include <sys/kernel.h> 36#include <sys/types.h> 37#include <sys/bio.h> 38#include <sys/devicestat.h> --- 259 unchanged lines hidden (view full) --- 298 periph->softc = softc; 299 300 softc->device_stats = devstat_new_entry("pt", 301 periph->unit_number, 0, 302 DEVSTAT_NO_BLOCKSIZE, 303 SID_TYPE(&cgd->inq_data) | DEVSTAT_TYPE_IF_SCSI, 304 DEVSTAT_PRIORITY_OTHER); 305 |
306 cam_periph_unlock(periph); |
|
306 softc->dev = make_dev(&pt_cdevsw, periph->unit_number, UID_ROOT, 307 GID_OPERATOR, 0600, "%s%d", periph->periph_name, 308 periph->unit_number); | 307 softc->dev = make_dev(&pt_cdevsw, periph->unit_number, UID_ROOT, 308 GID_OPERATOR, 0600, "%s%d", periph->periph_name, 309 periph->unit_number); |
310 cam_periph_lock(periph); |
|
309 softc->dev->si_drv1 = periph; 310 311 /* 312 * Add async callbacks for bus reset and 313 * bus device reset calls. I don't bother 314 * checking if this fails as, in most cases, 315 * the system will function just fine without 316 * them and the only alternative would be to --- 346 unchanged lines hidden --- | 311 softc->dev->si_drv1 = periph; 312 313 /* 314 * Add async callbacks for bus reset and 315 * bus device reset calls. I don't bother 316 * checking if this fails as, in most cases, 317 * the system will function just fine without 318 * them and the only alternative would be to --- 346 unchanged lines hidden --- |