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 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; |
203 if (bootverbose) 204 xpt_print(periph->path, "removing device entry\n"); |
205 devstat_remove_entry(softc->device_stats); |
206 cam_periph_unlock(periph); |
207 destroy_dev(softc->dev); |
208 cam_periph_lock(periph); |
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 --- |