\hypertarget{scsi__sa_8c_source}{}\doxysection{scsi\+\_\+sa.\+c}
\label{scsi__sa_8c_source}\index{cam/scsi/scsi\_sa.c@{cam/scsi/scsi\_sa.c}}
\mbox{\hyperlink{scsi__sa_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00002}00002 \textcolor{comment}{ * Implementation of SCSI Sequential Access Peripheral driver for CAM.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00004}00004 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00006}00006 \textcolor{comment}{ * Copyright (c) 1999, 2000 Matthew Jacob}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00007}00007 \textcolor{comment}{ * Copyright (c) 2013, 2014, 2015, 2021 Spectra Logic Corporation}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00008}00008 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00010}00010 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00011}00011 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00012}00012 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00013}00013 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions, and the following disclaimer,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00015}00015 \textcolor{comment}{ *    without modification, immediately at the beginning of the file.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00016}00016 \textcolor{comment}{ * 2. The name of the author may not be used to endorse or promote products}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00017}00017 \textcolor{comment}{ *    derived from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00018}00018 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00019}00019 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00020}00020 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00021}00021 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00022}00022 \textcolor{comment}{ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00023}00023 \textcolor{comment}{ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00024}00024 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00025}00025 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00026}00026 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00027}00027 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00028}00028 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00029}00029 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00030}00030 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00033}\mbox{\hyperlink{scsi__sa_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00033}} \mbox{\hyperlink{scsi__sa_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00037}00037 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00040}00040 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/time.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/bio.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/limits.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/mtio.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00047}00047 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/sbuf.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/taskqueue.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00052}00052 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/fcntl.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/devicestat.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00056}00056 \textcolor{preprocessor}{\#ifndef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <string.h>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00059}00059 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam_8h}{cam/cam.h}}>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__ccb_8h}{cam/cam\_ccb.h}}>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__periph_8h}{cam/cam\_periph.h}}>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__xpt__periph_8h}{cam/cam\_xpt\_periph.h}}>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{cam__debug_8h}{cam/cam\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{scsi__all_8h}{cam/scsi/scsi\_all.h}}>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{scsi__message_8h}{cam/scsi/scsi\_message.h}}>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{scsi__sa_8h}{cam/scsi/scsi\_sa.h}}>}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00071}00071 \textcolor{preprocessor}{\#ifdef \_KERNEL}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00073}00073 \textcolor{preprocessor}{\#include "{}opt\_sa.h"{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00075}00075 \textcolor{preprocessor}{\#ifndef SA\_IO\_TIMEOUT}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00076}\mbox{\hyperlink{scsi__sa_8c_af6d5091ed8a0d8370d78baf70dca2c51}{00076}} \textcolor{preprocessor}{\#define SA\_IO\_TIMEOUT           32}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00077}00077 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00078}00078 \textcolor{preprocessor}{\#ifndef SA\_SPACE\_TIMEOUT}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00079}\mbox{\hyperlink{scsi__sa_8c_a8ce76db62e1eebf439cfe113ed606f72}{00079}} \textcolor{preprocessor}{\#define SA\_SPACE\_TIMEOUT        1 * 60}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00080}00080 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00081}00081 \textcolor{preprocessor}{\#ifndef SA\_REWIND\_TIMEOUT}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00082}\mbox{\hyperlink{scsi__sa_8c_aabc3983d87f496eed5fd2a5ad4a4c90c}{00082}} \textcolor{preprocessor}{\#define SA\_REWIND\_TIMEOUT       2 * 60}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00083}00083 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00084}00084 \textcolor{preprocessor}{\#ifndef SA\_ERASE\_TIMEOUT}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00085}\mbox{\hyperlink{scsi__sa_8c_a61b416e6b9a7d33d7f3f8c4a7e4575ff}{00085}} \textcolor{preprocessor}{\#define SA\_ERASE\_TIMEOUT        4 * 60}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00086}00086 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00087}00087 \textcolor{preprocessor}{\#ifndef SA\_REP\_DENSITY\_TIMEOUT}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00088}\mbox{\hyperlink{scsi__sa_8c_a923531d20ff50d7ed964a4e9a6cc2eb3}{00088}} \textcolor{preprocessor}{\#define SA\_REP\_DENSITY\_TIMEOUT  1}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00089}00089 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00091}\mbox{\hyperlink{scsi__sa_8c_a4ed910875dabb9f193ea2bdf14af22b7}{00091}} \textcolor{preprocessor}{\#define SCSIOP\_TIMEOUT          (60 * 1000)     }\textcolor{comment}{/* not an option */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00093}\mbox{\hyperlink{scsi__sa_8c_aa93c04b7063725819bb0bd0a97d52e5e}{00093}} \textcolor{preprocessor}{\#define IO\_TIMEOUT              (SA\_IO\_TIMEOUT * 60 * 1000)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00094}\mbox{\hyperlink{scsi__sa_8c_a411717a42c8430bf232ed84a5b845d65}{00094}} \textcolor{preprocessor}{\#define REWIND\_TIMEOUT          (SA\_REWIND\_TIMEOUT * 60 * 1000)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00095}\mbox{\hyperlink{scsi__sa_8c_a91d65cd02aa7f90fc2a0ca9e714adfcd}{00095}} \textcolor{preprocessor}{\#define ERASE\_TIMEOUT           (SA\_ERASE\_TIMEOUT * 60 * 1000)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00096}\mbox{\hyperlink{scsi__sa_8c_aceca2b9f2bef5461184b0681308c2f33}{00096}} \textcolor{preprocessor}{\#define SPACE\_TIMEOUT           (SA\_SPACE\_TIMEOUT * 60 * 1000)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00097}\mbox{\hyperlink{scsi__sa_8c_a3c37707ff1b76372ccc9f8437e17f089}{00097}} \textcolor{preprocessor}{\#define REP\_DENSITY\_TIMEOUT     (SA\_REP\_DENSITY\_TIMEOUT * 60 * 1000)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00099}00099 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00100}00100 \textcolor{comment}{ * Additional options that can be set for config: SA\_1FM\_AT\_EOT}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00101}00101 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00103}00103 \textcolor{preprocessor}{\#ifndef UNUSED\_PARAMETER}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00104}\mbox{\hyperlink{scsi__sa_8c_a3c95a90e7806e4b0d21edfae15b73465}{00104}} \textcolor{preprocessor}{\#define UNUSED\_PARAMETER(x)     x = x}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00105}00105 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00107}\mbox{\hyperlink{scsi__sa_8c_a68addb069cc1408c598a72d20cc725da}{00107}} \textcolor{preprocessor}{\#define QFRLS(ccb)      \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00108}00108 \textcolor{preprocessor}{        if (((ccb)-\/>ccb\_h.status \& CAM\_DEV\_QFRZN) != 0) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00109}00109 \textcolor{preprocessor}{                cam\_release\_devq((ccb)-\/>ccb\_h.path, 0, 0, 0, FALSE)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00111}00111 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00112}00112 \textcolor{comment}{ * Driver states}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00113}00113 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00115}\mbox{\hyperlink{scsi__sa_8c_a0b1ef0658f35d5c4b143562318b6c047}{00115}} \textcolor{keyword}{static} \mbox{\hyperlink{scsi__sa_8c_a0b1ef0658f35d5c4b143562318b6c047}{MALLOC\_DEFINE}}(M\_SCSISA, \textcolor{stringliteral}{"{}SCSI sa"{}}, \textcolor{stringliteral}{"{}SCSI sequential access buffers"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00117}\mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164}{00117}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00118}\mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164aac35c38a1e5bc8b1e9e02507a3fc7a51}{00118}}         \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164aac35c38a1e5bc8b1e9e02507a3fc7a51}{SA\_STATE\_NORMAL}}, \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164acdbb91da5e7c2fbefee5bf3a78a35da3}{SA\_STATE\_PROBE}}, \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164ad460142169adbb8b3d2c74adfe9b3fd0}{SA\_STATE\_ABNORMAL}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00119}\mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164ad460142169adbb8b3d2c74adfe9b3fd0}{00119}} \} \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164}{sa\_state}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00120}00120 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00121}\mbox{\hyperlink{scsi__sa_8c_ad32e4f918ac5ba3c97b6f816ef6f02df}{00121}} \textcolor{preprocessor}{\#define ccb\_pflags      ppriv\_field0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00122}\mbox{\hyperlink{scsi__sa_8c_aa8cbccb0f9744ba58c6df5ddc2e8b35a}{00122}} \textcolor{preprocessor}{\#define ccb\_bp          ppriv\_ptr1}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00124}00124 \textcolor{comment}{/* bits in ccb\_pflags */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00125}\mbox{\hyperlink{scsi__sa_8c_ade5ad1160849d3d66129903d4dd5934a}{00125}} \textcolor{preprocessor}{\#define SA\_POSITION\_UPDATED     0x1}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00127}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9}{00127}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00128}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a03e5b5ba99adc89677b5aafdb5f23be8}{00128}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a03e5b5ba99adc89677b5aafdb5f23be8}{SA\_FLAG\_OPEN}}                = 0x00001,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00129}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{00129}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}              = 0x00002,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00130}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a87c1744a10537aef95ff80fc5b907953}{00130}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a87c1744a10537aef95ff80fc5b907953}{SA\_FLAG\_TAPE\_LOCKED}}  = 0x00004,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00131}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a024900590c1c65352f43e7fea7b1d3be}{00131}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a024900590c1c65352f43e7fea7b1d3be}{SA\_FLAG\_TAPE\_MOUNTED}}        = 0x00008,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00132}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9663bda7bedb689a352d84a9fbf73cfc}{00132}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9663bda7bedb689a352d84a9fbf73cfc}{SA\_FLAG\_TAPE\_WP}}          = 0x00010,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00133}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{00133}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}        = 0x00020,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00134}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9af1db72dd19793d88e611acdd7f842352}{00134}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9af1db72dd19793d88e611acdd7f842352}{SA\_FLAG\_EOM\_PENDING}}  = 0x00040,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00135}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a3b5f8b7ae50c7b097d4badf16d867640}{00135}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a3b5f8b7ae50c7b097d4badf16d867640}{SA\_FLAG\_EIO\_PENDING}}  = 0x00080,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00136}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9330f4ca7f1d6bd6499a6a77a60ea385}{00136}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9330f4ca7f1d6bd6499a6a77a60ea385}{SA\_FLAG\_EOF\_PENDING}}  = 0x00100,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00137}00137         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9595047edf1771cd6fb3a805ec85c7be}{SA\_FLAG\_ERR\_PENDING}}  = (\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9af1db72dd19793d88e611acdd7f842352}{SA\_FLAG\_EOM\_PENDING}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a3b5f8b7ae50c7b097d4badf16d867640}{SA\_FLAG\_EIO\_PENDING}}|}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00138}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9595047edf1771cd6fb3a805ec85c7be}{00138}}                                    \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9330f4ca7f1d6bd6499a6a77a60ea385}{SA\_FLAG\_EOF\_PENDING}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00139}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a85411c7c0718e44034b6d3d3a57543dd}{00139}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a85411c7c0718e44034b6d3d3a57543dd}{SA\_FLAG\_INVALID}}          = 0x00200,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00140}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a1888f91e4e176990d6548f37e7724465}{00140}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a1888f91e4e176990d6548f37e7724465}{SA\_FLAG\_COMP\_ENABLED}}        = 0x00400,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00141}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5b8031931aca8cdfa8e6abb46dc668bf}{00141}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5b8031931aca8cdfa8e6abb46dc668bf}{SA\_FLAG\_COMP\_SUPP}}      = 0x00800,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00142}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a0f4c8efdb5d93152a259c1ee694d58e5}{00142}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a0f4c8efdb5d93152a259c1ee694d58e5}{SA\_FLAG\_COMP\_UNSUPP}}  = 0x01000,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00143}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{00143}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}}  = 0x02000,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00144}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a203568b61a5d82dc71d5d9bcde7b39ee}{00144}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a203568b61a5d82dc71d5d9bcde7b39ee}{SA\_FLAG\_PROTECT\_SUPP}}        = 0x04000,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00146}00146         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9ac55b3e338fbce4838f7ffc84556c989f}{SA\_FLAG\_COMPRESSION}}  = (\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5b8031931aca8cdfa8e6abb46dc668bf}{SA\_FLAG\_COMP\_SUPP}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a1888f91e4e176990d6548f37e7724465}{SA\_FLAG\_COMP\_ENABLED}}|}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00147}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9ac55b3e338fbce4838f7ffc84556c989f}{00147}}                                    \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a0f4c8efdb5d93152a259c1ee694d58e5}{SA\_FLAG\_COMP\_UNSUPP}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00148}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a022155c4fea7f618a79540c776800a05}{00148}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a022155c4fea7f618a79540c776800a05}{SA\_FLAG\_SCTX\_INIT}}      = 0x08000,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00149}\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a4984b5393494539b38df7714edcf3151}{00149}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a4984b5393494539b38df7714edcf3151}{SA\_FLAG\_RSOC\_TO\_TRY}}  = 0x10000,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00150}00150 \} \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9}{sa\_flags}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00151}00151 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00152}\mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679}{00152}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00153}\mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679ad53f6f604c93c4dd2e2be7af13dc8884}{00153}}         \mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679ad53f6f604c93c4dd2e2be7af13dc8884}{SA\_MODE\_REWIND}}            = 0x00,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00154}\mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679a290479a8d368e7cae8aef987cd0b5746}{00154}}         \mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679a290479a8d368e7cae8aef987cd0b5746}{SA\_MODE\_NOREWIND}}        = 0x01,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00155}00155         \mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679a3682f93bbecb8c2f1161250f54f86d8b}{SA\_MODE\_OFFLINE}}          = 0x02}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00156}\mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679a3682f93bbecb8c2f1161250f54f86d8b}{00156}} \} \mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679}{sa\_mode}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00158}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016a}{00158}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00159}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaba63b94d9eed020025c1a78d134e8cc4}{00159}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaba63b94d9eed020025c1a78d134e8cc4}{SA\_TIMEOUT\_ERASE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00160}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf245bc20d18ac336973056deb6138a77}{00160}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf245bc20d18ac336973056deb6138a77}{SA\_TIMEOUT\_LOAD}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00161}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa4f4a8dc9926eee608f362e2e8778236}{00161}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa4f4a8dc9926eee608f362e2e8778236}{SA\_TIMEOUT\_LOCATE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00162}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa506b917e072378f2c50b4abf5bac3ec3}{00162}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa506b917e072378f2c50b4abf5bac3ec3}{SA\_TIMEOUT\_MODE\_SELECT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00163}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6dda6e14e8cf743dc3efa009b308ef95}{00163}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6dda6e14e8cf743dc3efa009b308ef95}{SA\_TIMEOUT\_MODE\_SENSE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00164}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa0d69fddc3aa64e582e031b44f838022}{00164}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa0d69fddc3aa64e582e031b44f838022}{SA\_TIMEOUT\_PREVENT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00165}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa2767ff3c6bbff66f42ed4fb912548a05}{00165}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa2767ff3c6bbff66f42ed4fb912548a05}{SA\_TIMEOUT\_READ}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00166}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa0eff19af7fbb7a63e527ec6889c3fbfc}{00166}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa0eff19af7fbb7a63e527ec6889c3fbfc}{SA\_TIMEOUT\_READ\_BLOCK\_LIMITS}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00167}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae77b8d365a84bfa90d0c502cf673bbb5}{00167}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae77b8d365a84bfa90d0c502cf673bbb5}{SA\_TIMEOUT\_READ\_POSITION}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00168}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae287a56d985358cde9f2451b27009d8f}{00168}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae287a56d985358cde9f2451b27009d8f}{SA\_TIMEOUT\_REP\_DENSITY}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00169}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6ef52d07b8b2e19bc0b3d6908fa805ec}{00169}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6ef52d07b8b2e19bc0b3d6908fa805ec}{SA\_TIMEOUT\_RESERVE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00170}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf648f06bfa840eb39e1ed420e9f2506a}{00170}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf648f06bfa840eb39e1ed420e9f2506a}{SA\_TIMEOUT\_REWIND}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00171}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6b462533b43954222ddf4c8f71057b49}{00171}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6b462533b43954222ddf4c8f71057b49}{SA\_TIMEOUT\_SPACE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00172}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa72385ad9a41511dc7597602972f4e68}{00172}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa72385ad9a41511dc7597602972f4e68}{SA\_TIMEOUT\_TUR}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00173}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa99b6f3c07f19a319106aa47928531547}{00173}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa99b6f3c07f19a319106aa47928531547}{SA\_TIMEOUT\_WRITE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00174}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aafdc542836d4c0c2c4a4039631718ba27}{00174}}         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aafdc542836d4c0c2c4a4039631718ba27}{SA\_TIMEOUT\_WRITE\_FILEMARKS}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00175}00175         \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa5a88dc10ce493c38ca92a8423729ea13}{SA\_TIMEOUT\_TYPE\_MAX}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00176}\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa5a88dc10ce493c38ca92a8423729ea13}{00176}} \} \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016a}{sa\_timeout\_types}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00178}00178 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00179}00179 \textcolor{comment}{ * These are the default timeout values that apply to all tape drives.  }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00180}00180 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00181}00181 \textcolor{comment}{ * We get timeouts from the following places in order of increasing}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00182}00182 \textcolor{comment}{ * priority:}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00183}00183 \textcolor{comment}{ * 1. Driver default timeouts. (Set in the structure below.)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00184}00184 \textcolor{comment}{ * 2. Timeouts loaded from the drive via REPORT SUPPORTED OPERATION}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00185}00185 \textcolor{comment}{ *    CODES.  (If the drive supports it, SPC-\/4/LTO-\/5 and newer should.)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00186}00186 \textcolor{comment}{ * 3. Global loader tunables, used for all sa(4) driver instances on}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00187}00187 \textcolor{comment}{ *    a machine.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00188}00188 \textcolor{comment}{ * 4. Instance-\/specific loader tunables, used for say sa5.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00189}00189 \textcolor{comment}{ * 5. On the fly user sysctl changes.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00190}00190 \textcolor{comment}{ * }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00191}00191 \textcolor{comment}{ * Each step will overwrite the timeout value set from the one}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00192}00192 \textcolor{comment}{ * before, so you go from general to most specific.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00193}00193 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00194}\mbox{\hyperlink{structsa__timeout__desc}{00194}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__timeout__desc}{sa\_timeout\_desc}} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00195}\mbox{\hyperlink{structsa__timeout__desc_a8239e7671c2f54ace5920e7583ddeef7}{00195}}         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *\mbox{\hyperlink{structsa__timeout__desc_a8239e7671c2f54ace5920e7583ddeef7}{desc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00196}\mbox{\hyperlink{structsa__timeout__desc_ade995e1d8ace0142db7a753afd5b8bab}{00196}}         \textcolor{keywordtype}{int} \mbox{\hyperlink{structsa__timeout__desc_ade995e1d8ace0142db7a753afd5b8bab}{value}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00197}00197 \} \mbox{\hyperlink{scsi__sa_8c_a84e20ed17b50b493a26123dcde0370d7}{sa\_default\_timeouts}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa5a88dc10ce493c38ca92a8423729ea13}{SA\_TIMEOUT\_TYPE\_MAX}}] = \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00198}00198         \{\textcolor{stringliteral}{"{}erase"{}},               \mbox{\hyperlink{scsi__sa_8c_a91d65cd02aa7f90fc2a0ca9e714adfcd}{ERASE\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00199}00199         \{\textcolor{stringliteral}{"{}load"{}},                \mbox{\hyperlink{scsi__sa_8c_a411717a42c8430bf232ed84a5b845d65}{REWIND\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00200}00200         \{\textcolor{stringliteral}{"{}locate"{}},              \mbox{\hyperlink{scsi__sa_8c_aceca2b9f2bef5461184b0681308c2f33}{SPACE\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00201}00201         \{\textcolor{stringliteral}{"{}mode\_select"{}},         \mbox{\hyperlink{scsi__sa_8c_a4ed910875dabb9f193ea2bdf14af22b7}{SCSIOP\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00202}00202         \{\textcolor{stringliteral}{"{}mode\_sense"{}},          \mbox{\hyperlink{scsi__sa_8c_a4ed910875dabb9f193ea2bdf14af22b7}{SCSIOP\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00203}00203         \{\textcolor{stringliteral}{"{}prevent"{}},             \mbox{\hyperlink{scsi__sa_8c_a4ed910875dabb9f193ea2bdf14af22b7}{SCSIOP\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00204}00204         \{\textcolor{stringliteral}{"{}read"{}},                \mbox{\hyperlink{scsi__sa_8c_aa93c04b7063725819bb0bd0a97d52e5e}{IO\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00205}00205         \{\textcolor{stringliteral}{"{}read\_block\_limits"{}},   \mbox{\hyperlink{scsi__sa_8c_a4ed910875dabb9f193ea2bdf14af22b7}{SCSIOP\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00206}00206         \{\textcolor{stringliteral}{"{}read\_position"{}},       \mbox{\hyperlink{scsi__sa_8c_a4ed910875dabb9f193ea2bdf14af22b7}{SCSIOP\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00207}00207         \{\textcolor{stringliteral}{"{}report\_density"{}},      \mbox{\hyperlink{scsi__sa_8c_a3c37707ff1b76372ccc9f8437e17f089}{REP\_DENSITY\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00208}00208         \{\textcolor{stringliteral}{"{}reserve"{}},             \mbox{\hyperlink{scsi__sa_8c_a4ed910875dabb9f193ea2bdf14af22b7}{SCSIOP\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00209}00209         \{\textcolor{stringliteral}{"{}rewind"{}},              \mbox{\hyperlink{scsi__sa_8c_a411717a42c8430bf232ed84a5b845d65}{REWIND\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00210}00210         \{\textcolor{stringliteral}{"{}space"{}},               \mbox{\hyperlink{scsi__sa_8c_aceca2b9f2bef5461184b0681308c2f33}{SPACE\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00211}00211         \{\textcolor{stringliteral}{"{}tur"{}},                 \mbox{\hyperlink{scsi__sa_8c_a4ed910875dabb9f193ea2bdf14af22b7}{SCSIOP\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00212}00212         \{\textcolor{stringliteral}{"{}write"{}},               \mbox{\hyperlink{scsi__sa_8c_aa93c04b7063725819bb0bd0a97d52e5e}{IO\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00213}00213         \{\textcolor{stringliteral}{"{}write\_filemarks"{}},     \mbox{\hyperlink{scsi__sa_8c_aa93c04b7063725819bb0bd0a97d52e5e}{IO\_TIMEOUT}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00214}\mbox{\hyperlink{scsi__sa_8c_a84e20ed17b50b493a26123dcde0370d7}{00214}} \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00215}00215 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00216}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13}{00216}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00217}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2d6e8e4afd2000dde8d9cbd5a1b0a7c7}{00217}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2d6e8e4afd2000dde8d9cbd5a1b0a7c7}{SA\_PARAM\_NONE}}              = 0x000,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00218}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{00218}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}}    = 0x001,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00219}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a866ff93522ab5a676dc5bfc9361847f0}{00219}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a866ff93522ab5a676dc5bfc9361847f0}{SA\_PARAM\_DENSITY}}        = 0x002,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00220}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{00220}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}        = 0x004,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00221}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a44d36e510664018f8cc6c009ad2c1eb5}{00221}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a44d36e510664018f8cc6c009ad2c1eb5}{SA\_PARAM\_BUFF\_MODE}}    = 0x008,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00222}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13ad92ed2aeda9e0f689cb3bf4e1b892d03}{00222}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13ad92ed2aeda9e0f689cb3bf4e1b892d03}{SA\_PARAM\_NUMBLOCKS}}    = 0x010,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00223}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af7a9d015b93b4016015a39ef3eee38cf}{00223}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af7a9d015b93b4016015a39ef3eee38cf}{SA\_PARAM\_WP}}          = 0x020,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00224}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13afba43d46a8e00933c70a33440a55a98a}{00224}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13afba43d46a8e00933c70a33440a55a98a}{SA\_PARAM\_SPEED}}            = 0x040,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00225}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3e0b39e1423dae8dc67ac87c2dbbb277}{00225}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3e0b39e1423dae8dc67ac87c2dbbb277}{SA\_PARAM\_DENSITY\_EXT}}        = 0x080,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00226}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2aaf5084da4efb059c34e48672c10f3a}{00226}}         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2aaf5084da4efb059c34e48672c10f3a}{SA\_PARAM\_LBP}}                = 0x100,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00227}00227         \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a0e5a4b0c599d3592a714401f04d5afa4}{SA\_PARAM\_ALL}}                = 0x1ff}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00228}\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a0e5a4b0c599d3592a714401f04d5afa4}{00228}} \} \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13}{sa\_params}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00230}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202}{00230}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00231}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a51a6b4da75742265ff1f3e82a388266e}{00231}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a51a6b4da75742265ff1f3e82a388266e}{SA\_QUIRK\_NONE}}              = 0x000,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00232}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{00232}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}          = 0x001, \textcolor{comment}{/* Can't deal with compression at all*/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00233}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{00233}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}            = 0x002, \textcolor{comment}{/* Force fixed mode */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00234}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{00234}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}}      = 0x004, \textcolor{comment}{/* Force variable mode */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00235}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{00235}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}}                = 0x008, \textcolor{comment}{/* Needs Two File Marks at EOD */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00236}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{00236}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}                = 0x010, \textcolor{comment}{/* No more than 1 File Mark at EOD */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00237}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a0c25fd54cec9e1586015e989e65f6990}{00237}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a0c25fd54cec9e1586015e989e65f6990}{SA\_QUIRK\_NODREAD}}        = 0x020, \textcolor{comment}{/* Don't try and dummy read density */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00238}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a6a1b0f3a7eea46816b046872d844aeff}{00238}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a6a1b0f3a7eea46816b046872d844aeff}{SA\_QUIRK\_NO\_MODESEL}}  = 0x040, \textcolor{comment}{/* Don't do mode select at all */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00239}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202aaaa6c2d0a911a0aefcf1f13f535fc37f}{00239}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202aaaa6c2d0a911a0aefcf1f13f535fc37f}{SA\_QUIRK\_NO\_CPAGE}}      = 0x080, \textcolor{comment}{/* Don't use DEVICE COMPRESSION page */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00240}00240         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202ab5a3af9a4ae56b69e42da1d880f37797}{SA\_QUIRK\_NO\_LONG\_POS}}        = 0x100  \textcolor{comment}{/* No long position information */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00241}\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202ab5a3af9a4ae56b69e42da1d880f37797}{00241}} \} \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202}{sa\_quirks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00243}\mbox{\hyperlink{scsi__sa_8c_aeb8d3664dea797826b4fbbce4d106562}{00243}} \textcolor{preprocessor}{\#define SA\_QUIRK\_BIT\_STRING     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00244}00244 \textcolor{preprocessor}{        "{}\(\backslash\)020"{}}                  \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00245}00245         "{}\(\backslash\)001NOCOMP"{}            \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00246}00246         "{}\(\backslash\)002FIXED"{}             \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00247}00247         "{}\(\backslash\)003VARIABLE"{}          \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00248}00248         "{}\(\backslash\)0042FM"{}               \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00249}00249         "{}\(\backslash\)0051FM"{}               \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00250}00250         "{}\(\backslash\)006NODREAD"{}           \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00251}00251         "{}\(\backslash\)007NO\_MODESEL"{}        \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00252}00252         "{}\(\backslash\)010NO\_CPAGE"{}          \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00253}00253         "{}\(\backslash\)011NO\_LONG\_POS"{}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00254}00254 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00255}\mbox{\hyperlink{scsi__sa_8c_a634577aa4d85bc0939e3ef367fcf754e}{00255}} \textcolor{preprocessor}{\#define SAMODE(z)       (dev2unit(z) \& 0x3)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00256}\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{00256}} \textcolor{preprocessor}{\#define SA\_IS\_CTRL(z)   (dev2unit(z) \& (1 << 4))}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00258}\mbox{\hyperlink{scsi__sa_8c_a14ac2777ba8967be44d9c69446fff6d9}{00258}} \textcolor{preprocessor}{\#define SA\_NOT\_CTLDEV   0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00259}\mbox{\hyperlink{scsi__sa_8c_a4fa7589e3a9dc87943a7d772ed215252}{00259}} \textcolor{preprocessor}{\#define SA\_CTLDEV       1}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00261}\mbox{\hyperlink{scsi__sa_8c_a595d407f04921e478be3c4343b4c2a3a}{00261}} \textcolor{preprocessor}{\#define SA\_ATYPE\_R      0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00262}\mbox{\hyperlink{scsi__sa_8c_aff5a6f0cdfe9458ac237157efca75c1a}{00262}} \textcolor{preprocessor}{\#define SA\_ATYPE\_NR     1}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00263}\mbox{\hyperlink{scsi__sa_8c_acde881c4e3e5e9e9170f0be55df15d41}{00263}} \textcolor{preprocessor}{\#define SA\_ATYPE\_ER     2}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00264}\mbox{\hyperlink{scsi__sa_8c_a7e07c37491e36f8b4e03f002d974455f}{00264}} \textcolor{preprocessor}{\#define SA\_NUM\_ATYPES   3}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00266}\mbox{\hyperlink{scsi__sa_8c_a5e95b49b609882f1044804197d8ab595}{00266}} \textcolor{preprocessor}{\#define SAMINOR(ctl, access) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00267}00267 \textcolor{preprocessor}{        ((ctl << 4) | (access \& 0x3))}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00269}\mbox{\hyperlink{structsa__devs}{00269}} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__devs}{sa\_devs}} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00270}\mbox{\hyperlink{structsa__devs_afb75b647df45f16528f33bf30b506046}{00270}}         \textcolor{keyword}{struct }cdev *\mbox{\hyperlink{structsa__devs_afb75b647df45f16528f33bf30b506046}{ctl\_dev}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00271}\mbox{\hyperlink{structsa__devs_a46b0698f8492872a703ad8f463406309}{00271}}         \textcolor{keyword}{struct }cdev *\mbox{\hyperlink{structsa__devs_a46b0698f8492872a703ad8f463406309}{r\_dev}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00272}\mbox{\hyperlink{structsa__devs_a5a68aef82f99d6bdc34b05d40b354964}{00272}}         \textcolor{keyword}{struct }cdev *\mbox{\hyperlink{structsa__devs_a5a68aef82f99d6bdc34b05d40b354964}{nr\_dev}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00273}\mbox{\hyperlink{structsa__devs_af50c2642783ce13089e951681ff4a463}{00273}}         \textcolor{keyword}{struct }cdev *\mbox{\hyperlink{structsa__devs_af50c2642783ce13089e951681ff4a463}{er\_dev}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00274}00274 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00275}00275 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00276}\mbox{\hyperlink{scsi__sa_8c_a266331bfde8c4de8055682569fd23587}{00276}} \textcolor{preprocessor}{\#define SASBADDBASE(sb, indent, data, xfmt, name, type, xsize, desc)    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00277}00277 \textcolor{preprocessor}{        sbuf\_printf(sb, "{}\%*s<\%s type=\(\backslash\)"{}\%s\(\backslash\)"{} size=\(\backslash\)"{}\%zd\(\backslash\)"{} "{}}              \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00278}00278             "{}fmt=\(\backslash\)"{}\%s\(\backslash\)"{} desc=\(\backslash\)"{}\%s\(\backslash\)"{}>"{} \#xfmt "{}</\%s>\(\backslash\)n"{}, indent, "{}"{},      \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00279}00279             \#name, \#type, xsize, \#xfmt, desc ? desc : "{}"{}, data, \#name);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00281}\mbox{\hyperlink{scsi__sa_8c_abf5ad9f4604be9d18f0256f4b5de2cb6}{00281}} \textcolor{preprocessor}{\#define SASBADDINT(sb, indent, data, fmt, name)                         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00282}00282 \textcolor{preprocessor}{        SASBADDBASE(sb, indent, data, fmt, name, int, sizeof(data),     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00283}00283 \textcolor{preprocessor}{                    NULL)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00285}\mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{00285}} \textcolor{preprocessor}{\#define SASBADDINTDESC(sb, indent, data, fmt, name, desc)               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00286}00286 \textcolor{preprocessor}{        SASBADDBASE(sb, indent, data, fmt, name, int, sizeof(data),     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00287}00287 \textcolor{preprocessor}{                    desc)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00289}\mbox{\hyperlink{scsi__sa_8c_ab754019dea2edfcc43f746b84fc57e49}{00289}} \textcolor{preprocessor}{\#define SASBADDUINT(sb, indent, data, fmt, name)                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00290}00290 \textcolor{preprocessor}{        SASBADDBASE(sb, indent, data, fmt, name, uint, sizeof(data),    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00291}00291 \textcolor{preprocessor}{                    NULL)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00293}\mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{00293}} \textcolor{preprocessor}{\#define SASBADDUINTDESC(sb, indent, data, fmt, name, desc)              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00294}00294 \textcolor{preprocessor}{        SASBADDBASE(sb, indent, data, fmt, name, uint, sizeof(data),    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00295}00295 \textcolor{preprocessor}{                    desc)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00297}\mbox{\hyperlink{scsi__sa_8c_a71a29b75ce769b5d2e75d183e0ad29cc}{00297}} \textcolor{preprocessor}{\#define SASBADDFIXEDSTR(sb, indent, data, fmt, name)                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00298}00298 \textcolor{preprocessor}{        SASBADDBASE(sb, indent, data, fmt, name, str, sizeof(data),     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00299}00299 \textcolor{preprocessor}{                    NULL)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00301}\mbox{\hyperlink{scsi__sa_8c_ad74855a8ef13d97487975447e9bc7456}{00301}} \textcolor{preprocessor}{\#define SASBADDFIXEDSTRDESC(sb, indent, data, fmt, name, desc)          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00302}00302 \textcolor{preprocessor}{        SASBADDBASE(sb, indent, data, fmt, name, str, sizeof(data),     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00303}00303 \textcolor{preprocessor}{                    desc)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00305}\mbox{\hyperlink{scsi__sa_8c_a898460e57a90835812604ea28f1bef39}{00305}} \textcolor{preprocessor}{\#define SASBADDVARSTR(sb, indent, data, fmt, name, maxlen)              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00306}00306 \textcolor{preprocessor}{        SASBADDBASE(sb, indent, data, fmt, name, str, maxlen, NULL)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00307}00307 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00308}\mbox{\hyperlink{scsi__sa_8c_a18ca51cdcbad34444dc6f86a7e3259d6}{00308}} \textcolor{preprocessor}{\#define SASBADDVARSTRDESC(sb, indent, data, fmt, name, maxlen, desc)    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00309}00309 \textcolor{preprocessor}{        SASBADDBASE(sb, indent, data, fmt, name, str, maxlen, desc)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00310}00310 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00311}\mbox{\hyperlink{scsi__sa_8c_add011268a2a0c41a6cb675ff2741e6d8}{00311}} \textcolor{preprocessor}{\#define SASBADDNODE(sb, indent, name) \{                                 \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00312}00312 \textcolor{preprocessor}{        sbuf\_printf(sb, "{}\%*s<\%s type=\(\backslash\)"{}\%s\(\backslash\)"{}>\(\backslash\)n"{}}, indent, "{}"{}, \#name,     \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00313}00313             "{}node"{});                                                    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00314}00314         indent += 2;                                                    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00315}00315 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00316}00316 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00317}\mbox{\hyperlink{scsi__sa_8c_a5c2ba6aa848e947bb357867e714f3d70}{00317}} \textcolor{preprocessor}{\#define SASBADDNODENUM(sb, indent, name, num) \{                         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00318}00318 \textcolor{preprocessor}{        sbuf\_printf(sb, "{}\%*s<\%s type=\(\backslash\)"{}\%s\(\backslash\)"{} num=\(\backslash\)"{}\%d\(\backslash\)"{}>\(\backslash\)n"{}}, indent, "{}"{}, \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00319}00319             \#name, "{}node"{}, num);                                        \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00320}00320         indent += 2;                                                    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00321}00321 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00323}\mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{00323}} \textcolor{preprocessor}{\#define SASBENDNODE(sb, indent, name) \{                                 \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00324}00324 \textcolor{preprocessor}{        indent -\/= 2;                                                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00325}00325 \textcolor{preprocessor}{        sbuf\_printf(sb, "{}\%*s</\%s>\(\backslash\)n"{}}, indent, "{}"{}, \#name);               \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00326}00326 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00327}00327 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00328}\mbox{\hyperlink{scsi__sa_8c_aac3d580b796e771d33e2cc5346dbb29e}{00328}} \textcolor{preprocessor}{\#define SA\_DENSITY\_TYPES        4}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00329}00329 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00330}\mbox{\hyperlink{structsa__prot__state}{00330}} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00331}\mbox{\hyperlink{structsa__prot__state_a89fe03ce576b0e0843562f4331c70aef}{00331}}         \textcolor{keywordtype}{int} \mbox{\hyperlink{structsa__prot__state_a89fe03ce576b0e0843562f4331c70aef}{initialized}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00332}\mbox{\hyperlink{structsa__prot__state_a1ead5ab1f9591218e35ced290670afc1}{00332}}         uint32\_t \mbox{\hyperlink{structsa__prot__state_a1ead5ab1f9591218e35ced290670afc1}{prot\_method}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00333}\mbox{\hyperlink{structsa__prot__state_ae9196a0a885e72c5b2b6ea1537ee2090}{00333}}         uint32\_t \mbox{\hyperlink{structsa__prot__state_ae9196a0a885e72c5b2b6ea1537ee2090}{pi\_length}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00334}\mbox{\hyperlink{structsa__prot__state_aa13d0fb6b12ac3242749ac525282c2ba}{00334}}         uint32\_t \mbox{\hyperlink{structsa__prot__state_aa13d0fb6b12ac3242749ac525282c2ba}{lbp\_w}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00335}\mbox{\hyperlink{structsa__prot__state_abfa494a22d6ce4596958f2e5986aff14}{00335}}         uint32\_t \mbox{\hyperlink{structsa__prot__state_abfa494a22d6ce4596958f2e5986aff14}{lbp\_r}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00336}\mbox{\hyperlink{structsa__prot__state_aa60f6294492f9bf63392df0a7609edca}{00336}}         uint32\_t \mbox{\hyperlink{structsa__prot__state_aa60f6294492f9bf63392df0a7609edca}{rbdp}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00337}00337 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00338}00338 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00339}\mbox{\hyperlink{structsa__prot__info}{00339}} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__info}{sa\_prot\_info}} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00340}\mbox{\hyperlink{structsa__prot__info_ab5c7f9311abbe2a8ed2b3fc335bc1ad7}{00340}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} \mbox{\hyperlink{structsa__prot__info_ab5c7f9311abbe2a8ed2b3fc335bc1ad7}{cur\_prot\_state}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00341}\mbox{\hyperlink{structsa__prot__info_a02071dfa67b7b2e1296c967ae88e9da0}{00341}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} \mbox{\hyperlink{structsa__prot__info_a02071dfa67b7b2e1296c967ae88e9da0}{pending\_prot\_state}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00342}00342 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00343}00343 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00344}00344 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00345}00345 \textcolor{comment}{ * A table mapping protection parameters to their types and values.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00346}00346 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00347}\mbox{\hyperlink{structsa__prot__map}{00347}} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00348}\mbox{\hyperlink{structsa__prot__map_aeb8684a955be23bf2a3995af642f32d9}{00348}}         \textcolor{keywordtype}{char} *\mbox{\hyperlink{structsa__prot__map_aeb8684a955be23bf2a3995af642f32d9}{name}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00349}\mbox{\hyperlink{structsa__prot__map_a5be0ce4119b0aacc4ca8974dcf00018d}{00349}}         mt\_param\_set\_type \mbox{\hyperlink{structsa__prot__map_a5be0ce4119b0aacc4ca8974dcf00018d}{param\_type}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00350}\mbox{\hyperlink{structsa__prot__map_a3aa128b3cef991f54d688605ee810cf2}{00350}}         off\_t \mbox{\hyperlink{structsa__prot__map_a3aa128b3cef991f54d688605ee810cf2}{offset}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00351}\mbox{\hyperlink{structsa__prot__map_a853e25bc86f5f9f518d95a62b932b7b1}{00351}}         uint32\_t \mbox{\hyperlink{structsa__prot__map_a853e25bc86f5f9f518d95a62b932b7b1}{min\_val}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00352}\mbox{\hyperlink{structsa__prot__map_a0d492d0c67f1f43f569bd64c9112bb9f}{00352}}         uint32\_t \mbox{\hyperlink{structsa__prot__map_a0d492d0c67f1f43f569bd64c9112bb9f}{max\_val}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00353}\mbox{\hyperlink{structsa__prot__map_a3246fd429567b2d0efec7c5555067e5b}{00353}}         uint32\_t *\mbox{\hyperlink{structsa__prot__map_a3246fd429567b2d0efec7c5555067e5b}{value}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00354}00354 \} \mbox{\hyperlink{scsi__sa_8c_a76dd3076f4f3b1a1985ae8a2b9e1f20e}{sa\_prot\_table}}[] = \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00355}00355         \{ \textcolor{stringliteral}{"{}prot\_method"{}}, MT\_PARAM\_SET\_UNSIGNED,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00356}00356           \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}}, prot\_method), }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00357}00357           \textcolor{comment}{/*min\_val*/} 0, \textcolor{comment}{/*max\_val*/} 255, NULL \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00358}00358         \{ \textcolor{stringliteral}{"{}pi\_length"{}}, MT\_PARAM\_SET\_UNSIGNED, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00359}00359           \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}}, pi\_length),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00360}00360           \textcolor{comment}{/*min\_val*/} 0, \textcolor{comment}{/*max\_val*/} \mbox{\hyperlink{scsi__sa_8h_a3a79707645fec57ac3df2e5141eaf10c}{SA\_CTRL\_DP\_PI\_LENGTH\_MASK}}, NULL \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00361}00361         \{ \textcolor{stringliteral}{"{}lbp\_w"{}}, MT\_PARAM\_SET\_UNSIGNED,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00362}00362           \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}}, lbp\_w),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00363}00363           \textcolor{comment}{/*min\_val*/} 0, \textcolor{comment}{/*max\_val*/} 1, NULL \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00364}00364         \{ \textcolor{stringliteral}{"{}lbp\_r"{}}, MT\_PARAM\_SET\_UNSIGNED,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00365}00365           \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}}, lbp\_r),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00366}00366           \textcolor{comment}{/*min\_val*/} 0, \textcolor{comment}{/*max\_val*/} 1, NULL \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00367}00367         \{ \textcolor{stringliteral}{"{}rbdp"{}}, MT\_PARAM\_SET\_UNSIGNED,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00368}00368           \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}}, rbdp),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00369}00369           \textcolor{comment}{/*min\_val*/} 0, \textcolor{comment}{/*max\_val*/} 1, NULL \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00370}\mbox{\hyperlink{scsi__sa_8c_a76dd3076f4f3b1a1985ae8a2b9e1f20e}{00370}} \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00372}\mbox{\hyperlink{scsi__sa_8c_a907a4cac166f1f5c4007798e918e3911}{00372}} \textcolor{preprocessor}{\#define SA\_NUM\_PROT\_ENTS nitems(sa\_prot\_table)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00373}00373 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00374}\mbox{\hyperlink{scsi__sa_8c_a2e9319a9e9ec17ba1f7fa57f28dce561}{00374}} \textcolor{preprocessor}{\#define SA\_PROT\_ENABLED(softc) ((softc-\/>flags \& SA\_FLAG\_PROTECT\_SUPP)   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00375}00375 \textcolor{preprocessor}{        \&\& (softc-\/>prot\_info.cur\_prot\_state.initialized != 0)           \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00376}00376 \textcolor{preprocessor}{        \&\& (softc-\/>prot\_info.cur\_prot\_state.prot\_method != 0))}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00377}00377 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00378}\mbox{\hyperlink{scsi__sa_8c_a8eaa8fd927ca3738b8a4d307f1f492bd}{00378}} \textcolor{preprocessor}{\#define SA\_PROT\_LEN(softc)      softc-\/>prot\_info.cur\_prot\_state.pi\_length}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00379}00379 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00380}\mbox{\hyperlink{structsa__softc}{00380}} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00381}\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{00381}}         \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164}{sa\_state}}        \mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00382}\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{00382}}         \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9}{sa\_flags}}        \mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00383}\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{00383}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202}{sa\_quirks}}      \mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00384}\mbox{\hyperlink{structsa__softc_a3b71e1c5affc6a08db028037589abda9}{00384}}         u\_int           \mbox{\hyperlink{structsa__softc_a3b71e1c5affc6a08db028037589abda9}{si\_flags}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00385}\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{00385}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00386}\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{00386}}         \textcolor{keyword}{struct          }bio\_queue\_head \mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00387}\mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{00387}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{queue\_count}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00388}\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{00388}}         \textcolor{keyword}{struct          }devstat *\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00389}\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{00389}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__devs}{sa\_devs}}   \mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00390}\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{00390}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00391}\mbox{\hyperlink{structsa__softc_aa7ca79dc3f9e8bba503b464062cc7237}{00391}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_aa7ca79dc3f9e8bba503b464062cc7237}{num\_devs\_to\_destroy}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00392}\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{00392}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00393}\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{00393}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00394}\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{00394}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00395}\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{00395}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00396}\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{00396}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00397}\mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{00397}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00398}\mbox{\hyperlink{structsa__softc_a3ca0bd4ab5f25455a370e7501b393e4c}{00398}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_a3ca0bd4ab5f25455a370e7501b393e4c}{cpi\_maxio}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00399}\mbox{\hyperlink{structsa__softc_ab8232ed7ea8c560ac3e476c8bc8f3d43}{00399}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_ab8232ed7ea8c560ac3e476c8bc8f3d43}{allow\_io\_split}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00400}\mbox{\hyperlink{structsa__softc_aac5ff6d65a9d1409ece7cf5c078c53e3}{00400}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_aac5ff6d65a9d1409ece7cf5c078c53e3}{inject\_eom}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00401}\mbox{\hyperlink{structsa__softc_aca2db39888e756409e8fafacb7878625}{00401}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_aca2db39888e756409e8fafacb7878625}{set\_pews\_status}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00402}\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{00402}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00403}\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{00403}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00404}\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{00404}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00405}\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{00405}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00406}\mbox{\hyperlink{structsa__softc_ad52880fc604ee916d38a1558d54cae97}{00406}}         u\_int32\_t       \mbox{\hyperlink{structsa__softc_ad52880fc604ee916d38a1558d54cae97}{media\_numblks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00407}\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{00407}}         u\_int8\_t        \mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00408}\mbox{\hyperlink{structsa__softc_a6586a25f6e27e356c53405f36d8082b7}{00408}}         u\_int8\_t        \mbox{\hyperlink{structsa__softc_a6586a25f6e27e356c53405f36d8082b7}{speed}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00409}\mbox{\hyperlink{structsa__softc_ade608c888502ad91ed1a942fe511e606}{00409}}         u\_int8\_t        \mbox{\hyperlink{structsa__softc_ade608c888502ad91ed1a942fe511e606}{scsi\_rev}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00410}\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{00410}}         u\_int8\_t        \mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}};             \textcolor{comment}{/* mtio mt\_dsreg, redux */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00411}\mbox{\hyperlink{structsa__softc_a99d1aec7cacf18491280fc264fcacf89}{00411}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a99d1aec7cacf18491280fc264fcacf89}{buffer\_mode}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00412}\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{00412}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00413}\mbox{\hyperlink{structsa__softc_a11b9c2f0c7edaae9a1e34f6a9240b1d1}{00413}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a11b9c2f0c7edaae9a1e34f6a9240b1d1}{last\_resid\_was\_io}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00414}\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{00414}}         uint8\_t         \mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[\mbox{\hyperlink{scsi__sa_8c_aac3d580b796e771d33e2cc5346dbb29e}{SA\_DENSITY\_TYPES}}];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00415}\mbox{\hyperlink{structsa__softc_ad736496a89601e8a642885184fa54d57}{00415}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_ad736496a89601e8a642885184fa54d57}{density\_info\_valid}}[\mbox{\hyperlink{scsi__sa_8c_aac3d580b796e771d33e2cc5346dbb29e}{SA\_DENSITY\_TYPES}}];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00416}\mbox{\hyperlink{structsa__softc_a1845fd5c22a7174ffb235fa20b3820ff}{00416}}         uint8\_t         \mbox{\hyperlink{structsa__softc_a1845fd5c22a7174ffb235fa20b3820ff}{density\_info}}[\mbox{\hyperlink{scsi__sa_8c_aac3d580b796e771d33e2cc5346dbb29e}{SA\_DENSITY\_TYPES}}][\mbox{\hyperlink{scsi__sa_8h_a1529ccb9926d4ff9e79a0eee554a7e1d}{SRDS\_MAX\_LENGTH}}];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00417}\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{00417}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa5a88dc10ce493c38ca92a8423729ea13}{SA\_TIMEOUT\_TYPE\_MAX}}];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00418}00418 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00419}\mbox{\hyperlink{structsa__softc_a28fb0330dc0653eb18a143567c3f4f9d}{00419}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__info}{sa\_prot\_info}} \mbox{\hyperlink{structsa__softc_a28fb0330dc0653eb18a143567c3f4f9d}{prot\_info}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00421}\mbox{\hyperlink{structsa__softc_a3ce8fd804df275ea1b98922e54296123}{00421}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a3ce8fd804df275ea1b98922e54296123}{sili}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00422}\mbox{\hyperlink{structsa__softc_a292c4a327681ab5aa5dd89257d824eeb}{00422}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a292c4a327681ab5aa5dd89257d824eeb}{eot\_warn}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00423}00423 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00424}00424         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00425}00425 \textcolor{comment}{         * Current position information.  -\/1 means that the given value is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00426}00426 \textcolor{comment}{         * unknown.  fileno and blkno are always calculated.  blkno is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00427}00427 \textcolor{comment}{         * relative to the previous file mark.  rep\_fileno and rep\_blkno}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00428}00428 \textcolor{comment}{         * are as reported by the drive, if it supports the long form}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00429}00429 \textcolor{comment}{         * report for the READ POSITION command.  rep\_blkno is relative to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00430}00430 \textcolor{comment}{         * the beginning of the partition.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00431}00431 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00432}00432 \textcolor{comment}{         * bop means that the drive is at the beginning of the partition.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00433}00433 \textcolor{comment}{         * eop means that the drive is between early warning and end of}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00434}00434 \textcolor{comment}{         * partition, inside the current partition.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00435}00435 \textcolor{comment}{         * bpew means that the position is in a PEWZ (Programmable Early}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00436}00436 \textcolor{comment}{         * Warning Zone)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00437}00437 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00438}\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{00438}}         daddr\_t         \mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}};     \textcolor{comment}{/* Absolute from BOT */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00439}\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{00439}}         daddr\_t         \mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}};           \textcolor{comment}{/* Relative to beginning of partition */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00440}\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{00440}}         daddr\_t         \mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}};             \textcolor{comment}{/* Relative to last file mark */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00441}\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{00441}}         daddr\_t         \mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}};     \textcolor{comment}{/* Relative to beginning of partition */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00442}\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{00442}}         daddr\_t         \mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}};   \textcolor{comment}{/* Relative to beginning of partition */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00443}\mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{00443}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{bop}};         \textcolor{comment}{/* Beginning of Partition */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00444}\mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{00444}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{eop}};         \textcolor{comment}{/* End of Partition */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00445}\mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{00445}}         \textcolor{keywordtype}{int}             \mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{bpew}};               \textcolor{comment}{/* Beyond Programmable Early Warning */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00446}00446 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00447}00447         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00448}00448 \textcolor{comment}{         * Latched Error Info}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00449}00449 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00450}00450         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00451}\mbox{\hyperlink{structsa__softc_afef00bacf08a8697096198ba304e677f}{00451}}                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__sense__data}{scsi\_sense\_data}} \mbox{\hyperlink{structsa__softc_afef00bacf08a8697096198ba304e677f}{\_last\_io\_sense}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00452}\mbox{\hyperlink{structsa__softc_a7d5ad4e62a2f2427c0c11a9c4d628995}{00452}}                 u\_int64\_t \mbox{\hyperlink{structsa__softc_a7d5ad4e62a2f2427c0c11a9c4d628995}{\_last\_io\_resid}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00453}\mbox{\hyperlink{structsa__softc_ac8a280da052f90e02b6e5c865254cba1}{00453}}                 u\_int8\_t \mbox{\hyperlink{structsa__softc_ac8a280da052f90e02b6e5c865254cba1}{\_last\_io\_cdb}}[\mbox{\hyperlink{cam_8h_aafeade80f10c193b360ea8a6ab5f66ca}{CAM\_MAX\_CDBLEN}}];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00454}\mbox{\hyperlink{structsa__softc_a0d997329640d449639b09ac58e9e0c20}{00454}}                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__sense__data}{scsi\_sense\_data}} \mbox{\hyperlink{structsa__softc_a0d997329640d449639b09ac58e9e0c20}{\_last\_ctl\_sense}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00455}\mbox{\hyperlink{structsa__softc_a3741993dbe315fe0d4db1c886b894160}{00455}}                 u\_int64\_t \mbox{\hyperlink{structsa__softc_a3741993dbe315fe0d4db1c886b894160}{\_last\_ctl\_resid}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00456}\mbox{\hyperlink{structsa__softc_a5104cf4031afe3b8594db719c88f3f00}{00456}}                 u\_int8\_t \mbox{\hyperlink{structsa__softc_a5104cf4031afe3b8594db719c88f3f00}{\_last\_ctl\_cdb}}[\mbox{\hyperlink{cam_8h_aafeade80f10c193b360ea8a6ab5f66ca}{CAM\_MAX\_CDBLEN}}];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00457}\mbox{\hyperlink{scsi__sa_8c_ae352514cca2f63ce61efb9924a9b94f7}{00457}} \textcolor{preprocessor}{\#define last\_io\_sense   errinfo.\_last\_io\_sense}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00458}\mbox{\hyperlink{scsi__sa_8c_a165e498acebfc23ae13b704d8ad3980d}{00458}} \textcolor{preprocessor}{\#define last\_io\_resid   errinfo.\_last\_io\_resid}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00459}\mbox{\hyperlink{scsi__sa_8c_a8bdbdd673f3bbde5443313d378022816}{00459}} \textcolor{preprocessor}{\#define last\_io\_cdb     errinfo.\_last\_io\_cdb}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00460}\mbox{\hyperlink{scsi__sa_8c_abc0db9ffa309c064ff0c2f6446453eb4}{00460}} \textcolor{preprocessor}{\#define last\_ctl\_sense  errinfo.\_last\_ctl\_sense}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00461}\mbox{\hyperlink{scsi__sa_8c_a1e5c7775786d540b65b6de678afc99b7}{00461}} \textcolor{preprocessor}{\#define last\_ctl\_resid  errinfo.\_last\_ctl\_resid}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00462}\mbox{\hyperlink{scsi__sa_8c_a5988bc593fac131487179da862c84d33}{00462}} \textcolor{preprocessor}{\#define last\_ctl\_cdb    errinfo.\_last\_ctl\_cdb}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00463}\mbox{\hyperlink{structsa__softc_a13d40c7d401673ae8986fa25fb92c2fc}{00463}}         \} \mbox{\hyperlink{structsa__softc_a13d40c7d401673ae8986fa25fb92c2fc}{errinfo}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00464}00464         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00465}00465 \textcolor{comment}{         * Misc other flags/state}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00466}00466 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00467}\mbox{\hyperlink{structsa__softc_af2ef643fc9229d7ada00445c002280af}{00467}}         u\_int32\_t}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00468}00468                                         : 29,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00469}\mbox{\hyperlink{structsa__softc_a53413f21235e427f2f8c8d7c5281aca8}{00469}}                 \mbox{\hyperlink{structsa__softc_a53413f21235e427f2f8c8d7c5281aca8}{open\_rdonly}}          : 1,    \textcolor{comment}{/* open read-\/only */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00470}\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{00470}}                 \mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}}    : 1,    \textcolor{comment}{/* open pending mount */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00471}\mbox{\hyperlink{structsa__softc_a202ed85b2a1b80315d4d4e503ac916b3}{00471}}                 \mbox{\hyperlink{structsa__softc_a202ed85b2a1b80315d4d4e503ac916b3}{ctrl\_mode}}              : 1;    \textcolor{comment}{/* control device open */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00473}\mbox{\hyperlink{structsa__softc_ab2a60347163a4a56f57c169751f6e6e8}{00473}}         \textcolor{keyword}{struct }task             \mbox{\hyperlink{structsa__softc_ab2a60347163a4a56f57c169751f6e6e8}{sysctl\_task}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00474}\mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{00474}}         \textcolor{keyword}{struct }sysctl\_ctx\_list  \mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{sysctl\_ctx}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00475}\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{00475}}         \textcolor{keyword}{struct }sysctl\_oid       *\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{sysctl\_tree}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00476}\mbox{\hyperlink{structsa__softc_a9dca6a5e153e8ae857724d0c6cc19b60}{00476}}         \textcolor{keyword}{struct }sysctl\_ctx\_list  \mbox{\hyperlink{structsa__softc_a9dca6a5e153e8ae857724d0c6cc19b60}{sysctl\_timeout\_ctx}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00477}\mbox{\hyperlink{structsa__softc_a5a3d774b8522372fb867cfb47e7762e6}{00477}}         \textcolor{keyword}{struct }sysctl\_oid       *\mbox{\hyperlink{structsa__softc_a5a3d774b8522372fb867cfb47e7762e6}{sysctl\_timeout\_tree}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00478}00478 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00480}\mbox{\hyperlink{structsa__quirk__entry}{00480}} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__quirk__entry}{sa\_quirk\_entry}} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00481}\mbox{\hyperlink{structsa__quirk__entry_a9e5964545ade326c1e92f38e9fcd75db}{00481}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__inquiry__pattern}{scsi\_inquiry\_pattern}} \mbox{\hyperlink{structsa__quirk__entry_a9e5964545ade326c1e92f38e9fcd75db}{inq\_pat}}; \textcolor{comment}{/* matching pattern */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00482}\mbox{\hyperlink{structsa__quirk__entry_ad4d7d069867ff85eb4113b67054f4877}{00482}}         \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202}{sa\_quirks}} \mbox{\hyperlink{structsa__quirk__entry_ad4d7d069867ff85eb4113b67054f4877}{quirks}};        \textcolor{comment}{/* specific quirk type */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00483}\mbox{\hyperlink{structsa__quirk__entry_ae0f1431fd54b03125c3029225819bcc2}{00483}}         u\_int32\_t \mbox{\hyperlink{structsa__quirk__entry_ae0f1431fd54b03125c3029225819bcc2}{prefblk}};       \textcolor{comment}{/* preferred blocksize when in fixed mode */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00484}00484 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00486}\mbox{\hyperlink{scsi__sa_8c_a0da205be93bec4455362ab10b064cbdd}{00486}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__quirk__entry}{sa\_quirk\_entry}} \mbox{\hyperlink{scsi__sa_8c_a0da205be93bec4455362ab10b064cbdd}{sa\_quirk\_table}}[] =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00487}00487 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00488}00488         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00489}00489                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}OnStream"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00490}00490                   \textcolor{stringliteral}{"{}ADR*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a0c25fd54cec9e1586015e989e65f6990}{SA\_QUIRK\_NODREAD}} |}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00491}00491                    \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a6a1b0f3a7eea46816b046872d844aeff}{SA\_QUIRK\_NO\_MODESEL}}, 32768}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00492}00492         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00493}00493         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00494}00494                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}ARCHIVE"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00495}00495                   \textcolor{stringliteral}{"{}Python 06408*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a0c25fd54cec9e1586015e989e65f6990}{SA\_QUIRK\_NODREAD}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00496}00496         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00497}00497         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00498}00498                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}ARCHIVE"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00499}00499                   \textcolor{stringliteral}{"{}Python 25601*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a0c25fd54cec9e1586015e989e65f6990}{SA\_QUIRK\_NODREAD}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00500}00500         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00501}00501         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00502}00502                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}ARCHIVE"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00503}00503                   \textcolor{stringliteral}{"{}Python*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a0c25fd54cec9e1586015e989e65f6990}{SA\_QUIRK\_NODREAD}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00504}00504         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00505}00505         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00506}00506                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}ARCHIVE"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00507}00507                   \textcolor{stringliteral}{"{}VIPER 150*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 512}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00508}00508         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00509}00509         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00510}00510                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}ARCHIVE"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00511}00511                   \textcolor{stringliteral}{"{}VIPER 2525 25462"{}}, \textcolor{stringliteral}{"{}-\/011"{}}\},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00512}00512                   \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a0c25fd54cec9e1586015e989e65f6990}{SA\_QUIRK\_NODREAD}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00513}00513         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00514}00514         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00515}00515                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}ARCHIVE"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00516}00516                   \textcolor{stringliteral}{"{}VIPER 2525*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 1024}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00517}00517         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00518}00518 \textcolor{preprocessor}{\#if     0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00519}00519         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00520}00520                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}HP"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00521}00521                   \textcolor{stringliteral}{"{}C15*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202aaaa6c2d0a911a0aefcf1f13f535fc37f}{SA\_QUIRK\_NO\_CPAGE}}, 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00522}00522         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00523}00523 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00524}00524         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00525}00525                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}HP"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00526}00526                   \textcolor{stringliteral}{"{}C56*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00527}00527         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00528}00528         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00529}00529                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}HP"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00530}00530                   \textcolor{stringliteral}{"{}T20*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 512}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00531}00531         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00532}00532         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00533}00533                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}HP"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00534}00534                   \textcolor{stringliteral}{"{}T4000*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 512}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00535}00535         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00536}00536         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00537}00537                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}HP"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00538}00538                   \textcolor{stringliteral}{"{}HP-\/88780*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00539}00539         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00540}00540         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00541}00541                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}KENNEDY"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00542}00542                   \textcolor{stringliteral}{"{}*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00543}00543         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00544}00544         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00545}00545                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}M4 DATA"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00546}00546                   \textcolor{stringliteral}{"{}123107 SCSI*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00547}00547         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00548}00548         \{       \textcolor{comment}{/* jreynold@primenet.com */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00549}00549                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}Seagate"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00550}00550                 \textcolor{stringliteral}{"{}STT8000N*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00551}00551         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00552}00552         \{       \textcolor{comment}{/* mike@sentex.net */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00553}00553                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}Seagate"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00554}00554                 \textcolor{stringliteral}{"{}STT20000*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00555}00555         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00556}00556         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00557}00557                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}SEAGATE"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00558}00558                 \textcolor{stringliteral}{"{}DAT    06241-\/XXX"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00559}00559         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00560}00560         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00561}00561                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}TANDBERG"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00562}00562                   \textcolor{stringliteral}{"{} TDC 3600"{}}, \textcolor{stringliteral}{"{}U07:"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 512}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00563}00563         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00564}00564         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00565}00565                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}TANDBERG"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00566}00566                   \textcolor{stringliteral}{"{} TDC 3800"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 512}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00567}00567         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00568}00568         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00569}00569                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}TANDBERG"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00570}00570                   \textcolor{stringliteral}{"{} TDC 4100"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 512}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00571}00571         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00572}00572         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00573}00573                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}TANDBERG"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00574}00574                   \textcolor{stringliteral}{"{} TDC 4200"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 512}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00575}00575         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00576}00576         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00577}00577                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}TANDBERG"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00578}00578                   \textcolor{stringliteral}{"{} SLR*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00579}00579         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00580}00580         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00581}00581                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}WANGTEK"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00582}00582                   \textcolor{stringliteral}{"{}5525ES*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 512}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00583}00583         \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00584}00584         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00585}00585                 \{ \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}}, \mbox{\hyperlink{scsi__all_8h_a45c9b059f8ba67baf36b09034842b0b1}{SIP\_MEDIA\_REMOVABLE}}, \textcolor{stringliteral}{"{}WANGTEK"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00586}00586                   \textcolor{stringliteral}{"{}51000*"{}}, \textcolor{stringliteral}{"{}*"{}}\}, \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}, 1024}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00587}00587         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00588}00588 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00589}00589 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00590}\mbox{\hyperlink{scsi__sa_8c_a6b81119a391aec88b2fa03bd71ec5c24}{00590}} \textcolor{keyword}{static}  d\_open\_t        \mbox{\hyperlink{scsi__sa_8c_a6b81119a391aec88b2fa03bd71ec5c24}{saopen}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00591}\mbox{\hyperlink{scsi__sa_8c_a3c4469b1e2ea03fbd36256a317803f6f}{00591}} \textcolor{keyword}{static}  d\_close\_t       \mbox{\hyperlink{scsi__sa_8c_a3c4469b1e2ea03fbd36256a317803f6f}{saclose}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00592}\mbox{\hyperlink{scsi__sa_8c_a162cc6027aebd783055fb7d9cbe74388}{00592}} \textcolor{keyword}{static}  d\_strategy\_t    \mbox{\hyperlink{scsi__sa_8c_a162cc6027aebd783055fb7d9cbe74388}{sastrategy}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00593}\mbox{\hyperlink{scsi__sa_8c_a39bcbaf5fa6427a96309dcb3aaf2291b}{00593}} \textcolor{keyword}{static}  d\_ioctl\_t       \mbox{\hyperlink{scsi__sa_8c_a39bcbaf5fa6427a96309dcb3aaf2291b}{saioctl}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00594}\mbox{\hyperlink{scsi__sa_8c_a4b5cf19a5aac1bac064375c11d3cf9b4}{00594}} \textcolor{keyword}{static}  \mbox{\hyperlink{cam__periph_8h_ae8635482322b2513ab2f662535250ac0}{periph\_init\_t}}      \mbox{\hyperlink{scsi__sa_8c_a4b5cf19a5aac1bac064375c11d3cf9b4}{sainit}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00595}\mbox{\hyperlink{scsi__sa_8c_ad6a728a015c101c0dfd73b362c3cd607}{00595}} \textcolor{keyword}{static}  \mbox{\hyperlink{cam__periph_8h_a0134746116b0c19d248d1342a16aab04}{periph\_ctor\_t}}      \mbox{\hyperlink{scsi__sa_8c_ad6a728a015c101c0dfd73b362c3cd607}{saregister}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00596}\mbox{\hyperlink{scsi__sa_8c_a9bfc816851a9bec6c3f858700917dc56}{00596}} \textcolor{keyword}{static}  \mbox{\hyperlink{cam__periph_8h_a14602bb3ac9272ea2209d63f1e618fca}{periph\_oninv\_t}}    \mbox{\hyperlink{scsi__sa_8c_a9bfc816851a9bec6c3f858700917dc56}{saoninvalidate}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00597}\mbox{\hyperlink{scsi__sa_8c_aeecc8bb9fba3c94ba0449e25bdd243c6}{00597}} \textcolor{keyword}{static}  \mbox{\hyperlink{cam__periph_8h_a8d863e438ef46ba796fbf3e77340b3e3}{periph\_dtor\_t}}      \mbox{\hyperlink{scsi__sa_8c_aeecc8bb9fba3c94ba0449e25bdd243c6}{sacleanup}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00598}\mbox{\hyperlink{scsi__sa_8c_adf05b5bd96cc0f3b4386ad5d4542d6c6}{00598}} \textcolor{keyword}{static}  \mbox{\hyperlink{cam__periph_8h_ab04cb4cf3fd8f8a44ce312952af7cb7f}{periph\_start\_t}}    \mbox{\hyperlink{scsi__sa_8c_adf05b5bd96cc0f3b4386ad5d4542d6c6}{sastart}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00599}00599 \textcolor{keyword}{static}  \textcolor{keywordtype}{void}            \mbox{\hyperlink{scsi__sa_8c_a4740008a803203b65f8d6efae7637fb2}{saasync}}(\textcolor{keywordtype}{void} *callback\_arg, u\_int32\_t code,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00600}00600                                 \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00601}00601 \textcolor{keyword}{static}  \textcolor{keywordtype}{void}            \mbox{\hyperlink{scsi__sa_8c_a52bf854e66bb2c3c08b1bf64ebb4701c}{sadone}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00602}00602                                \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *start\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00603}00603 \textcolor{keyword}{static}  \textcolor{keywordtype}{int}             \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}}, u\_int32\_t \mbox{\hyperlink{cam_8h_a14bf0cceb256c2063f776e6cc4aba316}{cam\_flags}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00604}00604                                 u\_int32\_t sense\_flags);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00605}00605 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_afed353b713c4b613922f53a39613629f}{samarkswanted}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00606}00606 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a1420122d62b1960df49c99f3d5fade09}{sacheckeod}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00607}00607 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{sagetparams}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00608}00608                                     \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13}{sa\_params}} params\_to\_get,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00609}00609                                     u\_int32\_t *blocksize, u\_int8\_t *density,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00610}00610                                     u\_int32\_t *numblocks, \textcolor{keywordtype}{int} *buff\_mode,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00611}00611                                     u\_int8\_t *write\_protect, u\_int8\_t *speed,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00612}00612                                     \textcolor{keywordtype}{int} *comp\_supported, \textcolor{keywordtype}{int} *comp\_enabled,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00613}00613                                     u\_int32\_t *comp\_algorithm,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00614}00614                                     \mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}} *comp\_page,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00615}00615                                     \textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00616}00616                                     *prot\_page, \textcolor{keywordtype}{int} dp\_size,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00617}00617                                     \textcolor{keywordtype}{int} prot\_changeable);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00618}00618 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a76b3309ed0aacd043656e814d2461154}{sasetprot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00619}00619                                   \textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} *new\_prot);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00620}00620 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00621}00621                                     \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13}{sa\_params}} params\_to\_set,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00622}00622                                     u\_int32\_t blocksize, u\_int8\_t density,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00623}00623                                     u\_int32\_t comp\_algorithm,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00624}00624                                     u\_int32\_t sense\_flags);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00625}00625 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a5cdac79fb2618c35b487973ac497b901}{sasetsili}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00626}00626                                   \textcolor{keyword}{struct} mtparamset *ps, \textcolor{keywordtype}{int} num\_params);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00627}00627 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a9d39ab73189e38b09dd07f9fe61c86b9}{saseteotwarn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00628}00628                                      \textcolor{keyword}{struct} mtparamset *ps, \textcolor{keywordtype}{int} num\_params);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00629}00629 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_aa9a4fa9c6f874c9ff3cfdd2da4c7507f}{safillprot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keywordtype}{int} *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00630}00630                                    \textcolor{keyword}{struct} sbuf *sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00631}00631 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_ad86f83edd96046e32445548b15cdfe6a}{sapopulateprots}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} *cur\_state,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00632}00632                                         \textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} *new\_table,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00633}00633                                         \textcolor{keywordtype}{int} table\_ents);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00634}00634 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} *\mbox{\hyperlink{scsi__sa_8c_a78f16c12b7dbdf51d25b502fcd571aaa}{safindprotent}}(\textcolor{keywordtype}{char} *\mbox{\hyperlink{structsa__prot__map_aeb8684a955be23bf2a3995af642f32d9}{name}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} *table,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00635}00635                                          \textcolor{keywordtype}{int} table\_ents);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00636}00636 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a2c8040ae78f65ea1da74f4392a24dc4a}{sasetprotents}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00637}00637                                       \textcolor{keyword}{struct} mtparamset *ps, \textcolor{keywordtype}{int} num\_params);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00638}00638 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__param__ent}{sa\_param\_ent}} *\mbox{\hyperlink{scsi__sa_8c_a9dd839a56b2e0b1a7828e9de530ef440}{safindparament}}(\textcolor{keyword}{struct} mtparamset *ps);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00639}00639 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_ab49203b2d951b6c33c76a4d5fce3a206}{saparamsetlist}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00640}00640                                        \textcolor{keyword}{struct} mtsetlist *list, \textcolor{keywordtype}{int} need\_copy);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00641}00641 \textcolor{keyword}{static}  \textcolor{keywordtype}{int}             \mbox{\hyperlink{scsi__sa_8c_a68ab43bfba2cea8003115c56df861103}{saextget}}(\textcolor{keyword}{struct} cdev *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00642}00642                                  \textcolor{keyword}{struct} sbuf *sb, \textcolor{keyword}{struct} mtextget *g);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00643}00643 \textcolor{keyword}{static}  \textcolor{keywordtype}{int}             \mbox{\hyperlink{scsi__sa_8c_a1bc1cd9a5f7e29c7f8bfeb038208a980}{saparamget}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keyword}{struct} sbuf *sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00644}00644 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_aaef9b6db880ee304a18ccc6305f08ba1}{saprevent}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int} action);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00645}00645 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a518ad50b44da7238b20aa8e2b489cd44}{sarewind}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00646}00646 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_ae932d7a651526aeffefd168f58bc440b}{saspace}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int} count,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00647}00647                                 \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927}{scsi\_space\_code}} code);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00648}00648 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_aa3e07f082d8c5bd777714115e4d99db8}{sadevgonecb}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00649}00649 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_a8f974d5ad848a4885f6ec3c3ce18bb71}{sasetupdev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keyword}{struct} cdev *dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00650}00650 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_a105eff621a7a7c9523607039e3fb5987}{saloadtotunables}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00651}00651 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_ac4b7ae274b9b2c55a88b37f35cc53a09}{sasysctlinit}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00652}00652 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_aecf3693b6283d4d0697d7528539d218e}{samount}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keywordtype}{int}, \textcolor{keyword}{struct} cdev *);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00653}00653 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a384d86c033008cc26071ea89d5d6c5ba}{saretension}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00654}00654 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_af35686132783c8995ee39b341123ac67}{sareservereleaseunit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00655}00655                                              \textcolor{keywordtype}{int} reserve);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00656}00656 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_aca72a710f2338f76e52de81bd1025bf2}{saloadunload}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int} load);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00657}00657 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a0b0cd69138727407748a6ef32c557240}{saerase}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int} longerase);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00658}00658 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a1d8d7e925b43a6580eef62643a7e2ee4}{sawritefilemarks}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00659}00659                                          \textcolor{keywordtype}{int} nmarks, \textcolor{keywordtype}{int} setmarks, \textcolor{keywordtype}{int} immed);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00660}00660 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{sagetpos}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00661}00661 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a95f654c6228aa0aa5024c3aa03d0e6cc}{sardpos}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int}, u\_int32\_t *);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00662}00662 \textcolor{keyword}{static} \textcolor{keywordtype}{int}              \mbox{\hyperlink{scsi__sa_8c_a228f994ded23909c90af6eedf47169ba}{sasetpos}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00663}00663                                  \textcolor{keyword}{struct} mtlocate *);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00664}00664 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_a2668a8712a929d910890742198f6c8a2}{safilldenstypesb}}(\textcolor{keyword}{struct} sbuf *sb, \textcolor{keywordtype}{int} *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00665}00665                                          uint8\_t *buf, \textcolor{keywordtype}{int} buf\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00666}00666                                          \textcolor{keywordtype}{int} is\_density);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00667}00667 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_a9a2137c12c07da7f81bae8a7d98dde4d}{safilldensitysb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keywordtype}{int} *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00668}00668                                         \textcolor{keyword}{struct} sbuf *sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00669}00669 \textcolor{keyword}{static} \textcolor{keywordtype}{void}             \mbox{\hyperlink{scsi__sa_8c_a4ab3be090922f004a07ed9190cd8be1b}{saloadtimeouts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00670}00670 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00671}00671 \textcolor{preprocessor}{\#ifndef SA\_DEFAULT\_IO\_SPLIT}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00672}\mbox{\hyperlink{scsi__sa_8c_a65a204217bc446823adbb2574af97436}{00672}} \textcolor{preprocessor}{\#define SA\_DEFAULT\_IO\_SPLIT     0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00673}00673 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00674}00674 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00675}\mbox{\hyperlink{scsi__sa_8c_a4e108da7a079697b2dcccb2bc4989f3e}{00675}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{scsi__sa_8c_a4e108da7a079697b2dcccb2bc4989f3e}{sa\_allow\_io\_split}} = \mbox{\hyperlink{scsi__sa_8c_a65a204217bc446823adbb2574af97436}{SA\_DEFAULT\_IO\_SPLIT}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00676}00676 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00677}00677 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00678}00678 \textcolor{comment}{ * Tunable to allow the user to set a global allow\_io\_split value.  Note}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00679}00679 \textcolor{comment}{ * that this WILL GO AWAY in FreeBSD 11.0.  Silently splitting the I/O up}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00680}00680 \textcolor{comment}{ * is bad behavior, because it hides the true tape block size from the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00681}00681 \textcolor{comment}{ * application.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00682}00682 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00683}\mbox{\hyperlink{scsi__sa_8c_a1ebc194797c8cbf6df54ca09217a4109}{00683}} \textcolor{keyword}{static} \mbox{\hyperlink{scsi__sa_8c_a1ebc194797c8cbf6df54ca09217a4109}{SYSCTL\_NODE}}(\_kern\_cam, OID\_AUTO, sa, CTLFLAG\_RD | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00684}00684     \textcolor{stringliteral}{"{}CAM Sequential Access Tape Driver"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00685}\mbox{\hyperlink{scsi__sa_8c_a6e1f5fa1aea445565eaa05ab4aab402c}{00685}} \mbox{\hyperlink{scsi__sa_8c_a6e1f5fa1aea445565eaa05ab4aab402c}{SYSCTL\_INT}}(\_kern\_cam\_sa, OID\_AUTO, allow\_io\_split, CTLFLAG\_RDTUN,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00686}00686     \&\mbox{\hyperlink{scsi__sa_8c_a4e108da7a079697b2dcccb2bc4989f3e}{sa\_allow\_io\_split}}, 0, \textcolor{stringliteral}{"{}Default I/O split value"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00687}00687 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00688}\mbox{\hyperlink{scsi__sa_8c_af1b708b719ff0a2469b0e11243b317f4}{00688}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structperiph__driver}{periph\_driver}} \mbox{\hyperlink{scsi__sa_8c_af1b708b719ff0a2469b0e11243b317f4}{sadriver}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00689}00689 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00690}00690         \mbox{\hyperlink{scsi__sa_8c_a4b5cf19a5aac1bac064375c11d3cf9b4}{sainit}}, \textcolor{stringliteral}{"{}sa"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00691}00691         TAILQ\_HEAD\_INITIALIZER(\mbox{\hyperlink{scsi__sa_8c_af1b708b719ff0a2469b0e11243b317f4}{sadriver}}.units), \textcolor{comment}{/* generation */} 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00692}00692 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00693}00693 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00694}\mbox{\hyperlink{scsi__sa_8c_ab5e2349b27c7fdb61bb8a98ca58d766b}{00694}} \mbox{\hyperlink{scsi__sa_8c_ab5e2349b27c7fdb61bb8a98ca58d766b}{PERIPHDRIVER\_DECLARE}}(sa, \mbox{\hyperlink{scsi__sa_8c_af1b708b719ff0a2469b0e11243b317f4}{sadriver}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00695}00695 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00696}00696 \textcolor{comment}{/* For 2.2-\/stable support */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00697}00697 \textcolor{preprocessor}{\#ifndef D\_TAPE}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00698}\mbox{\hyperlink{scsi__sa_8c_a1860933a7d6bd88f9cc14cdaf6e3f379}{00698}} \textcolor{preprocessor}{\#define D\_TAPE 0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00699}00699 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00700}00700 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00701}\mbox{\hyperlink{scsi__sa_8c_ae06f69356e8eab12146d9d55fae1c156}{00701}} \textcolor{keyword}{static} \textcolor{keyword}{struct }cdevsw \mbox{\hyperlink{scsi__sa_8c_ae06f69356e8eab12146d9d55fae1c156}{sa\_cdevsw}} = \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00702}00702         .d\_version =    D\_VERSION,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00703}00703         .d\_open =       \mbox{\hyperlink{scsi__sa_8c_a6b81119a391aec88b2fa03bd71ec5c24}{saopen}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00704}00704         .d\_close =      \mbox{\hyperlink{scsi__sa_8c_a3c4469b1e2ea03fbd36256a317803f6f}{saclose}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00705}00705         .d\_read =       physread,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00706}00706         .d\_write =      physwrite,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00707}00707         .d\_ioctl =      \mbox{\hyperlink{scsi__sa_8c_a39bcbaf5fa6427a96309dcb3aaf2291b}{saioctl}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00708}00708         .d\_strategy =   \mbox{\hyperlink{scsi__sa_8c_a162cc6027aebd783055fb7d9cbe74388}{sastrategy}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00709}00709         .d\_name =       \textcolor{stringliteral}{"{}sa"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00710}00710         .d\_flags =      \mbox{\hyperlink{scsi__sa_8c_a1860933a7d6bd88f9cc14cdaf6e3f379}{D\_TAPE}} | D\_TRACKCLOSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00711}00711 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00712}00712 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00713}00713 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00714}\mbox{\hyperlink{scsi__sa_8c_a2dc926e434e12b48b69f61ba543bc8a6}{00714}} \mbox{\hyperlink{scsi__sa_8c_a6b81119a391aec88b2fa03bd71ec5c24}{saopen}}(\textcolor{keyword}{struct} cdev *dev, \textcolor{keywordtype}{int} flags, \textcolor{keywordtype}{int} fmt, \textcolor{keyword}{struct} thread *td)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00715}00715 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00716}00716         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00717}00717         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00718}00718         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00720}00720         \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)dev-\/>si\_drv1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00721}00721         if (\mbox{\hyperlink{cam__periph_8c_a5b3dbda06d83cc62f5ba1be9622efa4b}{cam\_periph\_acquire}}(periph) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00722}00722                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00723}00723         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00724}00724 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00725}00725         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00726}00726 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00727}00727         \mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00728}00728 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00729}00729         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}|\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00730}00730             (\textcolor{stringliteral}{"{}saopen(\%s): softc=0x\%x\(\backslash\)n"{}}, devtoname(dev), softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00731}00731 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00732}00732         \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(dev)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00733}00733                 softc-\/>\mbox{\hyperlink{structsa__softc_a202ed85b2a1b80315d4d4e503ac916b3}{ctrl\_mode}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00734}00734                 softc-\/>\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}}++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00735}00735                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00736}00736                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00737}00737         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00738}00738 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00739}00739         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{cam__periph_8c_a9590854e2c9bfe6a5ba541b1a211d494}{cam\_periph\_hold}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, PRIBIO|PCATCH)) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00740}00740                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00741}00741                 \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00742}00742                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00743}00743         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00744}00744 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00745}00745         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a03e5b5ba99adc89677b5aafdb5f23be8}{SA\_FLAG\_OPEN}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00746}00746                 error = EBUSY;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00747}00747         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a85411c7c0718e44034b6d3d3a57543dd}{SA\_FLAG\_INVALID}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00748}00748                 error = ENXIO;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00749}00749         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00750}00750                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00751}00751 \textcolor{comment}{                 * Preserve whether this is a read\_only open.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00752}00752 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00753}00753                 softc-\/>\mbox{\hyperlink{structsa__softc_a53413f21235e427f2f8c8d7c5281aca8}{open\_rdonly}} = (\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& O\_RDWR) == O\_RDONLY;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00754}00754 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00755}00755                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00756}00756 \textcolor{comment}{                 * The function samount ensures media is loaded and ready.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00757}00757 \textcolor{comment}{                 * It also does a device RESERVE if the tape isn't yet mounted.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00758}00758 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00759}00759 \textcolor{comment}{                 * If the mount fails and this was a non-\/blocking open,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00760}00760 \textcolor{comment}{                 * make this a 'open\_pending\_mount' action.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00761}00761 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00762}00762                 error = \mbox{\hyperlink{scsi__sa_8c_aecf3693b6283d4d0697d7528539d218e}{samount}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}}, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00763}00763                 \textcolor{keywordflow}{if} (error \&\& (\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& O\_NONBLOCK)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00764}00764                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a03e5b5ba99adc89677b5aafdb5f23be8}{SA\_FLAG\_OPEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00765}00765                         softc-\/>\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00766}00766                         softc-\/>\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}}++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00767}00767                         \mbox{\hyperlink{cam__periph_8c_a87d933ebed78bbf0c6fce590bb487a8d}{cam\_periph\_unhold}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00768}00768                         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00769}00769                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00770}00770                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00771}00771         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00772}00772 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00773}00773         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00774}00774                 \mbox{\hyperlink{cam__periph_8c_a87d933ebed78bbf0c6fce590bb487a8d}{cam\_periph\_unhold}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00775}00775                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00776}00776                 \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00777}00777                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00778}00778         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00779}00779 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00780}00780         \mbox{\hyperlink{scsi__sa_8c_aaef9b6db880ee304a18ccc6305f08ba1}{saprevent}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{scsi__all_8h_ac7bf3a4a9e6879bdf6d174f9e48e6bf9}{PR\_PREVENT}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00781}00781         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a03e5b5ba99adc89677b5aafdb5f23be8}{SA\_FLAG\_OPEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00782}00782         softc-\/>\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}}++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00783}00783 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00784}00784         \mbox{\hyperlink{cam__periph_8c_a87d933ebed78bbf0c6fce590bb487a8d}{cam\_periph\_unhold}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00785}00785         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00786}00786         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00787}00787 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00788}00788 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00789}00789 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00790}\mbox{\hyperlink{scsi__sa_8c_ad801cac47bb391e4603e0456f09b1dad}{00790}} \mbox{\hyperlink{scsi__sa_8c_a3c4469b1e2ea03fbd36256a317803f6f}{saclose}}(\textcolor{keyword}{struct} cdev *dev, \textcolor{keywordtype}{int} flag, \textcolor{keywordtype}{int} fmt, \textcolor{keyword}{struct} thread *td)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00791}00791 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00792}00792         \textcolor{keyword}{struct  }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00793}00793         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00794}00794         \textcolor{keywordtype}{int}     mode, error, writing, tmp, i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00795}00795         \textcolor{keywordtype}{int}     closedbits = \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a03e5b5ba99adc89677b5aafdb5f23be8}{SA\_FLAG\_OPEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00796}00796 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00797}00797         mode = \mbox{\hyperlink{scsi__sa_8c_a634577aa4d85bc0939e3ef367fcf754e}{SAMODE}}(dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00798}00798         \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)dev-\/>si\_drv1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00799}00799         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00800}00800 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00801}00801         \mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00802}00802 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00803}00803         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}|\mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00804}00804             (\textcolor{stringliteral}{"{}saclose(\%s): softc=0x\%x\(\backslash\)n"{}}, devtoname(dev), softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00805}00805 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00806}00806         softc-\/>\mbox{\hyperlink{structsa__softc_a53413f21235e427f2f8c8d7c5281aca8}{open\_rdonly}} = 0; }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00807}00807         \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(dev)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00808}00808                 softc-\/>\mbox{\hyperlink{structsa__softc_a202ed85b2a1b80315d4d4e503ac916b3}{ctrl\_mode}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00809}00809                 softc-\/>\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00810}00810                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00811}00811                 \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00812}00812                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00813}00813         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00814}00814 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00815}00815         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00816}00816                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_OPEN;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00817}00817                 softc-\/>\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}} = 0; }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00818}00818                 softc-\/>\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00819}00819                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00820}00820                 \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00821}00821                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00822}00822         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00823}00823 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00824}00824         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{cam__periph_8c_a9590854e2c9bfe6a5ba541b1a211d494}{cam\_periph\_hold}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, PRIBIO)) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00825}00825                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00826}00826                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00827}00827         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00828}00828 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00829}00829         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00830}00830 \textcolor{comment}{         * Were we writing the tape?}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00831}00831 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00832}00832         writing = (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}) != 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00833}00833 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00834}00834         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00835}00835 \textcolor{comment}{         * See whether or not we need to write filemarks. If this}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00836}00836 \textcolor{comment}{         * fails, we probably have to assume we've lost tape}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00837}00837 \textcolor{comment}{         * position.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00838}00838 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00839}00839         error = \mbox{\hyperlink{scsi__sa_8c_a1420122d62b1960df49c99f3d5fade09}{sacheckeod}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00840}00840         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00841}00841                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00842}00842                     \textcolor{stringliteral}{"{}failed to write terminating filemark(s)\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00843}00843                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00844}00844         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00845}00845 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00846}00846         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00847}00847 \textcolor{comment}{         * Whatever we end up doing, allow users to eject tapes from here on.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00848}00848 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00849}00849         \mbox{\hyperlink{scsi__sa_8c_aaef9b6db880ee304a18ccc6305f08ba1}{saprevent}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{scsi__all_8h_a0ede30a52a749c2e236336adc15d14d1}{PR\_ALLOW}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00850}00850 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00851}00851         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00852}00852 \textcolor{comment}{         * Decide how to end...}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00853}00853 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00854}00854         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a024900590c1c65352f43e7fea7b1d3be}{SA\_FLAG\_TAPE\_MOUNTED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00855}00855                 closedbits |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00856}00856         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{switch} (mode) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00857}00857         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679a3682f93bbecb8c2f1161250f54f86d8b}{SA\_MODE\_OFFLINE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00858}00858                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00859}00859 \textcolor{comment}{                 * An 'offline' close is an unconditional release of}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00860}00860 \textcolor{comment}{                 * frozen \&\& mount conditions, irrespective of whether}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00861}00861 \textcolor{comment}{                 * these operations succeeded. The reason for this is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00862}00862 \textcolor{comment}{                 * to allow at least some kind of programmatic way}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00863}00863 \textcolor{comment}{                 * around our state getting all fouled up. If somebody}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00864}00864 \textcolor{comment}{                 * issues an 'offline' command, that will be allowed}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00865}00865 \textcolor{comment}{                 * to clear state.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00866}00866 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00867}00867                 (void) \mbox{\hyperlink{scsi__sa_8c_a518ad50b44da7238b20aa8e2b489cd44}{sarewind}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00868}00868                 (void) \mbox{\hyperlink{scsi__sa_8c_aca72a710f2338f76e52de81bd1025bf2}{saloadunload}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, FALSE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00869}00869                 closedbits |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a024900590c1c65352f43e7fea7b1d3be}{SA\_FLAG\_TAPE\_MOUNTED}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00870}00870                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00871}00871         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679ad53f6f604c93c4dd2e2be7af13dc8884}{SA\_MODE\_REWIND}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00872}00872                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00873}00873 \textcolor{comment}{                 * If the rewind fails, return an error-\/ if anyone cares,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00874}00874 \textcolor{comment}{                 * but not overwriting any previous error.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00875}00875 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00876}00876 \textcolor{comment}{                 * We don't clear the notion of mounted here, but we do}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00877}00877 \textcolor{comment}{                 * clear the notion of frozen if we successfully rewound.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00878}00878 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00879}00879                 tmp = \mbox{\hyperlink{scsi__sa_8c_a518ad50b44da7238b20aa8e2b489cd44}{sarewind}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00880}00880                 \textcolor{keywordflow}{if} (tmp) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00881}00881                         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00882}00882                                 error = tmp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00883}00883                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00884}00884                         closedbits |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00885}00885                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00886}00886                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00887}00887         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8c_aa42c86e67ab98e7732604e2afba7e679a290479a8d368e7cae8aef987cd0b5746}{SA\_MODE\_NOREWIND}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00888}00888                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00889}00889 \textcolor{comment}{                 * If we're not rewinding/unloading the tape, find out}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00890}00890 \textcolor{comment}{                 * whether we need to back up over one of two filemarks}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00891}00891 \textcolor{comment}{                 * we wrote (if we wrote two filemarks) so that appends}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00892}00892 \textcolor{comment}{                 * from this point on will be sane.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00893}00893 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00894}00894                 \textcolor{keywordflow}{if} (error == 0 \&\& writing \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00895}00895                         tmp = \mbox{\hyperlink{scsi__sa_8c_ae932d7a651526aeffefd168f58bc440b}{saspace}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, -\/1, \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927aa80e7481061650e9d0cacc7664ae316e}{SS\_FILEMARKS}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00896}00896                         \textcolor{keywordflow}{if} (tmp) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00897}00897                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}unable to backspace "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00898}00898                                     \textcolor{stringliteral}{"{}over one of double filemarks at end of "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00899}00899                                     \textcolor{stringliteral}{"{}tape\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00900}00900                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}it is possible that "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00901}00901                                     \textcolor{stringliteral}{"{}this device needs a SA\_QUIRK\_1FM quirk set"{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00902}00902                                     \textcolor{stringliteral}{"{}for it\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00903}00903                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00904}00904                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00905}00905                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00906}00906                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00907}00907         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00908}00908                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}unknown mode 0x\%x in saclose\(\backslash\)n"{}}, mode);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00909}00909                 \textcolor{comment}{/* NOTREACHED */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00910}00910                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00911}00911         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00912}00912 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00913}00913         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00914}00914 \textcolor{comment}{         * We wish to note here that there are no more filemarks to be written.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00915}00915 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00916}00916         softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00917}00917         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_WRITTEN;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00918}00918 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00919}00919         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00920}00920 \textcolor{comment}{         * And we are no longer open for business.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00921}00921 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00922}00922         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~closedbits;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00923}00923         softc-\/>\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00924}00924 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00925}00925         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00926}00926 \textcolor{comment}{         * Invalidate any density information that depends on having tape}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00927}00927 \textcolor{comment}{         * media in the drive.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00928}00928 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00929}00929         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{scsi__sa_8c_aac3d580b796e771d33e2cc5346dbb29e}{SA\_DENSITY\_TYPES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00930}00930                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[i] \& \mbox{\hyperlink{scsi__sa_8h_ad8abca0b944e3f2f8e54410f73aa96be}{SRDS\_MEDIA}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00931}00931                         softc-\/>\mbox{\hyperlink{structsa__softc_ad736496a89601e8a642885184fa54d57}{density\_info\_valid}}[i] = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00932}00932         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00933}00933 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00934}00934         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00935}00935 \textcolor{comment}{         * Inform users if tape state if frozen....}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00936}00936 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00937}00937         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00938}00938                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}tape is now frozen-\/ use an OFFLINE, "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00939}00939                     \textcolor{stringliteral}{"{}REWIND or MTEOM command to clear this state.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00940}00940         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00941}00941 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00942}00942         \textcolor{comment}{/* release the device if it is no longer mounted */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00943}00943         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a024900590c1c65352f43e7fea7b1d3be}{SA\_FLAG\_TAPE\_MOUNTED}}) == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00944}00944                 \mbox{\hyperlink{scsi__sa_8c_af35686132783c8995ee39b341123ac67}{sareservereleaseunit}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, FALSE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00945}00945 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00946}00946         \mbox{\hyperlink{cam__periph_8c_a87d933ebed78bbf0c6fce590bb487a8d}{cam\_periph\_unhold}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00947}00947         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00948}00948         \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00949}00949 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00950}00950         \textcolor{keywordflow}{return} (error); }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00951}00951 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00952}00952 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00953}00953 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00954}00954 \textcolor{comment}{ * Actually translate the requested transfer into one the physical driver}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00955}00955 \textcolor{comment}{ * can understand.  The transfer is described by a buf and will include}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00956}00956 \textcolor{comment}{ * only one physical transfer.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00957}00957 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00958}00958 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00959}\mbox{\hyperlink{scsi__sa_8c_a6ca3ecd0e79dc222413b605395612430}{00959}} \mbox{\hyperlink{scsi__sa_8c_a162cc6027aebd783055fb7d9cbe74388}{sastrategy}}(\textcolor{keyword}{struct} bio *bp)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00960}00960 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00961}00961         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00962}00962         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00963}00963 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00964}00964         bp-\/>bio\_resid = bp-\/>bio\_bcount;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00965}00965         \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(bp-\/>bio\_dev)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00966}00966                 biofinish(bp, NULL, EINVAL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00967}00967                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00968}00968         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00969}00969         \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)bp-\/>bio\_dev-\/>si\_drv1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00970}00970         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00971}00971 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00972}00972         \mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00973}00973 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00974}00974         if (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a85411c7c0718e44034b6d3d3a57543dd}{SA\_FLAG\_INVALID}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00975}00975                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00976}00976                 biofinish(bp, NULL, ENXIO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00977}00977                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00978}00978         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00979}00979 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00980}00980         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00981}00981                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00982}00982                 biofinish(bp, NULL, EPERM);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00983}00983                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00984}00984         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00985}00985 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00986}00986         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00987}00987 \textcolor{comment}{         * This should actually never occur as the write(2)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00988}00988 \textcolor{comment}{         * system call traps attempts to write to a read-\/only}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00989}00989 \textcolor{comment}{         * file descriptor.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00990}00990 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00991}00991         \textcolor{keywordflow}{if} (bp-\/>bio\_cmd == BIO\_WRITE \&\& softc-\/>\mbox{\hyperlink{structsa__softc_a53413f21235e427f2f8c8d7c5281aca8}{open\_rdonly}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00992}00992                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00993}00993                 biofinish(bp, NULL, EBADF);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00994}00994                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00995}00995         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00996}00996 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00997}00997         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00998}00998                 \textcolor{keywordtype}{int} error = \mbox{\hyperlink{scsi__sa_8c_aecf3693b6283d4d0697d7528539d218e}{samount}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 0, bp-\/>bio\_dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l00999}00999                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01000}01000                         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01001}01001                         biofinish(bp, NULL, ENXIO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01002}01002                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01003}01003                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01004}01004                 \mbox{\hyperlink{scsi__sa_8c_aaef9b6db880ee304a18ccc6305f08ba1}{saprevent}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{scsi__all_8h_ac7bf3a4a9e6879bdf6d174f9e48e6bf9}{PR\_PREVENT}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01005}01005                 softc-\/>\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01006}01006         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01007}01007 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01008}01008         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01009}01009 \textcolor{comment}{         * If it's a null transfer, return immediately}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01010}01010 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01011}01011         \textcolor{keywordflow}{if} (bp-\/>bio\_bcount == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01012}01012                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01013}01013                 biodone(bp);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01014}01014                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01015}01015         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01016}01016 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01017}01017         \textcolor{comment}{/* valid request?  */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01018}01018         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01019}01019                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01020}01020 \textcolor{comment}{                 * Fixed block device.  The byte count must}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01021}01021 \textcolor{comment}{                 * be a multiple of our block size.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01022}01022 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01023}01023                 \textcolor{keywordflow}{if} (((softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} != \string~0) \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01024}01024                     ((bp-\/>bio\_bcount \& softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}}) != 0)) ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01025}01025                     ((softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} == \string~0) \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01026}01026                     ((bp-\/>bio\_bcount \% softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}}) != 0))) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01027}01027                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}Invalid request.  Fixed block "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01028}01028                             \textcolor{stringliteral}{"{}device requests must be a multiple of \%d bytes\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01029}01029                             softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01030}01030                         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01031}01031                         biofinish(bp, NULL, EINVAL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01032}01032                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01033}01033                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01034}01034         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((bp-\/>bio\_bcount > softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}}) ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01035}01035                    (bp-\/>bio\_bcount < softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}}) ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01036}01036                    (bp-\/>bio\_bcount \& softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01037}01037                 \mbox{\hyperlink{cam__xpt_8c_a1de517aa78d2b98ed9ff46a85f31d54e}{xpt\_print\_path}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01038}01038                 printf(\textcolor{stringliteral}{"{}Invalid request.  Variable block "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01039}01039                     \textcolor{stringliteral}{"{}device requests must be "{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01040}01040                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01041}01041                         printf(\textcolor{stringliteral}{"{}a multiple of \%d "{}}, (0x1 << softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01042}01042                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01043}01043                 printf(\textcolor{stringliteral}{"{}between \%d and \%d bytes\(\backslash\)n"{}}, softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01044}01044                     softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01045}01045                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01046}01046                 biofinish(bp, NULL, EINVAL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01047}01047                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01048}01048         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01049}01049 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01050}01050         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01051}01051 \textcolor{comment}{         * Place it at the end of the queue.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01052}01052 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01053}01053         bioq\_insert\_tail(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}}, bp);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01054}01054         softc-\/>\mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{queue\_count}}++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01055}01055 \textcolor{preprocessor}{\#if     0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01056}01056         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01057}01057             (\textcolor{stringliteral}{"{}sastrategy: queuing a \%ld \%s byte \%s\(\backslash\)n"{}}, bp-\/>bio\_bcount,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01058}01058             (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}})?  \textcolor{stringliteral}{"{}fixed"{}} : \textcolor{stringliteral}{"{}variable"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01059}01059             (bp-\/>bio\_cmd == BIO\_READ)? \textcolor{stringliteral}{"{}read"{}} : \textcolor{stringliteral}{"{}write"{}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01060}01060 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01061}01061         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{queue\_count}} > 1) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01062}01062                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01063}01063                     (\textcolor{stringliteral}{"{}sastrategy: queue count now \%d\(\backslash\)n"{}}, softc-\/>\mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{queue\_count}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01064}01064         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01065}01065 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01066}01066         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01067}01067 \textcolor{comment}{         * Schedule ourselves for performing the work.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01068}01068 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01069}01069         \mbox{\hyperlink{cam__xpt_8c_a26e646d0732b4acab4667d28f24d026e}{xpt\_schedule}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01070}01070         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01071}01071 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01072}01072         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01073}01073 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01074}01074 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01075}01075 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01076}\mbox{\hyperlink{scsi__sa_8c_a5cdac79fb2618c35b487973ac497b901}{01076}} \mbox{\hyperlink{scsi__sa_8c_a5cdac79fb2618c35b487973ac497b901}{sasetsili}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keyword}{struct} mtparamset *ps, \textcolor{keywordtype}{int} num\_params)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01077}01077 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01078}01078         uint32\_t sili\_blocksize;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01079}01079         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01080}01080         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01081}01081 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01082}01082         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01083}01083         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01084}01084 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01085}01085         if (ps-\/>value\_type != MT\_PARAM\_SET\_SIGNED) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01086}01086                 snprintf(ps-\/>error\_str, \textcolor{keyword}{sizeof}(ps-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01087}01087                     \textcolor{stringliteral}{"{}sili is a signed parameter"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01088}01088                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01089}01089         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01090}01090         \textcolor{keywordflow}{if} ((ps-\/>value.value\_signed < 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01091}01091          || (ps-\/>value.value\_signed > 1)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01092}01092                 snprintf(ps-\/>error\_str, \textcolor{keyword}{sizeof}(ps-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01093}01093                     \textcolor{stringliteral}{"{}invalid sili value \%jd"{}}, (intmax\_t)ps-\/>value.value\_signed);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01094}01094                 \textcolor{keywordflow}{goto} bailout\_error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01095}01095         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01096}01096         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01097}01097 \textcolor{comment}{         * We only set the SILI flag in variable block}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01098}01098 \textcolor{comment}{         * mode.  You'll get a check condition in fixed}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01099}01099 \textcolor{comment}{         * block mode if things don't line up in any case.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01100}01100 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01101}01101         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01102}01102                 snprintf(ps-\/>error\_str, \textcolor{keyword}{sizeof}(ps-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01103}01103                     \textcolor{stringliteral}{"{}can't set sili bit in fixed block mode"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01104}01104                 \textcolor{keywordflow}{goto} bailout\_error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01105}01105         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01106}01106         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a3ce8fd804df275ea1b98922e54296123}{sili}} == ps-\/>value.value\_signed)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01107}01107                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01108}01108 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01109}01109         \textcolor{keywordflow}{if} (ps-\/>value.value\_signed == 1)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01110}01110                 sili\_blocksize = 4;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01111}01111         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01112}01112                 sili\_blocksize = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01113}01113 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01114}01114         error = \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01115}01115                             sili\_blocksize, 0, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55ba032bb2bff9d794c3b78f4a8c5c47637a}{SF\_QUIET\_IR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01116}01116         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01117}01117                 snprintf(ps-\/>error\_str, \textcolor{keyword}{sizeof}(ps-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01118}01118                     \textcolor{stringliteral}{"{}sasetparams() returned error \%d"{}}, error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01119}01119                 \textcolor{keywordflow}{goto} bailout\_error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01120}01120         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01121}01121 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01122}01122         softc-\/>\mbox{\hyperlink{structsa__softc_a3ce8fd804df275ea1b98922e54296123}{sili}} = ps-\/>value.value\_signed;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01123}01123 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01124}01124 bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01125}01125         ps-\/>status = MT\_PARAM\_STATUS\_OK;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01126}01126         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01127}01127 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01128}01128 bailout\_error:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01129}01129         ps-\/>status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01130}01130         \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01131}01131                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01132}01132 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01133}01133         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01134}01134 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01135}01135 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01136}01136 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01137}\mbox{\hyperlink{scsi__sa_8c_a9d39ab73189e38b09dd07f9fe61c86b9}{01137}} \mbox{\hyperlink{scsi__sa_8c_a9d39ab73189e38b09dd07f9fe61c86b9}{saseteotwarn}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keyword}{struct} mtparamset *ps, \textcolor{keywordtype}{int} num\_params)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01138}01138 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01139}01139         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01140}01140         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01141}01141 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01142}01142         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01143}01143         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01144}01144 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01145}01145         if (ps-\/>value\_type != MT\_PARAM\_SET\_SIGNED) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01146}01146                 snprintf(ps-\/>error\_str, \textcolor{keyword}{sizeof}(ps-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01147}01147                     \textcolor{stringliteral}{"{}eot\_warn is a signed parameter"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01148}01148                 ps-\/>status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01149}01149                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01150}01150         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01151}01151         \textcolor{keywordflow}{if} ((ps-\/>value.value\_signed < 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01152}01152          || (ps-\/>value.value\_signed > 1)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01153}01153                 snprintf(ps-\/>error\_str, \textcolor{keyword}{sizeof}(ps-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01154}01154                     \textcolor{stringliteral}{"{}invalid eot\_warn value \%jd\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01155}01155                     (intmax\_t)ps-\/>value.value\_signed);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01156}01156                 ps-\/>status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01157}01157                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01158}01158         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01159}01159         softc-\/>\mbox{\hyperlink{structsa__softc_a292c4a327681ab5aa5dd89257d824eeb}{eot\_warn}} = ps-\/>value.value\_signed;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01160}01160         ps-\/>status = MT\_PARAM\_STATUS\_OK;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01161}01161 bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01162}01162         \textcolor{keywordflow}{if} (ps-\/>status != MT\_PARAM\_STATUS\_OK)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01163}01163                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01164}01164 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01165}01165         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01166}01166 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01167}01167 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01168}01168 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01169}\mbox{\hyperlink{scsi__sa_8c_aa9a4fa9c6f874c9ff3cfdd2da4c7507f}{01169}} \mbox{\hyperlink{scsi__sa_8c_aa9a4fa9c6f874c9ff3cfdd2da4c7507f}{safillprot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keywordtype}{int} *indent, \textcolor{keyword}{struct} sbuf *sb)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01170}01170 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01171}01171         \textcolor{keywordtype}{int} tmpint;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01172}01172 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01173}01173         \mbox{\hyperlink{scsi__sa_8c_add011268a2a0c41a6cb675ff2741e6d8}{SASBADDNODE}}(sb, *indent, protection);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01174}01174         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a203568b61a5d82dc71d5d9bcde7b39ee}{SA\_FLAG\_PROTECT\_SUPP}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01175}01175                 tmpint = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01176}01176         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01177}01177                 tmpint = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01178}01178         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, *indent, tmpint, \%d, protection\_supported,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01179}01179             \textcolor{stringliteral}{"{}Set to 1 if protection information is supported"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01180}01180 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01181}01181         \textcolor{keywordflow}{if} ((tmpint != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01182}01182          \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_a28fb0330dc0653eb18a143567c3f4f9d}{prot\_info}}.\mbox{\hyperlink{structsa__prot__info_ab5c7f9311abbe2a8ed2b3fc335bc1ad7}{cur\_prot\_state}}.\mbox{\hyperlink{structsa__prot__state_a89fe03ce576b0e0843562f4331c70aef}{initialized}} != 0)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01183}01183                 \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} *prot;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01184}01184 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01185}01185                 prot = \&softc-\/>\mbox{\hyperlink{structsa__softc_a28fb0330dc0653eb18a143567c3f4f9d}{prot\_info}}.\mbox{\hyperlink{structsa__prot__info_ab5c7f9311abbe2a8ed2b3fc335bc1ad7}{cur\_prot\_state}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01186}01186 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01187}01187                 \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent, prot-\/>\mbox{\hyperlink{structsa__prot__state_a1ead5ab1f9591218e35ced290670afc1}{prot\_method}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01188}01188                     \mbox{\hyperlink{structsa__prot__state_a1ead5ab1f9591218e35ced290670afc1}{prot\_method}}, \textcolor{stringliteral}{"{}Current Protection Method"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01189}01189                 \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent, prot-\/>\mbox{\hyperlink{structsa__prot__state_ae9196a0a885e72c5b2b6ea1537ee2090}{pi\_length}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01190}01190                     \mbox{\hyperlink{structsa__prot__state_ae9196a0a885e72c5b2b6ea1537ee2090}{pi\_length}}, \textcolor{stringliteral}{"{}Length of Protection Information"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01191}01191                 \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent, prot-\/>\mbox{\hyperlink{structsa__prot__state_aa13d0fb6b12ac3242749ac525282c2ba}{lbp\_w}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01192}01192                     \mbox{\hyperlink{structsa__prot__state_aa13d0fb6b12ac3242749ac525282c2ba}{lbp\_w}}, \textcolor{stringliteral}{"{}Check Protection on Writes"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01193}01193                 \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent, prot-\/>\mbox{\hyperlink{structsa__prot__state_abfa494a22d6ce4596958f2e5986aff14}{lbp\_r}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01194}01194                     \mbox{\hyperlink{structsa__prot__state_abfa494a22d6ce4596958f2e5986aff14}{lbp\_r}}, \textcolor{stringliteral}{"{}Check and Include Protection on Reads"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01195}01195                 \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent, prot-\/>\mbox{\hyperlink{structsa__prot__state_aa60f6294492f9bf63392df0a7609edca}{rbdp}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01196}01196                     \mbox{\hyperlink{structsa__prot__state_aa60f6294492f9bf63392df0a7609edca}{rbdp}}, \textcolor{stringliteral}{"{}Transfer Protection Information for RECOVER "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01197}01197                     \textcolor{stringliteral}{"{}BUFFERED DATA command"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01198}01198         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01199}01199         \mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{SASBENDNODE}}(sb, *indent, protection);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01200}01200 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01201}01201 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01202}01202 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01203}\mbox{\hyperlink{scsi__sa_8c_ad86f83edd96046e32445548b15cdfe6a}{01203}} \mbox{\hyperlink{scsi__sa_8c_ad86f83edd96046e32445548b15cdfe6a}{sapopulateprots}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} *cur\_state, \textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} *new\_table,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01204}01204     \textcolor{keywordtype}{int} table\_ents)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01205}01205 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01206}01206         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01207}01207 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01208}01208         bcopy(\mbox{\hyperlink{scsi__sa_8c_a76dd3076f4f3b1a1985ae8a2b9e1f20e}{sa\_prot\_table}}, new\_table, min(table\_ents * \textcolor{keyword}{sizeof}(*new\_table),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01209}01209             \textcolor{keyword}{sizeof}(\mbox{\hyperlink{scsi__sa_8c_a76dd3076f4f3b1a1985ae8a2b9e1f20e}{sa\_prot\_table}})));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01210}01210 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01211}01211         table\_ents = min(table\_ents, \mbox{\hyperlink{scsi__sa_8c_a907a4cac166f1f5c4007798e918e3911}{SA\_NUM\_PROT\_ENTS}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01212}01212 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01213}01213         \textcolor{keywordflow}{for} (i = 0; i < table\_ents; i++)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01214}01214                 new\_table[i].value = (uint32\_t *)((uint8\_t *)cur\_state +}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01215}01215                     new\_table[i].offset);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01216}01216 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01217}01217         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01218}01218 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01219}01219 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01220}01220 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} *}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01221}\mbox{\hyperlink{scsi__sa_8c_a78f16c12b7dbdf51d25b502fcd571aaa}{01221}} \mbox{\hyperlink{scsi__sa_8c_a78f16c12b7dbdf51d25b502fcd571aaa}{safindprotent}}(\textcolor{keywordtype}{char} *\mbox{\hyperlink{structsa__prot__map_aeb8684a955be23bf2a3995af642f32d9}{name}}, \textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} *table, \textcolor{keywordtype}{int} table\_ents)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01222}01222 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01223}01223         \textcolor{keywordtype}{char} *prot\_name = \textcolor{stringliteral}{"{}protection."{}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01224}01224         \textcolor{keywordtype}{int} i, prot\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01225}01225 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01226}01226         prot\_len = strlen(prot\_name);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01227}01227 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01228}01228         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01229}01229 \textcolor{comment}{         * This shouldn't happen, but we check just in case.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01230}01230 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01231}01231         \textcolor{keywordflow}{if} (strncmp(\mbox{\hyperlink{structsa__prot__map_aeb8684a955be23bf2a3995af642f32d9}{name}}, prot\_name, prot\_len) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01232}01232                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01233}01233 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01234}01234         \textcolor{keywordflow}{for} (i = 0; i < table\_ents; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01235}01235                 \textcolor{keywordflow}{if} (strcmp(\&\mbox{\hyperlink{structsa__prot__map_aeb8684a955be23bf2a3995af642f32d9}{name}}[prot\_len], table[i].\mbox{\hyperlink{structsa__prot__map_aeb8684a955be23bf2a3995af642f32d9}{name}}) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01236}01236                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01237}01237                 \textcolor{keywordflow}{return} (\&table[i]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01238}01238         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01239}01239 bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01240}01240         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01241}01241 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01242}01242 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01243}01243 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01244}\mbox{\hyperlink{scsi__sa_8c_a2c8040ae78f65ea1da74f4392a24dc4a}{01244}} \mbox{\hyperlink{scsi__sa_8c_a2c8040ae78f65ea1da74f4392a24dc4a}{sasetprotents}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{struct} mtparamset *ps, \textcolor{keywordtype}{int} num\_params)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01245}01245 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01246}01246         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01247}01247         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} prot\_ents[\mbox{\hyperlink{scsi__sa_8c_a907a4cac166f1f5c4007798e918e3911}{SA\_NUM\_PROT\_ENTS}}];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01248}01248         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} new\_state;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01249}01249         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01250}01250         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01251}01251 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01252}01252         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01253}01253         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01254}01254 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01255}01255         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01256}01256 \textcolor{comment}{         * Make sure that this tape drive supports protection information.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01257}01257 \textcolor{comment}{         * Otherwise we can't set anything.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01258}01258 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01259}01259         if ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a203568b61a5d82dc71d5d9bcde7b39ee}{SA\_FLAG\_PROTECT\_SUPP}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01260}01260                 snprintf(ps[0].error\_str, \textcolor{keyword}{sizeof}(ps[0].error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01261}01261                     \textcolor{stringliteral}{"{}Protection information is not supported for this device"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01262}01262                 ps[0].status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01263}01263                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01264}01264         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01265}01265 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01266}01266         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01267}01267 \textcolor{comment}{         * We can't operate with physio(9) splitting enabled, because there}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01268}01268 \textcolor{comment}{         * is no way to insure (especially in variable block mode) that}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01269}01269 \textcolor{comment}{         * what the user writes (with a checksum block at the end) will }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01270}01270 \textcolor{comment}{         * make it into the sa(4) driver intact.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01271}01271 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01272}01272         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a3b71e1c5affc6a08db028037589abda9}{si\_flags}} \& SI\_NOSPLIT) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01273}01273                 snprintf(ps[0].error\_str, \textcolor{keyword}{sizeof}(ps[0].error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01274}01274                     \textcolor{stringliteral}{"{}Protection information cannot be enabled with I/O "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01275}01275                     \textcolor{stringliteral}{"{}splitting"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01276}01276                 ps[0].status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01277}01277                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01278}01278         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01279}01279 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01280}01280         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01281}01281 \textcolor{comment}{         * Take the current cached protection state and use that as the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01282}01282 \textcolor{comment}{         * basis for our new entries.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01283}01283 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01284}01284         bcopy(\&softc-\/>\mbox{\hyperlink{structsa__softc_a28fb0330dc0653eb18a143567c3f4f9d}{prot\_info}}.\mbox{\hyperlink{structsa__prot__info_ab5c7f9311abbe2a8ed2b3fc335bc1ad7}{cur\_prot\_state}}, \&new\_state, \textcolor{keyword}{sizeof}(new\_state));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01285}01285 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01286}01286         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01287}01287 \textcolor{comment}{         * Populate the table mapping property names to pointers into the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01288}01288 \textcolor{comment}{         * state structure.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01289}01289 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01290}01290         \mbox{\hyperlink{scsi__sa_8c_ad86f83edd96046e32445548b15cdfe6a}{sapopulateprots}}(\&new\_state, prot\_ents, \mbox{\hyperlink{scsi__sa_8c_a907a4cac166f1f5c4007798e918e3911}{SA\_NUM\_PROT\_ENTS}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01291}01291 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01292}01292         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01293}01293 \textcolor{comment}{         * For each parameter the user passed in, make sure the name, type}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01294}01294 \textcolor{comment}{         * and value are valid.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01295}01295 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01296}01296         \textcolor{keywordflow}{for} (i = 0; i < num\_params; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01297}01297                 \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__map}{sa\_prot\_map}} *ent;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01298}01298 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01299}01299                 ent = \mbox{\hyperlink{scsi__sa_8c_a78f16c12b7dbdf51d25b502fcd571aaa}{safindprotent}}(ps[i].value\_name, prot\_ents,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01300}01300                     \mbox{\hyperlink{scsi__sa_8c_a907a4cac166f1f5c4007798e918e3911}{SA\_NUM\_PROT\_ENTS}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01301}01301                 \textcolor{keywordflow}{if} (ent == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01302}01302                         ps[i].status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01303}01303                         snprintf(ps[i].error\_str, \textcolor{keyword}{sizeof}(ps[i].error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01304}01304                             \textcolor{stringliteral}{"{}Invalid protection entry name \%s"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01305}01305                             ps[i].value\_name);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01306}01306                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01307}01307                         \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01308}01308                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01309}01309                 \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structsa__prot__map_a5be0ce4119b0aacc4ca8974dcf00018d}{param\_type}} != ps[i].value\_type) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01310}01310                         ps[i].status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01311}01311                         snprintf(ps[i].error\_str, \textcolor{keyword}{sizeof}(ps[i].error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01312}01312                             \textcolor{stringliteral}{"{}Supplied type \%d does not match actual type \%d"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01313}01313                             ps[i].value\_type, ent-\/>\mbox{\hyperlink{structsa__prot__map_a5be0ce4119b0aacc4ca8974dcf00018d}{param\_type}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01314}01314                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01315}01315                         \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01316}01316                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01317}01317                 \textcolor{keywordflow}{if} ((ps[i].\mbox{\hyperlink{structsa__prot__map_a3246fd429567b2d0efec7c5555067e5b}{value}}.value\_unsigned < ent-\/>\mbox{\hyperlink{structsa__prot__map_a853e25bc86f5f9f518d95a62b932b7b1}{min\_val}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01318}01318                  || (ps[i].value.value\_unsigned > ent-\/>\mbox{\hyperlink{structsa__prot__map_a0d492d0c67f1f43f569bd64c9112bb9f}{max\_val}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01319}01319                         ps[i].status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01320}01320                         snprintf(ps[i].error\_str, \textcolor{keyword}{sizeof}(ps[i].error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01321}01321                             \textcolor{stringliteral}{"{}Value \%ju is outside valid range \%u -\/ \%u"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01322}01322                             (uintmax\_t)ps[i].\mbox{\hyperlink{structsa__prot__map_a3246fd429567b2d0efec7c5555067e5b}{value}}.value\_unsigned, ent-\/>\mbox{\hyperlink{structsa__prot__map_a853e25bc86f5f9f518d95a62b932b7b1}{min\_val}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01323}01323                             ent-\/>\mbox{\hyperlink{structsa__prot__map_a0d492d0c67f1f43f569bd64c9112bb9f}{max\_val}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01324}01324                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01325}01325                         \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01326}01326                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01327}01327                 *(ent-\/>\mbox{\hyperlink{structsa__prot__map_a3246fd429567b2d0efec7c5555067e5b}{value}}) = ps[i].\mbox{\hyperlink{structsa__prot__map_a3246fd429567b2d0efec7c5555067e5b}{value}}.value\_unsigned;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01328}01328         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01329}01329 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01330}01330         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01331}01331 \textcolor{comment}{         * Actually send the protection settings to the drive.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01332}01332 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01333}01333         error = \mbox{\hyperlink{scsi__sa_8c_a76b3309ed0aacd043656e814d2461154}{sasetprot}}(periph, \&new\_state);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01334}01334         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01335}01335                 \textcolor{keywordflow}{for} (i = 0; i < num\_params; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01336}01336                         ps[i].status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01337}01337                         snprintf(ps[i].error\_str, \textcolor{keyword}{sizeof}(ps[i].error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01338}01338                             \textcolor{stringliteral}{"{}Unable to set parameter, see dmesg(8)"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01339}01339                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01340}01340                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01341}01341         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01342}01342 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01343}01343         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01344}01344 \textcolor{comment}{         * Let the user know that his settings were stored successfully.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01345}01345 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01346}01346         \textcolor{keywordflow}{for} (i = 0; i < num\_params; i++)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01347}01347                 ps[i].status = MT\_PARAM\_STATUS\_OK;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01348}01348 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01349}01349 bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01350}01350         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01351}01351 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01352}01352 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01353}01353 \textcolor{comment}{ * Entry handlers generally only handle a single entry.  Node handlers will}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01354}01354 \textcolor{comment}{ * handle a contiguous range of parameters to set in a single call.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01355}01355 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01356}\mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928}{01356}} \textcolor{keyword}{typedef} \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01357}\mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928ae9a1c15422f778610ab4ffba3fbbdbb6}{01357}}         \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928ae9a1c15422f778610ab4ffba3fbbdbb6}{SA\_PARAM\_TYPE\_ENTRY}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01358}01358         \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928af0462b62af16418a32e3216eb4745d3e}{SA\_PARAM\_TYPE\_NODE}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01359}\mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928af0462b62af16418a32e3216eb4745d3e}{01359}} \} \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928}{sa\_param\_type}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01360}01360 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01361}\mbox{\hyperlink{structsa__param__ent}{01361}} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__param__ent}{sa\_param\_ent}} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01362}\mbox{\hyperlink{structsa__param__ent_aa716e5d4f305bd4a5086a434f160f90c}{01362}}         \textcolor{keywordtype}{char} *\mbox{\hyperlink{structsa__param__ent_aa716e5d4f305bd4a5086a434f160f90c}{name}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01363}\mbox{\hyperlink{structsa__param__ent_a014dcb7db5cf35758aea5eb243a79795}{01363}}         \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928}{sa\_param\_type}} \mbox{\hyperlink{structsa__param__ent_a014dcb7db5cf35758aea5eb243a79795}{param\_type}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01364}\mbox{\hyperlink{structsa__param__ent_ad4e6170874f0c77c62e6932cfcadf8c8}{01364}}         int (*\mbox{\hyperlink{structsa__param__ent_ad4e6170874f0c77c62e6932cfcadf8c8}{set\_func}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{struct }mtparamset *ps,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01365}01365                         \textcolor{keywordtype}{int} num\_params);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01366}01366 \} \mbox{\hyperlink{scsi__sa_8c_a26692c019182f17215750d0e2d3e1933}{sa\_param\_table}}[] = \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01367}01367         \{\textcolor{stringliteral}{"{}sili"{}}, \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928ae9a1c15422f778610ab4ffba3fbbdbb6}{SA\_PARAM\_TYPE\_ENTRY}}, \mbox{\hyperlink{scsi__sa_8c_a5cdac79fb2618c35b487973ac497b901}{sasetsili}} \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01368}01368         \{\textcolor{stringliteral}{"{}eot\_warn"{}}, \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928ae9a1c15422f778610ab4ffba3fbbdbb6}{SA\_PARAM\_TYPE\_ENTRY}}, \mbox{\hyperlink{scsi__sa_8c_a9d39ab73189e38b09dd07f9fe61c86b9}{saseteotwarn}} \},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01369}01369         \{\textcolor{stringliteral}{"{}protection."{}}, \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928af0462b62af16418a32e3216eb4745d3e}{SA\_PARAM\_TYPE\_NODE}}, \mbox{\hyperlink{scsi__sa_8c_a2c8040ae78f65ea1da74f4392a24dc4a}{sasetprotents}} \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01370}\mbox{\hyperlink{scsi__sa_8c_a26692c019182f17215750d0e2d3e1933}{01370}} \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01371}01371 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01372}01372 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__param__ent}{sa\_param\_ent}} *}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01373}\mbox{\hyperlink{scsi__sa_8c_a9dd839a56b2e0b1a7828e9de530ef440}{01373}} \mbox{\hyperlink{scsi__sa_8c_a9dd839a56b2e0b1a7828e9de530ef440}{safindparament}}(\textcolor{keyword}{struct} mtparamset *ps)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01374}01374 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01375}01375         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01376}01376 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01377}01377         \textcolor{keywordflow}{for} (i = 0; i < nitems(\mbox{\hyperlink{scsi__sa_8c_a26692c019182f17215750d0e2d3e1933}{sa\_param\_table}}); i++)\{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01378}01378                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01379}01379 \textcolor{comment}{                 * For entries, we compare all of the characters.  For}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01380}01380 \textcolor{comment}{                 * nodes, we only compare the first N characters.  The node}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01381}01381 \textcolor{comment}{                 * handler will decode the rest.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01382}01382 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01383}01383                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__sa_8c_a26692c019182f17215750d0e2d3e1933}{sa\_param\_table}}[i].\mbox{\hyperlink{structsa__param__ent_a014dcb7db5cf35758aea5eb243a79795}{param\_type}} == \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928ae9a1c15422f778610ab4ffba3fbbdbb6}{SA\_PARAM\_TYPE\_ENTRY}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01384}01384                         \textcolor{keywordflow}{if} (strcmp(ps-\/>value\_name, \mbox{\hyperlink{scsi__sa_8c_a26692c019182f17215750d0e2d3e1933}{sa\_param\_table}}[i].\mbox{\hyperlink{structsa__param__ent_aa716e5d4f305bd4a5086a434f160f90c}{name}}) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01385}01385                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01386}01386                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01387}01387                         \textcolor{keywordflow}{if} (strncmp(ps-\/>value\_name, \mbox{\hyperlink{scsi__sa_8c_a26692c019182f17215750d0e2d3e1933}{sa\_param\_table}}[i].\mbox{\hyperlink{structsa__param__ent_aa716e5d4f305bd4a5086a434f160f90c}{name}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01388}01388                             strlen(\mbox{\hyperlink{scsi__sa_8c_a26692c019182f17215750d0e2d3e1933}{sa\_param\_table}}[i].\mbox{\hyperlink{structsa__param__ent_aa716e5d4f305bd4a5086a434f160f90c}{name}})) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01389}01389                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01390}01390                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01391}01391                 \textcolor{keywordflow}{return} (\&\mbox{\hyperlink{scsi__sa_8c_a26692c019182f17215750d0e2d3e1933}{sa\_param\_table}}[i]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01392}01392         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01393}01393 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01394}01394         \textcolor{keywordflow}{return} (NULL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01395}01395 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01396}01396 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01397}01397 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01398}01398 \textcolor{comment}{ * Go through a list of parameters, coalescing contiguous parameters with}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01399}01399 \textcolor{comment}{ * the same parent node into a single call to a set\_func.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01400}01400 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01401}01401 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01402}\mbox{\hyperlink{scsi__sa_8c_ab49203b2d951b6c33c76a4d5fce3a206}{01402}} \mbox{\hyperlink{scsi__sa_8c_ab49203b2d951b6c33c76a4d5fce3a206}{saparamsetlist}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{struct} mtsetlist *list,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01403}01403     \textcolor{keywordtype}{int} need\_copy)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01404}01404 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01405}01405         \textcolor{keywordtype}{int} i, contig\_ents;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01406}01406         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01407}01407         \textcolor{keyword}{struct }mtparamset *params, *first;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01408}01408         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__param__ent}{sa\_param\_ent}} *first\_ent;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01409}01409 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01410}01410         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01411}01411         params = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01412}01412 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01413}01413         \textcolor{keywordflow}{if} (list-\/>num\_params == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01414}01414                 \textcolor{comment}{/* Nothing to do */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01415}01415                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01416}01416 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01417}01417         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01418}01418 \textcolor{comment}{         * Verify that the user has the correct structure size.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01419}01419 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01420}01420         \textcolor{keywordflow}{if} ((list-\/>num\_params * \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} mtparamset)) !=}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01421}01421              list-\/>param\_len) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01422}01422                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}\%s: length of params \%d != "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01423}01423                     \textcolor{stringliteral}{"{}sizeof(struct mtparamset) \%zd * num\_params \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01424}01424                     \_\_func\_\_, list-\/>param\_len, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} mtparamset),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01425}01425                     list-\/>num\_params);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01426}01426                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01427}01427                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01428}01428         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01429}01429 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01430}01430         \textcolor{keywordflow}{if} (need\_copy != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01431}01431                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01432}01432 \textcolor{comment}{                 * XXX KDM will dropping the lock cause an issue here?}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01433}01433 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01434}01434                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01435}01435                 params = malloc(list-\/>param\_len, M\_SCSISA, M\_WAITOK | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01436}01436                 error = copyin(list-\/>params, params, list-\/>param\_len);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01437}01437                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01438}01438 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01439}01439                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01440}01440                         \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01441}01441         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01442}01442                 params = list-\/>params;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01443}01443         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01444}01444 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01445}01445         contig\_ents = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01446}01446         first = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01447}01447         first\_ent = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01448}01448         \textcolor{keywordflow}{for} (i = 0; i < list-\/>num\_params; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01449}01449                 \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__param__ent}{sa\_param\_ent}} *ent;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01450}01450 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01451}01451                 ent = \mbox{\hyperlink{scsi__sa_8c_a9dd839a56b2e0b1a7828e9de530ef440}{safindparament}}(\&params[i]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01452}01452                 \textcolor{keywordflow}{if} (ent == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01453}01453                         snprintf(params[i].error\_str,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01454}01454                             \textcolor{keyword}{sizeof}(params[i].error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01455}01455                             \textcolor{stringliteral}{"{}\%s: cannot find parameter \%s"{}}, \_\_func\_\_,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01456}01456                             params[i].value\_name);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01457}01457                         params[i].status = MT\_PARAM\_STATUS\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01458}01458                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01459}01459                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01460}01460 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01461}01461                 \textcolor{keywordflow}{if} (first != NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01462}01462                         \textcolor{keywordflow}{if} (first\_ent == ent) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01463}01463                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01464}01464 \textcolor{comment}{                                 * We're still in a contiguous list of}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01465}01465 \textcolor{comment}{                                 * parameters that can be handled by one}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01466}01466 \textcolor{comment}{                                 * node handler.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01467}01467 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01468}01468                                 contig\_ents++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01469}01469                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01470}01470                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01471}01471                                 error = first\_ent-\/>\mbox{\hyperlink{structsa__param__ent_ad4e6170874f0c77c62e6932cfcadf8c8}{set\_func}}(periph, first,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01472}01472                                     contig\_ents);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01473}01473                                 first = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01474}01474                                 first\_ent = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01475}01475                                 contig\_ents = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01476}01476                                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01477}01477                                         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01478}01478                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01479}01479                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01480}01480                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01481}01481                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01482}01482                 \textcolor{keywordflow}{if} (ent-\/>\mbox{\hyperlink{structsa__param__ent_a014dcb7db5cf35758aea5eb243a79795}{param\_type}} == \mbox{\hyperlink{scsi__sa_8c_adf2bc50a6484b506043b2acd74110928af0462b62af16418a32e3216eb4745d3e}{SA\_PARAM\_TYPE\_NODE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01483}01483                         first = \&params[i];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01484}01484                         first\_ent = ent;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01485}01485                         contig\_ents = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01486}01486                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01487}01487                         error = ent-\/>\mbox{\hyperlink{structsa__param__ent_ad4e6170874f0c77c62e6932cfcadf8c8}{set\_func}}(periph, \&params[i], 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01488}01488                         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01489}01489                                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01490}01490                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01491}01491                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01492}01492                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01493}01493         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01494}01494         \textcolor{keywordflow}{if} (first != NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01495}01495                 first\_ent-\/>\mbox{\hyperlink{structsa__param__ent_ad4e6170874f0c77c62e6932cfcadf8c8}{set\_func}}(periph, first, contig\_ents);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01496}01496 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01497}01497 bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01498}01498         \textcolor{keywordflow}{if} (need\_copy != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01499}01499                 \textcolor{keywordflow}{if} (error != EFAULT) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01500}01500                         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01501}01501                         copyout(params, list-\/>params, list-\/>param\_len);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01502}01502                         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01503}01503                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01504}01504                 free(params, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01505}01505         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01506}01506         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01507}01507 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01508}01508 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01509}01509 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01510}\mbox{\hyperlink{scsi__sa_8c_a734f17432c2e146dff22882d62a45cb2}{01510}} \mbox{\hyperlink{scsi__sa_8c_a734f17432c2e146dff22882d62a45cb2}{sagetparams\_common}}(\textcolor{keyword}{struct} cdev *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01511}01511 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01512}01512         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01513}01513         u\_int8\_t write\_protect;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01514}01514         \textcolor{keywordtype}{int} comp\_enabled, comp\_supported, error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01515}01515 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01516}01516         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01517}01517 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01518}01518         if (softc-\/>\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01519}01519                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01520}01520 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01521}01521         \textcolor{comment}{/* The control device may issue getparams() if there are no opens. */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01522}01522         \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(dev) \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a03e5b5ba99adc89677b5aafdb5f23be8}{SA\_FLAG\_OPEN}}) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01523}01523                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01524}01524 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01525}01525         error = \mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{sagetparams}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a0e5a4b0c599d3592a714401f04d5afa4}{SA\_PARAM\_ALL}}, \&softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01526}01526             \&softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}}, \&softc-\/>\mbox{\hyperlink{structsa__softc_ad52880fc604ee916d38a1558d54cae97}{media\_numblks}}, \&softc-\/>\mbox{\hyperlink{structsa__softc_a99d1aec7cacf18491280fc264fcacf89}{buffer\_mode}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01527}01527             \&write\_protect, \&softc-\/>\mbox{\hyperlink{structsa__softc_a6586a25f6e27e356c53405f36d8082b7}{speed}}, \&comp\_supported, \&comp\_enabled,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01528}01528             \&softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}}, NULL, NULL, 0, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01529}01529         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01530}01530                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01531}01531         \textcolor{keywordflow}{if} (write\_protect)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01532}01532                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9663bda7bedb689a352d84a9fbf73cfc}{SA\_FLAG\_TAPE\_WP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01533}01533         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01534}01534                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_WP;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01535}01535         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_COMPRESSION;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01536}01536         \textcolor{keywordflow}{if} (comp\_supported) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01537}01537                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}} == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01538}01538                         softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01539}01539                             softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01540}01540                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5b8031931aca8cdfa8e6abb46dc668bf}{SA\_FLAG\_COMP\_SUPP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01541}01541                 \textcolor{keywordflow}{if} (comp\_enabled)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01542}01542                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a1888f91e4e176990d6548f37e7724465}{SA\_FLAG\_COMP\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01543}01543         \} \textcolor{keywordflow}{else}  }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01544}01544                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a0f4c8efdb5d93152a259c1ee694d58e5}{SA\_FLAG\_COMP\_UNSUPP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01545}01545 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01546}01546         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01547}01547 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01548}01548 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01549}\mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{01549}} \textcolor{preprocessor}{\#define PENDING\_MOUNT\_CHECK(softc, periph, dev)         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01550}01550 \textcolor{preprocessor}{        if (softc-\/>open\_pending\_mount) \{                \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01551}01551 \textcolor{preprocessor}{                error = samount(periph, 0, dev);        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01552}01552 \textcolor{preprocessor}{                if (error) \{                            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01553}01553 \textcolor{preprocessor}{                        break;                          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01554}01554 \textcolor{preprocessor}{                \}                                       \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01555}01555 \textcolor{preprocessor}{                saprevent(periph, PR\_PREVENT);          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01556}01556 \textcolor{preprocessor}{                softc-\/>open\_pending\_mount = 0;          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01557}01557 \textcolor{preprocessor}{        \}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01558}01558 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01559}01559 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01560}\mbox{\hyperlink{scsi__sa_8c_a5d0d47079b2a391fd92506f5bc6253b9}{01560}} \mbox{\hyperlink{scsi__sa_8c_a39bcbaf5fa6427a96309dcb3aaf2291b}{saioctl}}(\textcolor{keyword}{struct} cdev *dev, u\_long cmd, caddr\_t arg, \textcolor{keywordtype}{int} flag, \textcolor{keyword}{struct} thread *td)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01561}01561 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01562}01562         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01563}01563         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01564}01564         \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927}{scsi\_space\_code}} spaceop;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01565}01565         \textcolor{keywordtype}{int} didlockperiph = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01566}01566         \textcolor{keywordtype}{int} mode;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01567}01567         \textcolor{keywordtype}{int} error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01568}01568 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01569}01569         mode = \mbox{\hyperlink{scsi__sa_8c_a634577aa4d85bc0939e3ef367fcf754e}{SAMODE}}(dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01570}01570         error = 0;              \textcolor{comment}{/* shut up gcc */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01571}01571         spaceop = 0;            \textcolor{comment}{/* shut up gcc */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01572}01572 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01573}01573         \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)dev-\/>si\_drv1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01574}01574         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01575}01575         \mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01576}01576 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01577}01577         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01578}01578 \textcolor{comment}{         * Check for control mode accesses. We allow MTIOCGET and}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01579}01579 \textcolor{comment}{         * MTIOCERRSTAT (but need to be the only one open in order}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01580}01580 \textcolor{comment}{         * to clear latched status), and MTSETBSIZE, MTSETDNSTY}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01581}01581 \textcolor{comment}{         * and MTCOMP (but need to be the only one accessing this}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01582}01582 \textcolor{comment}{         * device to run those).}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01583}01583 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01584}01584 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01585}01585         if (\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(dev)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01586}01586                 \textcolor{keywordflow}{switch} (cmd) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01587}01587                 \textcolor{keywordflow}{case} MTIOCGETEOTMODEL:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01588}01588                 \textcolor{keywordflow}{case} MTIOCGET:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01589}01589                 \textcolor{keywordflow}{case} MTIOCEXTGET:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01590}01590                 \textcolor{keywordflow}{case} MTIOCPARAMGET:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01591}01591                 \textcolor{keywordflow}{case} MTIOCRBLIM:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01592}01592                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01593}01593                 \textcolor{keywordflow}{case} MTIOCERRSTAT:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01594}01594                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01595}01595 \textcolor{comment}{                         * If the periph isn't already locked, lock it}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01596}01596 \textcolor{comment}{                         * so our MTIOCERRSTAT can reset latched error stats.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01597}01597 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01598}01598 \textcolor{comment}{                         * If the periph is already locked, skip it because}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01599}01599 \textcolor{comment}{                         * we're just getting status and it'll be up to the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01600}01600 \textcolor{comment}{                         * other thread that has this device open to do}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01601}01601 \textcolor{comment}{                         * an MTIOCERRSTAT that would clear latched status.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01602}01602 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01603}01603                         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} \& \mbox{\hyperlink{cam__periph_8h_a8c36ad94432b80e31eb8dae3663dd80f}{CAM\_PERIPH\_LOCKED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01604}01604                                 error = \mbox{\hyperlink{cam__periph_8c_a9590854e2c9bfe6a5ba541b1a211d494}{cam\_periph\_hold}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, PRIBIO|PCATCH);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01605}01605                                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01606}01606                                         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01607}01607                                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01608}01608                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01609}01609                                 didlockperiph = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01610}01610                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01611}01611                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01612}01612 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01613}01613                 \textcolor{keywordflow}{case} MTIOCTOP:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01614}01614                 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01615}01615                         \textcolor{keyword}{struct }mtop *mt = (\textcolor{keyword}{struct }mtop *) arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01616}01616 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01617}01617                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01618}01618 \textcolor{comment}{                         * Check to make sure it's an OP we can perform}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01619}01619 \textcolor{comment}{                         * with no media inserted.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01620}01620 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01621}01621                         \textcolor{keywordflow}{switch} (mt-\/>mt\_op) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01622}01622                         \textcolor{keywordflow}{case} MTSETBSIZ:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01623}01623                         \textcolor{keywordflow}{case} MTSETDNSTY:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01624}01624                         \textcolor{keywordflow}{case} MTCOMP:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01625}01625                                 mt = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01626}01626                                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01627}01627                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01628}01628                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01629}01629                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01630}01630                         \textcolor{keywordflow}{if} (mt != NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01631}01631                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01632}01632                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01633}01633                         \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01634}01634                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01635}01635                 \textcolor{keywordflow}{case} MTIOCSETEOTMODEL:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01636}01636                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01637}01637 \textcolor{comment}{                         * We need to acquire the peripheral here rather}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01638}01638 \textcolor{comment}{                         * than at open time because we are sharing writable}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01639}01639 \textcolor{comment}{                         * access to data structures.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01640}01640 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01641}01641                         error = \mbox{\hyperlink{cam__periph_8c_a9590854e2c9bfe6a5ba541b1a211d494}{cam\_periph\_hold}}(periph, PRIBIO|PCATCH);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01642}01642                         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01643}01643                                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01644}01644                                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01645}01645                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01646}01646                         didlockperiph = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01647}01647                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01648}01648 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01649}01649                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01650}01650                         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01651}01651                         \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01652}01652                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01653}01653         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01654}01654 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01655}01655         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01656}01656 \textcolor{comment}{         * Find the device that the user is talking about}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01657}01657 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01658}01658         \textcolor{keywordflow}{switch} (cmd) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01659}01659         \textcolor{keywordflow}{case} MTIOCGET:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01660}01660         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01661}01661                 \textcolor{keyword}{struct }mtget *g = (\textcolor{keyword}{struct }mtget *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01662}01662 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01663}01663                 error = \mbox{\hyperlink{scsi__sa_8c_a734f17432c2e146dff22882d62a45cb2}{sagetparams\_common}}(dev, periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01664}01664                 \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01665}01665                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01666}01666                 bzero(g, \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct} mtget));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01667}01667                 g-\/>mt\_type = MT\_ISAR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01668}01668                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a0f4c8efdb5d93152a259c1ee694d58e5}{SA\_FLAG\_COMP\_UNSUPP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01669}01669                         g-\/>mt\_comp = MT\_COMP\_UNSUPP;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01670}01670                         g-\/>mt\_comp0 = MT\_COMP\_UNSUPP;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01671}01671                         g-\/>mt\_comp1 = MT\_COMP\_UNSUPP;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01672}01672                         g-\/>mt\_comp2 = MT\_COMP\_UNSUPP;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01673}01673                         g-\/>mt\_comp3 = MT\_COMP\_UNSUPP;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01674}01674                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01675}01675                         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a1888f91e4e176990d6548f37e7724465}{SA\_FLAG\_COMP\_ENABLED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01676}01676                                 g-\/>mt\_comp = MT\_COMP\_DISABLED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01677}01677                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01678}01678                                 g-\/>mt\_comp = softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01679}01679                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01680}01680                         g-\/>mt\_comp0 = softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01681}01681                         g-\/>mt\_comp1 = softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01682}01682                         g-\/>mt\_comp2 = softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01683}01683                         g-\/>mt\_comp3 = softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01684}01684                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01685}01685                 g-\/>mt\_density = softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01686}01686                 g-\/>mt\_density0 = softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01687}01687                 g-\/>mt\_density1 = softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01688}01688                 g-\/>mt\_density2 = softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01689}01689                 g-\/>mt\_density3 = softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01690}01690                 g-\/>mt\_blksiz = softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01691}01691                 g-\/>mt\_blksiz0 = softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01692}01692                 g-\/>mt\_blksiz1 = softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01693}01693                 g-\/>mt\_blksiz2 = softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01694}01694                 g-\/>mt\_blksiz3 = softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01695}01695                 g-\/>mt\_fileno = softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01696}01696                 g-\/>mt\_blkno = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01697}01697                 g-\/>mt\_dsreg = (short) softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01698}01698                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01699}01699 \textcolor{comment}{                 * Yes, we know that this is likely to overflow}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01700}01700 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01701}01701                 if (softc-\/>\mbox{\hyperlink{structsa__softc_a11b9c2f0c7edaae9a1e34f6a9240b1d1}{last\_resid\_was\_io}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01702}01702                         \textcolor{keywordflow}{if} ((g-\/>mt\_resid = (\textcolor{keywordtype}{short}) softc-\/>last\_io\_resid) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01703}01703                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(dev) == 0 || didlockperiph) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01704}01704                                         softc-\/>last\_io\_resid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01705}01705                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01706}01706                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01707}01707                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01708}01708                         \textcolor{keywordflow}{if} ((g-\/>mt\_resid = (\textcolor{keywordtype}{short})softc-\/>last\_ctl\_resid) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01709}01709                                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(dev) == 0 || didlockperiph) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01710}01710                                         softc-\/>last\_ctl\_resid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01711}01711                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01712}01712                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01713}01713                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01714}01714                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01715}01715                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01716}01716         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01717}01717         \textcolor{keywordflow}{case} MTIOCEXTGET:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01718}01718         \textcolor{keywordflow}{case} MTIOCPARAMGET:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01719}01719         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01720}01720                 \textcolor{keyword}{struct }mtextget *g = (\textcolor{keyword}{struct }mtextget *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01721}01721                 \textcolor{keywordtype}{char} *tmpstr2;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01722}01722                 \textcolor{keyword}{struct }sbuf *sb;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01723}01723 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01724}01724                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01725}01725 \textcolor{comment}{                 * Report drive status using an XML format.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01726}01726 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01727}01727 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01728}01728                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01729}01729 \textcolor{comment}{                 * XXX KDM will dropping the lock cause any problems here?}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01730}01730 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01731}01731                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01732}01732                 sb = sbuf\_new(NULL, NULL, g-\/>alloc\_len, SBUF\_FIXEDLEN);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01733}01733                 \textcolor{keywordflow}{if} (sb == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01734}01734                         g-\/>status = MT\_EXT\_GET\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01735}01735                         snprintf(g-\/>error\_str, \textcolor{keyword}{sizeof}(g-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01736}01736                                  \textcolor{stringliteral}{"{}Unable to allocate \%d bytes for status info"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01737}01737                                  g-\/>alloc\_len);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01738}01738                         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01739}01739                         \textcolor{keywordflow}{goto} extget\_bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01740}01740                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01741}01741                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01742}01742 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01743}01743                 \textcolor{keywordflow}{if} (cmd == MTIOCEXTGET)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01744}01744                         error = \mbox{\hyperlink{scsi__sa_8c_a68ab43bfba2cea8003115c56df861103}{saextget}}(dev, periph, sb, g);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01745}01745                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01746}01746                         error = \mbox{\hyperlink{scsi__sa_8c_a1bc1cd9a5f7e29c7f8bfeb038208a980}{saparamget}}(softc, sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01747}01747 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01748}01748                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01749}01749                         \textcolor{keywordflow}{goto} extget\_bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01750}01750 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01751}01751                 error = sbuf\_finish(sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01752}01752                 \textcolor{keywordflow}{if} (error == ENOMEM) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01753}01753                         g-\/>status = MT\_EXT\_GET\_NEED\_MORE\_SPACE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01754}01754                         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01755}01755                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01756}01756                         g-\/>status = MT\_EXT\_GET\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01757}01757                         snprintf(g-\/>error\_str, \textcolor{keyword}{sizeof}(g-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01758}01758                             \textcolor{stringliteral}{"{}Error \%d returned from sbuf\_finish()"{}}, error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01759}01759                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01760}01760                         g-\/>status = MT\_EXT\_GET\_OK;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01761}01761 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01762}01762                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01763}01763                 tmpstr2 = sbuf\_data(sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01764}01764                 g-\/>fill\_len = strlen(tmpstr2) + 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01765}01765                 \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01766}01766 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01767}01767                 error = copyout(tmpstr2, g-\/>status\_xml, g-\/>fill\_len);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01768}01768 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01769}01769                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01770}01770 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01771}01771 extget\_bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01772}01772                 sbuf\_delete(sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01773}01773                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01774}01774         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01775}01775         \textcolor{keywordflow}{case} MTIOCPARAMSET:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01776}01776         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01777}01777                 \textcolor{keyword}{struct }mtsetlist list;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01778}01778                 \textcolor{keyword}{struct }mtparamset *ps = (\textcolor{keyword}{struct }mtparamset *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01779}01779                 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01780}01780                 bzero(\&list, \textcolor{keyword}{sizeof}(list));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01781}01781                 list.num\_params = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01782}01782                 list.param\_len = \textcolor{keyword}{sizeof}(*ps);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01783}01783                 list.params = ps;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01784}01784 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01785}01785                 error = \mbox{\hyperlink{scsi__sa_8c_ab49203b2d951b6c33c76a4d5fce3a206}{saparamsetlist}}(periph, \&list, \textcolor{comment}{/*need\_copy*/} 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01786}01786                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01787}01787         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01788}01788         \textcolor{keywordflow}{case} MTIOCSETLIST:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01789}01789         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01790}01790                 \textcolor{keyword}{struct }mtsetlist *list = (\textcolor{keyword}{struct }mtsetlist *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01791}01791 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01792}01792                 error = \mbox{\hyperlink{scsi__sa_8c_ab49203b2d951b6c33c76a4d5fce3a206}{saparamsetlist}}(periph, list, \textcolor{comment}{/*need\_copy*/} 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01793}01793                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01794}01794         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01795}01795         \textcolor{keywordflow}{case} MTIOCERRSTAT:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01796}01796         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01797}01797                 \textcolor{keyword}{struct }scsi\_tape\_errors *sep =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01798}01798                     \&((\textcolor{keyword}{union }mterrstat *)arg)-\/>scsi\_errstat;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01799}01799 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01800}01800                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01801}01801                     (\textcolor{stringliteral}{"{}saioctl: MTIOCERRSTAT\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01802}01802 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01803}01803                 bzero(sep, \textcolor{keyword}{sizeof}(*sep));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01804}01804                 sep-\/>io\_resid = softc-\/>last\_io\_resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01805}01805                 bcopy((caddr\_t) \&softc-\/>last\_io\_sense, sep-\/>io\_sense,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01806}01806                     sizeof (sep-\/>io\_sense));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01807}01807                 bcopy((caddr\_t) \&softc-\/>last\_io\_cdb, sep-\/>io\_cdb,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01808}01808                     sizeof (sep-\/>io\_cdb));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01809}01809                 sep-\/>ctl\_resid = softc-\/>last\_ctl\_resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01810}01810                 bcopy((caddr\_t) \&softc-\/>last\_ctl\_sense, sep-\/>ctl\_sense,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01811}01811                     sizeof (sep-\/>ctl\_sense));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01812}01812                 bcopy((caddr\_t) \&softc-\/>last\_ctl\_cdb, sep-\/>ctl\_cdb,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01813}01813                     sizeof (sep-\/>ctl\_cdb));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01814}01814 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01815}01815                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(dev) == 0 \&\& !softc-\/>\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}}) ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01816}01816                     didlockperiph)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01817}01817                         bzero((caddr\_t) \&softc-\/>\mbox{\hyperlink{structsa__softc_a13d40c7d401673ae8986fa25fb92c2fc}{errinfo}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01818}01818                             sizeof (softc-\/>\mbox{\hyperlink{structsa__softc_a13d40c7d401673ae8986fa25fb92c2fc}{errinfo}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01819}01819                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01820}01820                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01821}01821         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01822}01822         \textcolor{keywordflow}{case} MTIOCTOP:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01823}01823         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01824}01824                 \textcolor{keyword}{struct }mtop *mt;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01825}01825                 \textcolor{keywordtype}{int}    count;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01826}01826 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01827}01827                 \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01828}01828 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01829}01829                 mt = (\textcolor{keyword}{struct }mtop *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01830}01830 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01831}01831                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01832}01832                          (\textcolor{stringliteral}{"{}saioctl: op=0x\%x count=0x\%x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01833}01833                           mt-\/>mt\_op, mt-\/>mt\_count));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01834}01834 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01835}01835                 count = mt-\/>mt\_count;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01836}01836                 \textcolor{keywordflow}{switch} (mt-\/>mt\_op) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01837}01837                 \textcolor{keywordflow}{case} MTWEOF:    \textcolor{comment}{/* write an end-\/of-\/file marker */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01838}01838                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01839}01839 \textcolor{comment}{                         * We don't need to clear the SA\_FLAG\_TAPE\_WRITTEN}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01840}01840 \textcolor{comment}{                         * flag because by keeping track of filemarks}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01841}01841 \textcolor{comment}{                         * we have last written we know whether or not}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01842}01842 \textcolor{comment}{                         * we need to write more when we close the device.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01843}01843 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01844}01844                         error = \mbox{\hyperlink{scsi__sa_8c_a1d8d7e925b43a6580eef62643a7e2ee4}{sawritefilemarks}}(periph, count, FALSE, FALSE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01845}01845                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01846}01846                 \textcolor{keywordflow}{case} MTWEOFI:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01847}01847                         \textcolor{comment}{/* write an end-\/of-\/file marker without waiting */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01848}01848                         error = \mbox{\hyperlink{scsi__sa_8c_a1d8d7e925b43a6580eef62643a7e2ee4}{sawritefilemarks}}(periph, count, FALSE, TRUE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01849}01849                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01850}01850                 \textcolor{keywordflow}{case} MTWSS:     \textcolor{comment}{/* write a setmark */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01851}01851                         error = \mbox{\hyperlink{scsi__sa_8c_a1d8d7e925b43a6580eef62643a7e2ee4}{sawritefilemarks}}(periph, count, TRUE, FALSE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01852}01852                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01853}01853                 \textcolor{keywordflow}{case} MTBSR:     \textcolor{comment}{/* backward space record */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01854}01854                 \textcolor{keywordflow}{case} MTFSR:     \textcolor{comment}{/* forward space record */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01855}01855                 \textcolor{keywordflow}{case} MTBSF:     \textcolor{comment}{/* backward space file */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01856}01856                 \textcolor{keywordflow}{case} MTFSF:     \textcolor{comment}{/* forward space file */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01857}01857                 \textcolor{keywordflow}{case} MTBSS:     \textcolor{comment}{/* backward space setmark */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01858}01858                 \textcolor{keywordflow}{case} MTFSS:     \textcolor{comment}{/* forward space setmark */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01859}01859                 \textcolor{keywordflow}{case} MTEOD:     \textcolor{comment}{/* space to end of recorded medium */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01860}01860                 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01861}01861                         \textcolor{keywordtype}{int} nmarks;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01862}01862 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01863}01863                         spaceop = \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927aa80e7481061650e9d0cacc7664ae316e}{SS\_FILEMARKS}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01864}01864                         nmarks = softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01865}01865                         error = \mbox{\hyperlink{scsi__sa_8c_a1420122d62b1960df49c99f3d5fade09}{sacheckeod}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01866}01866                         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01867}01867                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01868}01868                                     \textcolor{stringliteral}{"{}EOD check prior to spacing failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01869}01869                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a3b5f8b7ae50c7b097d4badf16d867640}{SA\_FLAG\_EIO\_PENDING}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01870}01870                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01871}01871                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01872}01872                         nmarks -\/= softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01873}01873                         \textcolor{keywordflow}{switch}(mt-\/>mt\_op) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01874}01874                         \textcolor{keywordflow}{case} MTBSR:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01875}01875                                 count = -\/count;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01876}01876                                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01877}01877                         \textcolor{keywordflow}{case} MTFSR:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01878}01878                                 spaceop = \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927a267358c8cb264cd529e4c02414ed81c5}{SS\_BLOCKS}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01879}01879                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01880}01880                         \textcolor{keywordflow}{case} MTBSF:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01881}01881                                 count = -\/count;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01882}01882                                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01883}01883                         \textcolor{keywordflow}{case} MTFSF:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01884}01884                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01885}01885                         \textcolor{keywordflow}{case} MTBSS:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01886}01886                                 count = -\/count;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01887}01887                                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01888}01888                         \textcolor{keywordflow}{case} MTFSS:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01889}01889                                 spaceop = \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927a94b42ac8db42a308ceba7774bb814ffe}{SS\_SETMARKS}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01890}01890                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01891}01891                         \textcolor{keywordflow}{case} MTEOD:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01892}01892                                 spaceop = \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927a2cb6ec77b9a77b9c2f63ff1e71232b0b}{SS\_EOD}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01893}01893                                 count = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01894}01894                                 nmarks = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01895}01895                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01896}01896                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01897}01897                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01898}01898                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01899}01899                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01900}01900                         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01901}01901                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01902}01902 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01903}01903                         nmarks = softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01904}01904                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01905}01905 \textcolor{comment}{                         * XXX: Why are we checking again?}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01906}01906 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01907}01907                         error = \mbox{\hyperlink{scsi__sa_8c_a1420122d62b1960df49c99f3d5fade09}{sacheckeod}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01908}01908                         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01909}01909                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01910}01910                         nmarks -\/= softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01911}01911                         error = \mbox{\hyperlink{scsi__sa_8c_ae932d7a651526aeffefd168f58bc440b}{saspace}}(periph, count -\/ nmarks, spaceop);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01912}01912                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01913}01913 \textcolor{comment}{                         * At this point, clear that we've written the tape}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01914}01914 \textcolor{comment}{                         * and that we've written any filemarks. We really}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01915}01915 \textcolor{comment}{                         * don't know what the applications wishes to do next-\/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01916}01916 \textcolor{comment}{                         * the sacheckeod's will make sure we terminated the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01917}01917 \textcolor{comment}{                         * tape correctly if we'd been writing, but the next}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01918}01918 \textcolor{comment}{                         * action the user application takes will set again}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01919}01919 \textcolor{comment}{                         * whether we need to write filemarks.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01920}01920 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01921}01921                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&=}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01922}01922                             \string~(\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01923}01923                         softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01924}01924                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01925}01925                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01926}01926                 \textcolor{keywordflow}{case} MTREW:     \textcolor{comment}{/* rewind */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01927}01927                         \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01928}01928                         (void) \mbox{\hyperlink{scsi__sa_8c_a1420122d62b1960df49c99f3d5fade09}{sacheckeod}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01929}01929                         error = \mbox{\hyperlink{scsi__sa_8c_a518ad50b44da7238b20aa8e2b489cd44}{sarewind}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01930}01930                         \textcolor{comment}{/* see above */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01931}01931                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&=}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01932}01932                             \string~(\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01933}01933                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_ERR\_PENDING;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01934}01934                         softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01935}01935                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01936}01936                 \textcolor{keywordflow}{case} MTERASE:   \textcolor{comment}{/* erase */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01937}01937                         \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01938}01938                         error = \mbox{\hyperlink{scsi__sa_8c_a0b0cd69138727407748a6ef32c557240}{saerase}}(periph, count);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01939}01939                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&=}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01940}01940                             \string~(\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01941}01941                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_ERR\_PENDING;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01942}01942                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01943}01943                 \textcolor{keywordflow}{case} MTRETENS:  \textcolor{comment}{/* re-\/tension tape */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01944}01944                         \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01945}01945                         error = \mbox{\hyperlink{scsi__sa_8c_a384d86c033008cc26071ea89d5d6c5ba}{saretension}}(periph);         }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01946}01946                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&=}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01947}01947                             \string~(\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01948}01948                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_ERR\_PENDING;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01949}01949                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01950}01950                 \textcolor{keywordflow}{case} MTOFFL:    \textcolor{comment}{/* rewind and put the drive offline */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01951}01951 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01952}01952                         \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01953}01953 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01954}01954                         (void) \mbox{\hyperlink{scsi__sa_8c_a1420122d62b1960df49c99f3d5fade09}{sacheckeod}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01955}01955                         \textcolor{comment}{/* see above */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01956}01956                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_WRITTEN;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01957}01957                         softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01958}01958 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01959}01959                         error = \mbox{\hyperlink{scsi__sa_8c_a518ad50b44da7238b20aa8e2b489cd44}{sarewind}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01960}01960                         \textcolor{comment}{/* clear the frozen flag anyway */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01961}01961                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_FROZEN;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01962}01962 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01963}01963                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01964}01964 \textcolor{comment}{                         * Be sure to allow media removal before ejecting.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01965}01965 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01966}01966 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01967}01967                         \mbox{\hyperlink{scsi__sa_8c_aaef9b6db880ee304a18ccc6305f08ba1}{saprevent}}(periph, \mbox{\hyperlink{scsi__all_8h_a0ede30a52a749c2e236336adc15d14d1}{PR\_ALLOW}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01968}01968                         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01969}01969                                 error = \mbox{\hyperlink{scsi__sa_8c_aca72a710f2338f76e52de81bd1025bf2}{saloadunload}}(periph, FALSE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01970}01970                                 \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01971}01971                                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_MOUNTED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01972}01972                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01973}01973                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01974}01974                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01975}01975 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01976}01976                 \textcolor{keywordflow}{case} MTLOAD:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01977}01977                         error = \mbox{\hyperlink{scsi__sa_8c_aca72a710f2338f76e52de81bd1025bf2}{saloadunload}}(periph, TRUE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01978}01978                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01979}01979                 \textcolor{keywordflow}{case} MTNOP:     \textcolor{comment}{/* no operation, sets status only */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01980}01980                 \textcolor{keywordflow}{case} MTCACHE:   \textcolor{comment}{/* enable controller cache */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01981}01981                 \textcolor{keywordflow}{case} MTNOCACHE: \textcolor{comment}{/* disable controller cache */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01982}01982                         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01983}01983                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01984}01984 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01985}01985                 \textcolor{keywordflow}{case} MTSETBSIZ: \textcolor{comment}{/* Set block size for device */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01986}01986 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01987}01987                         \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01988}01988 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01989}01989                         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a3ce8fd804df275ea1b98922e54296123}{sili}} != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01990}01990                          \&\& (count != 0)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01991}01991                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}Can't enter fixed "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01992}01992                                     \textcolor{stringliteral}{"{}block mode with SILI enabled\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01993}01993                                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01994}01994                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01995}01995                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01996}01996                         error = \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}}, count,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01997}01997                                             0, 0, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01998}01998                         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l01999}01999                                 softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02000}02000                                     softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02001}02001                                 softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} = count;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02002}02002                                 \textcolor{keywordflow}{if} (count) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02003}02003                                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02004}02004                                         \textcolor{keywordflow}{if} (powerof2(count)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02005}02005                                                 softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02006}02006                                                     ffs(count) -\/ 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02007}02007                                                 softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} = count -\/ 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02008}02008                                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02009}02009                                                 softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} = \string~0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02010}02010                                                 softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02011}02011                                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02012}02012                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02013}02013 \textcolor{comment}{                                         * Make the user's desire 'persistent'.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02014}02014 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02015}02015                                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \&= \string~SA\_QUIRK\_VARIABLE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02016}02016                                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02017}02017                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02018}02018                                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_FIXED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02019}02019                                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}} == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02020}02020                                                 softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}} = \string~0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02021}02021                                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02022}02022                                         softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02023}02023                                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02024}02024                                                 softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02025}02025                                                     softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02026}02026                                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02027}02027                                                 softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02028}02028                                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02029}02029                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02030}02030 \textcolor{comment}{                                         * Make the user's desire 'persistent'.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02031}02031 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02032}02032                                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02033}02033                                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \&= \string~SA\_QUIRK\_FIXED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02034}02034                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02035}02035                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02036}02036                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02037}02037                 \textcolor{keywordflow}{case} MTSETDNSTY:        \textcolor{comment}{/* Set density for device and mode */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02038}02038                         \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02039}02039 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02040}02040                         \textcolor{keywordflow}{if} (count > UCHAR\_MAX) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02041}02041                                 error = EINVAL; }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02042}02042                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02043}02043                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02044}02044                                 error = \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a866ff93522ab5a676dc5bfc9361847f0}{SA\_PARAM\_DENSITY}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02045}02045                                                     0, count, 0, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02046}02046                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02047}02047                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02048}02048                 \textcolor{keywordflow}{case} MTCOMP:    \textcolor{comment}{/* enable compression */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02049}02049                         \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02050}02050                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02051}02051 \textcolor{comment}{                         * Some devices don't support compression, and}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02052}02052 \textcolor{comment}{                         * don't like it if you ask them for the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02053}02053 \textcolor{comment}{                         * compression page.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02054}02054 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02055}02055                         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}) ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02056}02056                             (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a0f4c8efdb5d93152a259c1ee694d58e5}{SA\_FLAG\_COMP\_UNSUPP}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02057}02057                                 error = ENODEV;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02058}02058                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02059}02059                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02060}02060                         error = \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02061}02061                             0, 0, count, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02062}02062                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02063}02063                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02064}02064                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02065}02065                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02066}02066                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02067}02067         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02068}02068         \textcolor{keywordflow}{case} MTIOCIEOT:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02069}02069         \textcolor{keywordflow}{case} MTIOCEEOT:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02070}02070                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02071}02071                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02072}02072         \textcolor{keywordflow}{case} MTIOCRDSPOS:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02073}02073                 \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02074}02074                 error = \mbox{\hyperlink{scsi__sa_8c_a95f654c6228aa0aa5024c3aa03d0e6cc}{sardpos}}(periph, 0, (u\_int32\_t *) arg);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02075}02075                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02076}02076         \textcolor{keywordflow}{case} MTIOCRDHPOS:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02077}02077                 \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02078}02078                 error = \mbox{\hyperlink{scsi__sa_8c_a95f654c6228aa0aa5024c3aa03d0e6cc}{sardpos}}(periph, 1, (u\_int32\_t *) arg);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02079}02079                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02080}02080         \textcolor{keywordflow}{case} MTIOCSLOCATE:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02081}02081         \textcolor{keywordflow}{case} MTIOCHLOCATE: \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02082}02082                 \textcolor{keyword}{struct }mtlocate locate\_info;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02083}02083                 \textcolor{keywordtype}{int} hard;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02084}02084 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02085}02085                 bzero(\&locate\_info, \textcolor{keyword}{sizeof}(locate\_info));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02086}02086                 locate\_info.logical\_id = *((uint32\_t *)arg);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02087}02087                 \textcolor{keywordflow}{if} (cmd == MTIOCSLOCATE)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02088}02088                         hard = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02089}02089                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02090}02090                         hard = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02091}02091 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02092}02092                 \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02093}02093 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02094}02094                 error = \mbox{\hyperlink{scsi__sa_8c_a228f994ded23909c90af6eedf47169ba}{sasetpos}}(periph, hard, \&locate\_info);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02095}02095                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02096}02096         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02097}02097         \textcolor{keywordflow}{case} MTIOCEXTLOCATE:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02098}02098                 \mbox{\hyperlink{scsi__sa_8c_a781cf10a4fe0a29db9f04233f07564c7}{PENDING\_MOUNT\_CHECK}}(softc, periph, dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02099}02099                 error = \mbox{\hyperlink{scsi__sa_8c_a228f994ded23909c90af6eedf47169ba}{sasetpos}}(periph, \textcolor{comment}{/*hard*/} 0, (\textcolor{keyword}{struct} mtlocate *)arg);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02100}02100                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&=}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02101}02101                     \string~(\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02102}02102                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_ERR\_PENDING;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02103}02103                 softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02104}02104                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02105}02105         \textcolor{keywordflow}{case} MTIOCGETEOTMODEL:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02106}02106                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02107}02107                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02108}02108                         mode = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02109}02109                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02110}02110                         mode = 2;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02111}02111                 *((u\_int32\_t *) arg) = mode;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02112}02112                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02113}02113         \textcolor{keywordflow}{case} MTIOCSETEOTMODEL:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02114}02114                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02115}02115                 \textcolor{keywordflow}{switch} (*((u\_int32\_t *) arg)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02116}02116                 \textcolor{keywordflow}{case} 1:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02117}02117                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \&= \string~SA\_QUIRK\_2FM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02118}02118                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02119}02119                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02120}02120                 \textcolor{keywordflow}{case} 2:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02121}02121                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \&= \string~SA\_QUIRK\_1FM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02122}02122                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02123}02123                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02124}02124                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02125}02125                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02126}02126                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02127}02127                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02128}02128                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02129}02129         \textcolor{keywordflow}{case} MTIOCRBLIM: \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02130}02130                 \textcolor{keyword}{struct }mtrblim *rblim;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02131}02131 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02132}02132                 rblim = (\textcolor{keyword}{struct }mtrblim *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02133}02133 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02134}02134                 rblim-\/>granularity = softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02135}02135                 rblim-\/>min\_block\_length = softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02136}02136                 rblim-\/>max\_block\_length = softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02137}02137                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02138}02138         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02139}02139         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02140}02140                 error = \mbox{\hyperlink{cam__periph_8c_ac87854e887a6602529ea8cafa66dbdac}{cam\_periph\_ioctl}}(periph, cmd, arg, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02141}02141                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02142}02142         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02143}02143 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02144}02144         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02145}02145 \textcolor{comment}{         * Check to see if we cleared a frozen state}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02146}02146 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02147}02147         \textcolor{keywordflow}{if} (error == 0 \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02148}02148                 \textcolor{keywordflow}{switch}(cmd) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02149}02149                 \textcolor{keywordflow}{case} MTIOCRDSPOS:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02150}02150                 \textcolor{keywordflow}{case} MTIOCRDHPOS:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02151}02151                 \textcolor{keywordflow}{case} MTIOCSLOCATE:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02152}02152                 \textcolor{keywordflow}{case} MTIOCHLOCATE:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02153}02153                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02154}02154 \textcolor{comment}{                         * XXX KDM look at this.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02155}02155 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02156}02156                         softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02157}02157                         softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02158}02158                         softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02159}02159                         softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02160}02160                         softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02161}02161                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_FROZEN;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02162}02162                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02163}02163                             \textcolor{stringliteral}{"{}tape state now unfrozen.\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02164}02164                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02165}02165                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02166}02166                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02167}02167                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02168}02168         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02169}02169         \textcolor{keywordflow}{if} (didlockperiph) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02170}02170                 \mbox{\hyperlink{cam__periph_8c_a87d933ebed78bbf0c6fce590bb487a8d}{cam\_periph\_unhold}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02171}02171         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02172}02172         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02173}02173         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02174}02174 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02175}02175 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02176}02176 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02177}02177 \mbox{\hyperlink{scsi__sa_8c_a4b5cf19a5aac1bac064375c11d3cf9b4}{sainit}}(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02178}02178 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02179}02179         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02180}02180 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02181}02181         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02182}02182 \textcolor{comment}{         * Install a global async callback.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02183}02183 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02184}02184         status = \mbox{\hyperlink{cam__xpt_8c_a8307586c12fb4774768a25a1fa4e6388}{xpt\_register\_async}}(\mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a04183843e65dd16d378d105270a6debd}{AC\_FOUND\_DEVICE}}, \mbox{\hyperlink{scsi__sa_8c_a4740008a803203b65f8d6efae7637fb2}{saasync}}, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02185}02185 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02186}02186         \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02187}02187                 printf(\textcolor{stringliteral}{"{}sa: Failed to attach master async callback "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02188}02188                        \textcolor{stringliteral}{"{}due to status 0x\%x!\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02189}02189         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02190}02190 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02191}02191 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02192}02192 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02193}\mbox{\hyperlink{scsi__sa_8c_aa3e07f082d8c5bd777714115e4d99db8}{02193}} \mbox{\hyperlink{scsi__sa_8c_aa3e07f082d8c5bd777714115e4d99db8}{sadevgonecb}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02194}02194 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02195}02195         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02196}02196         \textcolor{keyword}{struct }mtx *mtx;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02197}02197         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02198}02198 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02199}02199         \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02200}02200         \mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02201}02201 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02202}02202         mtx = \mbox{\hyperlink{cam__periph_8h_a8b9ecf78613a0fdde3d227cf5a109101}{cam\_periph\_mtx}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02203}02203         mtx\_lock(mtx);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02204}02204 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02205}02205         softc-\/>\mbox{\hyperlink{structsa__softc_aa7ca79dc3f9e8bba503b464062cc7237}{num\_devs\_to\_destroy}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02206}02206         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aa7ca79dc3f9e8bba503b464062cc7237}{num\_devs\_to\_destroy}} == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02207}02207                 \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02208}02208 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02209}02209                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02210}02210 \textcolor{comment}{                 * When we have gotten all of our callbacks, we will get}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02211}02211 \textcolor{comment}{                 * no more close calls from devfs.  So if we have any}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02212}02212 \textcolor{comment}{                 * dangling opens, we need to release the reference held}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02213}02213 \textcolor{comment}{                 * for that particular context.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02214}02214 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02215}02215                 \textcolor{keywordflow}{for} (i = 0; i < softc-\/>\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}}; i++)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02216}02216                         \mbox{\hyperlink{cam__periph_8c_a06741cfe8f484a9dad6f9607a233908c}{cam\_periph\_release\_locked}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02217}02217 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02218}02218                 softc-\/>\mbox{\hyperlink{structsa__softc_a0938464f30d23ff89dce97520e59f09f}{open\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02219}02219 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02220}02220                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02221}02221 \textcolor{comment}{                 * Release the reference held for devfs, all of our}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02222}02222 \textcolor{comment}{                 * instances are gone now.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02223}02223 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02224}02224                 \mbox{\hyperlink{cam__periph_8c_a06741cfe8f484a9dad6f9607a233908c}{cam\_periph\_release\_locked}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02225}02225         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02226}02226 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02227}02227         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02228}02228 \textcolor{comment}{         * We reference the lock directly here, instead of using}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02229}02229 \textcolor{comment}{         * cam\_periph\_unlock().  The reason is that the final call to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02230}02230 \textcolor{comment}{         * cam\_periph\_release\_locked() above could result in the periph}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02231}02231 \textcolor{comment}{         * getting freed.  If that is the case, dereferencing the periph}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02232}02232 \textcolor{comment}{         * with a cam\_periph\_unlock() call would cause a page fault.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02233}02233 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02234}02234         mtx\_unlock(mtx);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02235}02235 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02236}02236 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02237}02237 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02238}\mbox{\hyperlink{scsi__sa_8c_aefa9138b18a5ad07cd9a0df8573a6822}{02238}} \mbox{\hyperlink{scsi__sa_8c_a9bfc816851a9bec6c3f858700917dc56}{saoninvalidate}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02239}02239 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02240}02240         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02241}02241 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02242}02242         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02243}02243 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02244}02244         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02245}02245 \textcolor{comment}{         * De-\/register any async callbacks.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02246}02246 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02247}02247         \mbox{\hyperlink{cam__xpt_8c_a8307586c12fb4774768a25a1fa4e6388}{xpt\_register\_async}}(0, \mbox{\hyperlink{scsi__sa_8c_a4740008a803203b65f8d6efae7637fb2}{saasync}}, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02248}02248 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02249}02249         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a85411c7c0718e44034b6d3d3a57543dd}{SA\_FLAG\_INVALID}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02250}02250 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02251}02251         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02252}02252 \textcolor{comment}{         * Return all queued I/O with ENXIO.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02253}02253 \textcolor{comment}{         * XXX Handle any transactions queued to the card}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02254}02254 \textcolor{comment}{         *     with XPT\_ABORT\_CCB.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02255}02255 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02256}02256         bioq\_flush(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}}, NULL, ENXIO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02257}02257         softc-\/>\mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{queue\_count}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02258}02258 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02259}02259         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02260}02260 \textcolor{comment}{         * Tell devfs that all of our devices have gone away, and ask for a}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02261}02261 \textcolor{comment}{         * callback when it has cleaned up its state.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02262}02262 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02263}02263         destroy\_dev\_sched\_cb(softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_afb75b647df45f16528f33bf30b506046}{ctl\_dev}}, \mbox{\hyperlink{scsi__sa_8c_aa3e07f082d8c5bd777714115e4d99db8}{sadevgonecb}}, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02264}02264         destroy\_dev\_sched\_cb(softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_a46b0698f8492872a703ad8f463406309}{r\_dev}}, \mbox{\hyperlink{scsi__sa_8c_aa3e07f082d8c5bd777714115e4d99db8}{sadevgonecb}}, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02265}02265         destroy\_dev\_sched\_cb(softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_a5a68aef82f99d6bdc34b05d40b354964}{nr\_dev}}, \mbox{\hyperlink{scsi__sa_8c_aa3e07f082d8c5bd777714115e4d99db8}{sadevgonecb}}, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02266}02266         destroy\_dev\_sched\_cb(softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_af50c2642783ce13089e951681ff4a463}{er\_dev}}, \mbox{\hyperlink{scsi__sa_8c_aa3e07f082d8c5bd777714115e4d99db8}{sadevgonecb}}, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02267}02267 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02268}02268 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02269}02269 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02270}\mbox{\hyperlink{scsi__sa_8c_a01c497846c198459a3d8bc0554f41f2b}{02270}} \mbox{\hyperlink{scsi__sa_8c_aeecc8bb9fba3c94ba0449e25bdd243c6}{sacleanup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02271}02271 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02272}02272         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02273}02273 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02274}02274         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02275}02275 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02276}02276         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02277}02277 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02278}02278         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a022155c4fea7f618a79540c776800a05}{SA\_FLAG\_SCTX\_INIT}}) != 0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02279}02279          \&\& (((softc-\/>\mbox{\hyperlink{structsa__softc_a5a3d774b8522372fb867cfb47e7762e6}{sysctl\_timeout\_tree}} != NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02280}02280            \&\& (sysctl\_ctx\_free(\&softc-\/>\mbox{\hyperlink{structsa__softc_a9dca6a5e153e8ae857724d0c6cc19b60}{sysctl\_timeout\_ctx}}) != 0))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02281}02281           || sysctl\_ctx\_free(\&softc-\/>\mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{sysctl\_ctx}}) != 0))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02282}02282                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}can't remove sysctl context\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02283}02283 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02284}02284         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02285}02285 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02286}02286         devstat\_remove\_entry(softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02287}02287 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02288}02288         free(softc, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02289}02289 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02290}02290 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02291}02291 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02292}\mbox{\hyperlink{scsi__sa_8c_a4740008a803203b65f8d6efae7637fb2}{02292}} \mbox{\hyperlink{scsi__sa_8c_a4740008a803203b65f8d6efae7637fb2}{saasync}}(\textcolor{keywordtype}{void} *callback\_arg, u\_int32\_t code,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02293}02293         \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__path}{cam\_path}} *path, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02294}02294 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02295}02295         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02296}02296 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02297}02297         periph = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)callback\_arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02298}02298         \textcolor{keywordflow}{switch} (code) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02299}02299         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a04183843e65dd16d378d105270a6debd}{AC\_FOUND\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02300}02300         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02301}02301                 \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdev}{ccb\_getdev}} *cgd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02302}02302                 \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02303}02303 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02304}02304                 cgd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdev}{ccb\_getdev}} *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02305}02305                 \textcolor{keywordflow}{if} (cgd == NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02306}02306                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02307}02307 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02308}02308                 \textcolor{keywordflow}{if} (cgd-\/>\mbox{\hyperlink{structccb__getdev_a019f53feca9e4c09b563eef64e19c1fd}{protocol}} != \mbox{\hyperlink{cam__ccb_8h_a283e001579038402a95e23bef57107e8a47dbcda94a42ad1914fddef379cb08ce}{PROTO\_SCSI}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02309}02309                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02310}02310                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__all_8h_ad67bf2d750c3d9079227da83ddd59320}{SID\_QUAL}}(\&cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}) != \mbox{\hyperlink{scsi__all_8h_a8a4bc5643529b38b5a6b9a8fe867af90}{SID\_QUAL\_LU\_CONNECTED}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02311}02311                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02312}02312                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__all_8h_aaf542baf40a444b689af23b271bfbebd}{SID\_TYPE}}(\&cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}) != \mbox{\hyperlink{scsi__all_8h_ac4ce37a9a837dbcc111faf6ef888839f}{T\_SEQUENTIAL}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02313}02313                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02314}02314 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02315}02315                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02316}02316 \textcolor{comment}{                 * Allocate a peripheral instance for}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02317}02317 \textcolor{comment}{                 * this device and start the probe}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02318}02318 \textcolor{comment}{                 * process.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02319}02319 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02320}02320                 status = \mbox{\hyperlink{cam__periph_8c_ad5e57f86a941e5a4021b0b026851e445}{cam\_periph\_alloc}}(\mbox{\hyperlink{scsi__sa_8c_ad6a728a015c101c0dfd73b362c3cd607}{saregister}}, \mbox{\hyperlink{scsi__sa_8c_a9bfc816851a9bec6c3f858700917dc56}{saoninvalidate}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02321}02321                                           \mbox{\hyperlink{scsi__sa_8c_aeecc8bb9fba3c94ba0449e25bdd243c6}{sacleanup}}, \mbox{\hyperlink{scsi__sa_8c_adf05b5bd96cc0f3b4386ad5d4542d6c6}{sastart}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02322}02322                                           \textcolor{stringliteral}{"{}sa"{}}, \mbox{\hyperlink{cam__periph_8h_ae648b142a75d7546562342a7b7961e6cada5282ff3d485d68259bc309db51476b}{CAM\_PERIPH\_BIO}}, path,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02323}02323                                           \mbox{\hyperlink{scsi__sa_8c_a4740008a803203b65f8d6efae7637fb2}{saasync}}, \mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0a04183843e65dd16d378d105270a6debd}{AC\_FOUND\_DEVICE}}, cgd);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02324}02324 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02325}02325                 \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02326}02326                  \&\& status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a167c9bce81d6e65c16734d3e0d59fe24}{CAM\_REQ\_INPROG}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02327}02327                         printf(\textcolor{stringliteral}{"{}saasync: Unable to probe new device "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02328}02328                                 \textcolor{stringliteral}{"{}due to status 0x\%x\(\backslash\)n"{}}, status);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02329}02329                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02330}02330         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02331}02331         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02332}02332                 \mbox{\hyperlink{cam__periph_8c_a75ca97e267b2b0a98d4c146ec1967bdc}{cam\_periph\_async}}(periph, code, path, arg);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02333}02333                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02334}02334         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02335}02335 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02336}02336 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02337}02337 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02338}\mbox{\hyperlink{scsi__sa_8c_a8f974d5ad848a4885f6ec3c3ce18bb71}{02338}} \mbox{\hyperlink{scsi__sa_8c_a8f974d5ad848a4885f6ec3c3ce18bb71}{sasetupdev}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keyword}{struct} cdev *dev)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02339}02339 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02340}02340 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02341}02341         dev-\/>si\_iosize\_max = softc-\/>\mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02342}02342         dev-\/>si\_flags |= softc-\/>\mbox{\hyperlink{structsa__softc_a3b71e1c5affc6a08db028037589abda9}{si\_flags}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02343}02343         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02344}02344 \textcolor{comment}{         * Keep a count of how many non-\/alias devices we have created,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02345}02345 \textcolor{comment}{         * so we can make sure we clean them all up on shutdown.  Aliases}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02346}02346 \textcolor{comment}{         * are cleaned up when we destroy the device they're an alias for.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02347}02347 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02348}02348         \textcolor{keywordflow}{if} ((dev-\/>si\_flags \& SI\_ALIAS) == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02349}02349                 softc-\/>\mbox{\hyperlink{structsa__softc_aa7ca79dc3f9e8bba503b464062cc7237}{num\_devs\_to\_destroy}}++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02350}02350 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02351}02351 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02352}02352 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02353}02353 \textcolor{comment}{ * Load the global (for all sa(4) instances) and per-\/instance tunable}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02354}02354 \textcolor{comment}{ * values for timeouts for various sa(4) commands.  This should be run}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02355}02355 \textcolor{comment}{ * after the default timeouts are fetched from the drive, so the user's}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02356}02356 \textcolor{comment}{ * preference will override the drive's defaults.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02357}02357 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02358}02358 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02359}\mbox{\hyperlink{scsi__sa_8c_a105eff621a7a7c9523607039e3fb5987}{02359}} \mbox{\hyperlink{scsi__sa_8c_a105eff621a7a7c9523607039e3fb5987}{saloadtotunables}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02360}02360 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02361}02361         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02362}02362         \textcolor{keywordtype}{char} tmpstr[80];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02363}02363 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02364}02364         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa5a88dc10ce493c38ca92a8423729ea13}{SA\_TIMEOUT\_TYPE\_MAX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02365}02365                 \textcolor{keywordtype}{int} tmpval, retval;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02366}02366 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02367}02367                 \textcolor{comment}{/* First grab any global timeout setting */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02368}02368                 snprintf(tmpstr, \textcolor{keyword}{sizeof}(tmpstr), \textcolor{stringliteral}{"{}kern.cam.sa.timeout.\%s"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02369}02369                     \mbox{\hyperlink{scsi__sa_8c_a84e20ed17b50b493a26123dcde0370d7}{sa\_default\_timeouts}}[i].desc);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02370}02370                 retval = TUNABLE\_INT\_FETCH(tmpstr, \&tmpval);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02371}02371                 \textcolor{keywordflow}{if} (retval != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02372}02372                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[i] = tmpval;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02373}02373 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02374}02374                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02375}02375 \textcolor{comment}{                 * Then overwrite any global timeout settings with}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02376}02376 \textcolor{comment}{                 * per-\/instance timeout settings.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02377}02377 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02378}02378                 snprintf(tmpstr, \textcolor{keyword}{sizeof}(tmpstr), \textcolor{stringliteral}{"{}kern.cam.sa.\%u.timeout.\%s"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02379}02379                     softc-\/>\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}, \mbox{\hyperlink{scsi__sa_8c_a84e20ed17b50b493a26123dcde0370d7}{sa\_default\_timeouts}}[i].\mbox{\hyperlink{structsa__timeout__desc_a8239e7671c2f54ace5920e7583ddeef7}{desc}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02380}02380                 retval = TUNABLE\_INT\_FETCH(tmpstr, \&tmpval);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02381}02381                 \textcolor{keywordflow}{if} (retval != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02382}02382                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[i] = tmpval;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02383}02383         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02384}02384 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02385}02385 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02386}02386 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02387}\mbox{\hyperlink{scsi__sa_8c_ac4b7ae274b9b2c55a88b37f35cc53a09}{02387}} \mbox{\hyperlink{scsi__sa_8c_ac4b7ae274b9b2c55a88b37f35cc53a09}{sasysctlinit}}(\textcolor{keywordtype}{void} *context, \textcolor{keywordtype}{int} pending)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02388}02388 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02389}02389         \textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02390}02390         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02391}02391         \textcolor{keywordtype}{char} tmpstr[64], tmpstr2[16];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02392}02392         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02393}02393 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02394}02394         \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *)context;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02395}02395         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02396}02396 \textcolor{comment}{         * If the periph is invalid, no need to setup the sysctls.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02397}02397 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02398}02398         \textcolor{keywordflow}{if} (periph-\/>\mbox{\hyperlink{structcam__periph_adc175e8331b0d9559b02277232bc8c5a}{flags}} \& \mbox{\hyperlink{cam__periph_8h_a102702353fe3915d10c6d66bf5b643a7}{CAM\_PERIPH\_INVALID}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02399}02399                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02400}02400 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02401}02401         \mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}} = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02402}02402 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02403}02403         snprintf(tmpstr, \textcolor{keyword}{sizeof}(tmpstr), \textcolor{stringliteral}{"{}CAM SA unit \%d"{}}, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02404}02404         snprintf(tmpstr2, \textcolor{keyword}{sizeof}(tmpstr2), \textcolor{stringliteral}{"{}\%u"{}}, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02405}02405 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02406}02406         sysctl\_ctx\_init(\&softc-\/>\mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{sysctl\_ctx}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02407}02407         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a022155c4fea7f618a79540c776800a05}{SA\_FLAG\_SCTX\_INIT}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02408}02408         softc-\/>\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{sysctl\_tree}} = SYSCTL\_ADD\_NODE\_WITH\_LABEL(\&softc-\/>\mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{sysctl\_ctx}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02409}02409             SYSCTL\_STATIC\_CHILDREN(\_kern\_cam\_sa), OID\_AUTO, tmpstr2,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02410}02410             CTLFLAG\_RD | CTLFLAG\_MPSAFE, 0, tmpstr, \textcolor{stringliteral}{"{}device\_index"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02411}02411         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{sysctl\_tree}} == NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02412}02412                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02413}02413 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02414}02414         SYSCTL\_ADD\_INT(\&softc-\/>\mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{sysctl\_ctx}}, SYSCTL\_CHILDREN(softc-\/>\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{sysctl\_tree}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02415}02415             OID\_AUTO, \textcolor{stringliteral}{"{}allow\_io\_split"{}}, CTLFLAG\_RDTUN | CTLFLAG\_NOFETCH, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02416}02416             \&softc-\/>\mbox{\hyperlink{structsa__softc_ab8232ed7ea8c560ac3e476c8bc8f3d43}{allow\_io\_split}}, 0, \textcolor{stringliteral}{"{}Allow Splitting I/O"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02417}02417         SYSCTL\_ADD\_INT(\&softc-\/>\mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{sysctl\_ctx}}, SYSCTL\_CHILDREN(softc-\/>\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{sysctl\_tree}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02418}02418             OID\_AUTO, \textcolor{stringliteral}{"{}maxio"{}}, CTLFLAG\_RD, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02419}02419             \&softc-\/>\mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}}, 0, \textcolor{stringliteral}{"{}Maximum I/O size"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02420}02420         SYSCTL\_ADD\_INT(\&softc-\/>\mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{sysctl\_ctx}}, SYSCTL\_CHILDREN(softc-\/>\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{sysctl\_tree}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02421}02421             OID\_AUTO, \textcolor{stringliteral}{"{}cpi\_maxio"{}}, CTLFLAG\_RD, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02422}02422             \&softc-\/>\mbox{\hyperlink{structsa__softc_a3ca0bd4ab5f25455a370e7501b393e4c}{cpi\_maxio}}, 0, \textcolor{stringliteral}{"{}Maximum Controller I/O size"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02423}02423         SYSCTL\_ADD\_INT(\&softc-\/>\mbox{\hyperlink{structsa__softc_a95f7438a4f6e80689e82284767244807}{sysctl\_ctx}}, SYSCTL\_CHILDREN(softc-\/>\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{sysctl\_tree}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02424}02424             OID\_AUTO, \textcolor{stringliteral}{"{}inject\_eom"{}}, CTLFLAG\_RW, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02425}02425             \&softc-\/>\mbox{\hyperlink{structsa__softc_aac5ff6d65a9d1409ece7cf5c078c53e3}{inject\_eom}}, 0, \textcolor{stringliteral}{"{}Queue EOM for the next write/read"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02426}02426 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02427}02427         sysctl\_ctx\_init(\&softc-\/>\mbox{\hyperlink{structsa__softc_a9dca6a5e153e8ae857724d0c6cc19b60}{sysctl\_timeout\_ctx}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02428}02428         softc-\/>\mbox{\hyperlink{structsa__softc_a5a3d774b8522372fb867cfb47e7762e6}{sysctl\_timeout\_tree}} = SYSCTL\_ADD\_NODE(\&softc-\/>\mbox{\hyperlink{structsa__softc_a9dca6a5e153e8ae857724d0c6cc19b60}{sysctl\_timeout\_ctx}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02429}02429             SYSCTL\_CHILDREN(softc-\/>\mbox{\hyperlink{structsa__softc_a202325ff1ecbc68b4da8c5fa559aaa9c}{sysctl\_tree}}), OID\_AUTO, \textcolor{stringliteral}{"{}timeout"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02430}02430             CTLFLAG\_RD | CTLFLAG\_MPSAFE, 0, \textcolor{stringliteral}{"{}Timeouts"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02431}02431         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5a3d774b8522372fb867cfb47e7762e6}{sysctl\_timeout\_tree}} == NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02432}02432                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02433}02433 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02434}02434         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa5a88dc10ce493c38ca92a8423729ea13}{SA\_TIMEOUT\_TYPE\_MAX}}; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02435}02435                 snprintf(tmpstr, \textcolor{keyword}{sizeof}(tmpstr), \textcolor{stringliteral}{"{}\%s timeout"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02436}02436                     \mbox{\hyperlink{scsi__sa_8c_a84e20ed17b50b493a26123dcde0370d7}{sa\_default\_timeouts}}[i].desc);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02437}02437 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02438}02438                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02439}02439 \textcolor{comment}{                 * Do NOT change this sysctl declaration to also load any}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02440}02440 \textcolor{comment}{                 * tunable values for this sa(4) instance.  In other words,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02441}02441 \textcolor{comment}{                 * do not change this to CTLFLAG\_RWTUN.  This function is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02442}02442 \textcolor{comment}{                 * run in parallel with the probe routine that fetches}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02443}02443 \textcolor{comment}{                 * recommended timeout values from the tape drive, and we}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02444}02444 \textcolor{comment}{                 * don't want the values from the drive to override the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02445}02445 \textcolor{comment}{                 * user's preference.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02446}02446 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02447}02447                 SYSCTL\_ADD\_INT(\&softc-\/>\mbox{\hyperlink{structsa__softc_a9dca6a5e153e8ae857724d0c6cc19b60}{sysctl\_timeout\_ctx}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02448}02448                     SYSCTL\_CHILDREN(softc-\/>\mbox{\hyperlink{structsa__softc_a5a3d774b8522372fb867cfb47e7762e6}{sysctl\_timeout\_tree}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02449}02449                     OID\_AUTO, \mbox{\hyperlink{scsi__sa_8c_a84e20ed17b50b493a26123dcde0370d7}{sa\_default\_timeouts}}[i].\mbox{\hyperlink{structsa__timeout__desc_a8239e7671c2f54ace5920e7583ddeef7}{desc}}, CTLFLAG\_RW, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02450}02450                     \&softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[i], 0, tmpstr);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02451}02451         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02452}02452 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02453}02453 bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02454}02454         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02455}02455 \textcolor{comment}{         * Release the reference that was held when this task was enqueued.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02456}02456 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02457}02457         \mbox{\hyperlink{cam__periph_8c_a7b495eee22da0818e6aec8aa176843b7}{cam\_periph\_release}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02458}02458 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02459}02459 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02460}02460 \textcolor{keyword}{static} \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02461}\mbox{\hyperlink{scsi__sa_8c_a26bea45aafab8f7531664166b38be749}{02461}} \mbox{\hyperlink{scsi__sa_8c_ad6a728a015c101c0dfd73b362c3cd607}{saregister}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02462}02462 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02463}02463         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02464}02464         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdev}{ccb\_getdev}} *cgd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02465}02465         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__pathinq}{ccb\_pathinq}} cpi;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02466}02466         \textcolor{keyword}{struct }make\_dev\_args args;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02467}02467         caddr\_t match;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02468}02468         \textcolor{keywordtype}{char} tmpstr[80];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02469}02469         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02470}02470         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02471}02471 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02472}02472         cgd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdev}{ccb\_getdev}} *)arg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02473}02473         \textcolor{keywordflow}{if} (cgd == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02474}02474                 printf(\textcolor{stringliteral}{"{}saregister: no getdev CCB, can't register device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02475}02475                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02476}02476         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02477}02477 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02478}02478         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02479}02479             malloc(\textcolor{keyword}{sizeof} (*softc), M\_SCSISA, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02480}02480         \textcolor{keywordflow}{if} (softc == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02481}02481                 printf(\textcolor{stringliteral}{"{}saregister: Unable to probe new device. "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02482}02482                        \textcolor{stringliteral}{"{}Unable to allocate softc\(\backslash\)n"{}});                           }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02483}02483                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02484}02484         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02485}02485         softc-\/>\mbox{\hyperlink{structsa__softc_ade608c888502ad91ed1a942fe511e606}{scsi\_rev}} = \mbox{\hyperlink{scsi__all_8h_ac9b7e886c10cab691999047dcdceff27}{SID\_ANSI\_REV}}(\&cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02486}02486         softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}} = \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164aac35c38a1e5bc8b1e9e02507a3fc7a51}{SA\_STATE\_NORMAL}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02487}02487         softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02488}02488         softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02489}02489         softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02490}02490         softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02491}02491         softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02492}02492         softc-\/>\mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{bop}} = -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02493}02493         softc-\/>\mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{eop}} = -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02494}02494         softc-\/>\mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{bpew}} = -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02495}02495 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02496}02496         bioq\_init(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02497}02497         softc-\/>\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}} = \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02498}02498         \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}} = softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02499}02499 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02500}02500         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02501}02501 \textcolor{comment}{         * See if this device has any quirks.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02502}02502 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02503}02503         match = \mbox{\hyperlink{cam_8c_a6ac169c6f650b65a4cd657068ce2b5f4}{cam\_quirkmatch}}((caddr\_t)\&cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02504}02504                                (caddr\_t)\mbox{\hyperlink{scsi__sa_8c_a0da205be93bec4455362ab10b064cbdd}{sa\_quirk\_table}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02505}02505                                nitems(\mbox{\hyperlink{scsi__sa_8c_a0da205be93bec4455362ab10b064cbdd}{sa\_quirk\_table}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02506}02506                                \textcolor{keyword}{sizeof}(*\mbox{\hyperlink{scsi__sa_8c_a0da205be93bec4455362ab10b064cbdd}{sa\_quirk\_table}}), \mbox{\hyperlink{scsi__all_8c_a765ea5977dbf1e1683573baaf3189613}{scsi\_inquiry\_match}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02507}02507 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02508}02508         \textcolor{keywordflow}{if} (match != NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02509}02509                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} = ((\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__quirk__entry}{sa\_quirk\_entry}} *)match)-\/>quirks;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02510}02510                 softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02511}02511                     ((\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__quirk__entry}{sa\_quirk\_entry}} *)match)-\/>prefblk;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02512}02512         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02513}02513                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} = \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a51a6b4da75742265ff1f3e82a388266e}{SA\_QUIRK\_NONE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02514}02514 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02515}02515 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02516}02516         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02517}02517 \textcolor{comment}{         * Initialize the default timeouts.  If this drive supports}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02518}02518 \textcolor{comment}{         * timeout descriptors we'll overwrite these values with the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02519}02519 \textcolor{comment}{         * recommended timeouts from the drive.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02520}02520 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02521}02521         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa5a88dc10ce493c38ca92a8423729ea13}{SA\_TIMEOUT\_TYPE\_MAX}}; i++)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02522}02522                 softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[i] = \mbox{\hyperlink{scsi__sa_8c_a84e20ed17b50b493a26123dcde0370d7}{sa\_default\_timeouts}}[i].\mbox{\hyperlink{structsa__timeout__desc_ade995e1d8ace0142db7a753afd5b8bab}{value}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02523}02523 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02524}02524         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02525}02525 \textcolor{comment}{         * Long format data for READ POSITION was introduced in SSC, which}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02526}02526 \textcolor{comment}{         * was after SCSI-\/2.  (Roughly equivalent to SCSI-\/3.)  If the drive}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02527}02527 \textcolor{comment}{         * reports that it is SCSI-\/2 or older, it is unlikely to support}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02528}02528 \textcolor{comment}{         * long position data, but it might.  Some drives from that era}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02529}02529 \textcolor{comment}{         * claim to be SCSI-\/2, but do support long position information.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02530}02530 \textcolor{comment}{         * So, instead of immediately disabling long position information}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02531}02531 \textcolor{comment}{         * for SCSI-\/2 devices, we'll try one pass through sagetpos(), and }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02532}02532 \textcolor{comment}{         * then disable long position information if we get an error.   }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02533}02533 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02534}02534         if (cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_ae1eb2e33319954898775af8b9eecfac6}{version}} <= \mbox{\hyperlink{scsi__all_8h_a00bb471bc9bf158c02e1ade8d8c635cc}{SCSI\_REV\_CCS}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02535}02535                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202ab5a3af9a4ae56b69e42da1d880f37797}{SA\_QUIRK\_NO\_LONG\_POS}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02536}02536 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02537}02537         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02538}02538 \textcolor{comment}{         * The SCSI REPORT SUPPORTED OPERATION CODES command was added in}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02539}02539 \textcolor{comment}{         * SPC-\/4.  That command optionally includes timeout data for}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02540}02540 \textcolor{comment}{         * different commands.  Timeout values can vary wildly among}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02541}02541 \textcolor{comment}{         * different drives, so if the drive itself has recommended values,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02542}02542 \textcolor{comment}{         * we will try to use them.  Set this flag to indicate we're going}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02543}02543 \textcolor{comment}{         * to ask the drive for timeout data.  This flag also tells us to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02544}02544 \textcolor{comment}{         * wait on loading timeout tunables so we can properly override}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02545}02545 \textcolor{comment}{         * timeouts with any user-\/specified values.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02546}02546 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02547}02547         \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__all_8h_ac9b7e886c10cab691999047dcdceff27}{SID\_ANSI\_REV}}(\&cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}) >= \mbox{\hyperlink{scsi__all_8h_ac12f664ff0bc56e894b1fd11fcad728f}{SCSI\_REV\_SPC4}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02548}02548                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a4984b5393494539b38df7714edcf3151}{SA\_FLAG\_RSOC\_TO\_TRY}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02549}02549 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02550}02550         if (cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_aab54c742e8c6dcf87175497a5d7f2ed0}{spc3\_flags}} \& \mbox{\hyperlink{scsi__all_8h_aac41349c76456466045ab95fdc26538d}{SPC3\_SID\_PROTECT}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02551}02551                 \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__dev__advinfo}{ccb\_dev\_advinfo}} cdai;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02552}02552                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__vpd__extended__inquiry__data}{scsi\_vpd\_extended\_inquiry\_data}} ext\_inq;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02553}02553 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02554}02554                 bzero(\&ext\_inq, \textcolor{keyword}{sizeof}(ext\_inq));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02555}02555 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02556}02556                 memset(\&cdai, 0, \textcolor{keyword}{sizeof}(cdai));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02557}02557                 \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}, periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02558}02558 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02559}02559                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055ca2c75d86cab0c5759920462cc2176ba5c}{XPT\_DEV\_ADVINFO}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02560}02560                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_affc168900cb9c5285561c61f0943c3e3}{flags}} = \mbox{\hyperlink{cam__ccb_8h_ab209104904dd7dc463ca8adf35ccaf89}{CDAI\_FLAG\_NONE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02561}02561                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_a349f9c118cd0310b80635196fe1995f5}{buftype}} = \mbox{\hyperlink{cam__ccb_8h_aa19588b39bf50b624fd6dd797dd7b40a}{CDAI\_TYPE\_EXT\_INQ}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02562}02562                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_afa050eda9092cdf454257eedb612ba3c}{bufsiz}} = \textcolor{keyword}{sizeof}(ext\_inq);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02563}02563                 cdai.\mbox{\hyperlink{structccb__dev__advinfo_a7b8fe8dead2731461b79ca1a5806956f}{buf}} = (uint8\_t *)\&ext\_inq;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02564}02564                 \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}((\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)\&cdai);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02565}02565 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02566}02566                 \textcolor{keywordflow}{if} ((cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3afe5c2fa0edb1c8fea0119515430d223e}{CAM\_DEV\_QFRZN}}) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02567}02567                         \mbox{\hyperlink{cam__periph_8c_a31248ce4d1951e8325b42cf2c309481d}{cam\_release\_devq}}(cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, 0, 0, 0, FALSE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02568}02568                 \textcolor{keywordflow}{if} ((cdai.\mbox{\hyperlink{structccb__dev__advinfo_a051d40fbe8b3713ed1c6dc0e80e713cd}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} == \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02569}02569                  \&\& (ext\_inq.\mbox{\hyperlink{structscsi__vpd__extended__inquiry__data_a91f20a4fa5fd496d53f7478638a5c804}{flags1}} \& \mbox{\hyperlink{scsi__all_8h_a51652750e81b0df7624ef87095da561d}{SVPD\_EID\_SA\_SPT\_LBP}}))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02570}02570                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a203568b61a5d82dc71d5d9bcde7b39ee}{SA\_FLAG\_PROTECT\_SUPP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02571}02571         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02572}02572 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02573}02573         \mbox{\hyperlink{cam__xpt_8h_ae111c3fbe95a53d1bdb2f112d86b929b}{xpt\_path\_inq}}(\&cpi, periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02574}02574 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02575}02575         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02576}02576 \textcolor{comment}{         * The SA driver supports a blocksize, but we don't know the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02577}02577 \textcolor{comment}{         * blocksize until we media is inserted.  So, set a flag to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02578}02578 \textcolor{comment}{         * indicate that the blocksize is unavailable right now.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02579}02579 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02580}02580         \mbox{\hyperlink{cam__periph_8h_a66d8b47f5a566db5a6be4697c17886c7}{cam\_periph\_unlock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02581}02581         softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}} = devstat\_new\_entry(\textcolor{stringliteral}{"{}sa"{}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}, 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02582}02582             DEVSTAT\_BS\_UNAVAILABLE, \mbox{\hyperlink{scsi__all_8h_aaf542baf40a444b689af23b271bfbebd}{SID\_TYPE}}(\&cgd-\/>\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}) |}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02583}02583             \mbox{\hyperlink{cam__ccb_8h_ab208430ee4ee01798ab512f38fc0cc7b}{XPORT\_DEVSTAT\_TYPE}}(cpi.\mbox{\hyperlink{structccb__pathinq_aaef7c0420017996140ae4bdede6a8152}{transport}}), DEVSTAT\_PRIORITY\_TAPE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02584}02584 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02585}02585         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02586}02586 \textcolor{comment}{         * Load the default value that is either compiled in, or loaded }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02587}02587 \textcolor{comment}{         * in the global kern.cam.sa.allow\_io\_split tunable.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02588}02588 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02589}02589         softc-\/>\mbox{\hyperlink{structsa__softc_ab8232ed7ea8c560ac3e476c8bc8f3d43}{allow\_io\_split}} = \mbox{\hyperlink{scsi__sa_8c_a4e108da7a079697b2dcccb2bc4989f3e}{sa\_allow\_io\_split}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02590}02590 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02591}02591         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02592}02592 \textcolor{comment}{         * Load a per-\/instance tunable, if it exists.  NOTE that this}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02593}02593 \textcolor{comment}{         * tunable WILL GO AWAY in FreeBSD 11.0.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02594}02594 \textcolor{comment}{         */} }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02595}02595         snprintf(tmpstr, \textcolor{keyword}{sizeof}(tmpstr), \textcolor{stringliteral}{"{}kern.cam.sa.\%u.allow\_io\_split"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02596}02596                  periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02597}02597         TUNABLE\_INT\_FETCH(tmpstr, \&softc-\/>\mbox{\hyperlink{structsa__softc_ab8232ed7ea8c560ac3e476c8bc8f3d43}{allow\_io\_split}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02598}02598 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02599}02599         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02600}02600 \textcolor{comment}{         * If maxio isn't set, we fall back to DFLTPHYS.  Otherwise we take}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02601}02601 \textcolor{comment}{         * the smaller of cpi.maxio or maxphys.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02602}02602 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02603}02603         \textcolor{keywordflow}{if} (cpi.\mbox{\hyperlink{structccb__pathinq_acafc5a0159d616aaa6b45619619dcc1e}{maxio}} == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02604}02604                 softc-\/>\mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}} = DFLTPHYS;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02605}02605         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (cpi.\mbox{\hyperlink{structccb__pathinq_acafc5a0159d616aaa6b45619619dcc1e}{maxio}} > maxphys)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02606}02606                 softc-\/>\mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}} = maxphys;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02607}02607         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02608}02608                 softc-\/>\mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}} = cpi.\mbox{\hyperlink{structccb__pathinq_acafc5a0159d616aaa6b45619619dcc1e}{maxio}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02609}02609 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02610}02610         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02611}02611 \textcolor{comment}{         * Record the controller's maximum I/O size so we can report it to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02612}02612 \textcolor{comment}{         * the user later.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02613}02613 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02614}02614         softc-\/>\mbox{\hyperlink{structsa__softc_a3ca0bd4ab5f25455a370e7501b393e4c}{cpi\_maxio}} = cpi.\mbox{\hyperlink{structccb__pathinq_acafc5a0159d616aaa6b45619619dcc1e}{maxio}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02615}02615 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02616}02616         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02617}02617 \textcolor{comment}{         * By default we tell physio that we do not want our I/O split.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02618}02618 \textcolor{comment}{         * The user needs to have a 1:1 mapping between the size of his}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02619}02619 \textcolor{comment}{         * write to a tape character device and the size of the write}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02620}02620 \textcolor{comment}{         * that actually goes down to the drive.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02621}02621 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02622}02622         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ab8232ed7ea8c560ac3e476c8bc8f3d43}{allow\_io\_split}} == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02623}02623                 softc-\/>\mbox{\hyperlink{structsa__softc_a3b71e1c5affc6a08db028037589abda9}{si\_flags}} = SI\_NOSPLIT;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02624}02624         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02625}02625                 softc-\/>\mbox{\hyperlink{structsa__softc_a3b71e1c5affc6a08db028037589abda9}{si\_flags}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02626}02626 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02627}02627         TASK\_INIT(\&softc-\/>\mbox{\hyperlink{structsa__softc_ab2a60347163a4a56f57c169751f6e6e8}{sysctl\_task}}, 0, \mbox{\hyperlink{scsi__sa_8c_ac4b7ae274b9b2c55a88b37f35cc53a09}{sasysctlinit}}, periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02628}02628 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02629}02629         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02630}02630 \textcolor{comment}{         * If the SIM supports unmapped I/O, let physio know that we can}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02631}02631 \textcolor{comment}{         * handle unmapped buffers.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02632}02632 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02633}02633         \textcolor{keywordflow}{if} (cpi.\mbox{\hyperlink{structccb__pathinq_a7b48ff4ce816b541a1c06a92bf0a4447}{hba\_misc}} \& \mbox{\hyperlink{cam__ccb_8h_a3c8f3fa68445478749d5dd7dcb4b014ea551da7a48147ae4ee13f38eb73a77f71}{PIM\_UNMAPPED}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02634}02634                 softc-\/>\mbox{\hyperlink{structsa__softc_a3b71e1c5affc6a08db028037589abda9}{si\_flags}} |= SI\_UNMAPPED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02635}02635 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02636}02636         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02637}02637 \textcolor{comment}{         * Acquire a reference to the periph before we create the devfs}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02638}02638 \textcolor{comment}{         * instances for it.  We'll release this reference once the devfs}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02639}02639 \textcolor{comment}{         * instances have been freed.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02640}02640 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02641}02641         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__periph_8c_a5b3dbda06d83cc62f5ba1be9622efa4b}{cam\_periph\_acquire}}(periph) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02642}02642                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}\%s: lost periph during "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02643}02643                           \textcolor{stringliteral}{"{}registration!\(\backslash\)n"{}}, \_\_func\_\_);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02644}02644                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02645}02645                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02646}02646         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02647}02647 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02648}02648         make\_dev\_args\_init(\&args);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02649}02649         args.mda\_devsw = \&\mbox{\hyperlink{scsi__sa_8c_ae06f69356e8eab12146d9d55fae1c156}{sa\_cdevsw}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02650}02650         args.mda\_si\_drv1 = softc-\/>\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02651}02651         args.mda\_uid = UID\_ROOT;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02652}02652         args.mda\_gid = GID\_OPERATOR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02653}02653         args.mda\_mode = 0660;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02654}02654 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02655}02655         args.mda\_unit = \mbox{\hyperlink{scsi__sa_8c_a5e95b49b609882f1044804197d8ab595}{SAMINOR}}(\mbox{\hyperlink{scsi__sa_8c_a4fa7589e3a9dc87943a7d772ed215252}{SA\_CTLDEV}}, \mbox{\hyperlink{scsi__sa_8c_a595d407f04921e478be3c4343b4c2a3a}{SA\_ATYPE\_R}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02656}02656         error = make\_dev\_s(\&args, \&softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_afb75b647df45f16528f33bf30b506046}{ctl\_dev}}, \textcolor{stringliteral}{"{}\%s\%d.ctl"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02657}02657             periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02658}02658         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02659}02659                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02660}02660                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02661}02661         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02662}02662         \mbox{\hyperlink{scsi__sa_8c_a8f974d5ad848a4885f6ec3c3ce18bb71}{sasetupdev}}(softc, softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_afb75b647df45f16528f33bf30b506046}{ctl\_dev}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02663}02663 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02664}02664         args.mda\_unit = \mbox{\hyperlink{scsi__sa_8c_a5e95b49b609882f1044804197d8ab595}{SAMINOR}}(\mbox{\hyperlink{scsi__sa_8c_a14ac2777ba8967be44d9c69446fff6d9}{SA\_NOT\_CTLDEV}}, \mbox{\hyperlink{scsi__sa_8c_a595d407f04921e478be3c4343b4c2a3a}{SA\_ATYPE\_R}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02665}02665         error = make\_dev\_s(\&args, \&softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_a46b0698f8492872a703ad8f463406309}{r\_dev}}, \textcolor{stringliteral}{"{}\%s\%d"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02666}02666             periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02667}02667         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02668}02668                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02669}02669                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02670}02670         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02671}02671         \mbox{\hyperlink{scsi__sa_8c_a8f974d5ad848a4885f6ec3c3ce18bb71}{sasetupdev}}(softc, softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_a46b0698f8492872a703ad8f463406309}{r\_dev}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02672}02672 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02673}02673         args.mda\_unit = \mbox{\hyperlink{scsi__sa_8c_a5e95b49b609882f1044804197d8ab595}{SAMINOR}}(\mbox{\hyperlink{scsi__sa_8c_a14ac2777ba8967be44d9c69446fff6d9}{SA\_NOT\_CTLDEV}}, \mbox{\hyperlink{scsi__sa_8c_aff5a6f0cdfe9458ac237157efca75c1a}{SA\_ATYPE\_NR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02674}02674         error = make\_dev\_s(\&args, \&softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_a5a68aef82f99d6bdc34b05d40b354964}{nr\_dev}}, \textcolor{stringliteral}{"{}n\%s\%d"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02675}02675             periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02676}02676         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02677}02677                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02678}02678                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02679}02679         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02680}02680         \mbox{\hyperlink{scsi__sa_8c_a8f974d5ad848a4885f6ec3c3ce18bb71}{sasetupdev}}(softc, softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_a5a68aef82f99d6bdc34b05d40b354964}{nr\_dev}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02681}02681 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02682}02682         args.mda\_unit = \mbox{\hyperlink{scsi__sa_8c_a5e95b49b609882f1044804197d8ab595}{SAMINOR}}(\mbox{\hyperlink{scsi__sa_8c_a14ac2777ba8967be44d9c69446fff6d9}{SA\_NOT\_CTLDEV}}, \mbox{\hyperlink{scsi__sa_8c_acde881c4e3e5e9e9170f0be55df15d41}{SA\_ATYPE\_ER}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02683}02683         error = make\_dev\_s(\&args, \&softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_af50c2642783ce13089e951681ff4a463}{er\_dev}}, \textcolor{stringliteral}{"{}e\%s\%d"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02684}02684             periph-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, periph-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02685}02685         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02686}02686                 \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02687}02687                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a7c519e8cfabb5fd17f4d518c82c17692}{CAM\_REQ\_CMP\_ERR}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02688}02688         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02689}02689         \mbox{\hyperlink{scsi__sa_8c_a8f974d5ad848a4885f6ec3c3ce18bb71}{sasetupdev}}(softc, softc-\/>\mbox{\hyperlink{structsa__softc_a92eb766689a7a7665e61cbffee3ecf63}{devs}}.\mbox{\hyperlink{structsa__devs_af50c2642783ce13089e951681ff4a463}{er\_dev}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02690}02690 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02691}02691         \mbox{\hyperlink{cam__periph_8h_a1f320a7fdaff6524ad067970fbab4b27}{cam\_periph\_lock}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02692}02692 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02693}02693         softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02694}02694         softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[1] = \mbox{\hyperlink{scsi__sa_8h_ad8abca0b944e3f2f8e54410f73aa96be}{SRDS\_MEDIA}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02695}02695         softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[2] = \mbox{\hyperlink{scsi__sa_8h_ae34f2aa5ee4dc9110ed76c3760871ea1}{SRDS\_MEDIUM\_TYPE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02696}02696         softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[3] = \mbox{\hyperlink{scsi__sa_8h_ae34f2aa5ee4dc9110ed76c3760871ea1}{SRDS\_MEDIUM\_TYPE}} | \mbox{\hyperlink{scsi__sa_8h_ad8abca0b944e3f2f8e54410f73aa96be}{SRDS\_MEDIA}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02697}02697         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02698}02698 \textcolor{comment}{         * Bump the peripheral refcount for the sysctl thread, in case we}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02699}02699 \textcolor{comment}{         * get invalidated before the thread has a chance to run.  Note}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02700}02700 \textcolor{comment}{         * that this runs in parallel with the probe for the timeout}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02701}02701 \textcolor{comment}{         * values.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02702}02702 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02703}02703         \mbox{\hyperlink{cam__periph_8c_a5b3dbda06d83cc62f5ba1be9622efa4b}{cam\_periph\_acquire}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02704}02704         taskqueue\_enqueue(taskqueue\_thread, \&softc-\/>\mbox{\hyperlink{structsa__softc_ab2a60347163a4a56f57c169751f6e6e8}{sysctl\_task}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02705}02705 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02706}02706         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02707}02707 \textcolor{comment}{         * Add an async callback so that we get}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02708}02708 \textcolor{comment}{         * notified if this device goes away.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02709}02709 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02710}02710         \mbox{\hyperlink{cam__xpt_8c_a8307586c12fb4774768a25a1fa4e6388}{xpt\_register\_async}}(\mbox{\hyperlink{cam__ccb_8h_a01187b765c0d47bdbc0776db5c5851f0ac3008f99f93ca1448f9c8705b1653da5}{AC\_LOST\_DEVICE}}, \mbox{\hyperlink{scsi__sa_8c_a4740008a803203b65f8d6efae7637fb2}{saasync}}, periph, periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02711}02711 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02712}02712         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02713}02713 \textcolor{comment}{         * See comment above, try fetching timeout values for drives that}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02714}02714 \textcolor{comment}{         * might support it.  Otherwise, use the defaults.  }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02715}02715 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02716}02716 \textcolor{comment}{         * We get timeouts from the following places in order of increasing}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02717}02717 \textcolor{comment}{         * priority:}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02718}02718 \textcolor{comment}{         * 1. Driver default timeouts.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02719}02719 \textcolor{comment}{         * 2. Timeouts loaded from the drive via REPORT SUPPORTED OPERATION}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02720}02720 \textcolor{comment}{         *    CODES. (We kick that off here if SA\_FLAG\_RSOC\_TO\_TRY is set.)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02721}02721 \textcolor{comment}{         * 3. Global loader tunables, used for all sa(4) driver instances on}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02722}02722 \textcolor{comment}{         *    a machine.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02723}02723 \textcolor{comment}{         * 4. Instance-\/specific loader tunables, used for say sa5.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02724}02724 \textcolor{comment}{         * 5. On the fly user sysctl changes.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02725}02725 \textcolor{comment}{         * }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02726}02726 \textcolor{comment}{         * Each step will overwrite the timeout value set from the one}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02727}02727 \textcolor{comment}{         * before, so you go from general to most specific.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02728}02728 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02729}02729         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a4984b5393494539b38df7714edcf3151}{SA\_FLAG\_RSOC\_TO\_TRY}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02730}02730                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02731}02731 \textcolor{comment}{                 * Bump the peripheral refcount while we are probing.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02732}02732 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02733}02733                 \mbox{\hyperlink{cam__periph_8c_a5b3dbda06d83cc62f5ba1be9622efa4b}{cam\_periph\_acquire}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02734}02734                 softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}} = \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164acdbb91da5e7c2fbefee5bf3a78a35da3}{SA\_STATE\_PROBE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02735}02735                 \mbox{\hyperlink{cam__xpt_8c_a26e646d0732b4acab4667d28f24d026e}{xpt\_schedule}}(periph, \mbox{\hyperlink{cam_8h_ae316ae6e125010c0ca0b3e778aa04bea}{CAM\_PRIORITY\_DEV}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02736}02736         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02737}02737                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02738}02738 \textcolor{comment}{                 * This drive doesn't support Report Supported Operation}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02739}02739 \textcolor{comment}{                 * Codes, so we load the tunables at this point to bring}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02740}02740 \textcolor{comment}{                 * in any user preferences.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02741}02741 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02742}02742                 \mbox{\hyperlink{scsi__sa_8c_a105eff621a7a7c9523607039e3fb5987}{saloadtotunables}}(softc);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02743}02743 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02744}02744                 \mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{xpt\_announce\_periph}}(periph, NULL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02745}02745                 \mbox{\hyperlink{cam__xpt_8c_ae4c51443613933a7cdffc5abbb6c3568}{xpt\_announce\_quirks}}(periph, softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}}, \mbox{\hyperlink{scsi__sa_8c_aeb8d3664dea797826b4fbbce4d106562}{SA\_QUIRK\_BIT\_STRING}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02746}02746         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02747}02747 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02748}02748         \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02749}02749 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02750}02750 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02751}02751 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02752}\mbox{\hyperlink{scsi__sa_8c_a654ad7f0c629af19a03197e1ee8a0717}{02752}} \mbox{\hyperlink{scsi__sa_8c_adf05b5bd96cc0f3b4386ad5d4542d6c6}{sastart}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *start\_ccb)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02753}02753 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02754}02754         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02755}02755 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02756}02756         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02757}02757 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02758}02758         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369a079361ad1b93ba7c851ca5ca4762ecd1}{CAM\_DEBUG\_TRACE}}, (\textcolor{stringliteral}{"{}sastart\(\backslash\)n"{}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02759}02759 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02760}02760         \textcolor{keywordflow}{switch} (softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02761}02761         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164aac35c38a1e5bc8b1e9e02507a3fc7a51}{SA\_STATE\_NORMAL}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02762}02762         \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02763}02763                 \textcolor{comment}{/* Pull a buffer from the queue and get going on it */}          }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02764}02764                 \textcolor{keyword}{struct }bio *bp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02765}02765 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02766}02766                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02767}02767 \textcolor{comment}{                 * See if there is a buf with work for us to do..}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02768}02768 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02769}02769                 bp = bioq\_first(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02770}02770                 \textcolor{keywordflow}{if} (bp == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02771}02771                         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(start\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02772}02772                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9595047edf1771cd6fb3a805ec85c7be}{SA\_FLAG\_ERR\_PENDING}}) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02773}02773                         || (softc-\/>\mbox{\hyperlink{structsa__softc_aac5ff6d65a9d1409ece7cf5c078c53e3}{inject\_eom}} != 0)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02774}02774                         \textcolor{keyword}{struct }bio *done\_bp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02775}02775 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02776}02776                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aac5ff6d65a9d1409ece7cf5c078c53e3}{inject\_eom}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02777}02777                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9af1db72dd19793d88e611acdd7f842352}{SA\_FLAG\_EOM\_PENDING}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02778}02778                                 softc-\/>\mbox{\hyperlink{structsa__softc_aac5ff6d65a9d1409ece7cf5c078c53e3}{inject\_eom}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02779}02779                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02780}02780 \textcolor{comment}{                                 * If we're injecting EOM for writes, we}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02781}02781 \textcolor{comment}{                                 * need to keep PEWS set for 3 queries}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02782}02782 \textcolor{comment}{                                 * to cover 2 position requests from the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02783}02783 \textcolor{comment}{                                 * kernel via sagetpos(), and then allow}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02784}02784 \textcolor{comment}{                                 * for one for the user to see the BPEW}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02785}02785 \textcolor{comment}{                                 * flag (e.g. via mt status).  After that,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02786}02786 \textcolor{comment}{                                 * it will be cleared.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02787}02787 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02788}02788                                 \textcolor{keywordflow}{if} (bp-\/>bio\_cmd == BIO\_WRITE)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02789}02789                                         softc-\/>\mbox{\hyperlink{structsa__softc_aca2db39888e756409e8fafacb7878625}{set\_pews\_status}} = 3;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02790}02790                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02791}02791                                         softc-\/>\mbox{\hyperlink{structsa__softc_aca2db39888e756409e8fafacb7878625}{set\_pews\_status}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02792}02792                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02793}02793 again:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02794}02794                         softc-\/>\mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{queue\_count}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02795}02795                         bioq\_remove(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}}, bp);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02796}02796                         bp-\/>bio\_resid = bp-\/>bio\_bcount;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02797}02797                         done\_bp = bp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02798}02798                         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9af1db72dd19793d88e611acdd7f842352}{SA\_FLAG\_EOM\_PENDING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02799}02799                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02800}02800 \textcolor{comment}{                                 * We have two different behaviors for}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02801}02801 \textcolor{comment}{                                 * writes when we hit either Early Warning}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02802}02802 \textcolor{comment}{                                 * or the PEWZ (Programmable Early Warning}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02803}02803 \textcolor{comment}{                                 * Zone).  The default behavior is that}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02804}02804 \textcolor{comment}{                                 * for all writes that are currently}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02805}02805 \textcolor{comment}{                                 * queued after the write where we saw the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02806}02806 \textcolor{comment}{                                 * early warning, we will return the write}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02807}02807 \textcolor{comment}{                                 * with the residual equal to the count.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02808}02808 \textcolor{comment}{                                 * i.e. tell the application that 0 bytes}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02809}02809 \textcolor{comment}{                                 * were written.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02810}02810 \textcolor{comment}{                                 * }}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02811}02811 \textcolor{comment}{                                 * The alternate behavior, which is enabled}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02812}02812 \textcolor{comment}{                                 * when eot\_warn is set, is that in}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02813}02813 \textcolor{comment}{                                 * addition to setting the residual equal}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02814}02814 \textcolor{comment}{                                 * to the count, we will set the error}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02815}02815 \textcolor{comment}{                                 * to ENOSPC.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02816}02816 \textcolor{comment}{                                 *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02817}02817 \textcolor{comment}{                                 * In either case, once queued writes are}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02818}02818 \textcolor{comment}{                                 * cleared out, we clear the error flag}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02819}02819 \textcolor{comment}{                                 * (see below) and the application is free to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02820}02820 \textcolor{comment}{                                 * attempt to write more.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02821}02821 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02822}02822                                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a292c4a327681ab5aa5dd89257d824eeb}{eot\_warn}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02823}02823                                         bp-\/>bio\_flags |= BIO\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02824}02824                                         bp-\/>bio\_error = ENOSPC;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02825}02825                                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02826}02826                                         bp-\/>bio\_error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02827}02827                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9330f4ca7f1d6bd6499a6a77a60ea385}{SA\_FLAG\_EOF\_PENDING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02828}02828                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02829}02829 \textcolor{comment}{                                 * This can only happen if we're reading}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02830}02830 \textcolor{comment}{                                 * in fixed length mode. In this case,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02831}02831 \textcolor{comment}{                                 * we dump the rest of the list the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02832}02832 \textcolor{comment}{                                 * same way.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02833}02833 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02834}02834                                 bp-\/>bio\_error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02835}02835                                 \textcolor{keywordflow}{if} (bioq\_first(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}}) != NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02836}02836                                         biodone(done\_bp);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02837}02837                                         \textcolor{keywordflow}{goto} again;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02838}02838                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02839}02839                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a3b5f8b7ae50c7b097d4badf16d867640}{SA\_FLAG\_EIO\_PENDING}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02840}02840                                 bp-\/>bio\_error = EIO;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02841}02841                                 bp-\/>bio\_flags |= BIO\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02842}02842                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02843}02843                         bp = bioq\_first(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02844}02844                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02845}02845 \textcolor{comment}{                         * Only if we have no other buffers queued up}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02846}02846 \textcolor{comment}{                         * do we clear the pending error flag.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02847}02847 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02848}02848                         \textcolor{keywordflow}{if} (bp == NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02849}02849                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_ERR\_PENDING;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02850}02850                         \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02851}02851                             (\textcolor{stringliteral}{"{}sastart-\/ ERR\_PENDING now 0x\%x, bp is \%sNULL, "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02852}02852                             \textcolor{stringliteral}{"{}\%d more buffers queued up\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02853}02853                             (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9595047edf1771cd6fb3a805ec85c7be}{SA\_FLAG\_ERR\_PENDING}}),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02854}02854                             (bp != NULL)? \textcolor{stringliteral}{"{}not "{}} : \textcolor{stringliteral}{"{} "{}}, softc-\/>\mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{queue\_count}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02855}02855                         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(start\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02856}02856                         biodone(done\_bp);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02857}02857                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02858}02858                         u\_int32\_t length;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02859}02859 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02860}02860                         bioq\_remove(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}}, bp);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02861}02861                         softc-\/>\mbox{\hyperlink{structsa__softc_a8f46fda2848756264d1bb06de0932c91}{queue\_count}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02862}02862 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02863}02863                         \textcolor{keywordflow}{if} ((bp-\/>bio\_cmd != BIO\_READ) \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02864}02864                             (bp-\/>bio\_cmd != BIO\_WRITE)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02865}02865                                 biofinish(bp, NULL, EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02866}02866                                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(start\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02867}02867                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02868}02868                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02869}02869                         length = bp-\/>bio\_bcount;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02870}02870 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02871}02871                         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02872}02872                                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02873}02873                                         length = length >> softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02874}02874                                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02875}02875                                         length = length / softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02876}02876                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02877}02877                                         bp-\/>bio\_error = EIO;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02878}02878                                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}zero blocksize"{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02879}02879                                             \textcolor{stringliteral}{"{} for FIXED length writes?\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02880}02880                                         biodone(bp);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02881}02881                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02882}02882                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02883}02883 \textcolor{preprocessor}{\#if     0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02884}02884                                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02885}02885                                     (\textcolor{stringliteral}{"{}issuing a \%d fixed record \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02886}02886                                     length,  (bp-\/>bio\_cmd == BIO\_READ)? \textcolor{stringliteral}{"{}read"{}} :}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02887}02887                                     \textcolor{stringliteral}{"{}write"{}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02888}02888 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02889}02889                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02890}02890 \textcolor{preprocessor}{\#if     0}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02891}02891                                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02892}02892                                     (\textcolor{stringliteral}{"{}issuing a \%d variable byte \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02893}02893                                     length,  (bp-\/>bio\_cmd == BIO\_READ)? \textcolor{stringliteral}{"{}read"{}} :}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02894}02894                                     \textcolor{stringliteral}{"{}write"{}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02895}02895 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02896}02896                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02897}02897                         devstat\_start\_transaction\_bio(softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}}, bp);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02898}02898                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02899}02899 \textcolor{comment}{                         * Some people have theorized that we should}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02900}02900 \textcolor{comment}{                         * suppress illegal length indication if we are}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02901}02901 \textcolor{comment}{                         * running in variable block mode so that we don't}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02902}02902 \textcolor{comment}{                         * have to request sense every time our requested}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02903}02903 \textcolor{comment}{                         * block size is larger than the written block.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02904}02904 \textcolor{comment}{                         * The residual information from the ccb allows}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02905}02905 \textcolor{comment}{                         * us to identify this situation anyway.  The only}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02906}02906 \textcolor{comment}{                         * problem with this is that we will not get}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02907}02907 \textcolor{comment}{                         * information about blocks that are larger than}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02908}02908 \textcolor{comment}{                         * our read buffer unless we set the block size}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02909}02909 \textcolor{comment}{                         * in the mode page to something other than 0.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02910}02910 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02911}02911 \textcolor{comment}{                         * I believe that this is a non-\/issue. If user apps}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02912}02912 \textcolor{comment}{                         * don't adjust their read size to match our record}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02913}02913 \textcolor{comment}{                         * size, that's just life. Anyway, the typical usage}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02914}02914 \textcolor{comment}{                         * would be to issue, e.g., 64KB reads and occasionally}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02915}02915 \textcolor{comment}{                         * have to do deal with 512 byte or 1KB intermediate}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02916}02916 \textcolor{comment}{                         * records.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02917}02917 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02918}02918 \textcolor{comment}{                         * That said, though, we now support setting the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02919}02919 \textcolor{comment}{                         * SILI bit on reads, and we set the blocksize to 4}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02920}02920 \textcolor{comment}{                         * bytes when we do that.  This gives us}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02921}02921 \textcolor{comment}{                         * compatibility with software that wants this,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02922}02922 \textcolor{comment}{                         * although the only real difference between that}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02923}02923 \textcolor{comment}{                         * and not setting the SILI bit on reads is that we}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02924}02924 \textcolor{comment}{                         * won't get a check condition on reads where our}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02925}02925 \textcolor{comment}{                         * request size is larger than the block on tape.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02926}02926 \textcolor{comment}{                         * That probably only makes a real difference in}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02927}02927 \textcolor{comment}{                         * non-\/packetized SCSI, where you have to go back}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02928}02928 \textcolor{comment}{                         * to the drive to request sense and thus incur}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02929}02929 \textcolor{comment}{                         * more latency.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02930}02930 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02931}02931                         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = (bp-\/>bio\_cmd == BIO\_READ)?}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02932}02932                             MTIO\_DSREG\_RD : MTIO\_DSREG\_WR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02933}02933                         \mbox{\hyperlink{scsi__sa_8c_ae9501381f141742a9beb8537b98fc66d}{scsi\_sa\_read\_write}}(\&start\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 0, \mbox{\hyperlink{scsi__sa_8c_a52bf854e66bb2c3c08b1bf64ebb4701c}{sadone}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02934}02934                             \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, (bp-\/>bio\_cmd == BIO\_READ ? }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02935}02935                             \mbox{\hyperlink{scsi__all_8h_a57edcc8f0428356ae9dccb86c323b4dc}{SCSI\_RW\_READ}} : \mbox{\hyperlink{scsi__all_8h_ab2b1533b0ff74f22cc945bfa1b0aa130}{SCSI\_RW\_WRITE}}) |}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02936}02936                             ((bp-\/>bio\_flags \& BIO\_UNMAPPED) != 0 ?}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02937}02937                             \mbox{\hyperlink{scsi__all_8h_a11ab4257f682a1045d94f991ae1cf2e0}{SCSI\_RW\_BIO}} : 0), softc-\/>\mbox{\hyperlink{structsa__softc_a3ce8fd804df275ea1b98922e54296123}{sili}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02938}02938                             (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) != 0, length,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02939}02939                             (bp-\/>bio\_flags \& BIO\_UNMAPPED) != 0 ? (\textcolor{keywordtype}{void} *)bp :}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02940}02940                             bp-\/>bio\_data, bp-\/>bio\_bcount, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02941}02941                             (bp-\/>bio\_cmd == BIO\_READ) ? }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02942}02942                             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa2767ff3c6bbff66f42ed4fb912548a05}{SA\_TIMEOUT\_READ}}] :}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02943}02943                             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa99b6f3c07f19a319106aa47928531547}{SA\_TIMEOUT\_WRITE}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02944}02944                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.ccb\_pflags \&= \string~SA\_POSITION\_UPDATED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02945}02945                         start\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.ccb\_bp = bp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02946}02946                         bp = bioq\_first(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02947}02947                         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}(start\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02948}02948                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02949}02949                 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02950}02950                 \textcolor{keywordflow}{if} (bp != NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02951}02951                         \textcolor{comment}{/* Have more work to do, so ensure we stay scheduled */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02952}02952                         \mbox{\hyperlink{cam__xpt_8c_a26e646d0732b4acab4667d28f24d026e}{xpt\_schedule}}(periph, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02953}02953                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02954}02954                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02955}02955         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02956}02956         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164acdbb91da5e7c2fbefee5bf3a78a35da3}{SA\_STATE\_PROBE}}: \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02957}02957                 \textcolor{keywordtype}{int} num\_opcodes;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02958}02958                 \textcolor{keywordtype}{size\_t} alloc\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02959}02959                 uint8\_t *params;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02960}02960 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02961}02961                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02962}02962 \textcolor{comment}{                 * This is an arbitrary number.  An IBM LTO-\/6 drive reports}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02963}02963 \textcolor{comment}{                 * 67 entries, and an IBM LTO-\/9 drive reports 71 entries.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02964}02964 \textcolor{comment}{                 * There can theoretically be more than 256 because}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02965}02965 \textcolor{comment}{                 * service actions of a particular opcode are reported}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02966}02966 \textcolor{comment}{                 * separately, but we're far enough ahead of the practical}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02967}02967 \textcolor{comment}{                 * number here that we don't need to implement logic to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02968}02968 \textcolor{comment}{                 * retry if we don't get all the timeout descriptors.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02969}02969 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02970}02970                 num\_opcodes = 256;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02971}02971 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02972}02972                 alloc\_len = num\_opcodes *}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02973}02973                     (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__supported__opcodes__descr}{scsi\_report\_supported\_opcodes\_descr}}) +}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02974}02974                      sizeof(struct \mbox{\hyperlink{structscsi__report__supported__opcodes__timeout}{scsi\_report\_supported\_opcodes\_timeout}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02975}02975 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02976}02976                 params = malloc(alloc\_len, M\_SCSISA, M\_NOWAIT| M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02977}02977                 \textcolor{keywordflow}{if} (params == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02978}02978                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02979}02979 \textcolor{comment}{                         * If this happens, go with default}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02980}02980 \textcolor{comment}{                         * timeouts and announce the drive.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02981}02981 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02982}02982                         \mbox{\hyperlink{scsi__sa_8c_a105eff621a7a7c9523607039e3fb5987}{saloadtotunables}}(softc);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02983}02983 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02984}02984                         softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}} = \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164aac35c38a1e5bc8b1e9e02507a3fc7a51}{SA\_STATE\_NORMAL}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02985}02985 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02986}02986                         \mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{xpt\_announce\_periph}}(periph, NULL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02987}02987                         \mbox{\hyperlink{cam__xpt_8c_ae4c51443613933a7cdffc5abbb6c3568}{xpt\_announce\_quirks}}(periph, softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02988}02988                                             \mbox{\hyperlink{scsi__sa_8c_aeb8d3664dea797826b4fbbce4d106562}{SA\_QUIRK\_BIT\_STRING}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02989}02989                         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(start\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02990}02990                         \mbox{\hyperlink{cam__periph_8c_a06741cfe8f484a9dad6f9607a233908c}{cam\_periph\_release\_locked}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02991}02991                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02992}02992                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02993}02993 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02994}02994                 \mbox{\hyperlink{scsi__all_8c_a14652fbee2a50a45b3e77a1971036555}{scsi\_report\_supported\_opcodes}}(\&start\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02995}02995                     \textcolor{comment}{/*retries*/} 3,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02996}02996                     \textcolor{comment}{/*cbfcnp*/} \mbox{\hyperlink{scsi__sa_8c_a52bf854e66bb2c3c08b1bf64ebb4701c}{sadone}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02997}02997                     \textcolor{comment}{/*tag\_action*/} \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02998}02998                     \textcolor{comment}{/*options*/} \mbox{\hyperlink{scsi__all_8h_a2d5c5d1185fa5d196b7635ebeff5357e}{RSO\_RCTD}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l02999}02999                     \textcolor{comment}{/*req\_opcode*/} 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03000}03000                     \textcolor{comment}{/*req\_service\_action*/} 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03001}03001                     \textcolor{comment}{/*data\_ptr*/} params,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03002}03002                     \textcolor{comment}{/*dxfer\_len*/} alloc\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03003}03003                     \textcolor{comment}{/*sense\_len*/} \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03004}03004                     \textcolor{comment}{/*timeout*/} softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa72385ad9a41511dc7597602972f4e68}{SA\_TIMEOUT\_TUR}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03005}03005 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03006}03006                 \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}(start\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03007}03007                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03008}03008         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03009}03009         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164ad460142169adbb8b3d2c74adfe9b3fd0}{SA\_STATE\_ABNORMAL}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03010}03010         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03011}03011                 panic(\textcolor{stringliteral}{"{}state 0x\%x in sastart"{}}, softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03012}03012                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03013}03013         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03014}03014 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03015}03015 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03016}03016 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03017}\mbox{\hyperlink{scsi__sa_8c_a52bf854e66bb2c3c08b1bf64ebb4701c}{03017}} \mbox{\hyperlink{scsi__sa_8c_a52bf854e66bb2c3c08b1bf64ebb4701c}{sadone}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *done\_ccb)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03018}03018 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03019}03019         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03020}03020         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03021}03021         \textcolor{keyword}{struct }bio *bp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03022}03022         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03023}03023 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03024}03024         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03025}03025         csio = \&done\_ccb-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03026}03026         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03027}03027 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03028}03028         if (softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}} == \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164aac35c38a1e5bc8b1e9e02507a3fc7a51}{SA\_STATE\_NORMAL}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03029}03029                 softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03030}03030                 bp = (\textcolor{keyword}{struct }bio *)done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.ccb\_bp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03031}03031 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03032}03032                 if ((done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}}) != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03033}03033                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}(done\_ccb, 0, 0)) == ERESTART) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03034}03034                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03035}03035 \textcolor{comment}{                                 * A retry was scheduled, so just return.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03036}03036 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03037}03037                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03038}03038                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03039}03039                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03040}03040         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}} == \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164acdbb91da5e7c2fbefee5bf3a78a35da3}{SA\_STATE\_PROBE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03041}03041                 bp = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03042}03042                 \textcolor{keywordflow}{if} ((done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}}) != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03043}03043                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03044}03044 \textcolor{comment}{                         * Note that on probe, we just run through}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03045}03045 \textcolor{comment}{                         * cam\_periph\_error(), since saerror() has a lot of}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03046}03046 \textcolor{comment}{                         * special handling for I/O errors.  We don't need}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03047}03047 \textcolor{comment}{                         * that to get the opcodes.  We either succeed}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03048}03048 \textcolor{comment}{                         * after a retry or two, or give up.  We don't}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03049}03049 \textcolor{comment}{                         * print sense, we don't need to worry the user if}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03050}03050 \textcolor{comment}{                         * this drive doesn't support timeout descriptors.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03051}03051 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03052}03052                         \textcolor{keywordflow}{if} ((error = \mbox{\hyperlink{cam__periph_8c_ac2010c1d05ec8dff4d1c03f3ec0be8c4}{cam\_periph\_error}}(done\_ccb, 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03053}03053                              \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}})) == ERESTART) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03054}03054                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03055}03055 \textcolor{comment}{                                 * A retry was scheduled, so just return.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03056}03056 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03057}03057                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03058}03058                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03059}03059                                 \textcolor{comment}{/* We failed to get opcodes.  Give up. */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03060}03060 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03061}03061                                 \mbox{\hyperlink{scsi__sa_8c_a105eff621a7a7c9523607039e3fb5987}{saloadtotunables}}(softc);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03062}03062 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03063}03063                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}} = \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164aac35c38a1e5bc8b1e9e02507a3fc7a51}{SA\_STATE\_NORMAL}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03064}03064 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03065}03065                                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(done\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03066}03066 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03067}03067                                 \mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{xpt\_announce\_periph}}(periph, NULL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03068}03068                                 \mbox{\hyperlink{cam__xpt_8c_ae4c51443613933a7cdffc5abbb6c3568}{xpt\_announce\_quirks}}(periph, softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03069}03069                                                     \mbox{\hyperlink{scsi__sa_8c_aeb8d3664dea797826b4fbbce4d106562}{SA\_QUIRK\_BIT\_STRING}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03070}03070                                 \mbox{\hyperlink{cam__periph_8c_a06741cfe8f484a9dad6f9607a233908c}{cam\_periph\_release\_locked}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03071}03071                                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03072}03072                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03073}03073                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03074}03074                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03075}03075 \textcolor{comment}{                 * At this point, we have succeeded, so load the timeouts}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03076}03076 \textcolor{comment}{                 * and go into the normal state.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03077}03077 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03078}03078                 softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}} = \mbox{\hyperlink{scsi__sa_8c_a9eb62e6f5764b69210dd0c60d7481164aac35c38a1e5bc8b1e9e02507a3fc7a51}{SA\_STATE\_NORMAL}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03079}03079 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03080}03080                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03081}03081 \textcolor{comment}{                 * First, load the timeouts we got from the drive.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03082}03082 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03083}03083                 \mbox{\hyperlink{scsi__sa_8c_a4ab3be090922f004a07ed9190cd8be1b}{saloadtimeouts}}(softc, done\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03084}03084 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03085}03085                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03086}03086 \textcolor{comment}{                 * Next, overwrite the timeouts from the drive with any}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03087}03087 \textcolor{comment}{                 * loader tunables that the user set.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03088}03088 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03089}03089                 \mbox{\hyperlink{scsi__sa_8c_a105eff621a7a7c9523607039e3fb5987}{saloadtotunables}}(softc);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03090}03090 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03091}03091                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(done\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03092}03092                 \mbox{\hyperlink{cam__xpt_8c_a62eab2d96b6a86a325df1d826c201746}{xpt\_announce\_periph}}(periph, NULL);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03093}03093                 \mbox{\hyperlink{cam__xpt_8c_ae4c51443613933a7cdffc5abbb6c3568}{xpt\_announce\_quirks}}(periph, softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03094}03094                                     \mbox{\hyperlink{scsi__sa_8c_aeb8d3664dea797826b4fbbce4d106562}{SA\_QUIRK\_BIT\_STRING}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03095}03095                 \mbox{\hyperlink{cam__periph_8c_a06741cfe8f484a9dad6f9607a233908c}{cam\_periph\_release\_locked}}(periph);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03096}03096                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03097}03097         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03098}03098                 panic(\textcolor{stringliteral}{"{}state 0x\%x in sadone"{}}, softc-\/>\mbox{\hyperlink{structsa__softc_a5c2991a2af7d052e2bb4565c1db8241f}{state}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03099}03099         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03100}03100 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03101}03101         \textcolor{keywordflow}{if} (error == EIO) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03102}03102                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03103}03103 \textcolor{comment}{                 * Catastrophic error. Mark the tape as frozen}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03104}03104 \textcolor{comment}{                 * (we no longer know tape position).}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03105}03105 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03106}03106 \textcolor{comment}{                 * Return all queued I/O with EIO, and unfreeze}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03107}03107 \textcolor{comment}{                 * our queue so that future transactions that}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03108}03108 \textcolor{comment}{                 * attempt to fix this problem can get to the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03109}03109 \textcolor{comment}{                 * device.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03110}03110 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03111}03111 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03112}03112 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03113}03113                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5f0148e39c8ba262675b99065f2a4b30}{SA\_FLAG\_TAPE\_FROZEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03114}03114                 bioq\_flush(\&softc-\/>\mbox{\hyperlink{structsa__softc_af128c54c37a2b694219a2e9c167b5461}{bio\_queue}}, NULL, EIO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03115}03115         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03116}03116         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03117}03117                 bp-\/>bio\_resid = bp-\/>bio\_bcount;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03118}03118                 bp-\/>bio\_error = error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03119}03119                 bp-\/>bio\_flags |= BIO\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03120}03120                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03121}03121 \textcolor{comment}{                 * In the error case, position is updated in saerror.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03122}03122 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03123}03123         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03124}03124                 bp-\/>bio\_resid = csio-\/>\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03125}03125                 bp-\/>bio\_error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03126}03126                 \textcolor{keywordflow}{if} (csio-\/>\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03127}03127                         bp-\/>bio\_flags |= BIO\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03128}03128                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03129}03129                 \textcolor{keywordflow}{if} (bp-\/>bio\_cmd == BIO\_WRITE) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03130}03130                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03131}03131                         softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03132}03132                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03133}03133                 \textcolor{keywordflow}{if} (!(csio-\/>\mbox{\hyperlink{structccb__scsiio_a267ba491b17e3e5820fdf56425a635b1}{ccb\_h}}.ccb\_pflags \& \mbox{\hyperlink{scsi__sa_8c_ade5ad1160849d3d66129903d4dd5934a}{SA\_POSITION\_UPDATED}}) \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03134}03134                     (softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} != (daddr\_t) -\/1)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03135}03135                         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03136}03136                                 u\_int32\_t l;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03137}03137                                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03138}03138                                         l = bp-\/>bio\_bcount >>}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03139}03139                                                 softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03140}03140                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03141}03141                                         l = bp-\/>bio\_bcount /}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03142}03142                                                 softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03143}03143                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03144}03144                                 softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} += (daddr\_t) l;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03145}03145                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03146}03146                                 softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}}++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03147}03147                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03148}03148                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03149}03149         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03150}03150         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03151}03151 \textcolor{comment}{         * If we had an error (immediate or pending),}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03152}03152 \textcolor{comment}{         * release the device queue now.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03153}03153 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03154}03154         \textcolor{keywordflow}{if} (error || (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9595047edf1771cd6fb3a805ec85c7be}{SA\_FLAG\_ERR\_PENDING}}))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03155}03155                 \mbox{\hyperlink{cam__periph_8c_a31248ce4d1951e8325b42cf2c309481d}{cam\_release\_devq}}(done\_ccb-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, 0, 0, 0, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03156}03156         \textcolor{keywordflow}{if} (error || bp-\/>bio\_resid) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03157}03157                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03158}03158                           (\textcolor{stringliteral}{"{}error \%d resid \%ld count \%ld\(\backslash\)n"{}}, error,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03159}03159                           bp-\/>bio\_resid, bp-\/>bio\_bcount));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03160}03160         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03161}03161         biofinish(bp, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}}, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03162}03162         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(done\_ccb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03163}03163 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03164}03164 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03165}03165 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03166}03166 \textcolor{comment}{ * Mount the tape (make sure it's ready for I/O).}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03167}03167 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03168}03168 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03169}\mbox{\hyperlink{scsi__sa_8c_aecf3693b6283d4d0697d7528539d218e}{03169}} \mbox{\hyperlink{scsi__sa_8c_aecf3693b6283d4d0697d7528539d218e}{samount}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keywordtype}{int} oflags, \textcolor{keyword}{struct} cdev *dev)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03170}03170 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03171}03171         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03172}03172         \textcolor{keyword}{union   }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03173}03173         \textcolor{keywordtype}{int}     error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03174}03174 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03175}03175         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03176}03176 \textcolor{comment}{         * oflags can be checked for 'kind' of open (read-\/only check) -\/ later}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03177}03177 \textcolor{comment}{         * dev can be checked for a control-\/mode or compression open -\/ later}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03178}03178 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03179}03179         \mbox{\hyperlink{scsi__sa_8c_a3c95a90e7806e4b0d21edfae15b73465}{UNUSED\_PARAMETER}}(oflags);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03180}03180         \mbox{\hyperlink{scsi__sa_8c_a3c95a90e7806e4b0d21edfae15b73465}{UNUSED\_PARAMETER}}(dev);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03181}03181 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03182}03182         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03183}03183 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03184}03184         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03185}03185 \textcolor{comment}{         * This should determine if something has happened since the last}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03186}03186 \textcolor{comment}{         * open/mount that would invalidate the mount. We do *not* want}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03187}03187 \textcolor{comment}{         * to retry this command-\/ we just want the status. But we only}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03188}03188 \textcolor{comment}{         * do this if we're mounted already-\/ if we're not mounted,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03189}03189 \textcolor{comment}{         * we don't care about the unit read state and can instead use}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03190}03190 \textcolor{comment}{         * this opportunity to attempt to reserve the tape unit.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03191}03191 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03192}03192 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03193}03193         if (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a024900590c1c65352f43e7fea7b1d3be}{SA\_FLAG\_TAPE\_MOUNTED}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03194}03194                 \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03195}03195                 \mbox{\hyperlink{scsi__all_8c_ad3d85bbe7cad765589e3d82a10729bc1}{scsi\_test\_unit\_ready}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 0, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03196}03196                     \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03197}03197                     softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa72385ad9a41511dc7597602972f4e68}{SA\_TIMEOUT\_TUR}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03198}03198                 error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03199}03199                     softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03200}03200                 \textcolor{keywordflow}{if} (error == ENXIO) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03201}03201                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_MOUNTED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03202}03202                         \mbox{\hyperlink{scsi__all_8c_ad3d85bbe7cad765589e3d82a10729bc1}{scsi\_test\_unit\_ready}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 0, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03203}03203                             \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03204}03204                             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa72385ad9a41511dc7597602972f4e68}{SA\_TIMEOUT\_TUR}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03205}03205                         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03206}03206                             softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03207}03207                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03208}03208                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03209}03209 \textcolor{comment}{                         * We don't need to freeze the tape because we}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03210}03210 \textcolor{comment}{                         * will now attempt to rewind/load it.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03211}03211 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03212}03212                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_MOUNTED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03213}03213                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__debug_8h_af17c6332916d08ae2b1c32630203d4ab}{CAM\_DEBUGGED}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03214}03214                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03215}03215                                     \textcolor{stringliteral}{"{}error \%d on TUR in samount\(\backslash\)n"{}}, error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03216}03216                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03217}03217                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03218}03218         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03219}03219                 error = \mbox{\hyperlink{scsi__sa_8c_af35686132783c8995ee39b341123ac67}{sareservereleaseunit}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, TRUE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03220}03220                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03221}03221                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03222}03222                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03223}03223                 \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03224}03224                 \mbox{\hyperlink{scsi__all_8c_ad3d85bbe7cad765589e3d82a10729bc1}{scsi\_test\_unit\_ready}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 0, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03225}03225                     \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03226}03226                     softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa72385ad9a41511dc7597602972f4e68}{SA\_TIMEOUT\_TUR}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03227}03227                 error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03228}03228                     softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03229}03229         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03230}03230 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03231}03231         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a024900590c1c65352f43e7fea7b1d3be}{SA\_FLAG\_TAPE\_MOUNTED}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03232}03232                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__read__block__limits__data}{scsi\_read\_block\_limits\_data}} *rblim = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03233}03233                 \textcolor{keywordtype}{int} comp\_enabled, comp\_supported;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03234}03234                 u\_int8\_t write\_protect, guessing = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03235}03235 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03236}03236                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03237}03237 \textcolor{comment}{                 * Clear out old state.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03238}03238 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03239}03239                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~(\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9663bda7bedb689a352d84a9fbf73cfc}{SA\_FLAG\_TAPE\_WP}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}|}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03240}03240                                   \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9595047edf1771cd6fb3a805ec85c7be}{SA\_FLAG\_ERR\_PENDING}}|\mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9ac55b3e338fbce4838f7ffc84556c989f}{SA\_FLAG\_COMPRESSION}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03241}03241                 softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03242}03242 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03243}03243                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03244}03244 \textcolor{comment}{                 * *Very* first off, make sure we're loaded to BOT.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03245}03245 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03246}03246                 \mbox{\hyperlink{scsi__sa_8c_a73cc74c54b8a76d621c61094d408c5f2}{scsi\_load\_unload}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 2, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, FALSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03247}03247                     FALSE, FALSE, 1, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03248}03248                     softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf245bc20d18ac336973056deb6138a77}{SA\_TIMEOUT\_LOAD}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03249}03249                 error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03250}03250                     softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03251}03251 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03252}03252                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03253}03253 \textcolor{comment}{                 * In case this doesn't work, do a REWIND instead}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03254}03254 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03255}03255                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03256}03256                         \mbox{\hyperlink{scsi__sa_8c_a410069d2a8f247757a67ab2f3ca2976f}{scsi\_rewind}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 2, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03257}03257                             FALSE, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03258}03258                             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf648f06bfa840eb39e1ed420e9f2506a}{SA\_TIMEOUT\_REWIND}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03259}03259                         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03260}03260                                 softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03261}03261                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03262}03262                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03263}03263                         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03264}03264                         \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03265}03265                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03266}03266 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03267}03267                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03268}03268 \textcolor{comment}{                 * Do a dummy test read to force access to the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03269}03269 \textcolor{comment}{                 * media so that the drive will really know what's}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03270}03270 \textcolor{comment}{                 * there. We actually don't really care what the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03271}03271 \textcolor{comment}{                 * blocksize on tape is and don't expect to really}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03272}03272 \textcolor{comment}{                 * read a full record.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03273}03273 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03274}03274                 rblim = (\textcolor{keyword}{struct  }\mbox{\hyperlink{structscsi__read__block__limits__data}{scsi\_read\_block\_limits\_data}} *)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03275}03275                     malloc(8192, M\_SCSISA, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03276}03276                 \textcolor{keywordflow}{if} (rblim == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03277}03277                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}no memory for test read\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03278}03278                         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03279}03279                         error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03280}03280                         \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03281}03281                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03282}03282 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03283}03283                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a0c25fd54cec9e1586015e989e65f6990}{SA\_QUIRK\_NODREAD}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03284}03284                         \mbox{\hyperlink{scsi__sa_8c_ae9501381f141742a9beb8537b98fc66d}{scsi\_sa\_read\_write}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 0, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03285}03285                             \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, 1, FALSE, 0, 8192,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03286}03286                             (\textcolor{keywordtype}{void} *) rblim, 8192, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03287}03287                             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa2767ff3c6bbff66f42ed4fb912548a05}{SA\_TIMEOUT\_READ}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03288}03288                         (void) \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03289}03289                             softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03290}03290                         \mbox{\hyperlink{scsi__sa_8c_a410069d2a8f247757a67ab2f3ca2976f}{scsi\_rewind}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 1, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03291}03291                             FALSE, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03292}03292                             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf648f06bfa840eb39e1ed420e9f2506a}{SA\_TIMEOUT\_REWIND}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03293}03293                         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, \mbox{\hyperlink{cam_8h_a14bf0cceb256c2063f776e6cc4aba316a22ee721e6ada9c8fb4a4697789d5246f}{CAM\_RETRY\_SELTO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03294}03294                             \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}} | \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55ba323bacc6659dffecaffcd935f98954a5}{SF\_RETRY\_UA}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03295}03295                             softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03296}03296                         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03297}03297                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03298}03298                                     \textcolor{stringliteral}{"{}unable to rewind after test read\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03299}03299                                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03300}03300                                 \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03301}03301                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03302}03302                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03303}03303 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03304}03304                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03305}03305 \textcolor{comment}{                 * Next off, determine block limits.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03306}03306 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03307}03307                 \mbox{\hyperlink{scsi__sa_8c_a31ad8bef747646fa0d53417539481827}{scsi\_read\_block\_limits}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 5, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03308}03308                     rblim, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03309}03309                     softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa0eff19af7fbb7a63e527ec6889c3fbfc}{SA\_TIMEOUT\_READ\_BLOCK\_LIMITS}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03310}03310 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03311}03311                 error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, \mbox{\hyperlink{cam_8h_a14bf0cceb256c2063f776e6cc4aba316a22ee721e6ada9c8fb4a4697789d5246f}{CAM\_RETRY\_SELTO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03312}03312                     \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}} | \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55ba323bacc6659dffecaffcd935f98954a5}{SF\_RETRY\_UA}}, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03313}03313 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03314}03314                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03315}03315 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03316}03316                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03317}03317                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03318}03318 \textcolor{comment}{                         * If it's less than SCSI-\/2, READ BLOCK LIMITS is not}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03319}03319 \textcolor{comment}{                         * a MANDATORY command. Anyway-\/ it doesn't matter-\/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03320}03320 \textcolor{comment}{                         * we can proceed anyway.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03321}03321 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03322}03322                         softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03323}03323                         softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}} = \string~0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03324}03324                         softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03325}03325                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03326}03326                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ade608c888502ad91ed1a942fe511e606}{scsi\_rev}} >= \mbox{\hyperlink{scsi__all_8h_a4ca74e45eb903450c0ffe2f95e447c6d}{SCSI\_REV\_SPC}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03327}03327                                 softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}} = \mbox{\hyperlink{scsi__sa_8h_ac3c3df762d0f5dad37cc769be20c48f0}{RBL\_GRAN}}(rblim);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03328}03328                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03329}03329                                 softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03330}03330                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03331}03331                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03332}03332 \textcolor{comment}{                         * We take max\_blk == min\_blk to mean a default to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03333}03333 \textcolor{comment}{                         * fixed mode-\/ but note that whatever we get out of}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03334}03334 \textcolor{comment}{                         * sagetparams below will actually determine whether}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03335}03335 \textcolor{comment}{                         * we are actually *in* fixed mode.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03336}03336 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03337}03337                         softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}} = \mbox{\hyperlink{scsi__all_8h_a3320d56b7bc675e8f20399c14e09a574}{scsi\_3btoul}}(rblim-\/>\mbox{\hyperlink{structscsi__read__block__limits__data_a1d56eb397d3abec2b7308b1c130f69aa}{maximum}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03338}03338                         softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}} = \mbox{\hyperlink{scsi__all_8h_a3bed0f6b9b74c170a3356b4263830a34}{scsi\_2btoul}}(rblim-\/>\mbox{\hyperlink{structscsi__read__block__limits__data_a7fcbce87e7833beee56e4009cf090b26}{minimum}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03339}03339                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03340}03340                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03341}03341 \textcolor{comment}{                 * Next, perform a mode sense to determine}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03342}03342 \textcolor{comment}{                 * current density, blocksize, compression etc.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03343}03343 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03344}03344                 error = \mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{sagetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a0e5a4b0c599d3592a714401f04d5afa4}{SA\_PARAM\_ALL}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03345}03345                                     \&softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03346}03346                                     \&softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03347}03347                                     \&softc-\/>\mbox{\hyperlink{structsa__softc_ad52880fc604ee916d38a1558d54cae97}{media\_numblks}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03348}03348                                     \&softc-\/>\mbox{\hyperlink{structsa__softc_a99d1aec7cacf18491280fc264fcacf89}{buffer\_mode}}, \&write\_protect,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03349}03349                                     \&softc-\/>\mbox{\hyperlink{structsa__softc_a6586a25f6e27e356c53405f36d8082b7}{speed}}, \&comp\_supported,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03350}03350                                     \&comp\_enabled, \&softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03351}03351                                     NULL, NULL, 0, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03352}03352 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03353}03353                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03354}03354                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03355}03355 \textcolor{comment}{                         * We could work a little harder here. We could}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03356}03356 \textcolor{comment}{                         * adjust our attempts to get information. It}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03357}03357 \textcolor{comment}{                         * might be an ancient tape drive. If someone}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03358}03358 \textcolor{comment}{                         * nudges us, we'll do that.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03359}03359 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03360}03360                         \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03361}03361                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03362}03362 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03363}03363                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03364}03364 \textcolor{comment}{                 * If no quirk has determined that this is a device that is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03365}03365 \textcolor{comment}{                 * preferred to be in fixed or variable mode, now is the time}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03366}03366 \textcolor{comment}{                 * to find out.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03367}03367 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03368}03368                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& (\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}})) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03369}03369                         guessing = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03370}03370                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03371}03371 \textcolor{comment}{                         * This could be expensive to find out. Luckily we}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03372}03372 \textcolor{comment}{                         * only need to do this once. If we start out in}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03373}03373 \textcolor{comment}{                         * 'default' mode, try and set ourselves to one}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03374}03374 \textcolor{comment}{                         * of the densities that would determine a wad}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03375}03375 \textcolor{comment}{                         * of other stuff. Go from highest to lowest.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03376}03376 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03377}03377                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}} == \mbox{\hyperlink{scsi__all_8h_a912bb2311d1a4a1fa238e267d5c750b4}{SCSI\_DEFAULT\_DENSITY}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03378}03378                                 \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03379}03379                                 \textcolor{keyword}{static} u\_int8\_t ctry[] = \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03380}03380                                         \mbox{\hyperlink{scsi__sa_8h_a17db817dd3d6629274e31184cfd233cc}{SCSI\_DENSITY\_HALFINCH\_PE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03381}03381                                         \mbox{\hyperlink{scsi__sa_8h_ab46ac576c16c7f283b58be738143ccf3}{SCSI\_DENSITY\_HALFINCH\_6250C}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03382}03382                                         \mbox{\hyperlink{scsi__sa_8h_aa7a33143e49923d92e2124eb8adeb83f}{SCSI\_DENSITY\_HALFINCH\_6250}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03383}03383                                         \mbox{\hyperlink{scsi__sa_8h_a5714a5e48de3e46b0ededff1dae31db8}{SCSI\_DENSITY\_HALFINCH\_1600}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03384}03384                                         \mbox{\hyperlink{scsi__sa_8h_a29f66861cd40911e6057778788a87f97}{SCSI\_DENSITY\_HALFINCH\_800}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03385}03385                                         \mbox{\hyperlink{scsi__sa_8h_a763c16e175d2ceba4282527315eb0c06}{SCSI\_DENSITY\_QIC\_4GB}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03386}03386                                         \mbox{\hyperlink{scsi__sa_8h_a3cd75593719f7e9cca976a9bbf9a783c}{SCSI\_DENSITY\_QIC\_2GB}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03387}03387                                         \mbox{\hyperlink{scsi__sa_8h_a407ccca3f022a12c10de6f05f2466445}{SCSI\_DENSITY\_QIC\_525\_320}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03388}03388                                         \mbox{\hyperlink{scsi__sa_8h_a6719269b39f58d9d0a55d7f707e2bcb5}{SCSI\_DENSITY\_QIC\_150}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03389}03389                                         \mbox{\hyperlink{scsi__sa_8h_a522bc83a149cfcac58950046893e2630}{SCSI\_DENSITY\_QIC\_120}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03390}03390                                         \mbox{\hyperlink{scsi__sa_8h_a1f99a2b7f951041d276ac484a2328e1c}{SCSI\_DENSITY\_QIC\_24}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03391}03391                                         \mbox{\hyperlink{scsi__sa_8h_ad93b6026cbb2e4376b54b6653f06d003}{SCSI\_DENSITY\_QIC\_11\_9TRK}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03392}03392                                         \mbox{\hyperlink{scsi__sa_8h_a8d2d05634bd5ec85e6e314c44e65e97b}{SCSI\_DENSITY\_QIC\_11\_4TRK}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03393}03393                                         \mbox{\hyperlink{scsi__sa_8h_add575d0d373e30f095b4990382056376}{SCSI\_DENSITY\_QIC\_1320}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03394}03394                                         \mbox{\hyperlink{scsi__sa_8h_a2b25252febd73c71e226c887f37dfaf5}{SCSI\_DENSITY\_QIC\_3080}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03395}03395                                         0}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03396}03396                                 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03397}03397                                 \textcolor{keywordflow}{for} (i = 0; ctry[i]; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03398}03398                                         error = \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(periph,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03399}03399                                             \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a866ff93522ab5a676dc5bfc9361847f0}{SA\_PARAM\_DENSITY}}, 0, ctry[i],}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03400}03400                                             0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03401}03401                                         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03402}03402                                                 softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}} = ctry[i];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03403}03403                                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03404}03404                                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03405}03405                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03406}03406                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03407}03407                         \textcolor{keywordflow}{switch} (softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03408}03408                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a8d2d05634bd5ec85e6e314c44e65e97b}{SCSI\_DENSITY\_QIC\_11\_4TRK}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03409}03409                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_ad93b6026cbb2e4376b54b6653f06d003}{SCSI\_DENSITY\_QIC\_11\_9TRK}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03410}03410                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a1f99a2b7f951041d276ac484a2328e1c}{SCSI\_DENSITY\_QIC\_24}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03411}03411                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a522bc83a149cfcac58950046893e2630}{SCSI\_DENSITY\_QIC\_120}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03412}03412                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a6719269b39f58d9d0a55d7f707e2bcb5}{SCSI\_DENSITY\_QIC\_150}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03413}03413                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a407ccca3f022a12c10de6f05f2466445}{SCSI\_DENSITY\_QIC\_525\_320}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03414}03414                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_add575d0d373e30f095b4990382056376}{SCSI\_DENSITY\_QIC\_1320}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03415}03415                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a2b25252febd73c71e226c887f37dfaf5}{SCSI\_DENSITY\_QIC\_3080}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03416}03416                                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \&= \string~SA\_QUIRK\_2FM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03417}03417                                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03418}03418                                 softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}} = 512;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03419}03419                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03420}03420                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a763c16e175d2ceba4282527315eb0c06}{SCSI\_DENSITY\_QIC\_4GB}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03421}03421                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a3cd75593719f7e9cca976a9bbf9a783c}{SCSI\_DENSITY\_QIC\_2GB}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03422}03422                                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \&= \string~SA\_QUIRK\_2FM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03423}03423                                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}|\mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03424}03424                                 softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}} = 1024;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03425}03425                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03426}03426                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03427}03427                                 softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03428}03428                                     softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03429}03429                                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03430}03430                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03431}03431                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03432}03432                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03433}03433 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03434}03434                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03435}03435 \textcolor{comment}{                 * If no quirk has determined that this is a device that needs}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03436}03436 \textcolor{comment}{                 * to have 2 Filemarks at EOD, now is the time to find out.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03437}03437 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03438}03438 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03439}03439                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03440}03440                         \textcolor{keywordflow}{switch} (softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03441}03441                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a29f66861cd40911e6057778788a87f97}{SCSI\_DENSITY\_HALFINCH\_800}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03442}03442                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a5714a5e48de3e46b0ededff1dae31db8}{SCSI\_DENSITY\_HALFINCH\_1600}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03443}03443                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_aa7a33143e49923d92e2124eb8adeb83f}{SCSI\_DENSITY\_HALFINCH\_6250}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03444}03444                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_ab46ac576c16c7f283b58be738143ccf3}{SCSI\_DENSITY\_HALFINCH\_6250C}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03445}03445                         \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a17db817dd3d6629274e31184cfd233cc}{SCSI\_DENSITY\_HALFINCH\_PE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03446}03446                                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \&= \string~SA\_QUIRK\_1FM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03447}03447                                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03448}03448                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03449}03449                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03450}03450                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03451}03451                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03452}03452                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03453}03453 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03454}03454                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03455}03455 \textcolor{comment}{                 * Now validate that some info we got makes sense.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03456}03456 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03457}03457                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}} < softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}}) ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03458}03458                     (softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}} > softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03459}03459                     softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03460}03460                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03461}03461                             \textcolor{stringliteral}{"{}BLOCK LIMITS (\%d..\%d) could not match current "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03462}03462                             \textcolor{stringliteral}{"{}block settings (\%d)-\/ adjusting\(\backslash\)n"{}}, softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03463}03463                             softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}}, softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03464}03464                         softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}} = softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03465}03465                             softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03466}03466                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03467}03467 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03468}03468                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03469}03469 \textcolor{comment}{                 * Now put ourselves into the right frame of mind based}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03470}03470 \textcolor{comment}{                 * upon quirks...}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03471}03471 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03472}03472 tryagain:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03473}03473                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03474}03474 \textcolor{comment}{                 * If we want to be in FIXED mode and our current blocksize}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03475}03475 \textcolor{comment}{                 * is not equal to our last blocksize (if nonzero), try and}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03476}03476 \textcolor{comment}{                 * set ourselves to this last blocksize (as the 'preferred'}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03477}03477 \textcolor{comment}{                 * block size).  The initial quirkmatch at registry sets the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03478}03478 \textcolor{comment}{                 * initial 'last' blocksize. If, for whatever reason, this}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03479}03479 \textcolor{comment}{                 * 'last' blocksize is zero, set the blocksize to 512,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03480}03480 \textcolor{comment}{                 * or min\_blk if that's larger.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03481}03481 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03482}03482                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}}) \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03483}03483                     (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a6a1b0f3a7eea46816b046872d844aeff}{SA\_QUIRK\_NO\_MODESEL}}) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03484}03484                     (softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} != softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03485}03485                         softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} = softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03486}03486                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03487}03487                                 softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} = 512;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03488}03488                                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} < softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03489}03489                                         softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} = softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03490}03490                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03491}03491                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03492}03492                         error = \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03493}03493                             softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}}, 0, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03494}03494                         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03495}03495                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03496}03496                                     \textcolor{stringliteral}{"{}unable to set fixed blocksize to \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03497}03497                                     softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03498}03498                                 \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03499}03499                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03500}03500                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03501}03501 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03502}03502                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a60f97234d2eaf71d39285b0f0485674f}{SA\_QUIRK\_VARIABLE}}) \&\& }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03503}03503                     (softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} != 0)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03504}03504                         softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}} = softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03505}03505                         softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03506}03506                         error = \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03507}03507                             0, 0, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03508}03508                         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03509}03509                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03510}03510 \textcolor{comment}{                                 * If this fails and we were guessing, just}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03511}03511 \textcolor{comment}{                                 * assume that we got it wrong and go try}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03512}03512 \textcolor{comment}{                                 * fixed block mode. Don't even check against}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03513}03513 \textcolor{comment}{                                 * density code at this point.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03514}03514 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03515}03515                                 \textcolor{keywordflow}{if} (guessing) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03516}03516                                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \&= \string~SA\_QUIRK\_VARIABLE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03517}03517                                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a7271ae2e95b9860c0bf11db5bdfb5d60}{SA\_QUIRK\_FIXED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03518}03518                                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}} == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03519}03519                                                 softc-\/>\mbox{\hyperlink{structsa__softc_ac973591a83ec3c89935d35b7e72d6cbe}{last\_media\_blksize}} = 512;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03520}03520                                         \textcolor{keywordflow}{goto} tryagain;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03521}03521                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03522}03522                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03523}03523                                     \textcolor{stringliteral}{"{}unable to set variable blocksize\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03524}03524                                 \textcolor{keywordflow}{goto} exit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03525}03525                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03526}03526                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03527}03527 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03528}03528                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03529}03529 \textcolor{comment}{                 * Now that we have the current block size,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03530}03530 \textcolor{comment}{                 * set up some parameters for sastart's usage.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03531}03531 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03532}03532                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03533}03533                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03534}03534                         \textcolor{keywordflow}{if} (powerof2(softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03535}03535                                 softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03536}03536                                     ffs(softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}}) -\/ 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03537}03537                                 softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} = softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03538}03538                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03539}03539                                 softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} = \string~0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03540}03540                                 softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03541}03541                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03542}03542                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03543}03543                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03544}03544 \textcolor{comment}{                         * The SCSI-\/3 spec allows 0 to mean "{}unspecified"{}.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03545}03545 \textcolor{comment}{                         * The SCSI-\/1 spec allows 0 to mean 'infinite'.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03546}03546 \textcolor{comment}{                         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03547}03547 \textcolor{comment}{                         * Either works here.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03548}03548 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03549}03549                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}} == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03550}03550                                 softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}} = \string~0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03551}03551                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03552}03552                         softc-\/>\mbox{\hyperlink{structsa__softc_aa6003f4f5b974c7e9ed5b69c1e59fdf5}{blk\_shift}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03553}03553                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03554}03554                                 softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} = softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}} -\/ 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03555}03555                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03556}03556                                 softc-\/>\mbox{\hyperlink{structsa__softc_a0585d52a1bf7353c99f91b6854cf42e5}{blk\_mask}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03557}03557                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03558}03558                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03559}03559 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03560}03560                 \textcolor{keywordflow}{if} (write\_protect) }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03561}03561                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9663bda7bedb689a352d84a9fbf73cfc}{SA\_FLAG\_TAPE\_WP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03562}03562 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03563}03563                 \textcolor{keywordflow}{if} (comp\_supported) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03564}03564                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}} == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03565}03565                                 softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03566}03566                                     softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03567}03567                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a5b8031931aca8cdfa8e6abb46dc668bf}{SA\_FLAG\_COMP\_SUPP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03568}03568                         \textcolor{keywordflow}{if} (comp\_enabled)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03569}03569                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a1888f91e4e176990d6548f37e7724465}{SA\_FLAG\_COMP\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03570}03570                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03571}03571                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a0f4c8efdb5d93152a259c1ee694d58e5}{SA\_FLAG\_COMP\_UNSUPP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03572}03572 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03573}03573                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a99d1aec7cacf18491280fc264fcacf89}{buffer\_mode}} == \mbox{\hyperlink{scsi__sa_8h_a4231017406245921645e05f00564eec7}{SMH\_SA\_BUF\_MODE\_NOBUF}}) \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03574}03574                     (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a6a1b0f3a7eea46816b046872d844aeff}{SA\_QUIRK\_NO\_MODESEL}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03575}03575                         error = \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a44d36e510664018f8cc6c009ad2c1eb5}{SA\_PARAM\_BUFF\_MODE}}, 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03576}03576                             0, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03577}03577                         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03578}03578                                 softc-\/>\mbox{\hyperlink{structsa__softc_a99d1aec7cacf18491280fc264fcacf89}{buffer\_mode}} = \mbox{\hyperlink{scsi__sa_8h_a0def48f570e4846878ac6cce9a3c83c9}{SMH\_SA\_BUF\_MODE\_SIBUF}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03579}03579                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03580}03580                                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03581}03581                                     \textcolor{stringliteral}{"{}unable to set buffered mode\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03582}03582                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03583}03583                         error = 0;      \textcolor{comment}{/* not an error */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03584}03584                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03585}03585 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03586}03586                 \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03587}03587                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a024900590c1c65352f43e7fea7b1d3be}{SA\_FLAG\_TAPE\_MOUNTED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03588}03588                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03589}03589 exit:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03590}03590                 \textcolor{keywordflow}{if} (rblim != NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03591}03591                         free(rblim, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03592}03592 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03593}03593                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03594}03594                         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_NIL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03595}03595                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03596}03596                         softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03597}03597                         softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03598}03598                         softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03599}03599                         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03600}03600                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03601}03601 \textcolor{preprocessor}{\#ifdef  SA\_1FM\_AT\_EOD}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03602}03602                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}}) == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03603}03603                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03604}03604 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03605}03605                 \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}) == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03606}03606                         softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03607}03607 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03608}03608         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03609}03609                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03610}03610 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03611}03611         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03612}03612 \textcolor{comment}{         * If we return an error, we're not mounted any more,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03613}03613 \textcolor{comment}{         * so release any device reservation.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03614}03614 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03615}03615         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03616}03616                 (void) \mbox{\hyperlink{scsi__sa_8c_af35686132783c8995ee39b341123ac67}{sareservereleaseunit}}(periph, FALSE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03617}03617         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03618}03618                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03619}03619 \textcolor{comment}{                 * Clear I/O residual.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03620}03620 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03621}03621                 softc-\/>last\_io\_resid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03622}03622                 softc-\/>last\_ctl\_resid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03623}03623         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03624}03624         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03625}03625 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03626}03626 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03627}03627 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03628}03628 \textcolor{comment}{ * How many filemarks do we need to write if we were to terminate the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03629}03629 \textcolor{comment}{ * tape session right now? Note that this can be a negative number}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03630}03630 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03631}03631 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03632}03632 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03633}\mbox{\hyperlink{scsi__sa_8c_afed353b713c4b613922f53a39613629f}{03633}} \mbox{\hyperlink{scsi__sa_8c_afed353b713c4b613922f53a39613629f}{samarkswanted}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03634}03634 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03635}03635         \textcolor{keywordtype}{int}     markswanted;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03636}03636         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03637}03637 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03638}03638         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03639}03639         markswanted = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03640}03640         if ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03641}03641                 markswanted++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03642}03642                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a23ee3b25dc8840e6f321139dc4d95326}{SA\_QUIRK\_2FM}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03643}03643                         markswanted++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03644}03644         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03645}03645         markswanted -\/= softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03646}03646         \textcolor{keywordflow}{return} (markswanted);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03647}03647 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03648}03648 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03649}03649 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03650}\mbox{\hyperlink{scsi__sa_8c_a1420122d62b1960df49c99f3d5fade09}{03650}} \mbox{\hyperlink{scsi__sa_8c_a1420122d62b1960df49c99f3d5fade09}{sacheckeod}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03651}03651 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03652}03652         \textcolor{keywordtype}{int}     error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03653}03653         \textcolor{keywordtype}{int}     markswanted;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03654}03654 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03655}03655         markswanted = \mbox{\hyperlink{scsi__sa_8c_afed353b713c4b613922f53a39613629f}{samarkswanted}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03656}03656 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03657}03657         \textcolor{keywordflow}{if} (markswanted > 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03658}03658                 error = \mbox{\hyperlink{scsi__sa_8c_a1d8d7e925b43a6580eef62643a7e2ee4}{sawritefilemarks}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, markswanted, FALSE, FALSE);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03659}03659         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03660}03660                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03661}03661         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03662}03662         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03663}03663 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03664}03664 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03665}03665 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03666}\mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{03666}} \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}(\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}}, u\_int32\_t cflgs, u\_int32\_t sflgs)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03667}03667 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03668}03668         \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *toobig =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03669}03669             \textcolor{stringliteral}{"{}\%d-\/byte tape record bigger than supplied buffer\(\backslash\)n"{}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03670}03670         \textcolor{keyword}{struct  }\mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03671}03671         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03672}03672         \textcolor{keyword}{struct  }\mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03673}03673         \textcolor{keyword}{struct  }\mbox{\hyperlink{structscsi__sense__data}{scsi\_sense\_data}} *sense;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03674}03674         uint64\_t resid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03675}03675         int64\_t info = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03676}03676         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03677}03677         \textcolor{keywordtype}{int} \mbox{\hyperlink{structscsi__sense__data_a2293ae61d918a2abfdd5a20d80882afc}{error\_code}}, sense\_key, asc, ascq, error, aqvalid, stream\_valid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03678}03678         \textcolor{keywordtype}{int} sense\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03679}03679         uint8\_t stream\_bits;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03680}03680 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03681}03681         periph = \mbox{\hyperlink{cam__xpt_8c_ac6ef509a45ba9a35eb670cd9c9ea9bc7}{xpt\_path\_periph}}(\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03682}03682         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03683}03683         csio = \&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03684}03684         sense = \&csio-\/>\mbox{\hyperlink{structccb__scsiio_a38e04f98dac99a3084f042ec2108054a}{sense\_data}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03685}03685         sense\_len = csio-\/>\mbox{\hyperlink{structccb__scsiio_a571468ac3ea1467d532b8767a90b516c}{sense\_len}} -\/ csio-\/>\mbox{\hyperlink{structccb__scsiio_a692447632a92215b9089398d63001f8f}{sense\_resid}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03686}03686         \mbox{\hyperlink{scsi__all_8c_aa4fd274032f460c0a69461c75f3f639d}{scsi\_extract\_sense\_len}}(sense, sense\_len, \&error\_code, \&sense\_key,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03687}03687             \&asc, \&ascq, \textcolor{comment}{/*show\_errors*/} 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03688}03688         \textcolor{keywordflow}{if} (asc != -\/1 \&\& ascq != -\/1)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03689}03689                 aqvalid = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03690}03690         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03691}03691                 aqvalid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03692}03692         \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__all_8c_ad420f59b6f400c7494ace26ed17aa8c9}{scsi\_get\_stream\_info}}(sense, sense\_len, NULL, \&stream\_bits) == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03693}03693                 stream\_valid = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03694}03694         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03695}03695                 stream\_valid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03696}03696         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03697}03697 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03698}03698         status = csio-\/>\mbox{\hyperlink{structccb__scsiio_a267ba491b17e3e5820fdf56425a635b1}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03699}03699 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03700}03700         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03701}03701 \textcolor{comment}{         * Calculate/latch up, any residuals... We do this in a funny 2-\/step}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03702}03702 \textcolor{comment}{         * so we can print stuff here if we have CAM\_DEBUG enabled for this}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03703}03703 \textcolor{comment}{         * unit.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03704}03704 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03705}03705         \textcolor{keywordflow}{if} (status == \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3aeb963e5650478930f8ff1380b169a84f}{CAM\_SCSI\_STATUS\_ERROR}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03706}03706                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__all_8c_aacb34a12a861bc80110bef97ad6cb22b}{scsi\_get\_sense\_info}}(sense, sense\_len, \mbox{\hyperlink{scsi__all_8h_a41716a2f30b15bb043dda710e7ef967c}{SSD\_DESC\_INFO}}, \&resid,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03707}03707                                         \&info) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03708}03708                         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03709}03709                                 resid *= softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03710}03710                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03711}03711                         resid = csio-\/>\mbox{\hyperlink{structccb__scsiio_a876ad61cacd6314a81bcb506ed3d4744}{dxfer\_len}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03712}03712                         info = resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03713}03713                         \textcolor{keywordflow}{if} ((softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03714}03714                                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03715}03715                                         info /= softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03716}03716                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03717}03717                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03718}03718                 \textcolor{keywordflow}{if} (csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}[0] == \mbox{\hyperlink{scsi__sa_8h_ac16f940e17f1ffa4e6e5ccb7333af92e}{SA\_READ}} ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03719}03719                     csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}[0] == \mbox{\hyperlink{scsi__sa_8h_a3441c0b619fbeb721f69976d85ebf947}{SA\_WRITE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03720}03720                         bcopy((caddr\_t) sense, (caddr\_t) \&softc-\/>last\_io\_sense,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03721}03721                             sizeof (\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__sense__data}{scsi\_sense\_data}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03722}03722                         bcopy(csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}, softc-\/>last\_io\_cdb,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03723}03723                             (\textcolor{keywordtype}{int}) csio-\/>\mbox{\hyperlink{structccb__scsiio_a9839f8df1d33870cf613fc1d94b3470b}{cdb\_len}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03724}03724                         softc-\/>last\_io\_resid = resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03725}03725                         softc-\/>\mbox{\hyperlink{structsa__softc_a11b9c2f0c7edaae9a1e34f6a9240b1d1}{last\_resid\_was\_io}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03726}03726                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03727}03727                         bcopy((caddr\_t) sense, (caddr\_t) \&softc-\/>last\_ctl\_sense,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03728}03728                             sizeof (\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__sense__data}{scsi\_sense\_data}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03729}03729                         bcopy(csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}, softc-\/>last\_ctl\_cdb,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03730}03730                             (\textcolor{keywordtype}{int}) csio-\/>\mbox{\hyperlink{structccb__scsiio_a9839f8df1d33870cf613fc1d94b3470b}{cdb\_len}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03731}03731                         softc-\/>last\_ctl\_resid = resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03732}03732                         softc-\/>\mbox{\hyperlink{structsa__softc_a11b9c2f0c7edaae9a1e34f6a9240b1d1}{last\_resid\_was\_io}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03733}03733                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03734}03734                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}}, (\textcolor{stringliteral}{"{}CDB[0]=0x\%x Key 0x\%x "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03735}03735                     \textcolor{stringliteral}{"{}ASC/ASCQ 0x\%x/0x\%x CAM STATUS 0x\%x flags 0x\%x resid \%jd "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03736}03736                     \textcolor{stringliteral}{"{}dxfer\_len \%d\(\backslash\)n"{}}, csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}[0] \& 0xff,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03737}03737                     sense\_key, asc, ascq, status,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03738}03738                     (stream\_valid) ? stream\_bits : 0, (intmax\_t)resid,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03739}03739                     csio-\/>\mbox{\hyperlink{structccb__scsiio_a876ad61cacd6314a81bcb506ed3d4744}{dxfer\_len}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03740}03740         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03741}03741                 \mbox{\hyperlink{cam__debug_8h_ae79c3c2e46f2d9fca388152c3ad38ef0}{CAM\_DEBUG}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03742}03742                     (\textcolor{stringliteral}{"{}Cam Status 0x\%x\(\backslash\)n"{}}, status));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03743}03743         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03744}03744 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03745}03745         \textcolor{keywordflow}{switch} (status) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03746}03746         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03747}03747                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03748}03748         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3aeb963e5650478930f8ff1380b169a84f}{CAM\_SCSI\_STATUS\_ERROR}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03749}03749                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03750}03750 \textcolor{comment}{                 * If a read/write command, we handle it here.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03751}03751 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03752}03752                 \textcolor{keywordflow}{if} (csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}[0] == \mbox{\hyperlink{scsi__sa_8h_ac16f940e17f1ffa4e6e5ccb7333af92e}{SA\_READ}} ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03753}03753                     csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}[0] == \mbox{\hyperlink{scsi__sa_8h_a3441c0b619fbeb721f69976d85ebf947}{SA\_WRITE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03754}03754                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03755}03755                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03756}03756                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03757}03757 \textcolor{comment}{                 * If this was just EOM/EOP, Filemark, Setmark, ILI or}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03758}03758 \textcolor{comment}{                 * PEW detected on a non read/write command, we assume}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03759}03759 \textcolor{comment}{                 * it's not an error and propagate the residual and return.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03760}03760 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03761}03761                 \textcolor{keywordflow}{if} ((aqvalid \&\& asc == 0 \&\& ((ascq > 0 \&\& ascq <= 5)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03762}03762                   || (ascq == 0x07)))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03763}03763                  || (aqvalid == 0 \&\& sense\_key == \mbox{\hyperlink{scsi__all_8h_ae96b8bf2eeff67db34c7d3fcb4be32af}{SSD\_KEY\_NO\_SENSE}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03764}03764                         csio-\/>\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}} = resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03765}03765                         \mbox{\hyperlink{scsi__sa_8c_a68addb069cc1408c598a72d20cc725da}{QFRLS}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03766}03766                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03767}03767                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03768}03768                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03769}03769 \textcolor{comment}{                 * Otherwise, we let the common code handle this.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03770}03770 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03771}03771                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__periph_8c_ac2010c1d05ec8dff4d1c03f3ec0be8c4}{cam\_periph\_error}}(\mbox{\hyperlink{unionccb}{ccb}}, cflgs, sflgs));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03772}03772 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03773}03773         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03774}03774 \textcolor{comment}{         * XXX: To Be Fixed}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03775}03775 \textcolor{comment}{         * We cannot depend upon CAM honoring retry counts for these.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03776}03776 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03777}03777         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a0cb6a35e1cbb336da844264c140f2f17}{CAM\_SCSI\_BUS\_RESET}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03778}03778         \textcolor{keywordflow}{case} \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3af0d119b5ee40192c3d6d0680f7db7cd6}{CAM\_BDR\_SENT}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03779}03779                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_af69c58b4653ec0977d4ccfe89e30cfad}{retry\_count}} <= 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03780}03780                         \textcolor{keywordflow}{return} (EIO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03781}03781                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03782}03782                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03783}03783         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03784}03784                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{cam__periph_8c_ac2010c1d05ec8dff4d1c03f3ec0be8c4}{cam\_periph\_error}}(\mbox{\hyperlink{unionccb}{ccb}}, cflgs, sflgs));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03785}03785         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03786}03786 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03787}03787         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03788}03788 \textcolor{comment}{         * Handle filemark, end of tape, mismatched record sizes....}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03789}03789 \textcolor{comment}{         * From this point out, we're only handling read/write cases.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03790}03790 \textcolor{comment}{         * Handle writes \&\& reads differently.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03791}03791 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03792}03792 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03793}03793         \textcolor{keywordflow}{if} (csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}}[0] == \mbox{\hyperlink{scsi__sa_8h_a3441c0b619fbeb721f69976d85ebf947}{SA\_WRITE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03794}03794                 \textcolor{keywordflow}{if} (sense\_key == \mbox{\hyperlink{scsi__all_8h_a84e1ffd5ee7632b104df696e82b48882}{SSD\_KEY\_VOLUME\_OVERFLOW}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03795}03795                         csio-\/>\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}} = resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03796}03796                         error = ENOSPC;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03797}03797                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((stream\_valid != 0) \&\& (stream\_bits \& \mbox{\hyperlink{scsi__all_8h_a9ac8bc9047a95c5ed169a5c85cb2a21a}{SSD\_EOM}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03798}03798                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9af1db72dd19793d88e611acdd7f842352}{SA\_FLAG\_EOM\_PENDING}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03799}03799                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03800}03800 \textcolor{comment}{                         * Grotesque as it seems, the few times}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03801}03801 \textcolor{comment}{                         * I've actually seen a non-\/zero resid,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03802}03802 \textcolor{comment}{                         * the tape drive actually lied and had}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03803}03803 \textcolor{comment}{                         * written all the data!.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03804}03804 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03805}03805                         csio-\/>\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03806}03806                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03807}03807         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03808}03808                 csio-\/>\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}} = resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03809}03809                 \textcolor{keywordflow}{if} (sense\_key == \mbox{\hyperlink{scsi__all_8h_a04bcc6ffeee47e9b0d5e370a69862a55}{SSD\_KEY\_BLANK\_CHECK}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03810}03810                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a27c999121394005047d4f2a101c4d778}{SA\_QUIRK\_1FM}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03811}03811                                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03812}03812                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9af1db72dd19793d88e611acdd7f842352}{SA\_FLAG\_EOM\_PENDING}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03813}03813                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03814}03814                                 error = EIO;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03815}03815                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03816}03816                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((stream\_valid != 0) \&\& (stream\_bits \& \mbox{\hyperlink{scsi__all_8h_a390cff8c593aaee0dfb9e8f871c92dad}{SSD\_FILEMARK}}))\{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03817}03817                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03818}03818                                 error = -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03819}03819                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a9330f4ca7f1d6bd6499a6a77a60ea385}{SA\_FLAG\_EOF\_PENDING}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03820}03820                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03821}03821                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03822}03822 \textcolor{comment}{                         * Unconditionally, if we detected a filemark on a read,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03823}03823 \textcolor{comment}{                         * mark that we've run moved a file ahead.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03824}03824 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03825}03825                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} != (daddr\_t) -\/1) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03826}03826                                 softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}}++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03827}03827                                 softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03828}03828                                 csio-\/>\mbox{\hyperlink{structccb__scsiio_a267ba491b17e3e5820fdf56425a635b1}{ccb\_h}}.ccb\_pflags |= \mbox{\hyperlink{scsi__sa_8c_ade5ad1160849d3d66129903d4dd5934a}{SA\_POSITION\_UPDATED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03829}03829                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03830}03830                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03831}03831         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03832}03832 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03833}03833         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03834}03834 \textcolor{comment}{         * Incorrect Length usually applies to read, but can apply to writes.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03835}03835 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03836}03836         \textcolor{keywordflow}{if} (error == 0 \&\& (stream\_valid != 0) \&\& (stream\_bits \& \mbox{\hyperlink{scsi__all_8h_a962be7e92db020ea69b97678493eb1e5}{SSD\_ILI}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03837}03837                 \textcolor{keywordflow}{if} (info < 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03838}03838                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(csio-\/>\mbox{\hyperlink{structccb__scsiio_a267ba491b17e3e5820fdf56425a635b1}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a47763149d044e13fcc06abfb3ddc941f}{path}}, toobig,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03839}03839                             csio-\/>\mbox{\hyperlink{structccb__scsiio_a876ad61cacd6314a81bcb506ed3d4744}{dxfer\_len}} -\/ info);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03840}03840                         csio-\/>\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}} = csio-\/>\mbox{\hyperlink{structccb__scsiio_a876ad61cacd6314a81bcb506ed3d4744}{dxfer\_len}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03841}03841                         error = EIO;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03842}03842                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03843}03843                         csio-\/>\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}} = resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03844}03844                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03845}03845                                 softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a3b5f8b7ae50c7b097d4badf16d867640}{SA\_FLAG\_EIO\_PENDING}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03846}03846                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03847}03847                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03848}03848 \textcolor{comment}{                         * Bump the block number if we hadn't seen a filemark.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03849}03849 \textcolor{comment}{                         * Do this independent of errors (we've moved anyway).}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03850}03850 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03851}03851                         \textcolor{keywordflow}{if} ((stream\_valid == 0) ||}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03852}03852                             (stream\_bits \& \mbox{\hyperlink{scsi__all_8h_a390cff8c593aaee0dfb9e8f871c92dad}{SSD\_FILEMARK}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03853}03853                                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} != (daddr\_t) -\/1) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03854}03854                                         softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}}++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03855}03855                                         csio-\/>\mbox{\hyperlink{structccb__scsiio_a267ba491b17e3e5820fdf56425a635b1}{ccb\_h}}.ccb\_pflags |=}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03856}03856                                            \mbox{\hyperlink{scsi__sa_8c_ade5ad1160849d3d66129903d4dd5934a}{SA\_POSITION\_UPDATED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03857}03857                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03858}03858                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03859}03859                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03860}03860         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03861}03861 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03862}03862         \textcolor{keywordflow}{if} (error <= 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03863}03863                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03864}03864 \textcolor{comment}{                 * Unfreeze the queue if frozen as we're not returning anything}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03865}03865 \textcolor{comment}{                 * to our waiters that would indicate an I/O error has occurred}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03866}03866 \textcolor{comment}{                 * (yet).}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03867}03867 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03868}03868                 \mbox{\hyperlink{scsi__sa_8c_a68addb069cc1408c598a72d20cc725da}{QFRLS}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03869}03869                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03870}03870         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03871}03871         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03872}03872 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03873}03873 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03874}03874 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03875}\mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{03875}} \mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{sagetparams}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13}{sa\_params}} params\_to\_get,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03876}03876             u\_int32\_t *blocksize, u\_int8\_t *density, u\_int32\_t *numblocks,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03877}03877             \textcolor{keywordtype}{int} *buff\_mode, u\_int8\_t *write\_protect, u\_int8\_t *\mbox{\hyperlink{structsa__softc_a6586a25f6e27e356c53405f36d8082b7}{speed}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03878}03878             \textcolor{keywordtype}{int} *comp\_supported, \textcolor{keywordtype}{int} *comp\_enabled, u\_int32\_t *\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03879}03879             \mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}} *tcs, \textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}} *prot\_page,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03880}03880             \textcolor{keywordtype}{int} dp\_size, \textcolor{keywordtype}{int} prot\_changeable)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03881}03881 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03882}03882         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03883}03883         \textcolor{keywordtype}{void} *mode\_buffer;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03884}03884         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__header__6}{scsi\_mode\_header\_6}} *mode\_hdr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03885}03885         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__blk__desc}{scsi\_mode\_blk\_desc}} *mode\_blk;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03886}03886         \textcolor{keywordtype}{int} mode\_buffer\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03887}03887         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03888}03888         u\_int8\_t cpage;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03889}03889         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03890}03890         \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3}{cam\_status}} status;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03891}03891 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03892}03892         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03893}03893         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03894}03894         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202aaaa6c2d0a911a0aefcf1f13f535fc37f}{SA\_QUIRK\_NO\_CPAGE}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03895}03895                 cpage = \mbox{\hyperlink{scsi__sa_8h_ae33f766135ab54f10fe4123a9739cf60}{SA\_DEVICE\_CONFIGURATION\_PAGE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03896}03896         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03897}03897                 cpage = \mbox{\hyperlink{scsi__sa_8h_a803f9cf01585377260c4b41ae6d3f759}{SA\_DATA\_COMPRESSION\_PAGE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03898}03898 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03899}03899 retry:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03900}03900         mode\_buffer\_len = \textcolor{keyword}{sizeof}(*mode\_hdr) + \textcolor{keyword}{sizeof}(*mode\_blk);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03901}03901 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03902}03902         \textcolor{keywordflow}{if} (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03903}03903                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03904}03904                         *comp\_supported = FALSE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03905}03905                         params\_to\_get \&= \string~SA\_PARAM\_COMPRESSION;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03906}03906                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03907}03907                         mode\_buffer\_len += \textcolor{keyword}{sizeof} (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03908}03908         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03909}03909 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03910}03910         \textcolor{comment}{/* XXX Fix M\_NOWAIT */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03911}03911         mode\_buffer = malloc(mode\_buffer\_len, M\_SCSISA, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03912}03912         \textcolor{keywordflow}{if} (mode\_buffer == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03913}03913                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03914}03914                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03915}03915         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03916}03916         mode\_hdr = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__header__6}{scsi\_mode\_header\_6}} *)mode\_buffer;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03917}03917         mode\_blk = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__blk__desc}{scsi\_mode\_blk\_desc}} *)\&mode\_hdr[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03918}03918 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03919}03919         \textcolor{comment}{/* it is safe to retry this */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03920}03920         \mbox{\hyperlink{scsi__all_8c_a07dd4b57b56297e478ebd3731a7ec608}{scsi\_mode\_sense}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 5, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, FALSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03921}03921             \mbox{\hyperlink{scsi__all_8h_a8b73ae18fa8796de2cbfc59283a89bd7}{SMS\_PAGE\_CTRL\_CURRENT}}, (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}) ?}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03922}03922             cpage : \mbox{\hyperlink{scsi__all_8h_aa7da31c6efbde1f5b2c7695e65e61c20}{SMS\_VENDOR\_SPECIFIC\_PAGE}}, mode\_buffer, mode\_buffer\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03923}03923             \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}}, softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6dda6e14e8cf743dc3efa009b308ef95}{SA\_TIMEOUT\_MODE\_SENSE}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03924}03924 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03925}03925         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03926}03926             softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03927}03927 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03928}03928         status = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03929}03929 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03930}03930         \textcolor{keywordflow}{if} (error == EINVAL \&\& (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}) != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03931}03931                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03932}03932 \textcolor{comment}{                 * Hmm. Let's see if we can try another page...}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03933}03933 \textcolor{comment}{                 * If we've already done that, give up on compression}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03934}03934 \textcolor{comment}{                 * for this device and remember this for the future}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03935}03935 \textcolor{comment}{                 * and attempt the request without asking for compression}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03936}03936 \textcolor{comment}{                 * info.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03937}03937 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03938}03938                 \textcolor{keywordflow}{if} (cpage == \mbox{\hyperlink{scsi__sa_8h_a803f9cf01585377260c4b41ae6d3f759}{SA\_DATA\_COMPRESSION\_PAGE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03939}03939                         cpage = \mbox{\hyperlink{scsi__sa_8h_ae33f766135ab54f10fe4123a9739cf60}{SA\_DEVICE\_CONFIGURATION\_PAGE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03940}03940                         \textcolor{keywordflow}{goto} retry;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03941}03941                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03942}03942                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202a5b277a55119b0fbd573f9f8571d7c814}{SA\_QUIRK\_NOCOMP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03943}03943                 free(mode\_buffer, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03944}03944                 \textcolor{keywordflow}{goto} retry;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03945}03945         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (status == \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3aeb963e5650478930f8ff1380b169a84f}{CAM\_SCSI\_STATUS\_ERROR}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03946}03946                 \textcolor{comment}{/* Tell the user about the fatal error. */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03947}03947                 \mbox{\hyperlink{scsi__all_8c_a4c4e999b950a849e9de2497a26efff53}{scsi\_sense\_print}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03948}03948                 \textcolor{keywordflow}{goto} sagetparamsexit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03949}03949         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03950}03950 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03951}03951         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03952}03952 \textcolor{comment}{         * If the user only wants the compression information, and}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03953}03953 \textcolor{comment}{         * the device doesn't send back the block descriptor, it's}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03954}03954 \textcolor{comment}{         * no big deal.  If the user wants more than just}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03955}03955 \textcolor{comment}{         * compression, though, and the device doesn't pass back the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03956}03956 \textcolor{comment}{         * block descriptor, we need to send another mode sense to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03957}03957 \textcolor{comment}{         * get the block descriptor.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03958}03958 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03959}03959         \textcolor{keywordflow}{if} ((mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a7586296eb8f4f6e2435f2673147ab143}{blk\_desc\_len}} == 0) \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03960}03960             (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}) \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03961}03961             (params\_to\_get \& \string~(\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}))) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03962}03962                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03963}03963 \textcolor{comment}{                 * Decrease the mode buffer length by the size of}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03964}03964 \textcolor{comment}{                 * the compression page, to make sure the data}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03965}03965 \textcolor{comment}{                 * there doesn't get overwritten.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03966}03966 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03967}03967                 mode\_buffer\_len -\/= \textcolor{keyword}{sizeof} (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03968}03968 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03969}03969                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03970}03970 \textcolor{comment}{                 * Now move the compression page that we presumably}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03971}03971 \textcolor{comment}{                 * got back down the memory chunk a little bit so}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03972}03972 \textcolor{comment}{                 * it doesn't get spammed.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03973}03973 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03974}03974                 bcopy(\&mode\_hdr[0], \&mode\_hdr[1], \textcolor{keyword}{sizeof} (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03975}03975                 bzero(\&mode\_hdr[0], \textcolor{keyword}{sizeof} (mode\_hdr[0]));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03976}03976 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03977}03977                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03978}03978 \textcolor{comment}{                 * Now, we issue another mode sense and just ask}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03979}03979 \textcolor{comment}{                 * for the block descriptor, etc.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03980}03980 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03981}03981 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03982}03982                 \mbox{\hyperlink{scsi__all_8c_a07dd4b57b56297e478ebd3731a7ec608}{scsi\_mode\_sense}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 2, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, FALSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03983}03983                     \mbox{\hyperlink{scsi__all_8h_a8b73ae18fa8796de2cbfc59283a89bd7}{SMS\_PAGE\_CTRL\_CURRENT}}, \mbox{\hyperlink{scsi__all_8h_aa7da31c6efbde1f5b2c7695e65e61c20}{SMS\_VENDOR\_SPECIFIC\_PAGE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03984}03984                     mode\_buffer, mode\_buffer\_len, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03985}03985                     softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6dda6e14e8cf743dc3efa009b308ef95}{SA\_TIMEOUT\_MODE\_SENSE}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03986}03986 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03987}03987                 error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03988}03988                     softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03989}03989 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03990}03990                 \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03991}03991                         \textcolor{keywordflow}{goto} sagetparamsexit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03992}03992         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03993}03993 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03994}03994         \textcolor{keywordflow}{if} (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03995}03995                 *blocksize = \mbox{\hyperlink{scsi__all_8h_a3320d56b7bc675e8f20399c14e09a574}{scsi\_3btoul}}(mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_a7684a030e3b01c4f0a39563b5294cbb6}{blklen}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03996}03996 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03997}03997         \textcolor{keywordflow}{if} (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13ad92ed2aeda9e0f689cb3bf4e1b892d03}{SA\_PARAM\_NUMBLOCKS}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03998}03998                 *numblocks = \mbox{\hyperlink{scsi__all_8h_a3320d56b7bc675e8f20399c14e09a574}{scsi\_3btoul}}(mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_aebd9b5125248c1719af48fbd4c3b2316}{nblocks}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l03999}03999 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04000}04000         \textcolor{keywordflow}{if} (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a44d36e510664018f8cc6c009ad2c1eb5}{SA\_PARAM\_BUFF\_MODE}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04001}04001                 *buff\_mode = mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a5c48083f48dac4fed9444ca94fe6a767}{dev\_spec}} \& \mbox{\hyperlink{scsi__sa_8h_a477b7ff6ac5a72009b241bb4ef212d88}{SMH\_SA\_BUF\_MODE\_MASK}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04002}04002 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04003}04003         \textcolor{keywordflow}{if} (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a866ff93522ab5a676dc5bfc9361847f0}{SA\_PARAM\_DENSITY}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04004}04004                 *\mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}} = mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04005}04005 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04006}04006         \textcolor{keywordflow}{if} (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af7a9d015b93b4016015a39ef3eee38cf}{SA\_PARAM\_WP}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04007}04007                 *write\_protect = (mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a5c48083f48dac4fed9444ca94fe6a767}{dev\_spec}} \& \mbox{\hyperlink{scsi__sa_8h_ac3f5aa158abbab15018b5fe69c876fd4}{SMH\_SA\_WP}})? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04008}04008 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04009}04009         \textcolor{keywordflow}{if} (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13afba43d46a8e00933c70a33440a55a98a}{SA\_PARAM\_SPEED}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04010}04010                 *speed = mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a5c48083f48dac4fed9444ca94fe6a767}{dev\_spec}} \& \mbox{\hyperlink{scsi__sa_8h_ad4b760f39fb4ed63fbc445e7b1613fb7}{SMH\_SA\_SPEED\_MASK}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04011}04011 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04012}04012         \textcolor{keywordflow}{if} (params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04013}04013                 \mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}} *ntcs = (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}} *) \&mode\_blk[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04014}04014                 \textcolor{keywordflow}{if} (cpage == \mbox{\hyperlink{scsi__sa_8h_a803f9cf01585377260c4b41ae6d3f759}{SA\_DATA\_COMPRESSION\_PAGE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04015}04015                         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__data__compression__page}{scsi\_data\_compression\_page}} *cp = \&ntcs-\/>\mbox{\hyperlink{unionsa__comp__t_ad0481e78acb41bfa9ecc051f93f04baf}{dcomp}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04016}04016                         *comp\_supported =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04017}04017                             (cp-\/>\mbox{\hyperlink{structscsi__data__compression__page_ab922d002ff24ac3eb5a318e83f265373}{dce\_and\_dcc}} \& \mbox{\hyperlink{scsi__sa_8h_ae71a24944c8c8fd321699e8fdbf4d749}{SA\_DCP\_DCC}})? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04018}04018                         *comp\_enabled =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04019}04019                             (cp-\/>\mbox{\hyperlink{structscsi__data__compression__page_ab922d002ff24ac3eb5a318e83f265373}{dce\_and\_dcc}} \& \mbox{\hyperlink{scsi__sa_8h_a4e409e7ae1ce04a8af70b3a6f5e87657}{SA\_DCP\_DCE}})? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04020}04020                         *\mbox{\hyperlink{structscsi__data__compression__page_a0e4e62c2a744ce824ff6de0e6ea4fe70}{comp\_algorithm}} = \mbox{\hyperlink{scsi__all_8h_a819d6f51420109cfeb06a235f299e113}{scsi\_4btoul}}(cp-\/>\mbox{\hyperlink{structscsi__data__compression__page_a0e4e62c2a744ce824ff6de0e6ea4fe70}{comp\_algorithm}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04021}04021                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04022}04022                         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__dev__conf__page}{scsi\_dev\_conf\_page}} *cp = \&ntcs-\/>\mbox{\hyperlink{unionsa__comp__t_a9984bfe6f5cf9e4bcf40493feeaef922}{dconf}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04023}04023                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04024}04024 \textcolor{comment}{                         * We don't really know whether this device supports}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04025}04025 \textcolor{comment}{                         * Data Compression if the algorithm field is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04026}04026 \textcolor{comment}{                         * zero. Just say we do.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04027}04027 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04028}04028                         *comp\_supported = TRUE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04029}04029                         *comp\_enabled =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04030}04030                             (cp-\/>\mbox{\hyperlink{structscsi__dev__conf__page_a0fd961e8840c72a66ccd82b7755bd2ab}{sel\_comp\_alg}} != \mbox{\hyperlink{scsi__sa_8h_a5355a2c368920c42a49574b2d1dfe260}{SA\_COMP\_NONE}})? TRUE : FALSE;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04031}04031                         *comp\_algorithm = cp-\/>\mbox{\hyperlink{structscsi__dev__conf__page_a0fd961e8840c72a66ccd82b7755bd2ab}{sel\_comp\_alg}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04032}04032                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04033}04033                 \textcolor{keywordflow}{if} (tcs != NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04034}04034                         bcopy(ntcs, tcs, \textcolor{keyword}{sizeof} (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04035}04035         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04036}04036 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04037}04037         \textcolor{keywordflow}{if} ((params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3e0b39e1423dae8dc67ac87c2dbbb277}{SA\_PARAM\_DENSITY\_EXT}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04038}04038          \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_ade608c888502ad91ed1a942fe511e606}{scsi\_rev}} >= \mbox{\hyperlink{scsi__all_8h_a4ca74e45eb903450c0ffe2f95e447c6d}{SCSI\_REV\_SPC}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04039}04039                 \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04040}04040 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04041}04041                 \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{scsi__sa_8c_aac3d580b796e771d33e2cc5346dbb29e}{SA\_DENSITY\_TYPES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04042}04042                         \mbox{\hyperlink{scsi__sa_8c_a76864f26b338d61c477ed2f1d2f8fff5}{scsi\_report\_density\_support}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04043}04043                             \textcolor{comment}{/*retries*/} 1,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04044}04044                             \textcolor{comment}{/*cbfcnp*/} NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04045}04045                             \textcolor{comment}{/*tag\_action*/} \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04046}04046                             \textcolor{comment}{/*media*/} softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[i] \& \mbox{\hyperlink{scsi__sa_8h_ad8abca0b944e3f2f8e54410f73aa96be}{SRDS\_MEDIA}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04047}04047                             \textcolor{comment}{/*medium\_type*/} softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[i] \&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04048}04048                                             \mbox{\hyperlink{scsi__sa_8h_ae34f2aa5ee4dc9110ed76c3760871ea1}{SRDS\_MEDIUM\_TYPE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04049}04049                             \textcolor{comment}{/*data\_ptr*/} softc-\/>\mbox{\hyperlink{structsa__softc_a1845fd5c22a7174ffb235fa20b3820ff}{density\_info}}[i],}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04050}04050                             \textcolor{comment}{/*length*/} \textcolor{keyword}{sizeof}(softc-\/>\mbox{\hyperlink{structsa__softc_a1845fd5c22a7174ffb235fa20b3820ff}{density\_info}}[i]),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04051}04051                             \textcolor{comment}{/*sense\_len*/} \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04052}04052                             \textcolor{comment}{/*timeout*/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04053}04053                                 softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae287a56d985358cde9f2451b27009d8f}{SA\_TIMEOUT\_REP\_DENSITY}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04054}04054                         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04055}04055                             softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04056}04056                         status = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04057}04057 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04058}04058                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04059}04059 \textcolor{comment}{                         * Some tape drives won't support this command at}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04060}04060 \textcolor{comment}{                         * all, but hopefully we'll minimize that with the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04061}04061 \textcolor{comment}{                         * check for SPC or greater support above.  If they}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04062}04062 \textcolor{comment}{                         * don't support the default report (neither the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04063}04063 \textcolor{comment}{                         * MEDIA or MEDIUM\_TYPE bits set), then there is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04064}04064 \textcolor{comment}{                         * really no point in continuing on to look for}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04065}04065 \textcolor{comment}{                         * other reports.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04066}04066 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04067}04067                         \textcolor{keywordflow}{if} ((error != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04068}04068                          || (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04069}04069                                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04070}04070                                 softc-\/>\mbox{\hyperlink{structsa__softc_ad736496a89601e8a642885184fa54d57}{density\_info\_valid}}[i] = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04071}04071                                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[i] == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04072}04072                                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04073}04073                                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04074}04074                                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04075}04075                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04076}04076                         softc-\/>\mbox{\hyperlink{structsa__softc_ad736496a89601e8a642885184fa54d57}{density\_info\_valid}}[i] = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a876ad61cacd6314a81bcb506ed3d4744}{dxfer\_len}} -\/}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04077}04077                             \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04078}04078                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04079}04079         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04080}04080 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04081}04081         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04082}04082 \textcolor{comment}{         * Get logical block protection parameters if the drive supports it.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04083}04083 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04084}04084         \textcolor{keywordflow}{if} ((params\_to\_get \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2aaf5084da4efb059c34e48672c10f3a}{SA\_PARAM\_LBP}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04085}04085          \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a203568b61a5d82dc71d5d9bcde7b39ee}{SA\_FLAG\_PROTECT\_SUPP}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04086}04086                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__header__10}{scsi\_mode\_header\_10}} *mode10\_hdr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04087}04087                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}} *dp\_page;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04088}04088                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__sense__10}{scsi\_mode\_sense\_10}} *cdb;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04089}04089                 \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} *prot;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04090}04090                 \textcolor{keywordtype}{int} dp\_len, returned\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04091}04091 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04092}04092                 \textcolor{keywordflow}{if} (dp\_size == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04093}04093                         dp\_size = \textcolor{keyword}{sizeof}(*dp\_page);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04094}04094 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04095}04095                 dp\_len = \textcolor{keyword}{sizeof}(*mode10\_hdr) + dp\_size;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04096}04096                 mode10\_hdr = malloc(dp\_len, M\_SCSISA, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04097}04097                 \textcolor{keywordflow}{if} (mode10\_hdr == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04098}04098                         error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04099}04099                         \textcolor{keywordflow}{goto} sagetparamsexit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04100}04100                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04101}04101 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04102}04102                 \mbox{\hyperlink{scsi__all_8c_aab2b4c4377d3de0d3a713c7c629ec3b9}{scsi\_mode\_sense\_len}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04103}04103                                     \textcolor{comment}{/*retries*/} 5,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04104}04104                                     \textcolor{comment}{/*cbfcnp*/} NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04105}04105                                     \textcolor{comment}{/*tag\_action*/} \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04106}04106                                     \textcolor{comment}{/*dbd*/} TRUE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04107}04107                                     \textcolor{comment}{/*page\_code*/} (prot\_changeable == 0) ?}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04108}04108                                                   \mbox{\hyperlink{scsi__all_8h_a8b73ae18fa8796de2cbfc59283a89bd7}{SMS\_PAGE\_CTRL\_CURRENT}} :}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04109}04109                                                   \mbox{\hyperlink{scsi__all_8h_a4a59c0e0c09721dcbdcf4c27b3da1201}{SMS\_PAGE\_CTRL\_CHANGEABLE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04110}04110                                     \textcolor{comment}{/*page*/} \mbox{\hyperlink{scsi__all_8h_a9f75aa6ff4c23b43fb0ae6f269e9cd49}{SMS\_CONTROL\_MODE\_PAGE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04111}04111                                     \textcolor{comment}{/*param\_buf*/} (uint8\_t *)mode10\_hdr,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04112}04112                                     \textcolor{comment}{/*param\_len*/} dp\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04113}04113                                     \textcolor{comment}{/*minimum\_cmd\_size*/} 10,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04114}04114                                     \textcolor{comment}{/*sense\_len*/} \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04115}04115                                     \textcolor{comment}{/*timeout*/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04116}04116                                     softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6dda6e14e8cf743dc3efa009b308ef95}{SA\_TIMEOUT\_MODE\_SENSE}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04117}04117                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04118}04118 \textcolor{comment}{                 * XXX KDM we need to be able to set the subpage in the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04119}04119 \textcolor{comment}{                 * fill function.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04120}04120 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04121}04121                 cdb = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__sense__10}{scsi\_mode\_sense\_10}} *)\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04122}04122                 cdb-\/>\mbox{\hyperlink{structscsi__mode__sense__10_a022d916b8a63d721c0e6a2f0d907e549}{subpage}} = \mbox{\hyperlink{scsi__sa_8h_afd5627fc63513fce4aa318822de8a4cc}{SA\_CTRL\_DP\_SUBPAGE\_CODE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04123}04123 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04124}04124                 error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04125}04125                     softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04126}04126                 \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04127}04127                         free(mode10\_hdr, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04128}04128                         \textcolor{keywordflow}{goto} sagetparamsexit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04129}04129                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04130}04130 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04131}04131                 status = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04132}04132                 \textcolor{keywordflow}{if} (status != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04133}04133                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04134}04134                         free(mode10\_hdr, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04135}04135                         \textcolor{keywordflow}{goto} sagetparamsexit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04136}04136                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04137}04137 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04138}04138                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04139}04139 \textcolor{comment}{                 * The returned data length at least has to be long enough}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04140}04140 \textcolor{comment}{                 * for us to look at length in the mode page header.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04141}04141 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04142}04142                 returned\_len = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a876ad61cacd6314a81bcb506ed3d4744}{dxfer\_len}} -\/ \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04143}04143                 \textcolor{keywordflow}{if} (returned\_len < \textcolor{keyword}{sizeof}(mode10\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__10_a1b4a430276b94ee1595dab7f4a565952}{data\_length}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04144}04144                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04145}04145                         free(mode10\_hdr, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04146}04146                         \textcolor{keywordflow}{goto} sagetparamsexit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04147}04147                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04148}04148 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04149}04149                 returned\_len = min(returned\_len, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04150}04150                     \textcolor{keyword}{sizeof}(mode10\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__10_a1b4a430276b94ee1595dab7f4a565952}{data\_length}}) +}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04151}04151                     \mbox{\hyperlink{scsi__all_8h_a3bed0f6b9b74c170a3356b4263830a34}{scsi\_2btoul}}(mode10\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__10_a1b4a430276b94ee1595dab7f4a565952}{data\_length}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04152}04152 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04153}04153                 dp\_page = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}} *)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04154}04154                     \&mode10\_hdr[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04155}04155 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04156}04156                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04157}04157 \textcolor{comment}{                 * We also have to have enough data to include the prot\_bits}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04158}04158 \textcolor{comment}{                 * in the subpage.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04159}04159 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04160}04160                 \textcolor{keywordflow}{if} (returned\_len < (\textcolor{keyword}{sizeof}(*mode10\_hdr) +}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04161}04161                     \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}}, \mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04162}04162                     + \textcolor{keyword}{sizeof}(dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}}))) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04163}04163                         error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04164}04164                         free(mode10\_hdr, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04165}04165                         \textcolor{keywordflow}{goto} sagetparamsexit;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04166}04166                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04167}04167 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04168}04168                 prot = \&softc-\/>\mbox{\hyperlink{structsa__softc_a28fb0330dc0653eb18a143567c3f4f9d}{prot\_info}}.\mbox{\hyperlink{structsa__prot__info_ab5c7f9311abbe2a8ed2b3fc335bc1ad7}{cur\_prot\_state}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04169}04169                 prot-\/>\mbox{\hyperlink{structsa__prot__state_a1ead5ab1f9591218e35ced290670afc1}{prot\_method}} = dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_aab96475e2f1d661b9e0f1c9e13d4c0f8}{prot\_method}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04170}04170                 prot-\/>\mbox{\hyperlink{structsa__prot__state_ae9196a0a885e72c5b2b6ea1537ee2090}{pi\_length}} = dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_af721a6952192f16a3df049b36bda96ed}{pi\_length}} \&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04171}04171                     \mbox{\hyperlink{scsi__sa_8h_a3a79707645fec57ac3df2e5141eaf10c}{SA\_CTRL\_DP\_PI\_LENGTH\_MASK}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04172}04172                 prot-\/>\mbox{\hyperlink{structsa__prot__state_aa13d0fb6b12ac3242749ac525282c2ba}{lbp\_w}} = (dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \& \mbox{\hyperlink{scsi__sa_8h_ae396873635fdde965403ad0b048c6c67}{SA\_CTRL\_DP\_LBP\_W}}) ? 1 :0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04173}04173                 prot-\/>\mbox{\hyperlink{structsa__prot__state_abfa494a22d6ce4596958f2e5986aff14}{lbp\_r}} = (dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \& \mbox{\hyperlink{scsi__sa_8h_a0b9846a8a00413cbce5098d10f2191f2}{SA\_CTRL\_DP\_LBP\_R}}) ? 1 :0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04174}04174                 prot-\/>\mbox{\hyperlink{structsa__prot__state_aa60f6294492f9bf63392df0a7609edca}{rbdp}} = (dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \& \mbox{\hyperlink{scsi__sa_8h_af632d00574f0f4b16ff0f3eeb4ced477}{SA\_CTRL\_DP\_RBDP}}) ? 1 :0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04175}04175                 prot-\/>\mbox{\hyperlink{structsa__prot__state_a89fe03ce576b0e0843562f4331c70aef}{initialized}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04176}04176 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04177}04177                 \textcolor{keywordflow}{if} (prot\_page != NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04178}04178                         bcopy(dp\_page, prot\_page, min(\textcolor{keyword}{sizeof}(*prot\_page),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04179}04179                             \textcolor{keyword}{sizeof}(*dp\_page)));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04180}04180 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04181}04181                 free(mode10\_hdr, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04182}04182         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04183}04183 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04184}04184         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__debug_8h_af17c6332916d08ae2b1c32630203d4ab}{CAM\_DEBUGGED}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04185}04185                 \textcolor{keywordtype}{int} idx;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04186}04186                 \textcolor{keywordtype}{char} *xyz = mode\_buffer;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04187}04187                 \mbox{\hyperlink{cam__xpt_8c_a1de517aa78d2b98ed9ff46a85f31d54e}{xpt\_print\_path}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04188}04188                 printf(\textcolor{stringliteral}{"{}Mode Sense Data="{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04189}04189                 \textcolor{keywordflow}{for} (idx = 0; idx < mode\_buffer\_len; idx++)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04190}04190                         printf(\textcolor{stringliteral}{"{} 0x\%02x"{}}, xyz[idx] \& 0xff);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04191}04191                 printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04192}04192         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04193}04193 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04194}04194 sagetparamsexit:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04195}04195 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04196}04196         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04197}04197         free(mode\_buffer, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04198}04198         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04199}04199 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04200}04200 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04201}04201 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04202}04202 \textcolor{comment}{ * Set protection information to the pending protection information stored}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04203}04203 \textcolor{comment}{ * in the softc.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04204}04204 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04205}04205 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04206}\mbox{\hyperlink{scsi__sa_8c_a76b3309ed0aacd043656e814d2461154}{04206}} \mbox{\hyperlink{scsi__sa_8c_a76b3309ed0aacd043656e814d2461154}{sasetprot}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{struct} \mbox{\hyperlink{structsa__prot__state}{sa\_prot\_state}} *new\_prot)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04207}04207 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04208}04208         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04209}04209         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}} *dp\_page, *dp\_changeable;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04210}04210         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__header__10}{scsi\_mode\_header\_10}} *mode10\_hdr, *mode10\_changeable;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04211}04211         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04212}04212         uint8\_t current\_speed;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04213}04213         \textcolor{keywordtype}{size\_t} dp\_size, dp\_page\_length;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04214}04214         \textcolor{keywordtype}{int} dp\_len, buff\_mode;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04215}04215         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04216}04216 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04217}04217         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04218}04218         mode10\_hdr = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04219}04219         mode10\_changeable = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04220}04220         \mbox{\hyperlink{unionccb}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04221}04221 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04222}04222         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04223}04223 \textcolor{comment}{         * Start off with the size set to the actual length of the page}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04224}04224 \textcolor{comment}{         * that we have defined.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04225}04225 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04226}04226         dp\_size = \textcolor{keyword}{sizeof}(*dp\_changeable);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04227}04227         dp\_page\_length = dp\_size -\/}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04228}04228             \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}}, prot\_method);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04229}04229 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04230}04230 retry\_length:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04231}04231 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04232}04232         dp\_len = \textcolor{keyword}{sizeof}(*mode10\_changeable) + dp\_size;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04233}04233         mode10\_changeable = malloc(dp\_len, M\_SCSISA, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04234}04234         \textcolor{keywordflow}{if} (mode10\_changeable == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04235}04235                 error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04236}04236                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04237}04237         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04238}04238 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04239}04239         dp\_changeable =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04240}04240             (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}} *)\&mode10\_changeable[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04241}04241 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04242}04242         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04243}04243 \textcolor{comment}{         * First get the data protection page changeable parameters mask.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04244}04244 \textcolor{comment}{         * We need to know which parameters the drive supports changing.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04245}04245 \textcolor{comment}{         * We also need to know what the drive claims that its page length}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04246}04246 \textcolor{comment}{         * is.  The reason is that IBM drives in particular are very picky}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04247}04247 \textcolor{comment}{         * about the page length.  They want it (the length set in the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04248}04248 \textcolor{comment}{         * page structure itself) to be 28 bytes, and they want the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04249}04249 \textcolor{comment}{         * parameter list length specified in the mode select header to be}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04250}04250 \textcolor{comment}{         * 40 bytes.  So, to work with IBM drives as well as any other tape}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04251}04251 \textcolor{comment}{         * drive, find out what the drive claims the page length is, and}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04252}04252 \textcolor{comment}{         * make sure that we match that.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04253}04253 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04254}04254         error = \mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{sagetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13afba43d46a8e00933c70a33440a55a98a}{SA\_PARAM\_SPEED}} | \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2aaf5084da4efb059c34e48672c10f3a}{SA\_PARAM\_LBP}},  }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04255}04255             NULL, NULL, NULL, \&buff\_mode, NULL, \&current\_speed, NULL, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04256}04256             NULL, NULL, dp\_changeable, dp\_size, \textcolor{comment}{/*prot\_changeable*/} 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04257}04257         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04258}04258                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04259}04259 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04260}04260         \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__all_8h_a3bed0f6b9b74c170a3356b4263830a34}{scsi\_2btoul}}(dp\_changeable-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_af07e671bfdb5c8127465a99b2c72181e}{length}}) > dp\_page\_length) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04261}04261                 dp\_page\_length = \mbox{\hyperlink{scsi__all_8h_a3bed0f6b9b74c170a3356b4263830a34}{scsi\_2btoul}}(dp\_changeable-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_af07e671bfdb5c8127465a99b2c72181e}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04262}04262                 dp\_size = dp\_page\_length +}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04263}04263                     \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04264}04264                     \mbox{\hyperlink{structscsi__control__data__prot__subpage_aab96475e2f1d661b9e0f1c9e13d4c0f8}{prot\_method}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04265}04265                 free(mode10\_changeable, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04266}04266                 mode10\_changeable = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04267}04267                 \textcolor{keywordflow}{goto} retry\_length;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04268}04268         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04269}04269 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04270}04270         mode10\_hdr = malloc(dp\_len, M\_SCSISA, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04271}04271         \textcolor{keywordflow}{if} (mode10\_hdr == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04272}04272                 error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04273}04273                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04274}04274         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04275}04275 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04276}04276         dp\_page = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__control__data__prot__subpage}{scsi\_control\_data\_prot\_subpage}} *)\&mode10\_hdr[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04277}04277 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04278}04278         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04279}04279 \textcolor{comment}{         * Now grab the actual current settings in the page.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04280}04280 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04281}04281         error = \mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{sagetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13afba43d46a8e00933c70a33440a55a98a}{SA\_PARAM\_SPEED}} | \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2aaf5084da4efb059c34e48672c10f3a}{SA\_PARAM\_LBP}},  }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04282}04282             NULL, NULL, NULL, \&buff\_mode, NULL, \&current\_speed, NULL, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04283}04283             NULL, NULL, dp\_page, dp\_size, \textcolor{comment}{/*prot\_changeable*/} 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04284}04284         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04285}04285                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04286}04286 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04287}04287         \textcolor{comment}{/* These two fields need to be 0 for MODE SELECT */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04288}04288         \mbox{\hyperlink{scsi__all_8h_a645af3def268320a573c026debde29e8}{scsi\_ulto2b}}(0, mode10\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__10_a1b4a430276b94ee1595dab7f4a565952}{data\_length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04289}04289         mode10\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__10_a23a2bd4fa0e4ee45d83fe687acfa7618}{medium\_type}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04290}04290         \textcolor{comment}{/* We are not including a block descriptor */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04291}04291         \mbox{\hyperlink{scsi__all_8h_a645af3def268320a573c026debde29e8}{scsi\_ulto2b}}(0, mode10\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__10_a748198f0ef40ab5e78a4b796e84313a0}{blk\_desc\_len}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04292}04292 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04293}04293         mode10\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__10_a22ce72a5daac2f8e5e898bb39a1d847c}{dev\_spec}} = current\_speed;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04294}04294         \textcolor{comment}{/* if set, set single-\/initiator buffering mode */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04295}04295         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a99d1aec7cacf18491280fc264fcacf89}{buffer\_mode}} == \mbox{\hyperlink{scsi__sa_8h_a0def48f570e4846878ac6cce9a3c83c9}{SMH\_SA\_BUF\_MODE\_SIBUF}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04296}04296                 mode10\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__10_a22ce72a5daac2f8e5e898bb39a1d847c}{dev\_spec}} |= \mbox{\hyperlink{scsi__sa_8h_a0def48f570e4846878ac6cce9a3c83c9}{SMH\_SA\_BUF\_MODE\_SIBUF}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04297}04297         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04298}04298 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04299}04299         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04300}04300 \textcolor{comment}{         * For each field, make sure that the drive allows changing it}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04301}04301 \textcolor{comment}{         * before bringing in the user's setting.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04302}04302 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04303}04303         \textcolor{keywordflow}{if} (dp\_changeable-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_aab96475e2f1d661b9e0f1c9e13d4c0f8}{prot\_method}} != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04304}04304                 dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_aab96475e2f1d661b9e0f1c9e13d4c0f8}{prot\_method}} = new\_prot-\/>\mbox{\hyperlink{structsa__prot__state_a1ead5ab1f9591218e35ced290670afc1}{prot\_method}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04305}04305 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04306}04306         \textcolor{keywordflow}{if} (dp\_changeable-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_af721a6952192f16a3df049b36bda96ed}{pi\_length}} \& \mbox{\hyperlink{scsi__sa_8h_a3a79707645fec57ac3df2e5141eaf10c}{SA\_CTRL\_DP\_PI\_LENGTH\_MASK}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04307}04307                 dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_af721a6952192f16a3df049b36bda96ed}{pi\_length}} \&= \string~SA\_CTRL\_DP\_PI\_LENGTH\_MASK;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04308}04308                 dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_af721a6952192f16a3df049b36bda96ed}{pi\_length}} |= (new\_prot-\/>\mbox{\hyperlink{structsa__prot__state_ae9196a0a885e72c5b2b6ea1537ee2090}{pi\_length}} \&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04309}04309                     \mbox{\hyperlink{scsi__sa_8h_a3a79707645fec57ac3df2e5141eaf10c}{SA\_CTRL\_DP\_PI\_LENGTH\_MASK}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04310}04310         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04311}04311         \textcolor{keywordflow}{if} (dp\_changeable-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \& \mbox{\hyperlink{scsi__sa_8h_ae396873635fdde965403ad0b048c6c67}{SA\_CTRL\_DP\_LBP\_W}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04312}04312                 \textcolor{keywordflow}{if} (new\_prot-\/>\mbox{\hyperlink{structsa__prot__state_aa13d0fb6b12ac3242749ac525282c2ba}{lbp\_w}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04313}04313                         dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} |= \mbox{\hyperlink{scsi__sa_8h_ae396873635fdde965403ad0b048c6c67}{SA\_CTRL\_DP\_LBP\_W}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04314}04314                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04315}04315                         dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \&= \string~SA\_CTRL\_DP\_LBP\_W;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04316}04316         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04317}04317 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04318}04318         \textcolor{keywordflow}{if} (dp\_changeable-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \& \mbox{\hyperlink{scsi__sa_8h_a0b9846a8a00413cbce5098d10f2191f2}{SA\_CTRL\_DP\_LBP\_R}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04319}04319                 \textcolor{keywordflow}{if} (new\_prot-\/>\mbox{\hyperlink{structsa__prot__state_abfa494a22d6ce4596958f2e5986aff14}{lbp\_r}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04320}04320                         dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} |= \mbox{\hyperlink{scsi__sa_8h_a0b9846a8a00413cbce5098d10f2191f2}{SA\_CTRL\_DP\_LBP\_R}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04321}04321                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04322}04322                         dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \&= \string~SA\_CTRL\_DP\_LBP\_R;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04323}04323         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04324}04324 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04325}04325         \textcolor{keywordflow}{if} (dp\_changeable-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \& \mbox{\hyperlink{scsi__sa_8h_af632d00574f0f4b16ff0f3eeb4ced477}{SA\_CTRL\_DP\_RBDP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04326}04326                 \textcolor{keywordflow}{if} (new\_prot-\/>\mbox{\hyperlink{structsa__prot__state_aa60f6294492f9bf63392df0a7609edca}{rbdp}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04327}04327                         dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} |= \mbox{\hyperlink{scsi__sa_8h_af632d00574f0f4b16ff0f3eeb4ced477}{SA\_CTRL\_DP\_RBDP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04328}04328                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04329}04329                         dp\_page-\/>\mbox{\hyperlink{structscsi__control__data__prot__subpage_a521faccc066b7a7110d7f6757f582a6c}{prot\_bits}} \&= \string~SA\_CTRL\_DP\_RBDP;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04330}04330         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04331}04331 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04332}04332         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(periph, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04333}04333 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04334}04334         \mbox{\hyperlink{scsi__all_8c_a229c4639ac306f94a8d9837f30274797}{scsi\_mode\_select\_len}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04335}04335                              \textcolor{comment}{/*retries*/} 5,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04336}04336                              \textcolor{comment}{/*cbfcnp*/} NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04337}04337                              \textcolor{comment}{/*tag\_action*/} \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04338}04338                              \textcolor{comment}{/*scsi\_page\_fmt*/} TRUE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04339}04339                              \textcolor{comment}{/*save\_pages*/} FALSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04340}04340                              \textcolor{comment}{/*param\_buf*/} (uint8\_t *)mode10\_hdr,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04341}04341                              \textcolor{comment}{/*param\_len*/} dp\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04342}04342                              \textcolor{comment}{/*minimum\_cmd\_size*/} 10,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04343}04343                              \textcolor{comment}{/*sense\_len*/} \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04344}04344                              \textcolor{comment}{/*timeout*/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04345}04345                                    softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa506b917e072378f2c50b4abf5bac3ec3}{SA\_TIMEOUT\_MODE\_SELECT}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04346}04346 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04347}04347         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04348}04348         \textcolor{keywordflow}{if} (error != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04349}04349                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04350}04350 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04351}04351         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}}) != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04352}04352                 error = EINVAL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04353}04353                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04354}04354         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04355}04355 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04356}04356         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04357}04357 \textcolor{comment}{         * The operation was successful.  We could just copy the settings}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04358}04358 \textcolor{comment}{         * the user requested, but just in case the drive ignored some of}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04359}04359 \textcolor{comment}{         * our settings, let's ask for status again.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04360}04360 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04361}04361         error = \mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{sagetparams}}(periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13afba43d46a8e00933c70a33440a55a98a}{SA\_PARAM\_SPEED}} | \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2aaf5084da4efb059c34e48672c10f3a}{SA\_PARAM\_LBP}},  }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04362}04362             NULL, NULL, NULL, \&buff\_mode, NULL, \&current\_speed, NULL, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04363}04363             NULL, NULL, dp\_page, dp\_size, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04364}04364 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04365}04365 bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04366}04366         \textcolor{keywordflow}{if} (\mbox{\hyperlink{unionccb}{ccb}} != NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04367}04367                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04368}04368         free(mode10\_hdr, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04369}04369         free(mode10\_changeable, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04370}04370         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04371}04371 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04372}04372 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04373}04373 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04374}04374 \textcolor{comment}{ * The purpose of this function is to set one of four different parameters}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04375}04375 \textcolor{comment}{ * for a tape drive:}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04376}04376 \textcolor{comment}{ *      -\/ blocksize}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04377}04377 \textcolor{comment}{ *      -\/ density}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04378}04378 \textcolor{comment}{ *      -\/ compression / compression algorithm}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04379}04379 \textcolor{comment}{ *      -\/ buffering mode}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04380}04380 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04381}04381 \textcolor{comment}{ * The assumption is that this will be called from saioctl(), and therefore}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04382}04382 \textcolor{comment}{ * from a process context.  Thus the waiting malloc calls below.  If that}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04383}04383 \textcolor{comment}{ * assumption ever changes, the malloc calls should be changed to be}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04384}04384 \textcolor{comment}{ * NOWAIT mallocs.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04385}04385 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04386}04386 \textcolor{comment}{ * Any or all of the four parameters may be set when this function is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04387}04387 \textcolor{comment}{ * called.  It should handle setting more than one parameter at once.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04388}04388 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04389}04389 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04390}\mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{04390}} \mbox{\hyperlink{scsi__sa_8c_a0c2b697d1924f83c669886dab9e4346c}{sasetparams}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13}{sa\_params}} params\_to\_set,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04391}04391             u\_int32\_t blocksize, u\_int8\_t density, u\_int32\_t calg,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04392}04392             u\_int32\_t sense\_flags)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04393}04393 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04394}04394         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04395}04395         u\_int32\_t current\_blocksize;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04396}04396         u\_int32\_t current\_calg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04397}04397         u\_int8\_t current\_density;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04398}04398         u\_int8\_t current\_speed;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04399}04399         \textcolor{keywordtype}{int} comp\_enabled, comp\_supported;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04400}04400         \textcolor{keywordtype}{void} *mode\_buffer;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04401}04401         \textcolor{keywordtype}{int} mode\_buffer\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04402}04402         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__header__6}{scsi\_mode\_header\_6}} *mode\_hdr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04403}04403         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__blk__desc}{scsi\_mode\_blk\_desc}} *mode\_blk;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04404}04404         \mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}} *ccomp, *cpage;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04405}04405         \textcolor{keywordtype}{int} buff\_mode;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04406}04406         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04407}04407         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04408}04408 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04409}04409         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04410}04410 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04411}04411         ccomp = malloc(\textcolor{keyword}{sizeof} (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}}), M\_SCSISA, M\_NOWAIT);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04412}04412         \textcolor{keywordflow}{if} (ccomp == NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04413}04413                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04414}04414 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04415}04415         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04416}04416 \textcolor{comment}{         * Since it doesn't make sense to set the number of blocks, or}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04417}04417 \textcolor{comment}{         * write protection, we won't try to get the current value.  We}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04418}04418 \textcolor{comment}{         * always want to get the blocksize, so we can set it back to the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04419}04419 \textcolor{comment}{         * proper value.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04420}04420 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04421}04421         error = \mbox{\hyperlink{scsi__sa_8c_a7b4662845a31162feb07588fc0675ce2}{sagetparams}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04422}04422             params\_to\_set | \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}} | \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13afba43d46a8e00933c70a33440a55a98a}{SA\_PARAM\_SPEED}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04423}04423             \&current\_blocksize, \&current\_density, NULL, \&buff\_mode, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04424}04424             \&current\_speed, \&comp\_supported, \&comp\_enabled,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04425}04425             \&current\_calg, ccomp, NULL, 0, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04426}04426 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04427}04427         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04428}04428                 free(ccomp, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04429}04429                 \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04430}04430         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04431}04431 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04432}04432         mode\_buffer\_len = \textcolor{keyword}{sizeof}(*mode\_hdr) + \textcolor{keyword}{sizeof}(*mode\_blk);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04433}04433         \textcolor{keywordflow}{if} (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04434}04434                 mode\_buffer\_len += \textcolor{keyword}{sizeof} (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04435}04435 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04436}04436         mode\_buffer = malloc(mode\_buffer\_len, M\_SCSISA, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04437}04437         \textcolor{keywordflow}{if} (mode\_buffer == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04438}04438                 free(ccomp, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04439}04439                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04440}04440         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04441}04441 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04442}04442         mode\_hdr = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__header__6}{scsi\_mode\_header\_6}} *)mode\_buffer;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04443}04443         mode\_blk = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__blk__desc}{scsi\_mode\_blk\_desc}} *)\&mode\_hdr[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04444}04444 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04445}04445         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(periph, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04446}04446 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04447}04447 retry:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04448}04448 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04449}04449         \textcolor{keywordflow}{if} (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04450}04450                 \textcolor{keywordflow}{if} (mode\_blk) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04451}04451                         cpage = (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}} *)\&mode\_blk[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04452}04452                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04453}04453                         cpage = (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}} *)\&mode\_hdr[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04454}04454                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04455}04455                 bcopy(ccomp, cpage, \textcolor{keyword}{sizeof} (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04456}04456                 cpage-\/>\mbox{\hyperlink{unionsa__comp__t_a41adc1284f6345a62dbd62c4dabdcec1}{hdr}}.\mbox{\hyperlink{unionsa__comp__t_a0f050650f28c50bc04f3f721fe1ab665}{pagecode}} \&= \string~0x80;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04457}04457         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04458}04458                 cpage = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04459}04459 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04460}04460         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04461}04461 \textcolor{comment}{         * If the caller wants us to set the blocksize, use the one they}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04462}04462 \textcolor{comment}{         * pass in.  Otherwise, use the blocksize we got back from the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04463}04463 \textcolor{comment}{         * mode select above.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04464}04464 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04465}04465         \textcolor{keywordflow}{if} (mode\_blk) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04466}04466                 \textcolor{keywordflow}{if} (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04467}04467                         \mbox{\hyperlink{scsi__all_8h_ad744ce4fe5b776d796fca7338f45d1a6}{scsi\_ulto3b}}(blocksize, mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_a7684a030e3b01c4f0a39563b5294cbb6}{blklen}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04468}04468                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04469}04469                         \mbox{\hyperlink{scsi__all_8h_ad744ce4fe5b776d796fca7338f45d1a6}{scsi\_ulto3b}}(current\_blocksize, mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_a7684a030e3b01c4f0a39563b5294cbb6}{blklen}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04470}04470 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04471}04471                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04472}04472 \textcolor{comment}{                 * Set density if requested, else preserve old density.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04473}04473 \textcolor{comment}{                 * SCSI\_SAME\_DENSITY only applies to SCSI-\/2 or better}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04474}04474 \textcolor{comment}{                 * devices, else density we've latched up in our softc.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04475}04475 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04476}04476                 \textcolor{keywordflow}{if} (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a866ff93522ab5a676dc5bfc9361847f0}{SA\_PARAM\_DENSITY}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04477}04477                         mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}} = \mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04478}04478                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ade608c888502ad91ed1a942fe511e606}{scsi\_rev}} > \mbox{\hyperlink{scsi__all_8h_a00bb471bc9bf158c02e1ade8d8c635cc}{SCSI\_REV\_CCS}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04479}04479                         mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}} = \mbox{\hyperlink{scsi__all_8h_ada2466e212d799cfb942ec2e7b684eae}{SCSI\_SAME\_DENSITY}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04480}04480                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04481}04481                         mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}} = softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04482}04482                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04483}04483         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04484}04484 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04485}04485         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04486}04486 \textcolor{comment}{         * For mode selects, these two fields must be zero.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04487}04487 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04488}04488         mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_ad898bf54019be72c4a7d596b732e179a}{data\_length}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04489}04489         mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a5ddfa1ed5dd0766a2f339f2ea5781daa}{medium\_type}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04490}04490 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04491}04491         \textcolor{comment}{/* set the speed to the current value */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04492}04492         mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a5c48083f48dac4fed9444ca94fe6a767}{dev\_spec}} = current\_speed;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04493}04493 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04494}04494         \textcolor{comment}{/* if set, set single-\/initiator buffering mode */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04495}04495         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a99d1aec7cacf18491280fc264fcacf89}{buffer\_mode}} == \mbox{\hyperlink{scsi__sa_8h_a0def48f570e4846878ac6cce9a3c83c9}{SMH\_SA\_BUF\_MODE\_SIBUF}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04496}04496                 mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a5c48083f48dac4fed9444ca94fe6a767}{dev\_spec}} |= \mbox{\hyperlink{scsi__sa_8h_a0def48f570e4846878ac6cce9a3c83c9}{SMH\_SA\_BUF\_MODE\_SIBUF}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04497}04497         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04498}04498 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04499}04499         \textcolor{keywordflow}{if} (mode\_blk)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04500}04500                 mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a7586296eb8f4f6e2435f2673147ab143}{blk\_desc\_len}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__blk__desc}{scsi\_mode\_blk\_desc}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04501}04501         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04502}04502                 mode\_hdr-\/>\mbox{\hyperlink{structscsi__mode__header__6_a7586296eb8f4f6e2435f2673147ab143}{blk\_desc\_len}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04503}04503 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04504}04504         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04505}04505 \textcolor{comment}{         * First, if the user wants us to set the compression algorithm or}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04506}04506 \textcolor{comment}{         * just turn compression on, check to make sure that this drive}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04507}04507 \textcolor{comment}{         * supports compression.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04508}04508 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04509}04509         \textcolor{keywordflow}{if} (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04510}04510                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04511}04511 \textcolor{comment}{                 * If the compression algorithm is 0, disable compression.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04512}04512 \textcolor{comment}{                 * If the compression algorithm is non-\/zero, enable}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04513}04513 \textcolor{comment}{                 * compression and set the compression type to the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04514}04514 \textcolor{comment}{                 * specified compression algorithm, unless the algorithm is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04515}04515 \textcolor{comment}{                 * MT\_COMP\_ENABLE.  In that case, we look at the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04516}04516 \textcolor{comment}{                 * compression algorithm that is currently set and if it is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04517}04517 \textcolor{comment}{                 * non-\/zero, we leave it as-\/is.  If it is zero, and we have}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04518}04518 \textcolor{comment}{                 * saved a compression algorithm from a time when}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04519}04519 \textcolor{comment}{                 * compression was enabled before, set the compression to}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04520}04520 \textcolor{comment}{                 * the saved value.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04521}04521 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04522}04522                 \textcolor{keywordflow}{switch} (ccomp-\/>\mbox{\hyperlink{unionsa__comp__t_a41adc1284f6345a62dbd62c4dabdcec1}{hdr}}.\mbox{\hyperlink{unionsa__comp__t_a0f050650f28c50bc04f3f721fe1ab665}{pagecode}} \& \string~0x80) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04523}04523                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_ae33f766135ab54f10fe4123a9739cf60}{SA\_DEVICE\_CONFIGURATION\_PAGE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04524}04524                 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04525}04525                         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__dev__conf__page}{scsi\_dev\_conf\_page}} *dcp = \&cpage-\/>\mbox{\hyperlink{unionsa__comp__t_a9984bfe6f5cf9e4bcf40493feeaef922}{dconf}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04526}04526                         \textcolor{keywordflow}{if} (calg == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04527}04527                                 dcp-\/>\mbox{\hyperlink{structscsi__dev__conf__page_a0fd961e8840c72a66ccd82b7755bd2ab}{sel\_comp\_alg}} = \mbox{\hyperlink{scsi__sa_8h_a5355a2c368920c42a49574b2d1dfe260}{SA\_COMP\_NONE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04528}04528                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04529}04529                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04530}04530                         \textcolor{keywordflow}{if} (calg != MT\_COMP\_ENABLE) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04531}04531                                 dcp-\/>\mbox{\hyperlink{structscsi__dev__conf__page_a0fd961e8840c72a66ccd82b7755bd2ab}{sel\_comp\_alg}} = calg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04532}04532                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (dcp-\/>\mbox{\hyperlink{structscsi__dev__conf__page_a0fd961e8840c72a66ccd82b7755bd2ab}{sel\_comp\_alg}} == \mbox{\hyperlink{scsi__sa_8h_a5355a2c368920c42a49574b2d1dfe260}{SA\_COMP\_NONE}} \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04533}04533                             softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04534}04534                                 dcp-\/>\mbox{\hyperlink{structscsi__dev__conf__page_a0fd961e8840c72a66ccd82b7755bd2ab}{sel\_comp\_alg}} = softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04535}04535                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04536}04536                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04537}04537                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04538}04538                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a803f9cf01585377260c4b41ae6d3f759}{SA\_DATA\_COMPRESSION\_PAGE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04539}04539                 \textcolor{keywordflow}{if} (ccomp-\/>\mbox{\hyperlink{unionsa__comp__t_ad0481e78acb41bfa9ecc051f93f04baf}{dcomp}}.\mbox{\hyperlink{structscsi__data__compression__page_ab922d002ff24ac3eb5a318e83f265373}{dce\_and\_dcc}} \& \mbox{\hyperlink{scsi__sa_8h_ae71a24944c8c8fd321699e8fdbf4d749}{SA\_DCP\_DCC}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04540}04540                         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__data__compression__page}{scsi\_data\_compression\_page}} *dcp = \&cpage-\/>\mbox{\hyperlink{unionsa__comp__t_ad0481e78acb41bfa9ecc051f93f04baf}{dcomp}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04541}04541                         \textcolor{keywordflow}{if} (calg == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04542}04542                                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04543}04543 \textcolor{comment}{                                 * Disable compression, but leave the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04544}04544 \textcolor{comment}{                                 * decompression and the capability bit}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04545}04545 \textcolor{comment}{                                 * alone.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04546}04546 \textcolor{comment}{                                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04547}04547                                 dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_ab922d002ff24ac3eb5a318e83f265373}{dce\_and\_dcc}} = \mbox{\hyperlink{scsi__sa_8h_ae71a24944c8c8fd321699e8fdbf4d749}{SA\_DCP\_DCC}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04548}04548                                 dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_a7aecf082291e7eccce7e7cdda18a9388}{dde\_and\_red}} |= \mbox{\hyperlink{scsi__sa_8h_ae7cbff60fb71f230a093c6087c9ab9b1}{SA\_DCP\_DDE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04549}04549                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04550}04550                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04551}04551                         \textcolor{comment}{/* enable compression \&\& decompression */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04552}04552                         dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_ab922d002ff24ac3eb5a318e83f265373}{dce\_and\_dcc}} = \mbox{\hyperlink{scsi__sa_8h_a4e409e7ae1ce04a8af70b3a6f5e87657}{SA\_DCP\_DCE}} | \mbox{\hyperlink{scsi__sa_8h_ae71a24944c8c8fd321699e8fdbf4d749}{SA\_DCP\_DCC}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04553}04553                         dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_a7aecf082291e7eccce7e7cdda18a9388}{dde\_and\_red}} |= \mbox{\hyperlink{scsi__sa_8h_ae7cbff60fb71f230a093c6087c9ab9b1}{SA\_DCP\_DDE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04554}04554                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04555}04555 \textcolor{comment}{                         * If there, use compression algorithm from caller.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04556}04556 \textcolor{comment}{                         * Otherwise, if there's a saved compression algorithm}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04557}04557 \textcolor{comment}{                         * and there is no current algorithm, use the saved}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04558}04558 \textcolor{comment}{                         * algorithm. Else parrot back what we got and hope}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04559}04559 \textcolor{comment}{                         * for the best.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04560}04560 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04561}04561                         \textcolor{keywordflow}{if} (calg != MT\_COMP\_ENABLE) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04562}04562                                 \mbox{\hyperlink{scsi__all_8h_aaa9d67f17d6412d1460d9bdee7e92d3e}{scsi\_ulto4b}}(calg, dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_a0e4e62c2a744ce824ff6de0e6ea4fe70}{comp\_algorithm}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04563}04563                                 \mbox{\hyperlink{scsi__all_8h_aaa9d67f17d6412d1460d9bdee7e92d3e}{scsi\_ulto4b}}(calg, dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_a8dc061dbd48c7530f52e9916ddf2cc3e}{decomp\_algorithm}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04564}04564                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{scsi__all_8h_a819d6f51420109cfeb06a235f299e113}{scsi\_4btoul}}(dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_a0e4e62c2a744ce824ff6de0e6ea4fe70}{comp\_algorithm}}) == 0 \&\&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04565}04565                             softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}} != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04566}04566                                 \mbox{\hyperlink{scsi__all_8h_aaa9d67f17d6412d1460d9bdee7e92d3e}{scsi\_ulto4b}}(softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04567}04567                                     dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_a0e4e62c2a744ce824ff6de0e6ea4fe70}{comp\_algorithm}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04568}04568                                 \mbox{\hyperlink{scsi__all_8h_aaa9d67f17d6412d1460d9bdee7e92d3e}{scsi\_ulto4b}}(softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04569}04569                                     dcp-\/>\mbox{\hyperlink{structscsi__data__compression__page_a8dc061dbd48c7530f52e9916ddf2cc3e}{decomp\_algorithm}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04570}04570                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04571}04571                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04572}04572                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04573}04573                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04574}04574 \textcolor{comment}{                 * Compression does not appear to be supported-\/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04575}04575 \textcolor{comment}{                 * at least via the DATA COMPRESSION page. It}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04576}04576 \textcolor{comment}{                 * would be too much to ask us to believe that}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04577}04577 \textcolor{comment}{                 * the page itself is supported, but incorrectly}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04578}04578 \textcolor{comment}{                 * reports an ability to manipulate data compression,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04579}04579 \textcolor{comment}{                 * so we'll assume that this device doesn't support}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04580}04580 \textcolor{comment}{                 * compression. We can just fall through for that.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04581}04581 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04582}04582                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04583}04583                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04584}04584                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04585}04585 \textcolor{comment}{                         * The drive doesn't seem to support compression,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04586}04586 \textcolor{comment}{                         * so turn off the set compression bit.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04587}04587 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04588}04588                         params\_to\_set \&= \string~SA\_PARAM\_COMPRESSION;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04589}04589                         \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04590}04590                             \textcolor{stringliteral}{"{}device does not seem to support compression\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04591}04591 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04592}04592                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04593}04593 \textcolor{comment}{                         * If that was the only thing the user wanted us to set,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04594}04594 \textcolor{comment}{                         * clean up allocated resources and return with}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04595}04595 \textcolor{comment}{                         * 'operation not supported'.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04596}04596 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04597}04597                         \textcolor{keywordflow}{if} (params\_to\_set == \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a2d6e8e4afd2000dde8d9cbd5a1b0a7c7}{SA\_PARAM\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04598}04598                                 free(mode\_buffer, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04599}04599                                 \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04600}04600                                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04601}04601                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04602}04602                 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04603}04603                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04604}04604 \textcolor{comment}{                         * That wasn't the only thing the user wanted us to set.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04605}04605 \textcolor{comment}{                         * So, decrease the stated mode buffer length by the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04606}04606 \textcolor{comment}{                         * size of the compression mode page.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04607}04607 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04608}04608                         mode\_buffer\_len -\/= \textcolor{keyword}{sizeof}(\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04609}04609                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04610}04610         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04611}04611 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04612}04612         \textcolor{comment}{/* It is safe to retry this operation */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04613}04613         \mbox{\hyperlink{scsi__all_8c_a5119e4be4784b3ad619c30c6f2bc8e9a}{scsi\_mode\_select}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 5, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04614}04614             (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}})? TRUE : FALSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04615}04615             FALSE, mode\_buffer, mode\_buffer\_len, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04616}04616             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa506b917e072378f2c50b4abf5bac3ec3}{SA\_TIMEOUT\_MODE\_SELECT}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04617}04617 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04618}04618         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04619}04619             sense\_flags, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04620}04620 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04621}04621         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__debug_8h_af17c6332916d08ae2b1c32630203d4ab}{CAM\_DEBUGGED}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04622}04622                 \textcolor{keywordtype}{int} idx;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04623}04623                 \textcolor{keywordtype}{char} *xyz = mode\_buffer;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04624}04624                 \mbox{\hyperlink{cam__xpt_8c_a1de517aa78d2b98ed9ff46a85f31d54e}{xpt\_print\_path}}(periph-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04625}04625                 printf(\textcolor{stringliteral}{"{}Err\%d, Mode Select Data="{}}, error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04626}04626                 \textcolor{keywordflow}{for} (idx = 0; idx < mode\_buffer\_len; idx++)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04627}04627                         printf(\textcolor{stringliteral}{"{} 0x\%02x"{}}, xyz[idx] \& 0xff);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04628}04628                 printf(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04629}04629         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04630}04630 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04631}04631         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04632}04632                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04633}04633 \textcolor{comment}{                 * If we can, try without setting density/blocksize.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04634}04634 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04635}04635                 \textcolor{keywordflow}{if} (mode\_blk) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04636}04636                         \textcolor{keywordflow}{if} ((params\_to\_set \&}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04637}04637                             (\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a866ff93522ab5a676dc5bfc9361847f0}{SA\_PARAM\_DENSITY}}|\mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13af4732e6556a607b211a21b579ffefa4a}{SA\_PARAM\_BLOCKSIZE}})) == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04638}04638                                 mode\_blk = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04639}04639                                 \textcolor{keywordflow}{goto} retry;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04640}04640                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04641}04641                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04642}04642                         mode\_blk = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__mode__blk__desc}{scsi\_mode\_blk\_desc}} *)\&mode\_hdr[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04643}04643                         cpage = (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}} *)\&mode\_blk[1];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04644}04644                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04645}04645 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04646}04646                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04647}04647 \textcolor{comment}{                 * If we were setting the blocksize, and that failed, we}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04648}04648 \textcolor{comment}{                 * want to set it to its original value.  If we weren't}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04649}04649 \textcolor{comment}{                 * setting the blocksize, we don't want to change it.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04650}04650 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04651}04651                 \mbox{\hyperlink{scsi__all_8h_ad744ce4fe5b776d796fca7338f45d1a6}{scsi\_ulto3b}}(current\_blocksize, mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_a7684a030e3b01c4f0a39563b5294cbb6}{blklen}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04652}04652 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04653}04653                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04654}04654 \textcolor{comment}{                 * Set density if requested, else preserve old density.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04655}04655 \textcolor{comment}{                 * SCSI\_SAME\_DENSITY only applies to SCSI-\/2 or better}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04656}04656 \textcolor{comment}{                 * devices, else density we've latched up in our softc.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04657}04657 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04658}04658                 \textcolor{keywordflow}{if} (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a866ff93522ab5a676dc5bfc9361847f0}{SA\_PARAM\_DENSITY}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04659}04659                         mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}} = current\_density;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04660}04660                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ade608c888502ad91ed1a942fe511e606}{scsi\_rev}} > \mbox{\hyperlink{scsi__all_8h_a00bb471bc9bf158c02e1ade8d8c635cc}{SCSI\_REV\_CCS}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04661}04661                         mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}} = \mbox{\hyperlink{scsi__all_8h_ada2466e212d799cfb942ec2e7b684eae}{SCSI\_SAME\_DENSITY}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04662}04662                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04663}04663                         mode\_blk-\/>\mbox{\hyperlink{structscsi__mode__blk__desc_aacbbb5bbf42455ee927b2b588d8ea6b1}{density}} = softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04664}04664                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04665}04665 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04666}04666                 \textcolor{keywordflow}{if} (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04667}04667                         bcopy(ccomp, cpage, \textcolor{keyword}{sizeof} (\mbox{\hyperlink{unionsa__comp__t}{sa\_comp\_t}}));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04668}04668 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04669}04669                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04670}04670 \textcolor{comment}{                 * The retry count is the only CCB field that might have been}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04671}04671 \textcolor{comment}{                 * changed that we care about, so reset it back to 1.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04672}04672 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04673}04673                 \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab0f218bc2944e08931eb0d935ce4085f}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_af69c58b4653ec0977d4ccfe89e30cfad}{retry\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04674}04674                 \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, sense\_flags,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04675}04675                     softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04676}04676         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04677}04677 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04678}04678         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04679}04679 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04680}04680         \textcolor{keywordflow}{if} (ccomp != NULL)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04681}04681                 free(ccomp, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04682}04682 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04683}04683         \textcolor{keywordflow}{if} (params\_to\_set \& \mbox{\hyperlink{scsi__sa_8c_af1cd83d9c6092d2d487df3c80e091f13a3c030adaa6f53702d72c96ed04f44fa0}{SA\_PARAM\_COMPRESSION}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04684}04684                 \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04685}04685                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_COMP\_ENABLED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04686}04686                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04687}04687 \textcolor{comment}{                         * Even if we get an error setting compression,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04688}04688 \textcolor{comment}{                         * do not say that we don't support it. We could}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04689}04689 \textcolor{comment}{                         * have been wrong, or it may be media specific.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04690}04690 \textcolor{comment}{                         *      softc-\/>flags \&= \string~SA\_FLAG\_COMP\_SUPP;}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04691}04691 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04692}04692                         softc-\/>\mbox{\hyperlink{structsa__softc_a13dba299d57795a6ba2db0abd9baea83}{saved\_comp\_algorithm}} = softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04693}04693                         softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04694}04694                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04695}04695                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a1888f91e4e176990d6548f37e7724465}{SA\_FLAG\_COMP\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04696}04696                         softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}} = calg;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04697}04697                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04698}04698         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04699}04699 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04700}04700         free(mode\_buffer, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04701}04701         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04702}04702 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04703}04703 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04704}04704 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04705}\mbox{\hyperlink{scsi__sa_8c_a68ab43bfba2cea8003115c56df861103}{04705}} \mbox{\hyperlink{scsi__sa_8c_a68ab43bfba2cea8003115c56df861103}{saextget}}(\textcolor{keyword}{struct} cdev *dev, \textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *periph, \textcolor{keyword}{struct} sbuf *sb,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04706}04706     \textcolor{keyword}{struct} mtextget *g)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04707}04707 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04708}04708         \textcolor{keywordtype}{int} indent, error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04709}04709         \textcolor{keywordtype}{char} tmpstr[80];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04710}04710         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04711}04711         \textcolor{keywordtype}{int} tmpint;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04712}04712         uint32\_t maxio\_tmp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04713}04713         \textcolor{keyword}{struct }\mbox{\hyperlink{structccb__getdev}{ccb\_getdev}} cgd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04714}04714 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04715}04715         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04716}04716 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04717}04717         error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04718}04718 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04719}04719         error = \mbox{\hyperlink{scsi__sa_8c_a734f17432c2e146dff22882d62a45cb2}{sagetparams\_common}}(dev, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04720}04720         \textcolor{keywordflow}{if} (error)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04721}04721                 \textcolor{keywordflow}{goto} extget\_bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04722}04722         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{scsi__sa_8c_a5dd881cf0fa436ca411453137786f57a}{SA\_IS\_CTRL}}(dev) \&\& !softc-\/>\mbox{\hyperlink{structsa__softc_a54780185ffa258ad009a46fd53767c69}{open\_pending\_mount}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04723}04723                 \mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{sagetpos}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04724}04724 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04725}04725         indent = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04726}04726         \mbox{\hyperlink{scsi__sa_8c_add011268a2a0c41a6cb675ff2741e6d8}{SASBADDNODE}}(sb, indent, mtextget);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04727}04727         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04728}04728 \textcolor{comment}{         * Basic CAM peripheral information.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04729}04729 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04730}04730         \mbox{\hyperlink{scsi__sa_8c_a898460e57a90835812604ea28f1bef39}{SASBADDVARSTR}}(sb, indent, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}, \%s, periph\_name,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04731}04731             strlen(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a12b5871a0ccca32fa359b1512d5dabad}{periph\_name}}) + 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04732}04732         \mbox{\hyperlink{scsi__sa_8c_ab754019dea2edfcc43f746b84fc57e49}{SASBADDUINT}}(sb, indent, \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a2b4a50e233de9e726afe3e7e85e63960}{unit\_number}}, \%u, unit\_number);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04733}04733         memset(\&cgd, 0, \textcolor{keyword}{sizeof}(cgd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04734}04734         \mbox{\hyperlink{cam__xpt_8c_a64b1b7434225c072f2d9379fe39e359c}{xpt\_setup\_ccb}}(\&cgd.\mbox{\hyperlink{structccb__getdev_a5d14cdc58f775661b78dccb59121e90e}{ccb\_h}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04735}04735                       \mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04736}04736                       \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04737}04737         cgd.\mbox{\hyperlink{structccb__getdev_a5d14cdc58f775661b78dccb59121e90e}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_a7439d6fedcb6191113a285c51038cd71}{func\_code}} = \mbox{\hyperlink{cam__ccb_8h_aa49540dd5ca09d2e63a5251de499055cae076749d68954cdfbd24a6060976168f}{XPT\_GDEV\_TYPE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04738}04738         \mbox{\hyperlink{cam__xpt_8c_a6ef97382f5b1590b4d2d138516a63bcc}{xpt\_action}}((\textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *)\&cgd);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04739}04739         \textcolor{keywordflow}{if} ((cgd.\mbox{\hyperlink{structccb__getdev_a5d14cdc58f775661b78dccb59121e90e}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}} \& \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a82f0d57eda0654067dc2db0c2a218caa}{CAM\_STATUS\_MASK}}) != \mbox{\hyperlink{cam_8h_a9ff49352334e6ad8ce937cf2fdf4cfb3a3487a040bd091973beb62275a7309324}{CAM\_REQ\_CMP}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04740}04740                 g-\/>status = MT\_EXT\_GET\_ERROR;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04741}04741                 snprintf(g-\/>error\_str, \textcolor{keyword}{sizeof}(g-\/>error\_str),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04742}04742                     \textcolor{stringliteral}{"{}Error \%\#x returned for XPT\_GDEV\_TYPE CCB"{}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04743}04743                     cgd.\mbox{\hyperlink{structccb__getdev_a5d14cdc58f775661b78dccb59121e90e}{ccb\_h}}.\mbox{\hyperlink{structccb__hdr_abcec535dec8d07473cd2af995bf25d88}{status}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04744}04744                 \textcolor{keywordflow}{goto} extget\_bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04745}04745         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04746}04746 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04747}04747         \mbox{\hyperlink{cam_8c_aab5d87f3a20087cd671b6ec6ab990e10}{cam\_strvis}}(tmpstr, cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_a2c889ff5bf7d9f89d5f2f6a68fff970c}{vendor}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04748}04748             \textcolor{keyword}{sizeof}(cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_a2c889ff5bf7d9f89d5f2f6a68fff970c}{vendor}}), \textcolor{keyword}{sizeof}(tmpstr));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04749}04749         \mbox{\hyperlink{scsi__sa_8c_a18ca51cdcbad34444dc6f86a7e3259d6}{SASBADDVARSTRDESC}}(sb, indent, tmpstr, \%s, vendor,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04750}04750             \textcolor{keyword}{sizeof}(cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_a2c889ff5bf7d9f89d5f2f6a68fff970c}{vendor}}) + 1, \textcolor{stringliteral}{"{}SCSI Vendor ID"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04751}04751 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04752}04752         \mbox{\hyperlink{cam_8c_aab5d87f3a20087cd671b6ec6ab990e10}{cam\_strvis}}(tmpstr, cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_aab2ebcd21b1d42bdf99b3407e38fe30b}{product}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04753}04753             \textcolor{keyword}{sizeof}(cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_aab2ebcd21b1d42bdf99b3407e38fe30b}{product}}), \textcolor{keyword}{sizeof}(tmpstr));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04754}04754         \mbox{\hyperlink{scsi__sa_8c_a18ca51cdcbad34444dc6f86a7e3259d6}{SASBADDVARSTRDESC}}(sb, indent, tmpstr, \%s, product,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04755}04755             \textcolor{keyword}{sizeof}(cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_aab2ebcd21b1d42bdf99b3407e38fe30b}{product}}) + 1, \textcolor{stringliteral}{"{}SCSI Product ID"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04756}04756 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04757}04757         \mbox{\hyperlink{cam_8c_aab5d87f3a20087cd671b6ec6ab990e10}{cam\_strvis}}(tmpstr, cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_af5ffaa090b21d5232c608dcf0b95efff}{revision}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04758}04758             \textcolor{keyword}{sizeof}(cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_af5ffaa090b21d5232c608dcf0b95efff}{revision}}), \textcolor{keyword}{sizeof}(tmpstr));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04759}04759         \mbox{\hyperlink{scsi__sa_8c_a18ca51cdcbad34444dc6f86a7e3259d6}{SASBADDVARSTRDESC}}(sb, indent, tmpstr, \%s, revision,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04760}04760             \textcolor{keyword}{sizeof}(cgd.\mbox{\hyperlink{structccb__getdev_ae40c7472cbd2a8142162c69e8f66dc55}{inq\_data}}.\mbox{\hyperlink{structscsi__inquiry__data_af5ffaa090b21d5232c608dcf0b95efff}{revision}}) + 1, \textcolor{stringliteral}{"{}SCSI Revision"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04761}04761 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04762}04762         \textcolor{keywordflow}{if} (cgd.\mbox{\hyperlink{structccb__getdev_a38340a037d79835f7face458aa1e9d3c}{serial\_num\_len}} > 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04763}04763                 \textcolor{keywordtype}{char} *tmpstr2;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04764}04764                 \textcolor{keywordtype}{size\_t} ts2\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04765}04765                 \textcolor{keywordtype}{int} ts2\_malloc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04766}04766 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04767}04767                 ts2\_len = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04768}04768 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04769}04769                 \textcolor{keywordflow}{if} (cgd.\mbox{\hyperlink{structccb__getdev_a38340a037d79835f7face458aa1e9d3c}{serial\_num\_len}} > \textcolor{keyword}{sizeof}(tmpstr)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04770}04770                         ts2\_len = cgd.\mbox{\hyperlink{structccb__getdev_a38340a037d79835f7face458aa1e9d3c}{serial\_num\_len}} + 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04771}04771                         ts2\_malloc = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04772}04772                         tmpstr2 = malloc(ts2\_len, M\_SCSISA, M\_NOWAIT | M\_ZERO);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04773}04773                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04774}04774 \textcolor{comment}{                         * The 80 characters allocated on the stack above}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04775}04775 \textcolor{comment}{                         * will handle the vast majority of serial numbers.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04776}04776 \textcolor{comment}{                         * If we run into one that is larger than that, and}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04777}04777 \textcolor{comment}{                         * we can't malloc the length without blocking,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04778}04778 \textcolor{comment}{                         * bail out with an out of memory error.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04779}04779 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04780}04780                         \textcolor{keywordflow}{if} (tmpstr2 == NULL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04781}04781                                 error = ENOMEM;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04782}04782                                 \textcolor{keywordflow}{goto} extget\_bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04783}04783                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04784}04784                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04785}04785                         ts2\_len = \textcolor{keyword}{sizeof}(tmpstr);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04786}04786                         ts2\_malloc = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04787}04787                         tmpstr2 = tmpstr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04788}04788                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04789}04789 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04790}04790                 \mbox{\hyperlink{cam_8c_aab5d87f3a20087cd671b6ec6ab990e10}{cam\_strvis}}(tmpstr2, cgd.\mbox{\hyperlink{structccb__getdev_a44757043db37e257e0cd4634ebf22695}{serial\_num}}, cgd.\mbox{\hyperlink{structccb__getdev_a38340a037d79835f7face458aa1e9d3c}{serial\_num\_len}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04791}04791                     ts2\_len);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04792}04792 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04793}04793                 \mbox{\hyperlink{scsi__sa_8c_a18ca51cdcbad34444dc6f86a7e3259d6}{SASBADDVARSTRDESC}}(sb, indent, tmpstr2, \%s, serial\_num,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04794}04794                     (ssize\_t)cgd.\mbox{\hyperlink{structccb__getdev_a38340a037d79835f7face458aa1e9d3c}{serial\_num\_len}} + 1, \textcolor{stringliteral}{"{}Serial Number"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04795}04795                 \textcolor{keywordflow}{if} (ts2\_malloc != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04796}04796                         free(tmpstr2, M\_SCSISA);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04797}04797         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04798}04798                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04799}04799 \textcolor{comment}{                 * We return a serial\_num element in any case, but it will}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04800}04800 \textcolor{comment}{                 * be empty if the device has no serial number.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04801}04801 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04802}04802                 tmpstr[0] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04803}04803                 \mbox{\hyperlink{scsi__sa_8c_a18ca51cdcbad34444dc6f86a7e3259d6}{SASBADDVARSTRDESC}}(sb, indent, tmpstr, \%s, serial\_num,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04804}04804                     (ssize\_t)0, \textcolor{stringliteral}{"{}Serial Number"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04805}04805         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04806}04806 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04807}04807         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}}, \%u, \mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04808}04808             \textcolor{stringliteral}{"{}Maximum I/O size allowed by driver and controller"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04809}04809 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04810}04810         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a3ca0bd4ab5f25455a370e7501b393e4c}{cpi\_maxio}}, \%u, \mbox{\hyperlink{structsa__softc_a3ca0bd4ab5f25455a370e7501b393e4c}{cpi\_maxio}}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04811}04811             \textcolor{stringliteral}{"{}Maximum I/O size reported by controller"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04812}04812 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04813}04813         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}}, \%u, \mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04814}04814             \textcolor{stringliteral}{"{}Maximum block size supported by tape drive and media"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04815}04815 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04816}04816         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}}, \%u, \mbox{\hyperlink{structsa__softc_ac423fcb5f50ec9ed3b06450bddc056e8}{min\_blk}}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04817}04817             \textcolor{stringliteral}{"{}Minimum block size supported by tape drive and media"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04818}04818 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04819}04819         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}}, \%u, \mbox{\hyperlink{structsa__softc_aee0a625e09ff937fd4727a6e7b3101f4}{blk\_gran}}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04820}04820             \textcolor{stringliteral}{"{}Block granularity supported by tape drive and media"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04821}04821 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04822}04822         maxio\_tmp = min(softc-\/>\mbox{\hyperlink{structsa__softc_a9bc61ed8e7919e7da2f91980e04e034f}{max\_blk}}, softc-\/>\mbox{\hyperlink{structsa__softc_a197179468462ad05eae231d29a366386}{maxio}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04823}04823 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04824}04824         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, indent, maxio\_tmp, \%u, max\_effective\_iosize, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04825}04825             \textcolor{stringliteral}{"{}Maximum possible I/O size"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04826}04826 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04827}04827         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9adfc276664faeca3bc241aa42c00e74b2}{SA\_FLAG\_FIXED}} ? 1 : 0, \%d, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04828}04828             fixed\_mode, \textcolor{stringliteral}{"{}Set to 1 for fixed block mode, 0 for variable block"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04829}04829 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04830}04830         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04831}04831 \textcolor{comment}{         * XXX KDM include SIM, bus, target, LUN?}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04832}04832 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04833}04833         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a0f4c8efdb5d93152a259c1ee694d58e5}{SA\_FLAG\_COMP\_UNSUPP}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04834}04834                 tmpint = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04835}04835         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04836}04836                 tmpint = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04837}04837         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, tmpint, \%d, compression\_supported,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04838}04838             \textcolor{stringliteral}{"{}Set to 1 if compression is supported, 0 if not"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04839}04839         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a1888f91e4e176990d6548f37e7724465}{SA\_FLAG\_COMP\_ENABLED}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04840}04840                 tmpint = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04841}04841         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04842}04842                 tmpint = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04843}04843         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, tmpint, \%d, compression\_enabled,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04844}04844             \textcolor{stringliteral}{"{}Set to 1 if compression is enabled, 0 if not"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04845}04845         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a7577caeae359e4d2ab1bc46fcd525eba}{comp\_algorithm}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04846}04846             compression\_algorithm, \textcolor{stringliteral}{"{}Numeric compression algorithm"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04847}04847 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04848}04848         \mbox{\hyperlink{scsi__sa_8c_aa9a4fa9c6f874c9ff3cfdd2da4c7507f}{safillprot}}(softc, \&indent, sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04849}04849 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04850}04850         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_aa7f6356ca84b470a8cd0c44545ee721d}{media\_blksize}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04851}04851             media\_blocksize, \textcolor{stringliteral}{"{}Block size reported by drive or set by user"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04852}04852         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, (intmax\_t)softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}}, \%jd,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04853}04853             calculated\_fileno, \textcolor{stringliteral}{"{}Calculated file number, -\/1 if unknown"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04854}04854         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, (intmax\_t)softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}}, \%jd,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04855}04855             calculated\_rel\_blkno, \textcolor{stringliteral}{"{}Calculated block number relative to file, "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04856}04856             \textcolor{stringliteral}{"{}set to -\/1 if unknown"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04857}04857         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, (intmax\_t)softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}}, \%jd,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04858}04858             reported\_fileno, \textcolor{stringliteral}{"{}File number reported by drive, -\/1 if unknown"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04859}04859         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, (intmax\_t)softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}}, \%jd,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04860}04860             reported\_blkno, \textcolor{stringliteral}{"{}Block number relative to BOP/BOT reported by "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04861}04861             \textcolor{stringliteral}{"{}drive, -\/1 if unknown"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04862}04862         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, (intmax\_t)softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}}, \%jd,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04863}04863             \mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}}, \textcolor{stringliteral}{"{}Current partition number, 0 is the default"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04864}04864         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{bop}}, \%d, \mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{bop}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04865}04865             \textcolor{stringliteral}{"{}Set to 1 if drive is at the beginning of partition/tape, 0 if "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04866}04866             \textcolor{stringliteral}{"{}not, -\/1 if unknown"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04867}04867         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{eop}}, \%d, \mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{eop}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04868}04868             \textcolor{stringliteral}{"{}Set to 1 if drive is past early warning, 0 if not, -\/1 if unknown"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04869}04869         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{bpew}}, \%d, \mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{bpew}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04870}04870             \textcolor{stringliteral}{"{}Set to 1 if drive is past programmable early warning, 0 if not, "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04871}04871             \textcolor{stringliteral}{"{}-\/1 if unknown"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04872}04872         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, (intmax\_t)softc-\/>last\_io\_resid, \%jd,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04873}04873             residual, \textcolor{stringliteral}{"{}Residual for the last I/O"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04874}04874         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04875}04875 \textcolor{comment}{         * XXX KDM should we send a string with the current driver}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04876}04876 \textcolor{comment}{         * status already decoded instead of a numeric value?}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04877}04877 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04878}04878         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}}, \%d, \mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04879}04879             \textcolor{stringliteral}{"{}Current state of the driver"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04880}04880 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04881}04881         \mbox{\hyperlink{scsi__sa_8c_a9a2137c12c07da7f81bae8a7d98dde4d}{safilldensitysb}}(softc, \&indent, sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04882}04882 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04883}04883         \mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{SASBENDNODE}}(sb, indent, mtextget);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04884}04884 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04885}04885 extget\_bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04886}04886 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04887}04887         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04888}04888 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04889}04889 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04890}04890 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04891}\mbox{\hyperlink{scsi__sa_8c_a1bc1cd9a5f7e29c7f8bfeb038208a980}{04891}} \mbox{\hyperlink{scsi__sa_8c_a1bc1cd9a5f7e29c7f8bfeb038208a980}{saparamget}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keyword}{struct} sbuf *sb)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04892}04892 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04893}04893         \textcolor{keywordtype}{int} indent;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04894}04894 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04895}04895         indent = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04896}04896         \mbox{\hyperlink{scsi__sa_8c_add011268a2a0c41a6cb675ff2741e6d8}{SASBADDNODE}}(sb, indent, mtparamget);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04897}04897         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a3ce8fd804df275ea1b98922e54296123}{sili}}, \%d, \mbox{\hyperlink{structsa__softc_a3ce8fd804df275ea1b98922e54296123}{sili}}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04898}04898             \textcolor{stringliteral}{"{}Suppress an error on underlength variable reads"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04899}04899         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a292c4a327681ab5aa5dd89257d824eeb}{eot\_warn}}, \%d, \mbox{\hyperlink{structsa__softc_a292c4a327681ab5aa5dd89257d824eeb}{eot\_warn}}, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04900}04900             \textcolor{stringliteral}{"{}Return an error to warn that end of tape is approaching"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04901}04901         \mbox{\hyperlink{scsi__sa_8c_aa9a4fa9c6f874c9ff3cfdd2da4c7507f}{safillprot}}(softc, \&indent, sb);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04902}04902         \mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{SASBENDNODE}}(sb, indent, mtparamget);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04903}04903 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04904}04904         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04905}04905 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04906}04906 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04907}04907 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04908}\mbox{\hyperlink{scsi__sa_8c_aaef9b6db880ee304a18ccc6305f08ba1}{04908}} \mbox{\hyperlink{scsi__sa_8c_aaef9b6db880ee304a18ccc6305f08ba1}{saprevent}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{int} action)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04909}04909 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04910}04910         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04911}04911         \textcolor{keyword}{union   }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};         }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04912}04912         \textcolor{keywordtype}{int}     error, sf;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04913}04913                 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04914}04914         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04915}04915 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04916}04916         if ((action == \mbox{\hyperlink{scsi__all_8h_a0ede30a52a749c2e236336adc15d14d1}{PR\_ALLOW}}) \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a87c1744a10537aef95ff80fc5b907953}{SA\_FLAG\_TAPE\_LOCKED}}) == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04917}04917                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04918}04918         \textcolor{keywordflow}{if} ((action == \mbox{\hyperlink{scsi__all_8h_ac7bf3a4a9e6879bdf6d174f9e48e6bf9}{PR\_PREVENT}}) \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a87c1744a10537aef95ff80fc5b907953}{SA\_FLAG\_TAPE\_LOCKED}}) != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04919}04919                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04920}04920 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04921}04921         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04922}04922 \textcolor{comment}{         * We can be quiet about illegal requests.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04923}04923 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04924}04924         \textcolor{keywordflow}{if} (\mbox{\hyperlink{cam__debug_8h_af17c6332916d08ae2b1c32630203d4ab}{CAM\_DEBUGGED}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \mbox{\hyperlink{cam__debug_8h_ae330349135d2d26f45cdf3cc67b2b369abf04aaf5da3cac8fdf092e75a6b82da6}{CAM\_DEBUG\_INFO}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04925}04925                 sf = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04926}04926         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04927}04927                 sf = \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55ba032bb2bff9d794c3b78f4a8c5c47637a}{SF\_QUIET\_IR}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04928}04928 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04929}04929         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04930}04930 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04931}04931         \textcolor{comment}{/* It is safe to retry this operation */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04932}04932         \mbox{\hyperlink{scsi__all_8c_a5d9cf55f39f559e0392d65901556d9ee}{scsi\_prevent}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 5, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04933}04933             \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}}, softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa0d69fddc3aa64e582e031b44f838022}{SA\_TIMEOUT\_PREVENT}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04934}04934 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04935}04935         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, sf, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04936}04936         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04937}04937                 \textcolor{keywordflow}{if} (action == \mbox{\hyperlink{scsi__all_8h_a0ede30a52a749c2e236336adc15d14d1}{PR\_ALLOW}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04938}04938                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \&= \string~SA\_FLAG\_TAPE\_LOCKED;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04939}04939                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04940}04940                         softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} |= \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a87c1744a10537aef95ff80fc5b907953}{SA\_FLAG\_TAPE\_LOCKED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04941}04941         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04942}04942 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04943}04943         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04944}04944 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04945}04945 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04946}04946 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04947}\mbox{\hyperlink{scsi__sa_8c_a518ad50b44da7238b20aa8e2b489cd44}{04947}} \mbox{\hyperlink{scsi__sa_8c_a518ad50b44da7238b20aa8e2b489cd44}{sarewind}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04948}04948 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04949}04949         \textcolor{keyword}{union   }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04950}04950         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04951}04951         \textcolor{keywordtype}{int}     error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04952}04952                 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04953}04953         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04954}04954 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04955}04955         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04956}04956 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04957}04957         \textcolor{comment}{/* It is safe to retry this operation */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04958}04958         \mbox{\hyperlink{scsi__sa_8c_a410069d2a8f247757a67ab2f3ca2976f}{scsi\_rewind}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 2, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, FALSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04959}04959             \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}}, softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf648f06bfa840eb39e1ed420e9f2506a}{SA\_TIMEOUT\_REWIND}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04960}04960 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04961}04961         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REW;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04962}04962         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04963}04963         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04964}04964 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04965}04965         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04966}04966         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04967}04967                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04968}04968                 softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = (daddr\_t) 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04969}04969         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04970}04970                 softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04971}04971                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = (daddr\_t) -\/1; }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04972}04972                 softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04973}04973         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04974}04974         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04975}04975 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04976}04976 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04977}04977 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04978}\mbox{\hyperlink{scsi__sa_8c_ae932d7a651526aeffefd168f58bc440b}{04978}} \mbox{\hyperlink{scsi__sa_8c_ae932d7a651526aeffefd168f58bc440b}{saspace}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{int} count, \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927}{scsi\_space\_code}} code)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04979}04979 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04980}04980         \textcolor{keyword}{union   }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04981}04981         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04982}04982         \textcolor{keywordtype}{int}     error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04983}04983                 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04984}04984         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04985}04985 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04986}04986         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04987}04987 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04988}04988         \textcolor{comment}{/* This cannot be retried */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04989}04989 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04990}04990         \mbox{\hyperlink{scsi__sa_8c_a31f302a1800ec19d2d2a8a85e3681786}{scsi\_space}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 0, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, code, count,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04991}04991             \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}}, softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6b462533b43954222ddf4c8f71057b49}{SA\_TIMEOUT\_SPACE}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04992}04992 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04993}04993         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04994}04994 \textcolor{comment}{         * Clear residual because we will be using it.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04995}04995 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04996}04996         softc-\/>last\_ctl\_resid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04997}04997 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04998}04998         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = (count < 0)? MTIO\_DSREG\_REV : MTIO\_DSREG\_FWD;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l04999}04999         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05000}05000         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05001}05001 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05002}05002         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05003}05003 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05004}05004         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05005}05005 \textcolor{comment}{         * If a spacing operation has failed, we need to invalidate}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05006}05006 \textcolor{comment}{         * this mount.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05007}05007 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05008}05008 \textcolor{comment}{         * If the spacing operation was setmarks or to end of recorded data,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05009}05009 \textcolor{comment}{         * we no longer know our relative position.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05010}05010 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05011}05011 \textcolor{comment}{         * If the spacing operations was spacing files in reverse, we}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05012}05012 \textcolor{comment}{         * take account of the residual, but still check against less}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05013}05013 \textcolor{comment}{         * than zero-\/ if we've gone negative, we must have hit BOT.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05014}05014 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05015}05015 \textcolor{comment}{         * If the spacing operations was spacing records in reverse and}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05016}05016 \textcolor{comment}{         * we have a residual, we've either hit BOT or hit a filemark.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05017}05017 \textcolor{comment}{         * In the former case, we know our new record number (0). In}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05018}05018 \textcolor{comment}{         * the latter case, we have absolutely no idea what the real}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05019}05019 \textcolor{comment}{         * record number is-\/ we've stopped between the end of the last}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05020}05020 \textcolor{comment}{         * record in the previous file and the filemark that stopped}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05021}05021 \textcolor{comment}{         * our spacing backwards.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05022}05022 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05023}05023         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05024}05024                 softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05025}05025                 softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05026}05026                 softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05027}05027         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (code == \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927a94b42ac8db42a308ceba7774bb814ffe}{SS\_SETMARKS}} || code == \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927a2cb6ec77b9a77b9c2f63ff1e71232b0b}{SS\_EOD}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05028}05028                 softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05029}05029         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (code == \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927aa80e7481061650e9d0cacc7664ae316e}{SS\_FILEMARKS}} \&\& softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} != (daddr\_t) -\/1) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05030}05030                 softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} += (count -\/ softc-\/>last\_ctl\_resid);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05031}05031                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} < 0)    \textcolor{comment}{/* we must of hit BOT */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05032}05032                         softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05033}05033                 softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05034}05034         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (code == \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927a267358c8cb264cd529e4c02414ed81c5}{SS\_BLOCKS}} \&\& softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} != (daddr\_t) -\/1) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05035}05035                 softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} += (count -\/ softc-\/>last\_ctl\_resid);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05036}05036                 \textcolor{keywordflow}{if} (count < 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05037}05037                         \textcolor{keywordflow}{if} (softc-\/>last\_ctl\_resid || softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} < 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05038}05038                                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05039}05039                                         softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05040}05040                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05041}05041                                         softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05042}05042                                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05043}05043                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05044}05044                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05045}05045         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05046}05046         \textcolor{keywordflow}{if} (error == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05047}05047                 \mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{sagetpos}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05048}05048 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05049}05049         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05050}05050 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05051}05051 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05052}05052 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05053}\mbox{\hyperlink{scsi__sa_8c_a1d8d7e925b43a6580eef62643a7e2ee4}{05053}} \mbox{\hyperlink{scsi__sa_8c_a1d8d7e925b43a6580eef62643a7e2ee4}{sawritefilemarks}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{int} nmarks, \textcolor{keywordtype}{int} setmarks, \textcolor{keywordtype}{int} immed)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05054}05054 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05055}05055         \textcolor{keyword}{union   }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05056}05056         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05057}05057         \textcolor{keywordtype}{int}     error, nwm = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05058}05058 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05059}05059         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05060}05060         if (softc-\/>\mbox{\hyperlink{structsa__softc_a53413f21235e427f2f8c8d7c5281aca8}{open\_rdonly}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05061}05061                 \textcolor{keywordflow}{return} (EBADF);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05062}05062 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05063}05063         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05064}05064         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05065}05065 \textcolor{comment}{         * Clear residual because we will be using it.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05066}05066 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05067}05067         softc-\/>last\_ctl\_resid = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05068}05068 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05069}05069         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_FMK;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05070}05070         \textcolor{comment}{/* this *must* not be retried */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05071}05071         \mbox{\hyperlink{scsi__sa_8c_a675aaf601441cdb4e1cd7530415e2dd8}{scsi\_write\_filemarks}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 0, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05072}05072             immed, setmarks, nmarks, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05073}05073             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aafdc542836d4c0c2c4a4039631718ba27}{SA\_TIMEOUT\_WRITE\_FILEMARKS}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05074}05074         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05075}05075 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05076}05076         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05077}05077 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05078}05078         \textcolor{keywordflow}{if} (error == 0 \&\& nmarks) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05079}05079                 \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05080}05080                 nwm = nmarks -\/ softc-\/>last\_ctl\_resid;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05081}05081                 softc-\/>\mbox{\hyperlink{structsa__softc_a288f894313e8ca2190666dcdd3b677b9}{filemarks}} += nwm;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05082}05082         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05083}05083 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05084}05084         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05085}05085 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05086}05086         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05087}05087 \textcolor{comment}{         * Update relative positions (if we're doing that).}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05088}05088 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05089}05089         \textcolor{keywordflow}{if} (error) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05090}05090                 softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05091}05091         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} != (daddr\_t) -\/1) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05092}05092                 softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} += nwm;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05093}05093                 softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05094}05094         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05095}05095 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05096}05096         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05097}05097 \textcolor{comment}{         * Ask the tape drive for position information.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05098}05098 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05099}05099         \mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{sagetpos}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05100}05100 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05101}05101         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05102}05102 \textcolor{comment}{         * If we got valid position information, since we just wrote a file}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05103}05103 \textcolor{comment}{         * mark, we know we're at the file mark and block 0 after that}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05104}05104 \textcolor{comment}{         * filemark.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05105}05105 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05106}05106         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} != (daddr\_t) -\/1) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05107}05107                 softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05108}05108                 softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05109}05109         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05110}05110 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05111}05111         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05112}05112 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05113}05113 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05114}05114 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05115}\mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{05115}} \mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{sagetpos}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05116}05116 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05117}05117         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05118}05118         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__position__long__data}{scsi\_tape\_position\_long\_data}} long\_pos;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05119}05119         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05120}05120         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05121}05121 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05122}05122         if (softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} \& \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202ab5a3af9a4ae56b69e42da1d880f37797}{SA\_QUIRK\_NO\_LONG\_POS}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05123}05123                 softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05124}05124                 softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05125}05125                 softc-\/>\mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{bop}} = softc-\/>\mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{eop}} = softc-\/>\mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{bpew}} = -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05126}05126                 \textcolor{keywordflow}{return} (EOPNOTSUPP);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05127}05127         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05128}05128 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05129}05129         bzero(\&long\_pos, \textcolor{keyword}{sizeof}(long\_pos));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05130}05130 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05131}05131         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \mbox{\hyperlink{cam_8h_a29369d4bf711763f232c214158987e20}{CAM\_PRIORITY\_NORMAL}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05132}05132         \mbox{\hyperlink{scsi__sa_8c_a55bd4f3cf2796af6cf475e8c11c7c5c1}{scsi\_read\_position\_10}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05133}05133                               \textcolor{comment}{/*retries*/} 1,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05134}05134                               \textcolor{comment}{/*cbfcnp*/} NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05135}05135                               \textcolor{comment}{/*tag\_action*/} \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05136}05136                               \textcolor{comment}{/*service\_action*/} \mbox{\hyperlink{scsi__sa_8h_a4dc2867c10a058c24402c0f047cc49ce}{SA\_RPOS\_LONG\_FORM}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05137}05137                               \textcolor{comment}{/*data\_ptr*/} (uint8\_t *)\&long\_pos,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05138}05138                               \textcolor{comment}{/*length*/} \textcolor{keyword}{sizeof}(long\_pos),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05139}05139                               \textcolor{comment}{/*sense\_len*/} \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05140}05140                               \textcolor{comment}{/*timeout*/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05141}05141                                  softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae77b8d365a84bfa90d0c502cf673bbb5}{SA\_TIMEOUT\_READ\_POSITION}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05142}05142 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05143}05143         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_RBSY;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05144}05144         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55ba032bb2bff9d794c3b78f4a8c5c47637a}{SF\_QUIET\_IR}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05145}05145                                   softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05146}05146         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05147}05147 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05148}05148         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05149}05149                 \textcolor{keywordflow}{if} (long\_pos.\mbox{\hyperlink{structscsi__tape__position__long__data_a2922cb1359e0a65c4ae1c6d2f079d6d3}{flags}} \& \mbox{\hyperlink{scsi__sa_8h_aa916b02a529ab92258e1f4b33498146a}{SA\_RPOS\_LONG\_MPU}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05150}05150                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05151}05151 \textcolor{comment}{                         * If the drive doesn't know what file mark it is}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05152}05152 \textcolor{comment}{                         * on, our calculated filemark isn't going to be}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05153}05153 \textcolor{comment}{                         * accurate either.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05154}05154 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05155}05155                         softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05156}05156                         softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05157}05157                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05158}05158                         softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05159}05159                             \mbox{\hyperlink{scsi__all_8h_a37a4255a8649ca4cf5f3f45c99a0513f}{scsi\_8btou64}}(long\_pos.\mbox{\hyperlink{structscsi__tape__position__long__data_a0966217454f6c45bcbe1ed5ef91f3c9c}{logical\_file\_num}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05160}05160                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05161}05161 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05162}05162                 \textcolor{keywordflow}{if} (long\_pos.\mbox{\hyperlink{structscsi__tape__position__long__data_a2922cb1359e0a65c4ae1c6d2f079d6d3}{flags}} \& \mbox{\hyperlink{scsi__sa_8h_aae5a99bb7b5628908357930d668f8a00}{SA\_RPOS\_LONG\_LONU}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05163}05163                         softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05164}05164                         softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05165}05165                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05166}05166 \textcolor{comment}{                         * If the tape drive doesn't know its block}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05167}05167 \textcolor{comment}{                         * position, we can't claim to know it either.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05168}05168 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05169}05169                         softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05170}05170                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05171}05171                         softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = \mbox{\hyperlink{scsi__all_8h_a819d6f51420109cfeb06a235f299e113}{scsi\_4btoul}}(long\_pos.\mbox{\hyperlink{structscsi__tape__position__long__data_a958bc854372b0d7662302165d1d9a6b0}{partition}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05172}05172                         softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05173}05173                             \mbox{\hyperlink{scsi__all_8h_a37a4255a8649ca4cf5f3f45c99a0513f}{scsi\_8btou64}}(long\_pos.\mbox{\hyperlink{structscsi__tape__position__long__data_a5a6f69275bf74ad0fe10e70266885ff8}{logical\_object\_num}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05174}05174                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05175}05175                 \textcolor{keywordflow}{if} (long\_pos.\mbox{\hyperlink{structscsi__tape__position__long__data_a2922cb1359e0a65c4ae1c6d2f079d6d3}{flags}} \& \mbox{\hyperlink{scsi__sa_8h_a522a870c45cdfc2a1e4ef97b5b64121d}{SA\_RPOS\_LONG\_BOP}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05176}05176                         softc-\/>\mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{bop}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05177}05177                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05178}05178                         softc-\/>\mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{bop}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05179}05179 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05180}05180                 \textcolor{keywordflow}{if} (long\_pos.\mbox{\hyperlink{structscsi__tape__position__long__data_a2922cb1359e0a65c4ae1c6d2f079d6d3}{flags}} \& \mbox{\hyperlink{scsi__sa_8h_a991457c4ca86da0c0c2cf5571361eb1e}{SA\_RPOS\_LONG\_EOP}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05181}05181                         softc-\/>\mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{eop}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05182}05182                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05183}05183                         softc-\/>\mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{eop}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05184}05184 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05185}05185                 \textcolor{keywordflow}{if} ((long\_pos.\mbox{\hyperlink{structscsi__tape__position__long__data_a2922cb1359e0a65c4ae1c6d2f079d6d3}{flags}} \& \mbox{\hyperlink{scsi__sa_8h_af9190ee0f60e52dfdd161d3d22921537}{SA\_RPOS\_LONG\_BPEW}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05186}05186                  || (softc-\/>\mbox{\hyperlink{structsa__softc_aca2db39888e756409e8fafacb7878625}{set\_pews\_status}} != 0)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05187}05187                         softc-\/>\mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{bpew}} = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05188}05188                         \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_aca2db39888e756409e8fafacb7878625}{set\_pews\_status}} > 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05189}05189                                 softc-\/>\mbox{\hyperlink{structsa__softc_aca2db39888e756409e8fafacb7878625}{set\_pews\_status}}-\/-\/;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05190}05190                 \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05191}05191                         softc-\/>\mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{bpew}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05192}05192         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (error == EINVAL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05193}05193                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05194}05194 \textcolor{comment}{                 * If this drive returned an invalid-\/request type error,}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05195}05195 \textcolor{comment}{                 * then it likely doesn't support the long form report.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05196}05196 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05197}05197                 softc-\/>\mbox{\hyperlink{structsa__softc_ad9dba4a5b63b31cab2784499e17ca0e0}{quirks}} |= \mbox{\hyperlink{scsi__sa_8c_a165048675dfbf892eb1a01a61f94a202ab5a3af9a4ae56b69e42da1d880f37797}{SA\_QUIRK\_NO\_LONG\_POS}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05198}05198         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05199}05199 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05200}05200         \textcolor{keywordflow}{if} (error != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05201}05201                 softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05202}05202                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05203}05203                 softc-\/>\mbox{\hyperlink{structsa__softc_a37ab5861c2484ff520d3767cf4ae210b}{bop}} = softc-\/>\mbox{\hyperlink{structsa__softc_a410935a3cfa950fc007e343f8d7cd909}{eop}} = softc-\/>\mbox{\hyperlink{structsa__softc_ac0bc35c0f0b7494c2f252fd59ba1239c}{bpew}} = -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05204}05204         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05205}05205 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05206}05206         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05207}05207 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05208}05208         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05209}05209 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05210}05210 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05211}05211 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05212}\mbox{\hyperlink{scsi__sa_8c_a95f654c6228aa0aa5024c3aa03d0e6cc}{05212}} \mbox{\hyperlink{scsi__sa_8c_a95f654c6228aa0aa5024c3aa03d0e6cc}{sardpos}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{int} hard, u\_int32\_t *blkptr)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05213}05213 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05214}05214         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__position__data}{scsi\_tape\_position\_data}} loc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05215}05215         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05216}05216         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05217}05217         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05218}05218 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05219}05219         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05220}05220 \textcolor{comment}{         * We try and flush any buffered writes here if we were writing}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05221}05221 \textcolor{comment}{         * and we're trying to get hardware block position. It eats}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05222}05222 \textcolor{comment}{         * up performance substantially, but I'm wary of drive firmware.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05223}05223 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05224}05224 \textcolor{comment}{         * I think that *logical* block position is probably okay-\/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05225}05225 \textcolor{comment}{         * but hardware block position might have to wait for data}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05226}05226 \textcolor{comment}{         * to hit media to be valid. Caveat Emptor.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05227}05227 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05228}05228 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05229}05229         if (hard \&\& (softc-\/>\mbox{\hyperlink{structsa__softc_a5cd5373538df6f05d097bfa601574fe7}{flags}} \& \mbox{\hyperlink{scsi__sa_8c_a786e88b53d46d5caad7ccac3ee7cb6a9a20ee35d406d69430b2d2d1c5c38a659b}{SA\_FLAG\_TAPE\_WRITTEN}})) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05230}05230                 error = \mbox{\hyperlink{scsi__sa_8c_a1d8d7e925b43a6580eef62643a7e2ee4}{sawritefilemarks}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 0, 0, 0);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05231}05231                 \textcolor{keywordflow}{if} (error \&\& error != EACCES)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05232}05232                         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05233}05233         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05234}05234 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05235}05235         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05236}05236         \mbox{\hyperlink{scsi__sa_8c_a03a0ec15dbedb3f0a49b706a3d0cdf07}{scsi\_read\_position}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 1, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05237}05237             hard, \&loc, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05238}05238             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae77b8d365a84bfa90d0c502cf673bbb5}{SA\_TIMEOUT\_READ\_POSITION}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05239}05239         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_RBSY;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05240}05240         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05241}05241         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05242}05242 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05243}05243         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05244}05244                 \textcolor{keywordflow}{if} (loc.\mbox{\hyperlink{structscsi__tape__position__data_aec0d777c4ea1f227f8026ebd133d5d7f}{flags}} \& \mbox{\hyperlink{scsi__sa_8h_a95556d7aa886fe575e2b0b8d5c93f7c4}{SA\_RPOS\_UNCERTAIN}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05245}05245                         error = EINVAL;         \textcolor{comment}{/* nothing is certain */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05246}05246                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05247}05247                         *blkptr = \mbox{\hyperlink{scsi__all_8h_a819d6f51420109cfeb06a235f299e113}{scsi\_4btoul}}(loc.\mbox{\hyperlink{structscsi__tape__position__data_a6d4fa38936e56a3bf46c3c214338786b}{firstblk}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05248}05248                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05249}05249         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05250}05250 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05251}05251         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05252}05252         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05253}05253 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05254}05254 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05255}05255 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05256}\mbox{\hyperlink{scsi__sa_8c_a228f994ded23909c90af6eedf47169ba}{05256}} \mbox{\hyperlink{scsi__sa_8c_a228f994ded23909c90af6eedf47169ba}{sasetpos}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{int} hard, \textcolor{keyword}{struct} mtlocate *locate\_info)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05257}05257 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05258}05258         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05259}05259         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05260}05260         \textcolor{keywordtype}{int} locate16;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05261}05261         \textcolor{keywordtype}{int} immed, cp;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05262}05262         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05263}05263 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05264}05264         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05265}05265 \textcolor{comment}{         * We used to try and flush any buffered writes here.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05266}05266 \textcolor{comment}{         * Now we push this onto user applications to either}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05267}05267 \textcolor{comment}{         * flush the pending writes themselves (via a zero count}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05268}05268 \textcolor{comment}{         * WRITE FILEMARKS command) or they can trust their tape}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05269}05269 \textcolor{comment}{         * drive to do this correctly for them.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05270}05270 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05271}05271 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05272}05272         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05273}05273         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05274}05274 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05275}05275         cp = locate\_info-\/>flags \& MT\_LOCATE\_FLAG\_CHANGE\_PART ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05276}05276         immed = locate\_info-\/>flags \& MT\_LOCATE\_FLAG\_IMMED ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05277}05277 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05278}05278         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05279}05279 \textcolor{comment}{         * Determine whether we have to use LOCATE or LOCATE16.  The hard}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05280}05280 \textcolor{comment}{         * bit is only possible with LOCATE, but the new ioctls do not}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05281}05281 \textcolor{comment}{         * allow setting that bit.  So we can't get into the situation of}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05282}05282 \textcolor{comment}{         * having the hard bit set with a block address that is larger than}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05283}05283 \textcolor{comment}{         * 32-\/bits.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05284}05284 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05285}05285         \textcolor{keywordflow}{if} (hard != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05286}05286                 locate16 = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05287}05287         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((locate\_info-\/>dest\_type != MT\_LOCATE\_DEST\_OBJECT)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05288}05288               || (locate\_info-\/>block\_address\_mode != MT\_LOCATE\_BAM\_IMPLICIT)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05289}05289               || (locate\_info-\/>logical\_id > \mbox{\hyperlink{scsi__sa_8h_a02003d68b71afa073dbc840ad784c42c}{SA\_SPOS\_MAX\_BLK}}))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05290}05290                 locate16 = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05291}05291         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05292}05292                 locate16 = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05293}05293 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05294}05294         \textcolor{keywordflow}{if} (locate16 != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05295}05295                 \mbox{\hyperlink{scsi__sa_8c_a6fc1c6428d529f855d387fd08146567a}{scsi\_locate\_16}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05296}05296                                \textcolor{comment}{/*retries*/} 1,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05297}05297                                \textcolor{comment}{/*cbfcnp*/} NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05298}05298                                \textcolor{comment}{/*tag\_action*/} \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05299}05299                                \textcolor{comment}{/*immed*/} immed,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05300}05300                                \textcolor{comment}{/*cp*/} cp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05301}05301                                \textcolor{comment}{/*dest\_type*/} locate\_info-\/>dest\_type,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05302}05302                                \textcolor{comment}{/*bam*/} locate\_info-\/>block\_address\_mode,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05303}05303                                \textcolor{comment}{/*partition*/} locate\_info-\/>partition,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05304}05304                                \textcolor{comment}{/*logical\_id*/} locate\_info-\/>logical\_id,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05305}05305                                \textcolor{comment}{/*sense\_len*/} \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05306}05306                                \textcolor{comment}{/*timeout*/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05307}05307                                    softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa4f4a8dc9926eee608f362e2e8778236}{SA\_TIMEOUT\_LOCATE}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05308}05308         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05309}05309                 \mbox{\hyperlink{scsi__sa_8c_ad91d7174748ac7a6442eca63e5cf6d83}{scsi\_locate\_10}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05310}05310                                \textcolor{comment}{/*retries*/} 1,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05311}05311                                \textcolor{comment}{/*cbfcnp*/} NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05312}05312                                \textcolor{comment}{/*tag\_action*/} \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05313}05313                                \textcolor{comment}{/*immed*/} immed,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05314}05314                                \textcolor{comment}{/*cp*/} cp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05315}05315                                \textcolor{comment}{/*hard*/} hard,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05316}05316                                \textcolor{comment}{/*partition*/} locate\_info-\/>partition,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05317}05317                                \textcolor{comment}{/*block\_address*/} locate\_info-\/>logical\_id,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05318}05318                                \textcolor{comment}{/*sense\_len*/} \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05319}05319                                \textcolor{comment}{/*timeout*/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05320}05320                                    softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa4f4a8dc9926eee608f362e2e8778236}{SA\_TIMEOUT\_LOCATE}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05321}05321         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05322}05322 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05323}05323         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_POS;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05324}05324         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05325}05325         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05326}05326         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05327}05327 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05328}05328         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05329}05329 \textcolor{comment}{         * We assume the calculated file and block numbers are unknown}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05330}05330 \textcolor{comment}{         * unless we have enough information to populate them.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05331}05331 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05332}05332         softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05333}05333 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05334}05334         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05335}05335 \textcolor{comment}{         * If the user requested changing the partition and the request}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05336}05336 \textcolor{comment}{         * succeeded, note the partition.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05337}05337 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05338}05338         \textcolor{keywordflow}{if} ((error == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05339}05339          \&\& (cp != 0))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05340}05340                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = locate\_info-\/>partition;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05341}05341         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05342}05342                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05343}05343 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05344}05344         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05345}05345                 \textcolor{keywordflow}{switch} (locate\_info-\/>dest\_type) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05346}05346                 \textcolor{keywordflow}{case} MT\_LOCATE\_DEST\_FILE:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05347}05347                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05348}05348 \textcolor{comment}{                         * This is the only case where we can reliably}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05349}05349 \textcolor{comment}{                         * calculate the file and block numbers.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05350}05350 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05351}05351                         softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = locate\_info-\/>logical\_id;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05352}05352                         softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05353}05353                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05354}05354                 \textcolor{keywordflow}{case} MT\_LOCATE\_DEST\_OBJECT:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05355}05355                 \textcolor{keywordflow}{case} MT\_LOCATE\_DEST\_SET:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05356}05356                 \textcolor{keywordflow}{case} MT\_LOCATE\_DEST\_EOD:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05357}05357                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05358}05358                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05359}05359                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05360}05360         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05361}05361 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05362}05362         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05363}05363 \textcolor{comment}{         * Ask the drive for current position information.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05364}05364 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05365}05365         \mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{sagetpos}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05366}05366 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05367}05367         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05368}05368 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05369}05369 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05370}05370 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05371}\mbox{\hyperlink{scsi__sa_8c_a384d86c033008cc26071ea89d5d6c5ba}{05371}} \mbox{\hyperlink{scsi__sa_8c_a384d86c033008cc26071ea89d5d6c5ba}{saretension}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05372}05372 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05373}05373         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05374}05374         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05375}05375         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05376}05376 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05377}05377         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05378}05378 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05379}05379         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05380}05380 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05381}05381         \textcolor{comment}{/* It is safe to retry this operation */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05382}05382         \mbox{\hyperlink{scsi__sa_8c_a73cc74c54b8a76d621c61094d408c5f2}{scsi\_load\_unload}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 5, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, FALSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05383}05383             FALSE, TRUE,  TRUE, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05384}05384             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf245bc20d18ac336973056deb6138a77}{SA\_TIMEOUT\_LOAD}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05385}05385 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05386}05386         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_TEN;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05387}05387         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05388}05388         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05389}05389 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05390}05390         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05391}05391         \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05392}05392                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05393}05393                 \mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{sagetpos}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05394}05394         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05395}05395                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05396}05396         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05397}05397 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05398}05398 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05399}05399 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05400}\mbox{\hyperlink{scsi__sa_8c_af35686132783c8995ee39b341123ac67}{05400}} \mbox{\hyperlink{scsi__sa_8c_af35686132783c8995ee39b341123ac67}{sareservereleaseunit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{int} reserve)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05401}05401 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05402}05402         \textcolor{keyword}{union }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05403}05403         \textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05404}05404         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05405}05405 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05406}05406         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05407}05407         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}},  1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05408}05408 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05409}05409         \textcolor{comment}{/* It is safe to retry this operation */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05410}05410         \mbox{\hyperlink{scsi__sa_8c_a891d38a734fe074b36cbbd5a91bbbeb3}{scsi\_reserve\_release\_unit}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 2, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05411}05411             FALSE,  0, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},  softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6ef52d07b8b2e19bc0b3d6908fa805ec}{SA\_TIMEOUT\_RESERVE}}],}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05412}05412             reserve);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05413}05413         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_RBSY;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05414}05414         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05415}05415             \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55ba323bacc6659dffecaffcd935f98954a5}{SF\_RETRY\_UA}} | \mbox{\hyperlink{cam_8h_a06fc87d81c62e9abb8790b6e5713c55baf5ee8065dc68dd8b0eddebd7eb317a35}{SF\_NO\_PRINT}}, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05416}05416         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05417}05417         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05418}05418 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05419}05419         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05420}05420 \textcolor{comment}{         * If the error was Illegal Request, then the device doesn't support}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05421}05421 \textcolor{comment}{         * RESERVE/RELEASE. This is not an error.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05422}05422 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05423}05423         \textcolor{keywordflow}{if} (error == EINVAL) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05424}05424                 error = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05425}05425         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05426}05426 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05427}05427         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05428}05428 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05429}05429 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05430}05430 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05431}\mbox{\hyperlink{scsi__sa_8c_aca72a710f2338f76e52de81bd1025bf2}{05431}} \mbox{\hyperlink{scsi__sa_8c_aca72a710f2338f76e52de81bd1025bf2}{saloadunload}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{int} load)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05432}05432 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05433}05433         \textcolor{keyword}{union   }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05434}05434         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05435}05435         \textcolor{keywordtype}{int}     error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05436}05436 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05437}05437         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05438}05438 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05439}05439         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05440}05440 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05441}05441         \textcolor{comment}{/* It is safe to retry this operation */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05442}05442         \mbox{\hyperlink{scsi__sa_8c_a73cc74c54b8a76d621c61094d408c5f2}{scsi\_load\_unload}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 5, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, FALSE,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05443}05443             FALSE, FALSE, load, \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05444}05444             softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf245bc20d18ac336973056deb6138a77}{SA\_TIMEOUT\_LOAD}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05445}05445 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05446}05446         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = (load)? MTIO\_DSREG\_LD : MTIO\_DSREG\_UNL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05447}05447         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05448}05448         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05449}05449         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05450}05450 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05451}05451         \textcolor{keywordflow}{if} (error || load == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05452}05452                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05453}05453                 softc-\/>\mbox{\hyperlink{structsa__softc_adb550367ad1825f0618e8c4e6e0f72b0}{rep\_fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_aacf731c8f6b87a924f44631a09545539}{rep\_blkno}} = (daddr\_t) -\/1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05454}05454         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (error == 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05455}05455                 softc-\/>\mbox{\hyperlink{structsa__softc_ab7db74dd94785e4231af72cc973ab484}{partition}} = softc-\/>\mbox{\hyperlink{structsa__softc_a08b5be392a89159053cced93aa72c72d}{fileno}} = softc-\/>\mbox{\hyperlink{structsa__softc_ae24142aa2c495eb25734844813778f61}{blkno}} = (daddr\_t) 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05456}05456                 \mbox{\hyperlink{scsi__sa_8c_ab8f43cd361edcce0ec3db444f348ce5c}{sagetpos}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05457}05457         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05458}05458         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05459}05459 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05460}05460 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05461}05461 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05462}\mbox{\hyperlink{scsi__sa_8c_a0b0cd69138727407748a6ef32c557240}{05462}} \mbox{\hyperlink{scsi__sa_8c_a0b0cd69138727407748a6ef32c557240}{saerase}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, \textcolor{keywordtype}{int} longerase)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05463}05463 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05464}05464 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05465}05465         \textcolor{keyword}{union   }\mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{mmc__sim__if_8m_a3b75bbd1e046a488543d1dccdbcae16b}{ccb}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05466}05466         \textcolor{keyword}{struct  }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05467}05467         \textcolor{keywordtype}{int} error;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05468}05468 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05469}05469         softc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structsa__softc}{sa\_softc}} *)\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_a6ba6ec6ae18e7f5935209ff5ca9ba385}{softc}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05470}05470         if (softc-\/>\mbox{\hyperlink{structsa__softc_a53413f21235e427f2f8c8d7c5281aca8}{open\_rdonly}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05471}05471                 \textcolor{keywordflow}{return} (EBADF);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05472}05472 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05473}05473         \mbox{\hyperlink{unionccb}{ccb}} = \mbox{\hyperlink{cam__periph_8h_a3e0b448f630edd6d782fb33e4a12e3f1}{cam\_periph\_getccb}}(\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}, 1);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05474}05474 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05475}05475         \mbox{\hyperlink{scsi__sa_8c_acf0feaf9426731e4c2e53a69a84ae381}{scsi\_erase}}(\&\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}, 1, NULL, \mbox{\hyperlink{scsi__message_8h_ac500601f6c78c28499b430fd47f2aa17}{MSG\_SIMPLE\_Q\_TAG}}, FALSE, longerase,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05476}05476             \mbox{\hyperlink{scsi__all_8h_adacdb3c5663de7101bb6a888ebde165c}{SSD\_FULL\_SIZE}}, softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaba63b94d9eed020025c1a78d134e8cc4}{SA\_TIMEOUT\_ERASE}}]);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05477}05477 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05478}05478         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_ZER;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05479}05479         error = \mbox{\hyperlink{cam__periph_8c_a9eb7c5c2381f6769e4ecf63233bfff6f}{cam\_periph\_runccb}}(\mbox{\hyperlink{unionccb}{ccb}}, \mbox{\hyperlink{scsi__sa_8c_af35e8f92b809448104df4534159c2e09}{saerror}}, 0, 0, softc-\/>\mbox{\hyperlink{structsa__softc_ac93bc68217480c699448b9b153050900}{device\_stats}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05480}05480         softc-\/>\mbox{\hyperlink{structsa__softc_a64e9e2d902fc7c1734be86898989f958}{dsreg}} = MTIO\_DSREG\_REST;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05481}05481 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05482}05482         \mbox{\hyperlink{cam__xpt_8c_acb560602f4997cc269e6bb54efa93725}{xpt\_release\_ccb}}(\mbox{\hyperlink{unionccb}{ccb}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05483}05483         \textcolor{keywordflow}{return} (error);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05484}05484 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05485}05485 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05486}05486 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05487}05487 \textcolor{comment}{ * Fill an sbuf with density data in XML format.  This particular macro}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05488}05488 \textcolor{comment}{ * works for multi-\/byte integer fields.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05489}05489 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05490}05490 \textcolor{comment}{ * Note that 1 byte fields aren't supported here.  The reason is that the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05491}05491 \textcolor{comment}{ * compiler does not evaluate the sizeof(), and assumes that any of the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05492}05492 \textcolor{comment}{ * sizes are possible for a given field.  So passing in a multi-\/byte}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05493}05493 \textcolor{comment}{ * field will result in a warning that the assignment makes an integer}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05494}05494 \textcolor{comment}{ * from a pointer without a cast, if there is an assignment in the 1 byte}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05495}05495 \textcolor{comment}{ * case.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05496}05496 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05497}\mbox{\hyperlink{scsi__sa_8c_aef65990eb5104985a404adfb7b23a706}{05497}} \textcolor{preprocessor}{\#define SAFILLDENSSB(dens\_data, sb, indent, field, desc\_remain,         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05498}05498 \textcolor{preprocessor}{                     len\_to\_go, cur\_offset, desc)\{                      \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05499}05499 \textcolor{preprocessor}{        size\_t cur\_field\_len;                                           \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05500}05500 \textcolor{preprocessor}{                                                                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05501}05501 \textcolor{preprocessor}{        cur\_field\_len = sizeof(dens\_data-\/>field);                       \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05502}05502 \textcolor{preprocessor}{        if (desc\_remain < cur\_field\_len) \{                              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05503}05503 \textcolor{preprocessor}{                len\_to\_go -\/= desc\_remain;                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05504}05504 \textcolor{preprocessor}{                cur\_offset += desc\_remain;                              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05505}05505 \textcolor{preprocessor}{                continue;                                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05506}05506 \textcolor{preprocessor}{        \}                                                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05507}05507 \textcolor{preprocessor}{        len\_to\_go -\/= cur\_field\_len;                                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05508}05508 \textcolor{preprocessor}{        cur\_offset += cur\_field\_len;                                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05509}05509 \textcolor{preprocessor}{        desc\_remain -\/= cur\_field\_len;                                   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05510}05510 \textcolor{preprocessor}{                                                                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05511}05511 \textcolor{preprocessor}{        switch (sizeof(dens\_data-\/>field)) \{                             \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05512}05512 \textcolor{preprocessor}{        case 1:                                                         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05513}05513 \textcolor{preprocessor}{                KASSERT(1 == 0, ("{}Programmer error, invalid 1 byte "{}}    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05514}05514                         "{}field width for SAFILLDENSFIELD"{}));            \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05515}05515                 break;                                                  \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05516}05516         case 2:                                                         \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05517}05517                 SASBADDUINTDESC(sb, indent,                             \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05518}05518                     scsi\_2btoul(dens\_data-\/>field), \%u, field, desc);    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05519}05519                 break;                                                  \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05520}05520         case 3:                                                         \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05521}05521                 SASBADDUINTDESC(sb, indent,                             \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05522}05522                     scsi\_3btoul(dens\_data-\/>field), \%u, field, desc);    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05523}05523                 break;                                                  \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05524}05524         case 4:                                                         \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05525}05525                 SASBADDUINTDESC(sb, indent,                             \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05526}05526                     scsi\_4btoul(dens\_data-\/>field), \%u, field, desc);    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05527}05527                 break;                                                  \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05528}05528         case 8:                                                         \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05529}05529                 SASBADDUINTDESC(sb, indent,                             \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05530}05530                     (uintmax\_t)scsi\_8btou64(dens\_data-\/>field),  \%ju,    \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05531}05531                     field, desc);                                       \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05532}05532                 break;                                                  \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05533}05533         default:                                                        \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05534}05534                 break;                                                  \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05535}05535         \}                                                               \(\backslash\)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05536}05536 \};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05537}05537 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05538}05538 \textcolor{comment}{ * Fill an sbuf with density data in XML format.  This particular macro}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05539}05539 \textcolor{comment}{ * works for strings.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05540}05540 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05541}\mbox{\hyperlink{scsi__sa_8c_a49d0c4d72d98eb2fc8d0a3be193759f4}{05541}} \textcolor{preprocessor}{\#define SAFILLDENSSBSTR(dens\_data, sb, indent, field, desc\_remain,      \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05542}05542 \textcolor{preprocessor}{                        len\_to\_go, cur\_offset, desc)\{                   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05543}05543 \textcolor{preprocessor}{        size\_t cur\_field\_len;                                           \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05544}05544 \textcolor{preprocessor}{        char tmpstr[32];                                                \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05545}05545 \textcolor{preprocessor}{                                                                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05546}05546 \textcolor{preprocessor}{        cur\_field\_len = sizeof(dens\_data-\/>field);                       \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05547}05547 \textcolor{preprocessor}{        if (desc\_remain < cur\_field\_len) \{                              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05548}05548 \textcolor{preprocessor}{                len\_to\_go -\/= desc\_remain;                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05549}05549 \textcolor{preprocessor}{                cur\_offset += desc\_remain;                              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05550}05550 \textcolor{preprocessor}{                continue;                                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05551}05551 \textcolor{preprocessor}{        \}                                                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05552}05552 \textcolor{preprocessor}{        len\_to\_go -\/= cur\_field\_len;                                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05553}05553 \textcolor{preprocessor}{        cur\_offset += cur\_field\_len;                                    \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05554}05554 \textcolor{preprocessor}{        desc\_remain -\/= cur\_field\_len;                                   \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05555}05555 \textcolor{preprocessor}{                                                                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05556}05556 \textcolor{preprocessor}{        cam\_strvis(tmpstr, dens\_data-\/>field,                            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05557}05557 \textcolor{preprocessor}{            sizeof(dens\_data-\/>field), sizeof(tmpstr));                  \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05558}05558 \textcolor{preprocessor}{        SASBADDVARSTRDESC(sb, indent, tmpstr, \%s, field,                \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05559}05559 \textcolor{preprocessor}{            strlen(tmpstr) + 1, desc);                                  \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05560}05560 \textcolor{preprocessor}{\};}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05561}05561 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05562}05562 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05563}05563 \textcolor{comment}{ * Fill an sbuf with density data descriptors.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05564}05564 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05565}05565 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05566}\mbox{\hyperlink{scsi__sa_8c_a2668a8712a929d910890742198f6c8a2}{05566}} \mbox{\hyperlink{scsi__sa_8c_a2668a8712a929d910890742198f6c8a2}{safilldenstypesb}}(\textcolor{keyword}{struct} sbuf *sb, \textcolor{keywordtype}{int} *indent, uint8\_t *buf, \textcolor{keywordtype}{int} buf\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05567}05567     \textcolor{keywordtype}{int} is\_density)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05568}05568 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05569}05569         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__density__hdr}{scsi\_density\_hdr}} *hdr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05570}05570         uint32\_t hdr\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05571}05571         \textcolor{keywordtype}{int} len\_to\_go, cur\_offset;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05572}05572         \textcolor{keywordtype}{int} length\_offset;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05573}05573         \textcolor{keywordtype}{int} num\_reports, need\_close;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05574}05574 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05575}05575         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05576}05576 \textcolor{comment}{         * We need at least the header length.  Note that this isn't an}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05577}05577 \textcolor{comment}{         * error, not all tape drives will have every data type.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05578}05578 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05579}05579         \textcolor{keywordflow}{if} (buf\_len < \textcolor{keyword}{sizeof}(*hdr))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05580}05580                 \textcolor{keywordflow}{goto} bailout;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05581}05581 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05582}05582         hdr = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__density__hdr}{scsi\_density\_hdr}} *)buf;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05583}05583         hdr\_len = \mbox{\hyperlink{scsi__all_8h_a3bed0f6b9b74c170a3356b4263830a34}{scsi\_2btoul}}(hdr-\/>\mbox{\hyperlink{structscsi__density__hdr_a94494d87be6990cdfe48de7a5ee55a78}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05584}05584         len\_to\_go = min(buf\_len -\/ \textcolor{keyword}{sizeof}(*hdr), hdr\_len);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05585}05585         \textcolor{keywordflow}{if} (is\_density) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05586}05586                 length\_offset = \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__density__data}{scsi\_density\_data}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05587}05587                     bits\_per\_mm);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05588}05588         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05589}05589                 length\_offset = \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__medium__type__data}{scsi\_medium\_type\_data}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05590}05590                     num\_density\_codes);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05591}05591         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05592}05592         cur\_offset = \textcolor{keyword}{sizeof}(*hdr);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05593}05593 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05594}05594         num\_reports = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05595}05595         need\_close = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05596}05596 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05597}05597         \textcolor{keywordflow}{while} (len\_to\_go > length\_offset) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05598}05598                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__density__data}{scsi\_density\_data}} *dens\_data;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05599}05599                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__medium__type__data}{scsi\_medium\_type\_data}} *type\_data;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05600}05600                 \textcolor{keywordtype}{int} desc\_remain;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05601}05601                 \textcolor{keywordtype}{size\_t} cur\_field\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05602}05602 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05603}05603                 dens\_data = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05604}05604                 type\_data = NULL;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05605}05605 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05606}05606                 \textcolor{keywordflow}{if} (is\_density) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05607}05607                         dens\_data =(\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__density__data}{scsi\_density\_data}} *)\&buf[cur\_offset];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05608}05608                         \textcolor{keywordflow}{if} (dens\_data-\/>\mbox{\hyperlink{structscsi__density__data_ab76d8874d866530c87d700bda822847e}{byte2}} \& \mbox{\hyperlink{scsi__sa_8h_a7d208d67311051343131e7836e00c884}{SDD\_DLV}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05609}05609                                 desc\_remain = \mbox{\hyperlink{scsi__all_8h_a3bed0f6b9b74c170a3356b4263830a34}{scsi\_2btoul}}(dens\_data-\/>\mbox{\hyperlink{structscsi__density__data_a66463bfb5b25d177f529596fe14ae36b}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05610}05610                         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05611}05611                                 desc\_remain = \mbox{\hyperlink{scsi__sa_8h_ac27a8a2144215e63a5391cd7a8f57705}{SDD\_DEFAULT\_LENGTH}} -\/}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05612}05612                                     length\_offset;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05613}05613                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05614}05614                         type\_data = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__medium__type__data}{scsi\_medium\_type\_data}} *)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05615}05615                             \&buf[cur\_offset];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05616}05616                         desc\_remain = \mbox{\hyperlink{scsi__all_8h_a3bed0f6b9b74c170a3356b4263830a34}{scsi\_2btoul}}(type\_data-\/>\mbox{\hyperlink{structscsi__medium__type__data_a1b8242ef33ddf35db8ffbb3177dd17a5}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05617}05617                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05618}05618 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05619}05619                 len\_to\_go -\/= length\_offset;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05620}05620                 desc\_remain = min(desc\_remain, len\_to\_go);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05621}05621                 cur\_offset += length\_offset;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05622}05622 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05623}05623                 \textcolor{keywordflow}{if} (need\_close != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05624}05624                         \mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{SASBENDNODE}}(sb, *indent, density\_entry);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05625}05625                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05626}05626 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05627}05627                 \mbox{\hyperlink{scsi__sa_8c_a5c2ba6aa848e947bb357867e714f3d70}{SASBADDNODENUM}}(sb, *indent, density\_entry, num\_reports);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05628}05628                 num\_reports++;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05629}05629                 need\_close = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05630}05630 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05631}05631                 \textcolor{keywordflow}{if} (is\_density) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05632}05632                         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05633}05633                             dens\_data-\/>\mbox{\hyperlink{structscsi__density__data_a2f3aaad10426d3899481c1501b1d4177}{primary\_density\_code}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05634}05634                             primary\_density\_code, \textcolor{stringliteral}{"{}Primary Density Code"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05635}05635                         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05636}05636                             dens\_data-\/>\mbox{\hyperlink{structscsi__density__data_ad1989c3bd08801c753224205ea6b7b63}{secondary\_density\_code}}, \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05637}05637                             secondary\_density\_code, \textcolor{stringliteral}{"{}Secondary Density Code"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05638}05638                         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05639}05639                             dens\_data-\/>\mbox{\hyperlink{structscsi__density__data_ab76d8874d866530c87d700bda822847e}{byte2}} \& \string~\mbox{\hyperlink{scsi__sa_8h_a7d208d67311051343131e7836e00c884}{SDD\_DLV}}, \%\#x, density\_flags,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05640}05640                             \textcolor{stringliteral}{"{}Density Flags"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05641}05641 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05642}05642                         \mbox{\hyperlink{scsi__sa_8c_aef65990eb5104985a404adfb7b23a706}{SAFILLDENSSB}}(dens\_data, sb, *indent, bits\_per\_mm,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05643}05643                             desc\_remain, len\_to\_go, cur\_offset, \textcolor{stringliteral}{"{}Bits per mm"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05644}05644                         \mbox{\hyperlink{scsi__sa_8c_aef65990eb5104985a404adfb7b23a706}{SAFILLDENSSB}}(dens\_data, sb, *indent, \mbox{\hyperlink{structscsi__medium__type__data_a4777b38ebd2d84f92ee3a237d61c9df4}{media\_width}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05645}05645                             desc\_remain, len\_to\_go, cur\_offset, \textcolor{stringliteral}{"{}Media width"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05646}05646                         \mbox{\hyperlink{scsi__sa_8c_aef65990eb5104985a404adfb7b23a706}{SAFILLDENSSB}}(dens\_data, sb, *indent, tracks,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05647}05647                             desc\_remain, len\_to\_go, cur\_offset,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05648}05648                             \textcolor{stringliteral}{"{}Number of Tracks"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05649}05649                         \mbox{\hyperlink{scsi__sa_8c_aef65990eb5104985a404adfb7b23a706}{SAFILLDENSSB}}(dens\_data, sb, *indent, capacity,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05650}05650                             desc\_remain, len\_to\_go, cur\_offset, \textcolor{stringliteral}{"{}Capacity"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05651}05651 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05652}05652                         \mbox{\hyperlink{scsi__sa_8c_a49d0c4d72d98eb2fc8d0a3be193759f4}{SAFILLDENSSBSTR}}(dens\_data, sb, *indent, \mbox{\hyperlink{structscsi__medium__type__data_ad5db469e1e1034cab48b11076b704b69}{assigning\_org}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05653}05653                             desc\_remain, len\_to\_go, cur\_offset,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05654}05654                             \textcolor{stringliteral}{"{}Assigning Organization"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05655}05655 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05656}05656                         \mbox{\hyperlink{scsi__sa_8c_a49d0c4d72d98eb2fc8d0a3be193759f4}{SAFILLDENSSBSTR}}(dens\_data, sb, *indent, density\_name,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05657}05657                             desc\_remain, len\_to\_go, cur\_offset, \textcolor{stringliteral}{"{}Density Name"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05658}05658 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05659}05659                         \mbox{\hyperlink{scsi__sa_8c_a49d0c4d72d98eb2fc8d0a3be193759f4}{SAFILLDENSSBSTR}}(dens\_data, sb, *indent, \mbox{\hyperlink{structscsi__medium__type__data_a26b45f2bc615a5164710f22cca530846}{description}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05660}05660                             desc\_remain, len\_to\_go, cur\_offset, \textcolor{stringliteral}{"{}Description"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05661}05661                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05662}05662                         \textcolor{keywordtype}{int} i;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05663}05663 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05664}05664                         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent, type\_data-\/>\mbox{\hyperlink{structscsi__medium__type__data_aa202ca71af6f57fce55943f1ccc446b5}{medium\_type}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05665}05665                             \%u, \mbox{\hyperlink{structscsi__medium__type__data_aa202ca71af6f57fce55943f1ccc446b5}{medium\_type}}, \textcolor{stringliteral}{"{}Medium Type"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05666}05666 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05667}05667                         cur\_field\_len =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05668}05668                             \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__medium__type__data}{scsi\_medium\_type\_data}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05669}05669                                        \mbox{\hyperlink{structscsi__medium__type__data_a4777b38ebd2d84f92ee3a237d61c9df4}{media\_width}}) -\/}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05670}05670                             \_\_offsetof(\textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__medium__type__data}{scsi\_medium\_type\_data}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05671}05671                                        \mbox{\hyperlink{structscsi__medium__type__data_aded9e953e13b1292b8e571be854d58fd}{num\_density\_codes}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05672}05672 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05673}05673                         \textcolor{keywordflow}{if} (desc\_remain < cur\_field\_len) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05674}05674                                 len\_to\_go -\/= desc\_remain;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05675}05675                                 cur\_offset += desc\_remain;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05676}05676                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05677}05677                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05678}05678                         len\_to\_go -\/= cur\_field\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05679}05679                         cur\_offset += cur\_field\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05680}05680                         desc\_remain -\/= cur\_field\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05681}05681 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05682}05682                         \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05683}05683                             type\_data-\/>\mbox{\hyperlink{structscsi__medium__type__data_aded9e953e13b1292b8e571be854d58fd}{num\_density\_codes}}, \%d,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05684}05684                             \mbox{\hyperlink{structscsi__medium__type__data_aded9e953e13b1292b8e571be854d58fd}{num\_density\_codes}}, \textcolor{stringliteral}{"{}Number of Density Codes"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05685}05685                         \mbox{\hyperlink{scsi__sa_8c_add011268a2a0c41a6cb675ff2741e6d8}{SASBADDNODE}}(sb, *indent, density\_code\_list);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05686}05686                         \textcolor{keywordflow}{for} (i = 0; i < type\_data-\/>\mbox{\hyperlink{structscsi__medium__type__data_aded9e953e13b1292b8e571be854d58fd}{num\_density\_codes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05687}05687                              i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05688}05688                                 \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05689}05689                                     type\_data-\/>\mbox{\hyperlink{structscsi__medium__type__data_ae5c7deee6642f94f959b88f998852fbc}{primary\_density\_codes}}[i], \%u,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05690}05690                                     density\_code, \textcolor{stringliteral}{"{}Density Code"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05691}05691                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05692}05692                         \mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{SASBENDNODE}}(sb, *indent, density\_code\_list);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05693}05693 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05694}05694                         \mbox{\hyperlink{scsi__sa_8c_aef65990eb5104985a404adfb7b23a706}{SAFILLDENSSB}}(type\_data, sb, *indent, \mbox{\hyperlink{structscsi__medium__type__data_a4777b38ebd2d84f92ee3a237d61c9df4}{media\_width}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05695}05695                             desc\_remain, len\_to\_go, cur\_offset,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05696}05696                             \textcolor{stringliteral}{"{}Media width"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05697}05697                         \mbox{\hyperlink{scsi__sa_8c_aef65990eb5104985a404adfb7b23a706}{SAFILLDENSSB}}(type\_data, sb, *indent, \mbox{\hyperlink{structscsi__medium__type__data_ac0f9a6db68a3cf7d93af14ea4f939354}{medium\_length}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05698}05698                             desc\_remain, len\_to\_go, cur\_offset,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05699}05699                             \textcolor{stringliteral}{"{}Medium length"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05700}05700 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05701}05701                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05702}05702 \textcolor{comment}{                         * Account for the two reserved bytes.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05703}05703 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05704}05704                         cur\_field\_len = \textcolor{keyword}{sizeof}(type\_data-\/>\mbox{\hyperlink{structscsi__medium__type__data_a5bfa95dc56138bd71b484e7fc6224d5e}{reserved2}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05705}05705                         \textcolor{keywordflow}{if} (desc\_remain < cur\_field\_len) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05706}05706                                 len\_to\_go -\/= desc\_remain;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05707}05707                                 cur\_offset += desc\_remain;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05708}05708                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05709}05709                         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05710}05710                         len\_to\_go -\/= cur\_field\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05711}05711                         cur\_offset += cur\_field\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05712}05712                         desc\_remain -\/= cur\_field\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05713}05713                         }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05714}05714                         \mbox{\hyperlink{scsi__sa_8c_a49d0c4d72d98eb2fc8d0a3be193759f4}{SAFILLDENSSBSTR}}(type\_data, sb, *indent, \mbox{\hyperlink{structscsi__medium__type__data_ad5db469e1e1034cab48b11076b704b69}{assigning\_org}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05715}05715                             desc\_remain, len\_to\_go, cur\_offset,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05716}05716                             \textcolor{stringliteral}{"{}Assigning Organization"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05717}05717                         \mbox{\hyperlink{scsi__sa_8c_a49d0c4d72d98eb2fc8d0a3be193759f4}{SAFILLDENSSBSTR}}(type\_data, sb, *indent,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05718}05718                             \mbox{\hyperlink{structscsi__medium__type__data_ac2eb41fa7c701f3133b99986b491e26b}{medium\_type\_name}}, desc\_remain, len\_to\_go,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05719}05719                             cur\_offset, \textcolor{stringliteral}{"{}Medium type name"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05720}05720                         \mbox{\hyperlink{scsi__sa_8c_a49d0c4d72d98eb2fc8d0a3be193759f4}{SAFILLDENSSBSTR}}(type\_data, sb, *indent, \mbox{\hyperlink{structscsi__medium__type__data_a26b45f2bc615a5164710f22cca530846}{description}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05721}05721                             desc\_remain, len\_to\_go, cur\_offset, \textcolor{stringliteral}{"{}Description"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05722}05722                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05723}05723         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05724}05724         \textcolor{keywordflow}{if} (need\_close != 0) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05725}05725                 \mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{SASBENDNODE}}(sb, *indent, density\_entry);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05726}05726         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05727}05727 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05728}05728 bailout:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05729}05729         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05730}05730 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05731}05731 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05732}05732 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05733}05733 \textcolor{comment}{ * Fill an sbuf with density data information}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05734}05734 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05735}05735 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05736}\mbox{\hyperlink{scsi__sa_8c_a9a2137c12c07da7f81bae8a7d98dde4d}{05736}} \mbox{\hyperlink{scsi__sa_8c_a9a2137c12c07da7f81bae8a7d98dde4d}{safilldensitysb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keywordtype}{int} *indent, \textcolor{keyword}{struct} sbuf *sb)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05737}05737 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05738}05738         \textcolor{keywordtype}{int} i, is\_density;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05739}05739 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05740}05740         \mbox{\hyperlink{scsi__sa_8c_add011268a2a0c41a6cb675ff2741e6d8}{SASBADDNODE}}(sb, *indent, mtdensity);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05741}05741         \mbox{\hyperlink{scsi__sa_8c_a857d3024ab67ab738ca27710ce1037ee}{SASBADDUINTDESC}}(sb, *indent, softc-\/>\mbox{\hyperlink{structsa__softc_af36e56882c62d1ed0f324da312045204}{media\_density}}, \%u, media\_density,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05742}05742             \textcolor{stringliteral}{"{}Current Medium Density"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05743}05743         is\_density = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05744}05744         \textcolor{keywordflow}{for} (i = 0; i < \mbox{\hyperlink{scsi__sa_8c_aac3d580b796e771d33e2cc5346dbb29e}{SA\_DENSITY\_TYPES}}; i++) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05745}05745                 \textcolor{keywordtype}{int} tmpint;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05746}05746 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05747}05747                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_ad736496a89601e8a642885184fa54d57}{density\_info\_valid}}[i] == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05748}05748                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05749}05749 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05750}05750                 \mbox{\hyperlink{scsi__sa_8c_add011268a2a0c41a6cb675ff2741e6d8}{SASBADDNODE}}(sb, *indent, density\_report);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05751}05751                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[i] \& \mbox{\hyperlink{scsi__sa_8h_ae34f2aa5ee4dc9110ed76c3760871ea1}{SRDS\_MEDIUM\_TYPE}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05752}05752                         tmpint = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05753}05753                         is\_density = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05754}05754                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05755}05755                         tmpint = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05756}05756                         is\_density = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05757}05757                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05758}05758                 \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, *indent, tmpint, \%d, medium\_type\_report,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05759}05759                     \textcolor{stringliteral}{"{}Medium type report"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05760}05760 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05761}05761                 \textcolor{keywordflow}{if} (softc-\/>\mbox{\hyperlink{structsa__softc_a8ad733a72430266971d927eeef353d23}{density\_type\_bits}}[i] \& \mbox{\hyperlink{scsi__sa_8h_ad8abca0b944e3f2f8e54410f73aa96be}{SRDS\_MEDIA}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05762}05762                         tmpint = 1;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05763}05763                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05764}05764                         tmpint = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05765}05765                 \mbox{\hyperlink{scsi__sa_8c_ae98ca7945cee728e2338cddc1b6dd4af}{SASBADDINTDESC}}(sb, *indent, tmpint, \%d, media\_report, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05766}05766                     \textcolor{stringliteral}{"{}Media report"{}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05767}05767 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05768}05768                 \mbox{\hyperlink{scsi__sa_8c_a2668a8712a929d910890742198f6c8a2}{safilldenstypesb}}(sb, indent, softc-\/>\mbox{\hyperlink{structsa__softc_a1845fd5c22a7174ffb235fa20b3820ff}{density\_info}}[i],}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05769}05769                     softc-\/>\mbox{\hyperlink{structsa__softc_ad736496a89601e8a642885184fa54d57}{density\_info\_valid}}[i], is\_density);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05770}05770                 \mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{SASBENDNODE}}(sb, *indent, density\_report);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05771}05771         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05772}05772         \mbox{\hyperlink{scsi__sa_8c_a20522b67ae3465d2fd97f838bbacb963}{SASBENDNODE}}(sb, *indent, mtdensity);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05773}05773 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05774}05774 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05775}05775 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05776}05776 \textcolor{comment}{ * Given a completed REPORT SUPPORTED OPERATION CODES command with timeout}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05777}05777 \textcolor{comment}{ * descriptors, go through the descriptors and set the sa(4) driver}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05778}05778 \textcolor{comment}{ * timeouts to the recommended values.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05779}05779 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05780}05780 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05781}\mbox{\hyperlink{scsi__sa_8c_a4ab3be090922f004a07ed9190cd8be1b}{05781}} \mbox{\hyperlink{scsi__sa_8c_a4ab3be090922f004a07ed9190cd8be1b}{saloadtimeouts}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structsa__softc}{sa\_softc}} *softc, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *\mbox{\hyperlink{unionccb}{ccb}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05782}05782 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05783}05783         uint32\_t valid\_len, avail\_len = 0, used\_len = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05784}05784         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__supported__opcodes__all}{scsi\_report\_supported\_opcodes\_all}} *hdr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05785}05785         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__supported__opcodes__descr}{scsi\_report\_supported\_opcodes\_descr}} *desc;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05786}05786         uint8\_t *buf;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05787}05787 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05788}05788         hdr = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__supported__opcodes__all}{scsi\_report\_supported\_opcodes\_all}} *)\mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a51063aa61cb015be29efd19874e0586c}{data\_ptr}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05789}05789         valid\_len = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a876ad61cacd6314a81bcb506ed3d4744}{dxfer\_len}} -\/ \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_aeb974c780ab5470ba5a8ef184b224c0f}{resid}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05790}05790 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05791}05791         if (valid\_len < \textcolor{keyword}{sizeof}(*hdr))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05792}05792                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05793}05793 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05794}05794         avail\_len = \mbox{\hyperlink{scsi__all_8h_a819d6f51420109cfeb06a235f299e113}{scsi\_4btoul}}(hdr-\/>\mbox{\hyperlink{structscsi__report__supported__opcodes__all_a7c02f683969fafac12213e16a106fd3b}{length}}) + \textcolor{keyword}{sizeof}(hdr-\/>\mbox{\hyperlink{structscsi__report__supported__opcodes__all_a7c02f683969fafac12213e16a106fd3b}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05795}05795         \textcolor{keywordflow}{if} ((avail\_len != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05796}05796          \&\& (avail\_len > valid\_len)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05797}05797                 \mbox{\hyperlink{cam__xpt_8c_a342b8e2ed77d0b7a12ae7bc49dd2beac}{xpt\_print}}(softc-\/>\mbox{\hyperlink{structsa__softc_a20cd3984e4cfae08be47872ec85060f1}{periph}}-\/>\mbox{\hyperlink{structcam__periph_ab9f512b2fa31891d84372cd6279670b7}{path}}, \textcolor{stringliteral}{"{}WARNING: available timeout "{}}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05798}05798                     \textcolor{stringliteral}{"{}descriptor len \%zu > valid len \%u\(\backslash\)n"{}}, avail\_len,valid\_len);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05799}05799         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05800}05800 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05801}05801         used\_len = \textcolor{keyword}{sizeof}(hdr-\/>\mbox{\hyperlink{structscsi__report__supported__opcodes__all_a7c02f683969fafac12213e16a106fd3b}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05802}05802         avail\_len = MIN(avail\_len, valid\_len -\/ \textcolor{keyword}{sizeof}(*hdr));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05803}05803         buf = \mbox{\hyperlink{unionccb}{ccb}}-\/>\mbox{\hyperlink{unionccb_ab835fc67ca6736b430af71ed7b1780f4}{csio}}.\mbox{\hyperlink{structccb__scsiio_a51063aa61cb015be29efd19874e0586c}{data\_ptr}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05804}05804         \textcolor{keywordflow}{while} ((avail\_len -\/ used\_len) > \textcolor{keyword}{sizeof}(*desc)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05805}05805                 \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__supported__opcodes__timeout}{scsi\_report\_supported\_opcodes\_timeout}} *td;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05806}05806                 uint32\_t td\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05807}05807                 uint32\_t rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05808}05808                 uint8\_t *cur\_ptr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05809}05809 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05810}05810                 cur\_ptr = \&buf[used\_len];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05811}05811                 desc = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__supported__opcodes__descr}{scsi\_report\_supported\_opcodes\_descr}} *)cur\_ptr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05812}05812 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05813}05813                 used\_len += \textcolor{keyword}{sizeof}(*desc);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05814}05814                 \textcolor{comment}{/* If there's no timeout descriptor, keep going */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05815}05815                 \textcolor{keywordflow}{if} ((desc-\/>\mbox{\hyperlink{structscsi__report__supported__opcodes__descr_a739b73691d235ca307119e06b1b2aa25}{flags}} \& \mbox{\hyperlink{scsi__all_8h_a141152d4adb5e0c64b1ead86d356e055}{RSO\_CTDP}}) == 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05816}05816                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05817}05817 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05818}05818                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05819}05819 \textcolor{comment}{                 * If we don't have enough space to fit a timeout}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05820}05820 \textcolor{comment}{                 * descriptor then we're done.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05821}05821 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05822}05822                 \textcolor{keywordflow}{if} ((avail\_len -\/ used\_len) < \textcolor{keyword}{sizeof}(*td)) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05823}05823                         used\_len = avail\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05824}05824                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05825}05825                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05826}05826 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05827}05827                 cur\_ptr = \&buf[used\_len];}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05828}05828                 td = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__supported__opcodes__timeout}{scsi\_report\_supported\_opcodes\_timeout}} *)cur\_ptr;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05829}05829                 td\_len = \mbox{\hyperlink{scsi__all_8h_a3bed0f6b9b74c170a3356b4263830a34}{scsi\_2btoul}}(td-\/>\mbox{\hyperlink{structscsi__report__supported__opcodes__timeout_a5b0769cdd0467ac563810c16f887e14b}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05830}05830                 td\_len += \textcolor{keyword}{sizeof}(td-\/>\mbox{\hyperlink{structscsi__report__supported__opcodes__timeout_a5b0769cdd0467ac563810c16f887e14b}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05831}05831                 used\_len += td\_len;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05832}05832 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05833}05833                 \textcolor{keywordflow}{if} (td\_len < \textcolor{keyword}{sizeof}(*td))}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05834}05834                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05835}05835 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05836}05836                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05837}05837 \textcolor{comment}{                 * Use the recommended timeout.  The nominal time is the}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05838}05838 \textcolor{comment}{                 * time to wait before querying for status.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05839}05839 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05840}05840                 rec\_time = \mbox{\hyperlink{scsi__all_8h_a819d6f51420109cfeb06a235f299e113}{scsi\_4btoul}}(td-\/>\mbox{\hyperlink{structscsi__report__supported__opcodes__timeout_a5ac44c9683fea72e57c2f6bc45115107}{recommended\_time}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05841}05841 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05842}05842                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05843}05843 \textcolor{comment}{                 * Our timeouts are set in thousandths of a seconds.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05844}05844 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05845}05845                 rec\_time *= 1000;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05846}05846 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05847}05847                 \textcolor{keywordflow}{switch}(desc-\/>\mbox{\hyperlink{structscsi__report__supported__opcodes__descr_a98229ee6dc528f7366f3f60ed9853a50}{opcode}}) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05848}05848                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a0d4522ecaa66a6e2edacf9cd78b07f89}{ERASE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05849}05849                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaba63b94d9eed020025c1a78d134e8cc4}{SA\_TIMEOUT\_ERASE}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05850}05850                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05851}05851                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_af35aa5193c8452148899d55477fa3c9d}{LOAD\_UNLOAD}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05852}05852                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf245bc20d18ac336973056deb6138a77}{SA\_TIMEOUT\_LOAD}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05853}05853                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05854}05854                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a50b1dc2e4f99b1ad0f8ed85625118a40}{LOCATE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05855}05855                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a583a9435066203294ab853d3f85ad112}{LOCATE\_16}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05856}05856                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05857}05857 \textcolor{comment}{                         * We are assuming these are the same timeout.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05858}05858 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05859}05859                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa4f4a8dc9926eee608f362e2e8778236}{SA\_TIMEOUT\_LOCATE}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05860}05860                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05861}05861                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__all_8h_a79a08a7451f098f96e18d5203fd87b4e}{MODE\_SELECT\_6}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05862}05862                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__all_8h_a69bd79d3c08488e06179c6c92a7e6d62}{MODE\_SELECT\_10}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05863}05863                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05864}05864 \textcolor{comment}{                         * We are assuming these are the same timeout.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05865}05865 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05866}05866                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa506b917e072378f2c50b4abf5bac3ec3}{SA\_TIMEOUT\_MODE\_SELECT}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05867}05867                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05868}05868                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__all_8h_a12b8beb5040277e31909bd77d7079e07}{MODE\_SENSE\_6}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05869}05869                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__all_8h_aa59a5ec2963fdc99eceb98b0d49797a0}{MODE\_SENSE\_10}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05870}05870                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05871}05871 \textcolor{comment}{                         * We are assuming these are the same timeout.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05872}05872 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05873}05873                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6dda6e14e8cf743dc3efa009b308ef95}{SA\_TIMEOUT\_MODE\_SENSE}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05874}05874                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05875}05875                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__all_8h_a90e75ec58e14f013550513e4226e3d0b}{PREVENT\_ALLOW}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05876}05876                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa0d69fddc3aa64e582e031b44f838022}{SA\_TIMEOUT\_PREVENT}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05877}05877                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05878}05878                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_ac16f940e17f1ffa4e6e5ccb7333af92e}{SA\_READ}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05879}05879                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa2767ff3c6bbff66f42ed4fb912548a05}{SA\_TIMEOUT\_READ}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05880}05880                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05881}05881                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a0686b0e8f7bcecee0ef8dd3a44928d6b}{READ\_BLOCK\_LIMITS}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05882}05882                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa0eff19af7fbb7a63e527ec6889c3fbfc}{SA\_TIMEOUT\_READ\_BLOCK\_LIMITS}}] =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05883}05883                             rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05884}05884                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05885}05885                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a9d4064df04c261f824c0a653ce7d7384}{READ\_POSITION}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05886}05886                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05887}05887 \textcolor{comment}{                         * Note that this may show up multiple times for}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05888}05888 \textcolor{comment}{                         * the short form, long form and extended form}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05889}05889 \textcolor{comment}{                         * service actions.  We're assuming they are all}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05890}05890 \textcolor{comment}{                         * the same.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05891}05891 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05892}05892                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae77b8d365a84bfa90d0c502cf673bbb5}{SA\_TIMEOUT\_READ\_POSITION}}] =rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05893}05893                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05894}05894                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_ae5bf38668bfca53d00546a7213aef5f1}{REPORT\_DENSITY\_SUPPORT}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05895}05895                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aae287a56d985358cde9f2451b27009d8f}{SA\_TIMEOUT\_REP\_DENSITY}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05896}05896                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05897}05897                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a90c5e8f505843f2cafe851ced87cf0e5}{RESERVE\_UNIT}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05898}05898                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a8d4830d68b0ec9605a10e07ca35f9367}{RELEASE\_UNIT}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05899}05899                         \textcolor{comment}{/* We are assuming these are the same timeout.*/}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05900}05900                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6ef52d07b8b2e19bc0b3d6908fa805ec}{SA\_TIMEOUT\_RESERVE}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05901}05901                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05902}05902                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_ac578227ce939acacb730881307f477d7}{REWIND}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05903}05903                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaf648f06bfa840eb39e1ed420e9f2506a}{SA\_TIMEOUT\_REWIND}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05904}05904                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05905}05905                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a5ff6e798033f03e74730e99f01936f84}{SPACE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05906}05906                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa6b462533b43954222ddf4c8f71057b49}{SA\_TIMEOUT\_SPACE}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05907}05907                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05908}05908                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__all_8h_ab581718c44561d5a761e98d22a9d9e14}{TEST\_UNIT\_READY}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05909}05909                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aaa72385ad9a41511dc7597602972f4e68}{SA\_TIMEOUT\_TUR}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05910}05910                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05911}05911                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a3441c0b619fbeb721f69976d85ebf947}{SA\_WRITE}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05912}05912                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aa99b6f3c07f19a319106aa47928531547}{SA\_TIMEOUT\_WRITE}}] = rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05913}05913                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05914}05914                 \textcolor{keywordflow}{case} \mbox{\hyperlink{scsi__sa_8h_a2c2625336cf0ea26b4591c6da0ffc022}{WRITE\_FILEMARKS}}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05915}05915                         softc-\/>\mbox{\hyperlink{structsa__softc_a3b6b19a9326c1eb18d5ffd1778db647a}{timeout\_info}}[\mbox{\hyperlink{scsi__sa_8c_a496b4d15976d531f5c3684f24cef016aafdc542836d4c0c2c4a4039631718ba27}{SA\_TIMEOUT\_WRITE\_FILEMARKS}}] =}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05916}05916                             rec\_time;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05917}05917                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05918}05918                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05919}05919                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05920}05920 \textcolor{comment}{                         * We have explicit cases for all of the timeouts}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05921}05921 \textcolor{comment}{                         * we use.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05922}05922 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05923}05923                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05924}05924                 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05925}05925         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05926}05926 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05927}05927 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05928}05928 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* \_KERNEL */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05929}05929 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05930}05930 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05931}05931 \textcolor{comment}{ * Read tape block limits command.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05932}05932 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05933}05933 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05934}\mbox{\hyperlink{scsi__sa_8c_a31ad8bef747646fa0d53417539481827}{05934}} \mbox{\hyperlink{scsi__sa_8c_a31ad8bef747646fa0d53417539481827}{scsi\_read\_block\_limits}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05935}05935                    \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05936}05936                    u\_int8\_t tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05937}05937                    \textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__read__block__limits__data}{scsi\_read\_block\_limits\_data}} *rlimit\_buf,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05938}05938                    u\_int8\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05939}05939 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05940}05940         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__read__block__limits}{scsi\_read\_block\_limits}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05941}05941 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05942}05942         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a00dc62a475e9a013d8a7f90fcf08f3af}{CAM\_DIR\_IN}}, tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05943}05943              (u\_int8\_t *)rlimit\_buf, \textcolor{keyword}{sizeof}(*rlimit\_buf), sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05944}05944              \textcolor{keyword}{sizeof}(*scsi\_cmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05945}05945 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05946}05946         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__read__block__limits}{scsi\_read\_block\_limits}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05947}05947         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05948}05948         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__read__block__limits_a22f4c0cb9f49205391aa28dbdae6d28e}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a0686b0e8f7bcecee0ef8dd3a44928d6b}{READ\_BLOCK\_LIMITS}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05949}05949 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05950}05950 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05951}05951 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05952}\mbox{\hyperlink{scsi__sa_8c_ae9501381f141742a9beb8537b98fc66d}{05952}} \mbox{\hyperlink{scsi__sa_8c_ae9501381f141742a9beb8537b98fc66d}{scsi\_sa\_read\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05953}05953                    \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05954}05954                    u\_int8\_t tag\_action, \textcolor{keywordtype}{int} readop, \textcolor{keywordtype}{int} sli,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05955}05955                    \textcolor{keywordtype}{int} fixed, u\_int32\_t length, u\_int8\_t *data\_ptr,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05956}05956                    u\_int32\_t dxfer\_len, u\_int8\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05957}05957 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05958}05958         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__sa__rw}{scsi\_sa\_rw}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05959}05959         \textcolor{keywordtype}{int} read;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05960}05960 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05961}05961         read = (readop \& \mbox{\hyperlink{scsi__all_8h_aae2618387d92dc45e2c49873edd27bfa}{SCSI\_RW\_DIRMASK}}) == \mbox{\hyperlink{scsi__all_8h_a57edcc8f0428356ae9dccb86c323b4dc}{SCSI\_RW\_READ}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05962}05962 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05963}05963         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__sa__rw}{scsi\_sa\_rw}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05964}05964         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__sa__rw_a6ab7028b667f1e18b1da567ca57f8efa}{opcode}} = read ? \mbox{\hyperlink{scsi__sa_8h_ac16f940e17f1ffa4e6e5ccb7333af92e}{SA\_READ}} : \mbox{\hyperlink{scsi__sa_8h_a3441c0b619fbeb721f69976d85ebf947}{SA\_WRITE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05965}05965         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__sa__rw_a66498767e66d37390512de6f78f8a6d1}{sli\_fixed}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05966}05966         if (sli \&\& read)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05967}05967                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__sa__rw_a66498767e66d37390512de6f78f8a6d1}{sli\_fixed}} |= \mbox{\hyperlink{scsi__sa_8h_aca7f318deab5923e5681992cd60e40f6}{SAR\_SLI}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05968}05968         \textcolor{keywordflow}{if} (fixed)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05969}05969                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__sa__rw_a66498767e66d37390512de6f78f8a6d1}{sli\_fixed}} |= \mbox{\hyperlink{scsi__sa_8h_a09b583004f477f165ca5baa291d29781}{SARW\_FIXED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05970}05970         \mbox{\hyperlink{scsi__all_8h_ad744ce4fe5b776d796fca7338f45d1a6}{scsi\_ulto3b}}(\mbox{\hyperlink{structscsi__sa__rw_aa3ea2e95a903fd54c911da1ffec4c8fd}{length}}, scsi\_cmd-\/>\mbox{\hyperlink{structscsi__sa__rw_aa3ea2e95a903fd54c911da1ffec4c8fd}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05971}05971         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__sa__rw_af1f80f7b9524a8eb484c9ac809503966}{control}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05972}05972 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05973}05973         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, (read ? \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a00dc62a475e9a013d8a7f90fcf08f3af}{CAM\_DIR\_IN}} : \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676adf60a86f59d84768dceb1af379c0dc3a}{CAM\_DIR\_OUT}}) |}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05974}05974             ((readop \& \mbox{\hyperlink{scsi__all_8h_a11ab4257f682a1045d94f991ae1cf2e0}{SCSI\_RW\_BIO}}) != 0 ? \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676ad410878e03dad5a8ee210123a0b0ea2b}{CAM\_DATA\_BIO}} : 0),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05975}05975             tag\_action, data\_ptr, dxfer\_len, sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05976}05976             \textcolor{keyword}{sizeof}(*scsi\_cmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05977}05977 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05978}05978 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05979}05979 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05980}\mbox{\hyperlink{scsi__sa_8c_a73cc74c54b8a76d621c61094d408c5f2}{05980}} \mbox{\hyperlink{scsi__sa_8c_a73cc74c54b8a76d621c61094d408c5f2}{scsi\_load\_unload}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,         }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05981}05981                  \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),   }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05982}05982                  u\_int8\_t tag\_action, \textcolor{keywordtype}{int} immediate, \textcolor{keywordtype}{int} eot,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05983}05983                  \textcolor{keywordtype}{int} reten, \textcolor{keywordtype}{int} load, u\_int8\_t sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05984}05984                  u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05985}05985 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05986}05986         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__load__unload}{scsi\_load\_unload}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05987}05987 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05988}05988         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__load__unload}{scsi\_load\_unload}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05989}05989         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05990}05990         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__load__unload_a589353a5fad4105e2db9d01bfbbe67df}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_af35aa5193c8452148899d55477fa3c9d}{LOAD\_UNLOAD}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05991}05991         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscsi__load__unload_a59dea0baf852b301f16f5fb2d41b0962}{immediate}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05992}05992                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__load__unload_a59dea0baf852b301f16f5fb2d41b0962}{immediate}} = \mbox{\hyperlink{scsi__sa_8h_ac2a3843c1f7af759d52f93b285a2758a}{SLU\_IMMED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05993}05993         \textcolor{keywordflow}{if} (eot)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05994}05994                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__load__unload_a5564cae07ede0e5a428cfcddb718c201}{eot\_reten\_load}} |= \mbox{\hyperlink{scsi__sa_8h_a15956a8956e942ea2d8226003490c8c8}{SLU\_EOT}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05995}05995         \textcolor{keywordflow}{if} (reten)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05996}05996                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__load__unload_a5564cae07ede0e5a428cfcddb718c201}{eot\_reten\_load}} |= \mbox{\hyperlink{scsi__sa_8h_ad52f08f944422d8bc759da7e01d09545}{SLU\_RETEN}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05997}05997         \textcolor{keywordflow}{if} (load)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05998}05998                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__load__unload_a5564cae07ede0e5a428cfcddb718c201}{eot\_reten\_load}} |= \mbox{\hyperlink{scsi__sa_8h_a5b8be618d55da725ee0a02f79ebb57ff}{SLU\_LOAD}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l05999}05999 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06000}06000         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}}, tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06001}06001             NULL, 0, sense\_len, \textcolor{keyword}{sizeof}(*scsi\_cmd), timeout);    }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06002}06002 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06003}06003 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06004}06004 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06005}\mbox{\hyperlink{scsi__sa_8c_a410069d2a8f247757a67ab2f3ca2976f}{06005}} \mbox{\hyperlink{scsi__sa_8c_a410069d2a8f247757a67ab2f3ca2976f}{scsi\_rewind}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,         }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06006}06006             \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),   }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06007}06007             u\_int8\_t tag\_action, \textcolor{keywordtype}{int} \mbox{\hyperlink{structscsi__load__unload_a59dea0baf852b301f16f5fb2d41b0962}{immediate}}, u\_int8\_t sense\_len,     }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06008}06008             u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06009}06009 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06010}06010         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__rewind}{scsi\_rewind}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06011}06011 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06012}06012         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__rewind}{scsi\_rewind}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06013}06013         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06014}06014         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__rewind_af076440e32ac36880b63b5860dc01416}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_ac578227ce939acacb730881307f477d7}{REWIND}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06015}06015         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structscsi__rewind_a4314b897752b5916897d2a014747a0b0}{immediate}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06016}06016                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__rewind_a4314b897752b5916897d2a014747a0b0}{immediate}} = \mbox{\hyperlink{scsi__sa_8h_a602352187165cf1ff1cd2e48662b9b16}{SREW\_IMMED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06017}06017 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06018}06018         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}}, tag\_action, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06019}06019             0, sense\_len, \textcolor{keyword}{sizeof}(*scsi\_cmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06020}06020 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06021}06021 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06022}06022 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06023}\mbox{\hyperlink{scsi__sa_8c_a31f302a1800ec19d2d2a8a85e3681786}{06023}} \mbox{\hyperlink{scsi__sa_8c_a31f302a1800ec19d2d2a8a85e3681786}{scsi\_space}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06024}06024            \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06025}06025            u\_int8\_t tag\_action, \mbox{\hyperlink{scsi__sa_8h_a3a8e6fd57e2c2e02dc399c29a3b0e927}{scsi\_space\_code}} code,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06026}06026            u\_int32\_t count, u\_int8\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06027}06027 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06028}06028         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__space}{scsi\_space}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06029}06029 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06030}06030         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__space}{scsi\_space}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06031}06031         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__space_a22ead2e73b94bf12e66eb32ba1b438b9}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a5ff6e798033f03e74730e99f01936f84}{SPACE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06032}06032         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__space_a2121caac2c350faaf1ec1c3ff5538b3a}{code}} = \mbox{\hyperlink{structscsi__space_a2121caac2c350faaf1ec1c3ff5538b3a}{code}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06033}06033         \mbox{\hyperlink{scsi__all_8h_ad744ce4fe5b776d796fca7338f45d1a6}{scsi\_ulto3b}}(\mbox{\hyperlink{structscsi__space_aed1abc2e0213dea252d3f4fa241cc673}{count}}, scsi\_cmd-\/>\mbox{\hyperlink{structscsi__space_aed1abc2e0213dea252d3f4fa241cc673}{count}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06034}06034         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__space_a81f875543ded0722bcdeaec21a0ec706}{control}} = 0;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06035}06035 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06036}06036         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}}, tag\_action, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06037}06037             0, sense\_len, \textcolor{keyword}{sizeof}(*scsi\_cmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06038}06038 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06039}06039 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06040}06040 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06041}\mbox{\hyperlink{scsi__sa_8c_a675aaf601441cdb4e1cd7530415e2dd8}{06041}} \mbox{\hyperlink{scsi__sa_8c_a675aaf601441cdb4e1cd7530415e2dd8}{scsi\_write\_filemarks}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06042}06042                      \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06043}06043                      u\_int8\_t tag\_action, \textcolor{keywordtype}{int} immediate, \textcolor{keywordtype}{int} setmark,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06044}06044                      u\_int32\_t num\_marks, u\_int8\_t sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06045}06045                      u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06046}06046 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06047}06047         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__write__filemarks}{scsi\_write\_filemarks}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06048}06048 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06049}06049         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__write__filemarks}{scsi\_write\_filemarks}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06050}06050         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06051}06051         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__write__filemarks_acf76b05a45debd990f756a250f8b8035}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a2c2625336cf0ea26b4591c6da0ffc022}{WRITE\_FILEMARKS}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06052}06052         \textcolor{keywordflow}{if} (immediate)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06053}06053                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__write__filemarks_ae3b9f3ced341eded6aff40be2648e66b}{byte2}} |= \mbox{\hyperlink{scsi__sa_8h_a84462c28dc3ad598f3fd8a701388dfdb}{SWFMRK\_IMMED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06054}06054         \textcolor{keywordflow}{if} (setmark)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06055}06055                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__write__filemarks_ae3b9f3ced341eded6aff40be2648e66b}{byte2}} |= \mbox{\hyperlink{scsi__sa_8h_a49d895e58b2db8430f1f4284635a951c}{SWFMRK\_WSMK}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06056}06056 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06057}06057         \mbox{\hyperlink{scsi__all_8h_ad744ce4fe5b776d796fca7338f45d1a6}{scsi\_ulto3b}}(\mbox{\hyperlink{structscsi__write__filemarks_a7ec69c249504ca27d4da34707568e43c}{num\_marks}}, scsi\_cmd-\/>\mbox{\hyperlink{structscsi__write__filemarks_a7ec69c249504ca27d4da34707568e43c}{num\_marks}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06058}06058 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06059}06059         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}}, tag\_action, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06060}06060             0, sense\_len, \textcolor{keyword}{sizeof}(*scsi\_cmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06061}06061 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06062}06062 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06063}06063 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06064}06064 \textcolor{comment}{ * The reserve and release unit commands differ only by their opcodes.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06065}06065 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06066}06066 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06067}\mbox{\hyperlink{scsi__sa_8c_a891d38a734fe074b36cbbd5a91bbbeb3}{06067}} \mbox{\hyperlink{scsi__sa_8c_a891d38a734fe074b36cbbd5a91bbbeb3}{scsi\_reserve\_release\_unit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06068}06068                           \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06069}06069                           u\_int8\_t tag\_action, \textcolor{keywordtype}{int} third\_party,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06070}06070                           \textcolor{keywordtype}{int} third\_party\_id, u\_int8\_t sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06071}06071                           u\_int32\_t timeout, \textcolor{keywordtype}{int} reserve)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06072}06072 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06073}06073         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__reserve__release__unit}{scsi\_reserve\_release\_unit}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06074}06074 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06075}06075         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__reserve__release__unit}{scsi\_reserve\_release\_unit}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06076}06076         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06077}06077 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06078}06078         \textcolor{keywordflow}{if} (reserve)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06079}06079                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__reserve__release__unit_a1cb1b276119535c63afe2afac8c349a5}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a90c5e8f505843f2cafe851ced87cf0e5}{RESERVE\_UNIT}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06080}06080         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06081}06081                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__reserve__release__unit_a1cb1b276119535c63afe2afac8c349a5}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a8d4830d68b0ec9605a10e07ca35f9367}{RELEASE\_UNIT}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06082}06082 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06083}06083         \textcolor{keywordflow}{if} (third\_party) \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06084}06084                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__reserve__release__unit_a3cddba56009ad1c021886878c51ee85b}{lun\_thirdparty}} |= \mbox{\hyperlink{scsi__sa_8h_a5717863d20e08ccbad6dfcb280ae39f6}{SRRU\_3RD\_PARTY}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06085}06085                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__reserve__release__unit_a3cddba56009ad1c021886878c51ee85b}{lun\_thirdparty}} |=}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06086}06086                         ((third\_party\_id << \mbox{\hyperlink{scsi__sa_8h_a22905b5c5447c0bee7c2742c1f2fd7e1}{SRRU\_3RD\_SHAMT}}) \& \mbox{\hyperlink{scsi__sa_8h_a2717a4efe18f0af7debf91fb73074379}{SRRU\_3RD\_MASK}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06087}06087         \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06088}06088 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06089}06089         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}}, tag\_action, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06090}06090             0, sense\_len, \textcolor{keyword}{sizeof}(*scsi\_cmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06091}06091 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06092}06092 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06093}06093 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06094}\mbox{\hyperlink{scsi__sa_8c_acf0feaf9426731e4c2e53a69a84ae381}{06094}} \mbox{\hyperlink{scsi__sa_8c_acf0feaf9426731e4c2e53a69a84ae381}{scsi\_erase}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06095}06095            \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06096}06096            u\_int8\_t tag\_action, \textcolor{keywordtype}{int} immediate, \textcolor{keywordtype}{int} long\_erase,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06097}06097            u\_int8\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06098}06098 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06099}06099         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__erase}{scsi\_erase}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06100}06100 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06101}06101         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__erase}{scsi\_erase}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06102}06102         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06103}06103 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06104}06104         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__erase_a13d71c8d3bc85008b3add5025ea42cc7}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a0d4522ecaa66a6e2edacf9cd78b07f89}{ERASE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06105}06105 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06106}06106         \textcolor{keywordflow}{if} (immediate)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06107}06107                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__erase_ad3405b4a222f0896838399c16874b717}{lun\_imm\_long}} |= \mbox{\hyperlink{scsi__sa_8h_a19e926e57fc72070f8498568e373d27d}{SE\_IMMED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06108}06108 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06109}06109         \textcolor{keywordflow}{if} (long\_erase)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06110}06110                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__erase_ad3405b4a222f0896838399c16874b717}{lun\_imm\_long}} |= \mbox{\hyperlink{scsi__sa_8h_a053262ee59bc7982da537c9774bd3772}{SE\_LONG}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06111}06111 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06112}06112         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}}, tag\_action, NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06113}06113             0, sense\_len, \textcolor{keyword}{sizeof}(*scsi\_cmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06114}06114 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06115}06115 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06116}06116 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06117}06117 \textcolor{comment}{ * Read Tape Position command.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06118}06118 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06119}06119 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06120}\mbox{\hyperlink{scsi__sa_8c_a03a0ec15dbedb3f0a49b706a3d0cdf07}{06120}} \mbox{\hyperlink{scsi__sa_8c_a03a0ec15dbedb3f0a49b706a3d0cdf07}{scsi\_read\_position}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06121}06121                    \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06122}06122                    u\_int8\_t tag\_action, \textcolor{keywordtype}{int} hardsoft,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06123}06123                    \textcolor{keyword}{struct} \mbox{\hyperlink{structscsi__tape__position__data}{scsi\_tape\_position\_data}} *sbp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06124}06124                    u\_int8\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06125}06125 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06126}06126         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__read__position}{scsi\_tape\_read\_position}} *scmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06127}06127 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06128}06128         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a00dc62a475e9a013d8a7f90fcf08f3af}{CAM\_DIR\_IN}}, tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06129}06129             (u\_int8\_t *)sbp, \textcolor{keyword}{sizeof} (*sbp), sense\_len, \textcolor{keyword}{sizeof}(*scmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06130}06130         scmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__read__position}{scsi\_tape\_read\_position}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06131}06131         bzero(scmd, \textcolor{keyword}{sizeof}(*scmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06132}06132         scmd-\/>\mbox{\hyperlink{structscsi__tape__read__position_a224462fe7e6736ecf154303b924a3324}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a9d4064df04c261f824c0a653ce7d7384}{READ\_POSITION}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06133}06133         scmd-\/>\mbox{\hyperlink{structscsi__tape__read__position_afd7176ddb7dc6fe33ad59b2fc12f4e08}{byte1}} = hardsoft;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06134}06134 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06135}06135 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06136}06136 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06137}06137 \textcolor{comment}{ * Read Tape Position command.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06138}06138 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06139}06139 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06140}\mbox{\hyperlink{scsi__sa_8c_a55bd4f3cf2796af6cf475e8c11c7c5c1}{06140}} \mbox{\hyperlink{scsi__sa_8c_a55bd4f3cf2796af6cf475e8c11c7c5c1}{scsi\_read\_position\_10}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06141}06141                       \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06142}06142                       u\_int8\_t tag\_action, \textcolor{keywordtype}{int} service\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06143}06143                       u\_int8\_t *data\_ptr, u\_int32\_t \mbox{\hyperlink{structscsi__tape__read__position_a2664a9ade71c4e9a372406ee28295a42}{length}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06144}06144                       u\_int32\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06145}06145 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06146}06146         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__read__position}{scsi\_tape\_read\_position}} *scmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06147}06147 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06148}06148         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06149}06149                       retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06150}06150                       cbfcnp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06151}06151                       \textcolor{comment}{/*flags*/}\mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a00dc62a475e9a013d8a7f90fcf08f3af}{CAM\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06152}06152                       tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06153}06153                       \textcolor{comment}{/*data\_ptr*/}data\_ptr,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06154}06154                       \textcolor{comment}{/*dxfer\_len*/}\mbox{\hyperlink{structscsi__tape__read__position_a2664a9ade71c4e9a372406ee28295a42}{length}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06155}06155                       sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06156}06156                       \textcolor{keyword}{sizeof}(*scmd),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06157}06157                       timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06158}06158 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06159}06159         scmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__read__position}{scsi\_tape\_read\_position}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06160}06160         bzero(scmd, \textcolor{keyword}{sizeof}(*scmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06161}06161         scmd-\/>\mbox{\hyperlink{structscsi__tape__read__position_a224462fe7e6736ecf154303b924a3324}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a9d4064df04c261f824c0a653ce7d7384}{READ\_POSITION}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06162}06162         scmd-\/>\mbox{\hyperlink{structscsi__tape__read__position_afd7176ddb7dc6fe33ad59b2fc12f4e08}{byte1}} = service\_action;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06163}06163         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06164}06164 \textcolor{comment}{         * The length is only currently set (as of SSC4r03) if the extended}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06165}06165 \textcolor{comment}{         * form is specified.  The other forms have fixed lengths.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06166}06166 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06167}06167         \textcolor{keywordflow}{if} (service\_action == \mbox{\hyperlink{scsi__sa_8h_af018921480809bd990cdf565649bdf1c}{SA\_RPOS\_EXTENDED\_FORM}})}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06168}06168                 \mbox{\hyperlink{scsi__all_8h_a645af3def268320a573c026debde29e8}{scsi\_ulto2b}}(\mbox{\hyperlink{structscsi__tape__read__position_a2664a9ade71c4e9a372406ee28295a42}{length}}, scmd-\/>\mbox{\hyperlink{structscsi__tape__read__position_a2664a9ade71c4e9a372406ee28295a42}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06169}06169 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06170}06170 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06171}06171 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06172}06172 \textcolor{comment}{ * Set Tape Position command.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06173}06173 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06174}06174 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06175}\mbox{\hyperlink{scsi__sa_8c_a70a0702546f84e080ea42468830d023e}{06175}} \mbox{\hyperlink{scsi__sa_8c_a70a0702546f84e080ea42468830d023e}{scsi\_set\_position}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06176}06176                    \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06177}06177                    u\_int8\_t tag\_action, \textcolor{keywordtype}{int} hardsoft, u\_int32\_t blkno,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06178}06178                    u\_int8\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06179}06179 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06180}06180         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__locate}{scsi\_tape\_locate}} *scmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06181}06181 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06182}06182         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio, retries, cbfcnp, \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}}, tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06183}06183             (u\_int8\_t *)NULL, 0, sense\_len, \textcolor{keyword}{sizeof}(*scmd), timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06184}06184         scmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__locate}{scsi\_tape\_locate}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06185}06185         bzero(scmd, \textcolor{keyword}{sizeof}(*scmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06186}06186         scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_ae432718c5794a714a54f486446852122}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a50b1dc2e4f99b1ad0f8ed85625118a40}{LOCATE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06187}06187         \textcolor{keywordflow}{if} (hardsoft)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06188}06188                 scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_a46619ece5236662211e935756f234fa5}{byte1}} |= \mbox{\hyperlink{scsi__sa_8h_a61f1175c906501b5e4339accba97a583}{SA\_SPOS\_BT}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06189}06189         \mbox{\hyperlink{scsi__all_8h_aaa9d67f17d6412d1460d9bdee7e92d3e}{scsi\_ulto4b}}(blkno, scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_a2482997bd6b5caffc1c4242cff8a9c11}{blkaddr}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06190}06190 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06191}06191 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06192}06192 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06193}06193 \textcolor{comment}{ * XXX KDM figure out how to make a compatibility function.}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06194}06194 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06195}06195 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06196}\mbox{\hyperlink{scsi__sa_8c_ad91d7174748ac7a6442eca63e5cf6d83}{06196}} \mbox{\hyperlink{scsi__sa_8c_ad91d7174748ac7a6442eca63e5cf6d83}{scsi\_locate\_10}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06197}06197                \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06198}06198                u\_int8\_t tag\_action, \textcolor{keywordtype}{int} immed, \textcolor{keywordtype}{int} cp, \textcolor{keywordtype}{int} hard,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06199}06199                int64\_t \mbox{\hyperlink{structscsi__tape__locate_af2e83e5f7cfd35c75e32008e1bc0e82d}{partition}}, u\_int32\_t block\_address,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06200}06200                \textcolor{keywordtype}{int} sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06201}06201 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06202}06202         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__locate}{scsi\_tape\_locate}} *scmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06203}06203 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06204}06204         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06205}06205                       retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06206}06206                       cbfcnp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06207}06207                       \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06208}06208                       tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06209}06209                       \textcolor{comment}{/*data\_ptr*/} NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06210}06210                       \textcolor{comment}{/*dxfer\_len*/} 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06211}06211                       sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06212}06212                       \textcolor{keyword}{sizeof}(*scmd),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06213}06213                       timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06214}06214         scmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__tape__locate}{scsi\_tape\_locate}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06215}06215         bzero(scmd, \textcolor{keyword}{sizeof}(*scmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06216}06216         scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_ae432718c5794a714a54f486446852122}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a50b1dc2e4f99b1ad0f8ed85625118a40}{LOCATE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06217}06217         \textcolor{keywordflow}{if} (immed)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06218}06218                 scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_a46619ece5236662211e935756f234fa5}{byte1}} |= \mbox{\hyperlink{scsi__sa_8h_a3a4ecc92f5516ffedef6a16bb6d3660e}{SA\_SPOS\_IMMED}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06219}06219         \textcolor{keywordflow}{if} (cp)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06220}06220                 scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_a46619ece5236662211e935756f234fa5}{byte1}} |= \mbox{\hyperlink{scsi__sa_8h_ac924eb9f831aec9f27c6bae9c024ac94}{SA\_SPOS\_CP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06221}06221         \textcolor{keywordflow}{if} (hard)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06222}06222                 scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_a46619ece5236662211e935756f234fa5}{byte1}} |= \mbox{\hyperlink{scsi__sa_8h_a61f1175c906501b5e4339accba97a583}{SA\_SPOS\_BT}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06223}06223         \mbox{\hyperlink{scsi__all_8h_aaa9d67f17d6412d1460d9bdee7e92d3e}{scsi\_ulto4b}}(block\_address, scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_a2482997bd6b5caffc1c4242cff8a9c11}{blkaddr}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06224}06224         scmd-\/>\mbox{\hyperlink{structscsi__tape__locate_af2e83e5f7cfd35c75e32008e1bc0e82d}{partition}} = \mbox{\hyperlink{structscsi__tape__locate_af2e83e5f7cfd35c75e32008e1bc0e82d}{partition}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06225}06225 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06226}06226 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06227}06227 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06228}\mbox{\hyperlink{scsi__sa_8c_a6fc1c6428d529f855d387fd08146567a}{06228}} \mbox{\hyperlink{scsi__sa_8c_a6fc1c6428d529f855d387fd08146567a}{scsi\_locate\_16}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06229}06229                \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06230}06230                u\_int8\_t tag\_action, \textcolor{keywordtype}{int} immed, \textcolor{keywordtype}{int} cp, u\_int8\_t dest\_type,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06231}06231                \textcolor{keywordtype}{int} bam, int64\_t \mbox{\hyperlink{structscsi__tape__locate_af2e83e5f7cfd35c75e32008e1bc0e82d}{partition}}, u\_int64\_t logical\_id,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06232}06232                \textcolor{keywordtype}{int} sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06233}06233 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06234}06234 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06235}06235         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__locate__16}{scsi\_locate\_16}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06236}06236 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06237}06237         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06238}06238                       retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06239}06239                       cbfcnp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06240}06240                       \textcolor{comment}{/*flags*/}\mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06241}06241                       tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06242}06242                       \textcolor{comment}{/*data\_ptr*/}NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06243}06243                       \textcolor{comment}{/*dxfer\_len*/}0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06244}06244                       sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06245}06245                       \textcolor{keyword}{sizeof}(*scsi\_cmd),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06246}06246                       timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06247}06247 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06248}06248         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__locate__16}{scsi\_locate\_16}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06249}06249         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06250}06250         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__locate__16_aace4b7dc722cc770f1e69ddfd258bde6}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a583a9435066203294ab853d3f85ad112}{LOCATE\_16}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06251}06251         \textcolor{keywordflow}{if} (immed)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06252}06252                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__locate__16_ad94083a10aefe5760d92c1732cf1f9bd}{byte1}} |= \mbox{\hyperlink{scsi__sa_8h_ac48a9d399bfdf735238aaf2f89887d4f}{SA\_LC\_IMMEDIATE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06253}06253         \textcolor{keywordflow}{if} (cp)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06254}06254                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__locate__16_ad94083a10aefe5760d92c1732cf1f9bd}{byte1}} |= \mbox{\hyperlink{scsi__sa_8h_a5ed0a60802e95da9192f8f3a1e177869}{SA\_LC\_CP}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06255}06255         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__locate__16_ad94083a10aefe5760d92c1732cf1f9bd}{byte1}} |= (dest\_type << \mbox{\hyperlink{scsi__sa_8h_a65f98d91f50521ce9242d33dea04e794}{SA\_LC\_DEST\_TYPE\_SHIFT}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06256}06256 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06257}06257         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__locate__16_aae3fe7f854836d951f9f1bc2edd182c3}{byte2}} |= bam;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06258}06258         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__locate__16_ae19242e4af096ae4077f1131394bd92e}{partition}} = \mbox{\hyperlink{structscsi__locate__16_ae19242e4af096ae4077f1131394bd92e}{partition}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06259}06259         \mbox{\hyperlink{scsi__all_8h_aad426c8a894cc6b0f8bc505c7103655f}{scsi\_u64to8b}}(\mbox{\hyperlink{structscsi__locate__16_a88ce2c52c408ae0fe3403ae49b84cdca}{logical\_id}}, scsi\_cmd-\/>\mbox{\hyperlink{structscsi__locate__16_a88ce2c52c408ae0fe3403ae49b84cdca}{logical\_id}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06260}06260 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06261}06261 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06262}06262 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06263}\mbox{\hyperlink{scsi__sa_8c_a76864f26b338d61c477ed2f1d2f8fff5}{06263}} \mbox{\hyperlink{scsi__sa_8c_a76864f26b338d61c477ed2f1d2f8fff5}{scsi\_report\_density\_support}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06264}06264                             \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06265}06265                             u\_int8\_t tag\_action, \textcolor{keywordtype}{int} media, \textcolor{keywordtype}{int} medium\_type,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06266}06266                             u\_int8\_t *data\_ptr, u\_int32\_t length,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06267}06267                             u\_int32\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06268}06268 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06269}06269         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__density__support}{scsi\_report\_density\_support}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06270}06270 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06271}06271         scsi\_cmd =(\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__report__density__support}{scsi\_report\_density\_support}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06272}06272         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06273}06273 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06274}06274         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__report__density__support_afedafc31c83342a1a38a56eb59e80489}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_ae5bf38668bfca53d00546a7213aef5f1}{REPORT\_DENSITY\_SUPPORT}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06275}06275         \textcolor{keywordflow}{if} (media != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06276}06276                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__report__density__support_a2e316687f7cd545c5669435f4e4aedac}{byte1}} |= \mbox{\hyperlink{scsi__sa_8h_ad8abca0b944e3f2f8e54410f73aa96be}{SRDS\_MEDIA}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06277}06277         \textcolor{keywordflow}{if} (medium\_type != 0)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06278}06278                 scsi\_cmd-\/>\mbox{\hyperlink{structscsi__report__density__support_a2e316687f7cd545c5669435f4e4aedac}{byte1}} |= \mbox{\hyperlink{scsi__sa_8h_ae34f2aa5ee4dc9110ed76c3760871ea1}{SRDS\_MEDIUM\_TYPE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06279}06279 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06280}06280         \mbox{\hyperlink{scsi__all_8h_a645af3def268320a573c026debde29e8}{scsi\_ulto2b}}(\mbox{\hyperlink{structscsi__report__density__support_a2aa32d615c5f14e83c6ad3004e31ebc5}{length}}, scsi\_cmd-\/>\mbox{\hyperlink{structscsi__report__density__support_a2aa32d615c5f14e83c6ad3004e31ebc5}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06281}06281 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06282}06282         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06283}06283                       retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06284}06284                       cbfcnp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06285}06285                       \textcolor{comment}{/*flags*/}\mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a00dc62a475e9a013d8a7f90fcf08f3af}{CAM\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06286}06286                       tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06287}06287                       \textcolor{comment}{/*data\_ptr*/}data\_ptr,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06288}06288                       \textcolor{comment}{/*dxfer\_len*/}\mbox{\hyperlink{structscsi__report__density__support_a2aa32d615c5f14e83c6ad3004e31ebc5}{length}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06289}06289                       sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06290}06290                       \textcolor{keyword}{sizeof}(*scsi\_cmd),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06291}06291                       timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06292}06292 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06293}06293 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06294}06294 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06295}\mbox{\hyperlink{scsi__sa_8c_a709e005dcddb2e253cdc65e8b4f3bc9b}{06295}} \mbox{\hyperlink{scsi__sa_8c_a709e005dcddb2e253cdc65e8b4f3bc9b}{scsi\_set\_capacity}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06296}06296                   \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06297}06297                   u\_int8\_t tag\_action, \textcolor{keywordtype}{int} \mbox{\hyperlink{structscsi__report__density__support_a2e316687f7cd545c5669435f4e4aedac}{byte1}}, u\_int32\_t proportion,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06298}06298                   u\_int32\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06299}06299 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06300}06300         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__set__capacity}{scsi\_set\_capacity}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06301}06301 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06302}06302         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__set__capacity}{scsi\_set\_capacity}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06303}06303         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06304}06304 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06305}06305         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__set__capacity_a0789552d61845bc7bbbb38688020bbac}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_ad454738267f90ba9d0a5e0f0af39d022}{SET\_CAPACITY}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06306}06306 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06307}06307         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__set__capacity_a0062252c14be1aea12cd0209f49cf795}{byte1}} = \mbox{\hyperlink{structscsi__set__capacity_a0062252c14be1aea12cd0209f49cf795}{byte1}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06308}06308         \mbox{\hyperlink{scsi__all_8h_a645af3def268320a573c026debde29e8}{scsi\_ulto2b}}(proportion, scsi\_cmd-\/>\mbox{\hyperlink{structscsi__set__capacity_a1579babbc20bed47e80d29e5c526c75d}{cap\_proportion}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06309}06309 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06310}06310         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06311}06311                       retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06312}06312                       cbfcnp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06313}06313                       \textcolor{comment}{/*flags*/}\mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06314}06314                       tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06315}06315                       \textcolor{comment}{/*data\_ptr*/}NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06316}06316                       \textcolor{comment}{/*dxfer\_len*/}0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06317}06317                       sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06318}06318                       \textcolor{keyword}{sizeof}(*scsi\_cmd),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06319}06319                       timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06320}06320 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06321}06321 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06322}06322 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06323}\mbox{\hyperlink{scsi__sa_8c_a84bb65ff8a77605d9518e19d75728521}{06323}} \mbox{\hyperlink{scsi__sa_8c_a84bb65ff8a77605d9518e19d75728521}{scsi\_format\_medium}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06324}06324                    \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06325}06325                    u\_int8\_t tag\_action, \textcolor{keywordtype}{int} \mbox{\hyperlink{structscsi__set__capacity_a0062252c14be1aea12cd0209f49cf795}{byte1}}, \textcolor{keywordtype}{int} byte2, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06326}06326                    u\_int8\_t *data\_ptr, u\_int32\_t dxfer\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06327}06327                    u\_int32\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06328}06328 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06329}06329         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__format__medium}{scsi\_format\_medium}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06330}06330 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06331}06331         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__format__medium}{scsi\_format\_medium}}*)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06332}06332         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06333}06333 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06334}06334         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__format__medium_a6b6a8339eab3e89b697d538230026407}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_ab36963755052d472c5b4927d8299c631}{FORMAT\_MEDIUM}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06335}06335 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06336}06336         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__format__medium_a34818b2d93a5a4321b66336b5a4341e5}{byte1}} = \mbox{\hyperlink{structscsi__format__medium_a34818b2d93a5a4321b66336b5a4341e5}{byte1}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06337}06337         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__format__medium_a09117e4140e4e97bd0ec25327df576fd}{byte2}} = \mbox{\hyperlink{structscsi__format__medium_a09117e4140e4e97bd0ec25327df576fd}{byte2}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06338}06338 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06339}06339         \mbox{\hyperlink{scsi__all_8h_a645af3def268320a573c026debde29e8}{scsi\_ulto2b}}(dxfer\_len, scsi\_cmd-\/>\mbox{\hyperlink{structscsi__format__medium_a0fa4bbfc4c757c44dce05ff009a88339}{length}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06340}06340 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06341}06341         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06342}06342                       retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06343}06343                       cbfcnp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06344}06344                       \textcolor{comment}{/*flags*/}(dxfer\_len > 0) ? \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676adf60a86f59d84768dceb1af379c0dc3a}{CAM\_DIR\_OUT}} : \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06345}06345                       tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06346}06346                       \textcolor{comment}{/*data\_ptr*/} data\_ptr,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06347}06347                       \textcolor{comment}{/*dxfer\_len*/} dxfer\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06348}06348                       sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06349}06349                       \textcolor{keyword}{sizeof}(*scsi\_cmd),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06350}06350                       timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06351}06351 \}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06352}06352 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06353}06353 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06354}\mbox{\hyperlink{scsi__sa_8c_a1b308e8c48d0c5d7e05f380fce94560e}{06354}} \mbox{\hyperlink{scsi__sa_8c_a1b308e8c48d0c5d7e05f380fce94560e}{scsi\_allow\_overwrite}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structccb__scsiio}{ccb\_scsiio}} *csio, u\_int32\_t retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06355}06355                    \textcolor{keywordtype}{void} (*cbfcnp)(\textcolor{keyword}{struct} \mbox{\hyperlink{structcam__periph}{cam\_periph}} *, \textcolor{keyword}{union} \mbox{\hyperlink{unionccb}{ccb}} *),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06356}06356                    u\_int8\_t tag\_action, \textcolor{keywordtype}{int} allow\_overwrite, \textcolor{keywordtype}{int} partition, }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06357}06357                    u\_int64\_t logical\_id, u\_int32\_t sense\_len, u\_int32\_t timeout)}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06358}06358 \{}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06359}06359         \textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__allow__overwrite}{scsi\_allow\_overwrite}} *scsi\_cmd;}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06360}06360 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06361}06361         scsi\_cmd = (\textcolor{keyword}{struct }\mbox{\hyperlink{structscsi__allow__overwrite}{scsi\_allow\_overwrite}} *)\&csio-\/>\mbox{\hyperlink{structccb__scsiio_a13387230fb12876920d96b0fe3a74689}{cdb\_io}}.\mbox{\hyperlink{unioncdb__t_a2d84ee02fd9dd4cabf1d6bd187625dc2}{cdb\_bytes}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06362}06362         bzero(scsi\_cmd, \textcolor{keyword}{sizeof}(*scsi\_cmd));}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06363}06363 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06364}06364         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__allow__overwrite_a0a3439771b89ab5ebebc98959e09727d}{opcode}} = \mbox{\hyperlink{scsi__sa_8h_a37ac215ee9300aca15c05de6d8d749c6}{ALLOW\_OVERWRITE}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06365}06365 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06366}06366         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__allow__overwrite_ac0af7363dbe274b6a5e319b25253966a}{allow\_overwrite}} = \mbox{\hyperlink{structscsi__allow__overwrite_ac0af7363dbe274b6a5e319b25253966a}{allow\_overwrite}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06367}06367         scsi\_cmd-\/>\mbox{\hyperlink{structscsi__allow__overwrite_a64957ea4c3e07a12ecb0c03f9fe2be96}{partition}} = \mbox{\hyperlink{structscsi__allow__overwrite_a64957ea4c3e07a12ecb0c03f9fe2be96}{partition}};}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06368}06368         \mbox{\hyperlink{scsi__all_8h_aad426c8a894cc6b0f8bc505c7103655f}{scsi\_u64to8b}}(\mbox{\hyperlink{structscsi__allow__overwrite_a8aeb6b74c46a06d10ea5606e023d772f}{logical\_id}}, scsi\_cmd-\/>\mbox{\hyperlink{structscsi__allow__overwrite_a8aeb6b74c46a06d10ea5606e023d772f}{logical\_id}});}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06369}06369 }
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06370}06370         \mbox{\hyperlink{cam__ccb_8h_aa2f54bfe52060582eb17ef5584b8f62b}{cam\_fill\_csio}}(csio,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06371}06371                       retries,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06372}06372                       cbfcnp,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06373}06373                       \mbox{\hyperlink{cam__ccb_8h_a8a331ca6ae1e86223b907c974ef6b676a17c5461f834828a5af4980b5ac3a375d}{CAM\_DIR\_NONE}},}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06374}06374                       tag\_action,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06375}06375                       \textcolor{comment}{/*data\_ptr*/} NULL,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06376}06376                       \textcolor{comment}{/*dxfer\_len*/} 0,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06377}06377                       sense\_len,}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06378}06378                       \textcolor{keyword}{sizeof}(*scsi\_cmd),}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06379}06379                       timeout);}
\DoxyCodeLine{\Hypertarget{scsi__sa_8c_source_l06380}06380 \}}

\end{DoxyCode}
