xref: /freebsd/lib/libcam/scsi_wrap.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1*da739265SWarner Losh /*-
2*da739265SWarner Losh  * Copyright (c) 2021 Netflix, Inc.
3*da739265SWarner Losh  *
4*da739265SWarner Losh  * Redistribution and use in source and binary forms, with or without
5*da739265SWarner Losh  * modification, are permitted provided that the following conditions
6*da739265SWarner Losh  * are met:
7*da739265SWarner Losh  * 1. Redistributions of source code must retain the above copyright
8*da739265SWarner Losh  *    notice, this list of conditions and the following disclaimer.
9*da739265SWarner Losh  * 2. Redistributions in binary form must reproduce the above copyright
10*da739265SWarner Losh  *    notice, this list of conditions and the following disclaimer in the
11*da739265SWarner Losh  *    documentation and/or other materials provided with the distribution.
12*da739265SWarner Losh  *
13*da739265SWarner Losh  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14*da739265SWarner Losh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15*da739265SWarner Losh  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16*da739265SWarner Losh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17*da739265SWarner Losh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18*da739265SWarner Losh  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19*da739265SWarner Losh  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20*da739265SWarner Losh  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21*da739265SWarner Losh  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22*da739265SWarner Losh  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23*da739265SWarner Losh  * SUCH DAMAGE.
24*da739265SWarner Losh  */
25*da739265SWarner Losh 
26*da739265SWarner Losh #ifndef _CAM_SCSI_WRAP_H
27*da739265SWarner Losh #define _CAM_SCSI_WRAP_H
28*da739265SWarner Losh 
29*da739265SWarner Losh void *scsi_wrap_get_physical_element_status(struct cam_device *device,
30*da739265SWarner Losh     int task_attr, int retry_count, int timeout, uint8_t report_type,
31*da739265SWarner Losh     uint32_t start_element);
32*da739265SWarner Losh void *scsi_wrap_inquiry(struct cam_device *device, uint32_t page, uint32_t length);
33*da739265SWarner Losh struct scsi_vpd_block_device_characteristics *scsi_wrap_vpd_block_device_characteristics(
34*da739265SWarner Losh     struct cam_device *device);
35*da739265SWarner Losh 
36*da739265SWarner Losh #endif /*  _CAM_SCSI_WRAP_H */
37