Deleted Added
full compact
ctl_backend_ramdisk.c (288348) ctl_backend_ramdisk.c (288369)
1/*-
2 * Copyright (c) 2003, 2008 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * Copyright (c) 2014-2015 Alexander Motin <mav@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Portions of this software were developed by Edward Tomasz Napierala
8 * under sponsorship from the FreeBSD Foundation.

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

36 */
37/*
38 * CAM Target Layer backend for a "fake" ramdisk.
39 *
40 * Author: Ken Merry <ken@FreeBSD.org>
41 */
42
43#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003, 2008 Silicon Graphics International Corp.
3 * Copyright (c) 2012 The FreeBSD Foundation
4 * Copyright (c) 2014-2015 Alexander Motin <mav@FreeBSD.org>
5 * All rights reserved.
6 *
7 * Portions of this software were developed by Edward Tomasz Napierala
8 * under sponsorship from the FreeBSD Foundation.

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

36 */
37/*
38 * CAM Target Layer backend for a "fake" ramdisk.
39 *
40 * Author: Ken Merry <ken@FreeBSD.org>
41 */
42
43#include <sys/cdefs.h>
44__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_backend_ramdisk.c 288348 2015-09-28 20:54:18Z mav $");
44__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_backend_ramdisk.c 288369 2015-09-29 15:12:40Z mav $");
45
46#include <sys/param.h>
47#include <sys/systm.h>
48#include <sys/kernel.h>
49#include <sys/condvar.h>
50#include <sys/types.h>
51#include <sys/lock.h>
52#include <sys/mutex.h>

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

875 */
876 ctl_set_success(&io->scsiio);
877 ctl_config_write_done(io);
878 break;
879 case START_STOP_UNIT: {
880 struct scsi_start_stop_unit *cdb;
881
882 cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb;
45
46#include <sys/param.h>
47#include <sys/systm.h>
48#include <sys/kernel.h>
49#include <sys/condvar.h>
50#include <sys/types.h>
51#include <sys/lock.h>
52#include <sys/mutex.h>

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

875 */
876 ctl_set_success(&io->scsiio);
877 ctl_config_write_done(io);
878 break;
879 case START_STOP_UNIT: {
880 struct scsi_start_stop_unit *cdb;
881
882 cdb = (struct scsi_start_stop_unit *)io->scsiio.cdb;
883 if ((cdb->how & SSS_PC_MASK) != 0) {
884 ctl_set_success(&io->scsiio);
885 ctl_config_write_done(io);
886 break;
887 }
883 if (cdb->how & SSS_START) {
884 if (cdb->how & SSS_LOEJ)
885 ctl_lun_has_media(cbe_lun);
886 ctl_start_lun(cbe_lun);
887 } else {
888 ctl_stop_lun(cbe_lun);
889 if (cdb->how & SSS_LOEJ)
890 ctl_lun_ejected(cbe_lun);

--- 53 unchanged lines hidden ---
888 if (cdb->how & SSS_START) {
889 if (cdb->how & SSS_LOEJ)
890 ctl_lun_has_media(cbe_lun);
891 ctl_start_lun(cbe_lun);
892 } else {
893 ctl_stop_lun(cbe_lun);
894 if (cdb->how & SSS_LOEJ)
895 ctl_lun_ejected(cbe_lun);

--- 53 unchanged lines hidden ---