Deleted Added
full compact
scsi_sg.c (186371) scsi_sg.c (187028)
1/*-
2 * Copyright (c) 2007 Scott Long
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

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

25 */
26
27/*
28 * scsi_sg peripheral driver. This driver is meant to implement the Linux
29 * SG passthrough interface for SCSI.
30 */
31
32#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2007 Scott Long
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

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

25 */
26
27/*
28 * scsi_sg peripheral driver. This driver is meant to implement the Linux
29 * SG passthrough interface for SCSI.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_sg.c 186371 2008-12-21 06:20:11Z scottl $");
33__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_sg.c 187028 2009-01-10 17:22:49Z trasz $");
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/kernel.h>
38#include <sys/types.h>
39#include <sys/bio.h>
40#include <sys/malloc.h>
41#include <sys/fcntl.h>

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

195}
196
197static void
198sgcleanup(struct cam_periph *periph)
199{
200 struct sg_softc *softc;
201
202 softc = (struct sg_softc *)periph->softc;
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/kernel.h>
38#include <sys/types.h>
39#include <sys/bio.h>
40#include <sys/malloc.h>
41#include <sys/fcntl.h>

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

195}
196
197static void
198sgcleanup(struct cam_periph *periph)
199{
200 struct sg_softc *softc;
201
202 softc = (struct sg_softc *)periph->softc;
203 if (bootverbose)
204 xpt_print(periph->path, "removing device entry\n");
203 devstat_remove_entry(softc->device_stats);
205 devstat_remove_entry(softc->device_stats);
206 cam_periph_unlock(periph);
204 destroy_dev(softc->dev);
207 destroy_dev(softc->dev);
205 if (bootverbose) {
206 xpt_print(periph->path, "removing device entry\n");
207 }
208 cam_periph_lock(periph);
208 free(softc, M_DEVBUF);
209}
210
211static void
212sgasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg)
213{
214 struct cam_periph *periph;
215

--- 768 unchanged lines hidden ---
209 free(softc, M_DEVBUF);
210}
211
212static void
213sgasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg)
214{
215 struct cam_periph *periph;
216

--- 768 unchanged lines hidden ---