Deleted Added
full compact
ctl_frontend_cam_sim.c (276616) ctl_frontend_cam_sim.c (284798)
1/*-
2 * Copyright (c) 2009 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

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

32/*
33 * CTL frontend to CAM SIM interface. This allows access to CTL LUNs via
34 * the da(4) and pass(4) drivers from inside the system.
35 *
36 * Author: Ken Merry <ken@FreeBSD.org>
37 */
38
39#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009 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

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

32/*
33 * CTL frontend to CAM SIM interface. This allows access to CTL LUNs via
34 * the da(4) and pass(4) drivers from inside the system.
35 *
36 * Author: Ken Merry <ken@FreeBSD.org>
37 */
38
39#include <sys/cdefs.h>
40__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c 276616 2015-01-03 13:11:39Z mav $");
40__FBSDID("$FreeBSD: stable/10/sys/cam/ctl/ctl_frontend_cam_sim.c 284798 2015-06-25 07:11:48Z mav $");
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>
45#include <sys/types.h>
46#include <sys/malloc.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>

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

94#define CFCS_BAD_CCB_FLAGS (CAM_DATA_ISPHYS | CAM_MSG_BUF_PHYS | \
95 CAM_SNS_BUF_PHYS | CAM_CDB_PHYS | CAM_SENSE_PTR | \
96 CAM_SENSE_PHYS)
97
98int cfcs_init(void);
99static void cfcs_poll(struct cam_sim *sim);
100static void cfcs_online(void *arg);
101static void cfcs_offline(void *arg);
41
42#include <sys/param.h>
43#include <sys/systm.h>
44#include <sys/kernel.h>
45#include <sys/types.h>
46#include <sys/malloc.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>

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

94#define CFCS_BAD_CCB_FLAGS (CAM_DATA_ISPHYS | CAM_MSG_BUF_PHYS | \
95 CAM_SNS_BUF_PHYS | CAM_CDB_PHYS | CAM_SENSE_PTR | \
96 CAM_SENSE_PHYS)
97
98int cfcs_init(void);
99static void cfcs_poll(struct cam_sim *sim);
100static void cfcs_online(void *arg);
101static void cfcs_offline(void *arg);
102static int cfcs_lun_enable(void *arg, struct ctl_id target_id, int lun_id);
103static int cfcs_lun_disable(void *arg, struct ctl_id target_id, int lun_id);
102static int cfcs_lun_enable(void *arg, int lun_id);
103static int cfcs_lun_disable(void *arg, int lun_id);
104static void cfcs_datamove(union ctl_io *io);
105static void cfcs_done(union ctl_io *io);
106void cfcs_action(struct cam_sim *sim, union ccb *ccb);
107static void cfcs_async(void *callback_arg, uint32_t code,
108 struct cam_path *path, void *arg);
109
110struct cfcs_softc cfcs_softc;
111/*

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

298
299static void
300cfcs_offline(void *arg)
301{
302 cfcs_onoffline(arg, /*online*/ 0);
303}
304
305static int
104static void cfcs_datamove(union ctl_io *io);
105static void cfcs_done(union ctl_io *io);
106void cfcs_action(struct cam_sim *sim, union ccb *ccb);
107static void cfcs_async(void *callback_arg, uint32_t code,
108 struct cam_path *path, void *arg);
109
110struct cfcs_softc cfcs_softc;
111/*

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

298
299static void
300cfcs_offline(void *arg)
301{
302 cfcs_onoffline(arg, /*online*/ 0);
303}
304
305static int
306cfcs_lun_enable(void *arg, struct ctl_id target_id, int lun_id)
306cfcs_lun_enable(void *arg, int lun_id)
307{
308 return (0);
309}
310static int
307{
308 return (0);
309}
310static int
311cfcs_lun_disable(void *arg, struct ctl_id target_id, int lun_id)
311cfcs_lun_disable(void *arg, int lun_id)
312{
313 return (0);
314}
315
316/*
317 * This function is very similar to ctl_ioctl_do_datamove(). Is there a
318 * way to combine the functionality?
319 *

--- 509 unchanged lines hidden ---
312{
313 return (0);
314}
315
316/*
317 * This function is very similar to ctl_ioctl_do_datamove(). Is there a
318 * way to combine the functionality?
319 *

--- 509 unchanged lines hidden ---