\hypertarget{umass_8c_source}{}\doxysection{umass.\+c}
\label{umass_8c_source}\index{dev/usb/storage/umass.c@{dev/usb/storage/umass.c}}
\mbox{\hyperlink{umass_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00001}00001 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00002}\mbox{\hyperlink{umass_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00002}} \mbox{\hyperlink{umass_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00003}00003 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00004}00004 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00005}00005 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00007}00007 \textcolor{comment}{ * Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00008}00008 \textcolor{comment}{ *                    Nick Hibma <n\_hibma@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00009}00009 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00011}00011 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00012}00012 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00013}00013 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00014}00014 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00015}00015 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00016}00016 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00017}00017 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00018}00018 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00019}00019 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00020}00020 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00021}00021 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00022}00022 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00023}00023 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00024}00024 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00025}00025 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00026}00026 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00027}00027 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00028}00028 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00029}00029 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00030}00030 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00031}00031 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00032}00032 \textcolor{comment}{ *      \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00033}00033 \textcolor{comment}{ *      \$NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp \$}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00034}00034 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00036}00036 \textcolor{comment}{/* Also already merged from NetBSD:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00037}00037 \textcolor{comment}{ *      \$NetBSD: umass.c,v 1.67 2001/11/25 19:05:22 augustss Exp \$}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00038}00038 \textcolor{comment}{ *      \$NetBSD: umass.c,v 1.90 2002/11/04 19:17:33 pooka Exp \$}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00039}00039 \textcolor{comment}{ *      \$NetBSD: umass.c,v 1.108 2003/11/07 17:03:25 wiz Exp \$}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00040}00040 \textcolor{comment}{ *      \$NetBSD: umass.c,v 1.109 2003/12/04 13:57:31 keihan Exp \$}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00041}00041 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00043}00043 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00044}00044 \textcolor{comment}{ * Universal Serial Bus Mass Storage Class specs:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00045}00045 \textcolor{comment}{ * http://www.usb.org/developers/devclass\_docs/usb\_msc\_overview\_1.2.pdf}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00046}00046 \textcolor{comment}{ * http://www.usb.org/developers/devclass\_docs/usbmassbulk\_10.pdf}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00047}00047 \textcolor{comment}{ * http://www.usb.org/developers/devclass\_docs/usb\_msc\_cbi\_1.1.pdf}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00048}00048 \textcolor{comment}{ * http://www.usb.org/developers/devclass\_docs/usbmass-\/ufi10.pdf}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00049}00049 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00051}00051 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00052}00052 \textcolor{comment}{ * Ported to NetBSD by Lennart Augustsson <augustss@NetBSD.org>.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00053}00053 \textcolor{comment}{ * Parts of the code written by Jason R. Thorpe <thorpej@shagadelic.org>.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00054}00054 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00056}00056 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00057}00057 \textcolor{comment}{ * The driver handles 3 Wire Protocols}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00058}00058 \textcolor{comment}{ * -\/ Command/Bulk/Interrupt (CBI)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00059}00059 \textcolor{comment}{ * -\/ Command/Bulk/Interrupt with Command Completion Interrupt (CBI with CCI)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00060}00060 \textcolor{comment}{ * -\/ Mass Storage Bulk-\/Only (BBB)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00061}00061 \textcolor{comment}{ *   (BBB refers Bulk/Bulk/Bulk for Command/Data/Status phases)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00062}00062 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00063}00063 \textcolor{comment}{ * Over these wire protocols it handles the following command protocols}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00064}00064 \textcolor{comment}{ * -\/ SCSI}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00065}00065 \textcolor{comment}{ * -\/ UFI (floppy command set)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00066}00066 \textcolor{comment}{ * -\/ 8070i (ATAPI)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00067}00067 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00068}00068 \textcolor{comment}{ * UFI and 8070i (ATAPI) are transformed versions of the SCSI command set. The}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00069}00069 \textcolor{comment}{ * sc-\/>sc\_transform method is used to convert the commands into the appropriate}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00070}00070 \textcolor{comment}{ * format (if at all necessary). For example, UFI requires all commands to be}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00071}00071 \textcolor{comment}{ * 12 bytes in length amongst other things.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00072}00072 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00073}00073 \textcolor{comment}{ * The source code below is marked and can be split into a number of pieces}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00074}00074 \textcolor{comment}{ * (in this order):}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00075}00075 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00076}00076 \textcolor{comment}{ * -\/ probe/attach/detach}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00077}00077 \textcolor{comment}{ * -\/ generic transfer routines}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00078}00078 \textcolor{comment}{ * -\/ BBB}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00079}00079 \textcolor{comment}{ * -\/ CBI}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00080}00080 \textcolor{comment}{ * -\/ CBI\_I (in addition to functions from CBI)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00081}00081 \textcolor{comment}{ * -\/ CAM (Common Access Method)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00082}00082 \textcolor{comment}{ * -\/ SCSI}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00083}00083 \textcolor{comment}{ * -\/ UFI}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00084}00084 \textcolor{comment}{ * -\/ 8070i (ATAPI)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00085}00085 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00086}00086 \textcolor{comment}{ * The protocols are implemented using a state machine, for the transfers as}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00087}00087 \textcolor{comment}{ * well as for the resets. The state machine is contained in umass\_t\_*\_callback.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00088}00088 \textcolor{comment}{ * The state machine is started through either umass\_command\_start() or}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00089}00089 \textcolor{comment}{ * umass\_reset().}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00090}00090 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00091}00091 \textcolor{comment}{ * The reason for doing this is a) CAM performs a lot better this way and b) it}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00092}00092 \textcolor{comment}{ * avoids using tsleep from interrupt context (for example after a failed}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00093}00093 \textcolor{comment}{ * transfer).}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00094}00094 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00096}00096 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00097}00097 \textcolor{comment}{ * The SCSI related part of this driver has been derived from the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00098}00098 \textcolor{comment}{ * dev/ppbus/vpo.c driver, by Nicolas Souchu (nsouch@FreeBSD.org).}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00099}00099 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00100}00100 \textcolor{comment}{ * The CAM layer uses so called actions which are messages sent to the host}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00101}00101 \textcolor{comment}{ * adapter for completion. The actions come in through umass\_cam\_action. The}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00102}00102 \textcolor{comment}{ * appropriate block of routines is called depending on the transport protocol}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00103}00103 \textcolor{comment}{ * in use. When the transfer has finished, these routines call}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00104}00104 \textcolor{comment}{ * umass\_cam\_cb again to complete the CAM command.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00105}00105 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00107}00107 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00108}00108 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00109}00109 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00110}00110 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00111}00111 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00112}00112 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00113}00113 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00114}00114 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00115}00115 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00116}00116 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00117}00117 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00118}00118 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00119}00119 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00120}00120 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00121}00121 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00122}00122 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00123}00123 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00124}00124 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00125}00125 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00126}00126 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00127}00127 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00128}00128 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00129}00129 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00131}00131 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__quirk_8h}{dev/usb/quirk/usb\_quirk.h}}>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00133}00133 \textcolor{preprocessor}{\#include <cam/cam.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00134}00134 \textcolor{preprocessor}{\#include <cam/cam\_ccb.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00135}00135 \textcolor{preprocessor}{\#include <cam/cam\_sim.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00136}00136 \textcolor{preprocessor}{\#include <cam/cam\_xpt\_sim.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00137}00137 \textcolor{preprocessor}{\#include <cam/scsi/scsi\_all.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00138}00138 \textcolor{preprocessor}{\#include <cam/scsi/scsi\_da.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00140}00140 \textcolor{preprocessor}{\#include <cam/cam\_periph.h>}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00141}00141 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00142}00142 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00143}00143 \textcolor{preprocessor}{\#define DIF(m, x)                               \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00144}00144 \textcolor{preprocessor}{  do \{                                          \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00145}00145 \textcolor{preprocessor}{    if (umass\_debug \& (m)) \{ x ; \}              \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00146}00146 \textcolor{preprocessor}{  \} while (0)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00148}00148 \textcolor{preprocessor}{\#define DPRINTF(sc, m, fmt, ...)                        \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00149}00149 \textcolor{preprocessor}{  do \{                                                  \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00150}00150 \textcolor{preprocessor}{    if (umass\_debug \& (m)) \{                            \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00151}00151 \textcolor{preprocessor}{        printf("{}\%s:\%s: "{}} fmt,                           \(\backslash\)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00152}00152                (sc) ? (const char *)(sc)-\/>sc\_name :     \(\backslash\)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00153}00153                (const char *)"{}umassX"{},                  \(\backslash\)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00154}00154                 \_\_FUNCTION\_\_ ,\#\# \_\_VA\_ARGS\_\_);          \(\backslash\)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00155}00155     \}                                                   \(\backslash\)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00156}00156   \} while (0)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00158}00158 \textcolor{preprocessor}{\#define UDMASS\_GEN      0x00010000      }\textcolor{comment}{/* general */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00159}00159 \textcolor{preprocessor}{\#define UDMASS\_SCSI     0x00020000      }\textcolor{comment}{/* scsi */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00160}00160 \textcolor{preprocessor}{\#define UDMASS\_UFI      0x00040000      }\textcolor{comment}{/* ufi command set */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00161}00161 \textcolor{preprocessor}{\#define UDMASS\_ATAPI    0x00080000      }\textcolor{comment}{/* 8070i command set */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00162}00162 \textcolor{preprocessor}{\#define UDMASS\_CMD      (UDMASS\_SCSI|UDMASS\_UFI|UDMASS\_ATAPI)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00163}00163 \textcolor{preprocessor}{\#define UDMASS\_USB      0x00100000      }\textcolor{comment}{/* USB general */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00164}00164 \textcolor{preprocessor}{\#define UDMASS\_BBB      0x00200000      }\textcolor{comment}{/* Bulk-\/Only transfers */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00165}00165 \textcolor{preprocessor}{\#define UDMASS\_CBI      0x00400000      }\textcolor{comment}{/* CBI transfers */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00166}00166 \textcolor{preprocessor}{\#define UDMASS\_WIRE     (UDMASS\_BBB|UDMASS\_CBI)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00167}00167 \textcolor{preprocessor}{\#define UDMASS\_ALL      0xffff0000      }\textcolor{comment}{/* all of the above */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00168}00168 \textcolor{keyword}{static} \textcolor{keywordtype}{int} umass\_debug;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keywordtype}{int} umass\_throttle;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00170}00170 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00171}00171 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, umass, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00172}00172     \textcolor{stringliteral}{"{}USB umass"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00173}00173 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_umass, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00174}00174     \&umass\_debug, 0, \textcolor{stringliteral}{"{}umass debug level"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00175}00175 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_umass, OID\_AUTO, throttle, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00176}00176     \&umass\_throttle, 0, \textcolor{stringliteral}{"{}Forced delay between commands in milliseconds"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00177}00177 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00178}\mbox{\hyperlink{umass_8c_a0825cea09ef3ea56dbb615b12a733075}{00178}} \textcolor{preprocessor}{\#define DIF(...) do \{ \} while (0)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00179}\mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{00179}} \textcolor{preprocessor}{\#define DPRINTF(...) do \{ \} while (0)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00180}00180 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00182}\mbox{\hyperlink{umass_8c_a127c097a67064d4bba92e26f485ed39d}{00182}} \textcolor{preprocessor}{\#define UMASS\_BULK\_SIZE (1 << 17)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00183}\mbox{\hyperlink{umass_8c_ac369c62a68386805c6d4e13371e70b03}{00183}} \textcolor{preprocessor}{\#define UMASS\_CBI\_DIAGNOSTIC\_CMDLEN 12  }\textcolor{comment}{/* bytes */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00184}\mbox{\hyperlink{umass_8c_ab6446042c0aa42600ef2511fd1de02d2}{00184}} \textcolor{preprocessor}{\#define UMASS\_MAX\_CMDLEN MAX(12, CAM\_MAX\_CDBLEN)        }\textcolor{comment}{/* bytes */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00186}00186 \textcolor{comment}{/* USB transfer definitions */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00188}\mbox{\hyperlink{umass_8c_a0dea8924adcf01d3b768adc189195a71}{00188}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_RESET1      0       }\textcolor{comment}{/* Bulk-\/Only */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00189}\mbox{\hyperlink{umass_8c_a7131c51faf3f7dfa8180d873c5eea816}{00189}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_RESET2      1}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00190}\mbox{\hyperlink{umass_8c_af8b0322efcc2cf2814d409966f7614e9}{00190}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_RESET3      2}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00191}\mbox{\hyperlink{umass_8c_aadffbb2c2620889c6daa1a1b3ccd323a}{00191}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_COMMAND     3}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00192}\mbox{\hyperlink{umass_8c_a3a3362d016fd8c9deea8c4241edad3f8}{00192}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_DATA\_READ   4}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00193}\mbox{\hyperlink{umass_8c_a9e505cb8fe4004266c19b527f283b0ac}{00193}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_DATA\_RD\_CS  5}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00194}\mbox{\hyperlink{umass_8c_ac7a17a20135cb1bf4172b647f90301ce}{00194}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_DATA\_WRITE  6}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00195}\mbox{\hyperlink{umass_8c_a9b8f0c7bf3719039cd37ece14dc64301}{00195}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_DATA\_WR\_CS  7}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00196}\mbox{\hyperlink{umass_8c_a908ea85dad04d97117a64af8b796e78a}{00196}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_STATUS      8}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00197}\mbox{\hyperlink{umass_8c_ac95cbd24722141236a34149bbf831c69}{00197}} \textcolor{preprocessor}{\#define UMASS\_T\_BBB\_MAX         9}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00198}00198 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00199}\mbox{\hyperlink{umass_8c_a695b041c10588247f7c5ef8ceb9b2673}{00199}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_RESET1      0       }\textcolor{comment}{/* CBI */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00200}\mbox{\hyperlink{umass_8c_ab95ef0a60706d310877aaf315edcdc97}{00200}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_RESET2      1}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00201}\mbox{\hyperlink{umass_8c_aa43a85af5bfd73457d24d5d319c468e6}{00201}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_RESET3      2}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00202}\mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{00202}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_COMMAND     3}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00203}\mbox{\hyperlink{umass_8c_adb196dd0010f4e1f26f7ec0081756d14}{00203}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_DATA\_READ   4}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00204}\mbox{\hyperlink{umass_8c_a5d3047e254b63401cef270eaedbb957d}{00204}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_DATA\_RD\_CS  5}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00205}\mbox{\hyperlink{umass_8c_a3041249aac35eae7fd2d8601e207b1ff}{00205}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_DATA\_WRITE  6}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00206}\mbox{\hyperlink{umass_8c_ae46c543e7e0ae600e34f10924b1f5320}{00206}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_DATA\_WR\_CS  7}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00207}\mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{00207}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_STATUS      8}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00208}\mbox{\hyperlink{umass_8c_a650ab8f293b106f3e60096bd17ccae47}{00208}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_RESET4      9}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00209}\mbox{\hyperlink{umass_8c_ab650a4fa6cd4d32ff892811e1130e73a}{00209}} \textcolor{preprocessor}{\#define UMASS\_T\_CBI\_MAX        10}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00211}\mbox{\hyperlink{umass_8c_af03ec61edc6e8350be26185af8d65fe5}{00211}} \textcolor{preprocessor}{\#define UMASS\_T\_MAX MAX(UMASS\_T\_CBI\_MAX, UMASS\_T\_BBB\_MAX)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00213}00213 \textcolor{comment}{/* Generic definitions */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00214}00214 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00215}00215 \textcolor{comment}{/* Direction for transfer */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00216}\mbox{\hyperlink{umass_8c_a665390e734d124195aa8d263d475c73a}{00216}} \textcolor{preprocessor}{\#define DIR\_NONE        0}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00217}\mbox{\hyperlink{umass_8c_adc4b177c894d6bf0c0065c0e8c6a31df}{00217}} \textcolor{preprocessor}{\#define DIR\_IN          1}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00218}\mbox{\hyperlink{umass_8c_a91459a263a21d175edba77e9aed856e4}{00218}} \textcolor{preprocessor}{\#define DIR\_OUT         2}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00220}00220 \textcolor{comment}{/* device name */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00221}\mbox{\hyperlink{umass_8c_a563cad7e347a704508920c0c59f74808}{00221}} \textcolor{preprocessor}{\#define DEVNAME         "{}umass"{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00222}\mbox{\hyperlink{umass_8c_a5725b09a7ddc0f4e1378de63c03d3f22}{00222}} \textcolor{preprocessor}{\#define DEVNAME\_SIM     "{}umass-\/sim"{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00224}00224 \textcolor{comment}{/* Approximate maximum transfer speeds (assumes 33\% overhead). */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00225}\mbox{\hyperlink{umass_8c_a5f4c990724cf7f390a29a73d08e0591b}{00225}} \textcolor{preprocessor}{\#define UMASS\_FULL\_TRANSFER\_SPEED       1000}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00226}\mbox{\hyperlink{umass_8c_ab641a0da8cc0cff3d4bade0a840e4cb2}{00226}} \textcolor{preprocessor}{\#define UMASS\_HIGH\_TRANSFER\_SPEED       40000}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00227}\mbox{\hyperlink{umass_8c_aa525d1c81f76c3c5b771bbdacca47b87}{00227}} \textcolor{preprocessor}{\#define UMASS\_SUPER\_TRANSFER\_SPEED      400000}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00228}\mbox{\hyperlink{umass_8c_a7100aa0c2695267b2da3c4a03b27406a}{00228}} \textcolor{preprocessor}{\#define UMASS\_FLOPPY\_TRANSFER\_SPEED     20}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00230}\mbox{\hyperlink{umass_8c_a2dfa91e088fb25608bdc861f7f035ed8}{00230}} \textcolor{preprocessor}{\#define UMASS\_TIMEOUT                   5000    }\textcolor{comment}{/* ms */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00232}00232 \textcolor{comment}{/* CAM specific definitions */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00234}\mbox{\hyperlink{umass_8c_a9bcd1efc276270831b04dccabedd201c}{00234}} \textcolor{preprocessor}{\#define UMASS\_SCSIID\_MAX        1       }\textcolor{comment}{/* maximum number of drives expected */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00235}\mbox{\hyperlink{umass_8c_af9001c1f22fcf0b7a78869ed95643c14}{00235}} \textcolor{preprocessor}{\#define UMASS\_SCSIID\_HOST       UMASS\_SCSIID\_MAX}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00237}00237 \textcolor{comment}{/* Bulk-\/Only features */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00239}\mbox{\hyperlink{umass_8c_ab4366a21c8add102c374fe8baeddadcb}{00239}} \textcolor{preprocessor}{\#define UR\_BBB\_RESET            0xff    }\textcolor{comment}{/* Bulk-\/Only reset */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00240}\mbox{\hyperlink{umass_8c_a6950b30cda57ceb3ff2d75caea266f1b}{00240}} \textcolor{preprocessor}{\#define UR\_BBB\_GET\_MAX\_LUN      0xfe    }\textcolor{comment}{/* Get maximum lun */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00242}00242 \textcolor{comment}{/* Command Block Wrapper */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00243}\mbox{\hyperlink{struct____packed}{00243}} \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00244}\mbox{\hyperlink{struct____packed_a0c24898e177ec7612a62fa51efbb5852}{00244}}         \mbox{\hyperlink{usb__endian_8h_ae3cbe7723d7e86b29e1b743781b29d6c}{uDWord}}    \mbox{\hyperlink{struct____packed_a0c24898e177ec7612a62fa51efbb5852}{dCBWSignature}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00245}\mbox{\hyperlink{umass_8c_a15cfcf912acb56af1b66380542dcf7f6}{00245}} \textcolor{preprocessor}{\#define CBWSIGNATURE    0x43425355}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00246}\mbox{\hyperlink{struct____packed_a58b82bcc4f7f16dee13d70a64146a8f9}{00246}}         \mbox{\hyperlink{usb__endian_8h_ae3cbe7723d7e86b29e1b743781b29d6c}{uDWord}}    \mbox{\hyperlink{struct____packed_a58b82bcc4f7f16dee13d70a64146a8f9}{dCBWTag}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00247}\mbox{\hyperlink{struct____packed_a20994ab9242fb4de492f09ac9dfe1a12}{00247}}         \mbox{\hyperlink{usb__endian_8h_ae3cbe7723d7e86b29e1b743781b29d6c}{uDWord}}    \mbox{\hyperlink{struct____packed_a20994ab9242fb4de492f09ac9dfe1a12}{dCBWDataTransferLength}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00248}\mbox{\hyperlink{struct____packed_abdd829d7d886569737d48c478991853f}{00248}}         \mbox{\hyperlink{usb__endian_8h_a4dea376b5cd0c5d694660473f5e7a459}{uByte}}      \mbox{\hyperlink{struct____packed_abdd829d7d886569737d48c478991853f}{bCBWFlags}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00249}\mbox{\hyperlink{umass_8c_adb6bd8dfe82d0ed3eb1c2caed92d8a9e}{00249}} \textcolor{preprocessor}{\#define CBWFLAGS\_OUT    0x00}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00250}\mbox{\hyperlink{umass_8c_ae8a2116019faea706c66bc3638995400}{00250}} \textcolor{preprocessor}{\#define CBWFLAGS\_IN     0x80}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00251}\mbox{\hyperlink{struct____packed_a63bee186334191ef92b83c5e517c7cc0}{00251}}         \mbox{\hyperlink{usb__endian_8h_a4dea376b5cd0c5d694660473f5e7a459}{uByte}}      \mbox{\hyperlink{struct____packed_a63bee186334191ef92b83c5e517c7cc0}{bCBWLUN}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00252}\mbox{\hyperlink{struct____packed_a9b1d05db5a236d07683155c06bedeb91}{00252}}         \mbox{\hyperlink{usb__endian_8h_a4dea376b5cd0c5d694660473f5e7a459}{uByte}}      \mbox{\hyperlink{struct____packed_a9b1d05db5a236d07683155c06bedeb91}{bCDBLength}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00253}\mbox{\hyperlink{umass_8c_a2eaeef6fe40c085412d2b2b7b98a1e5e}{00253}} \textcolor{preprocessor}{\#define CBWCDBLENGTH    16}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00254}\mbox{\hyperlink{struct____packed_a96ff6530a3b60a1cf1f2a1c20cfcbb8b}{00254}}         \mbox{\hyperlink{usb__endian_8h_a4dea376b5cd0c5d694660473f5e7a459}{uByte}}      CBWCDB[\mbox{\hyperlink{umass_8c_a2eaeef6fe40c085412d2b2b7b98a1e5e}{CBWCDBLENGTH}}];}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00255}00255 \} \mbox{\hyperlink{struct____packed}{\_\_packed}} umass\_bbb\_cbw\_t;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00256}00256 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00257}\mbox{\hyperlink{umass_8c_ac0a03e9141b158a0d8e08c9608691b80}{00257}} \textcolor{preprocessor}{\#define UMASS\_BBB\_CBW\_SIZE      31}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00259}00259 \textcolor{comment}{/* Command Status Wrapper */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00260}00260 \textcolor{keyword}{typedef} \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00261}\mbox{\hyperlink{struct____packed_ae068fe18af3ffd7c29c3b0d10686f56d}{00261}}         \mbox{\hyperlink{usb__endian_8h_ae3cbe7723d7e86b29e1b743781b29d6c}{uDWord}}    \mbox{\hyperlink{struct____packed_ae068fe18af3ffd7c29c3b0d10686f56d}{dCSWSignature}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00262}\mbox{\hyperlink{umass_8c_a6d29dee6ca7f61ee7407eb0c9df8fe0a}{00262}} \textcolor{preprocessor}{\#define CSWSIGNATURE    0x53425355}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00263}\mbox{\hyperlink{umass_8c_a4907e1fe6f49511970fd6bac4f89388b}{00263}} \textcolor{preprocessor}{\#define CSWSIGNATURE\_IMAGINATION\_DBX1   0x43425355}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00264}\mbox{\hyperlink{umass_8c_ac6475d6b62832d14fc958683e6b35f53}{00264}} \textcolor{preprocessor}{\#define CSWSIGNATURE\_OLYMPUS\_C1 0x55425355}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00265}\mbox{\hyperlink{struct____packed_a23dc96a41101618130b54fd8440a94f4}{00265}}         \mbox{\hyperlink{usb__endian_8h_ae3cbe7723d7e86b29e1b743781b29d6c}{uDWord}}    \mbox{\hyperlink{struct____packed_a23dc96a41101618130b54fd8440a94f4}{dCSWTag}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00266}\mbox{\hyperlink{struct____packed_a19906a1293fe5e3bcf14331ab9cbbbed}{00266}}         \mbox{\hyperlink{usb__endian_8h_ae3cbe7723d7e86b29e1b743781b29d6c}{uDWord}}    \mbox{\hyperlink{struct____packed_a19906a1293fe5e3bcf14331ab9cbbbed}{dCSWDataResidue}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00267}\mbox{\hyperlink{struct____packed_a45fbcb5d08d6475d34633d9174be7b6d}{00267}}         \mbox{\hyperlink{usb__endian_8h_a4dea376b5cd0c5d694660473f5e7a459}{uByte}}      \mbox{\hyperlink{struct____packed_a45fbcb5d08d6475d34633d9174be7b6d}{bCSWStatus}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00268}\mbox{\hyperlink{umass_8c_a0eb3a9534c70bd126379d425c54498aa}{00268}} \textcolor{preprocessor}{\#define CSWSTATUS\_GOOD  0x0}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00269}\mbox{\hyperlink{umass_8c_aee89dc947347ceec52385e1428cdf087}{00269}} \textcolor{preprocessor}{\#define CSWSTATUS\_FAILED        0x1}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00270}\mbox{\hyperlink{umass_8c_a05601fcfef35de03cf867dc6c6f5410a}{00270}} \textcolor{preprocessor}{\#define CSWSTATUS\_PHASE 0x2}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00271}00271 \} \mbox{\hyperlink{struct____packed}{\_\_packed}} umass\_bbb\_csw\_t;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00272}00272 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00273}\mbox{\hyperlink{umass_8c_adc4952d2403ac30135d409c410185a74}{00273}} \textcolor{preprocessor}{\#define UMASS\_BBB\_CSW\_SIZE      13}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00274}00274 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00275}00275 \textcolor{comment}{/* CBI features */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00276}00276 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00277}\mbox{\hyperlink{umass_8c_a6e48f91b4a59177504cc59daabb6c655}{00277}} \textcolor{preprocessor}{\#define UR\_CBI\_ADSC     0x00}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00278}00278 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00279}00279 \textcolor{keyword}{typedef} \textcolor{keyword}{union }\{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00280}00280         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00281}\mbox{\hyperlink{struct____packed_a5ac1f983c1f0d391c753aa0cd0bba663}{00281}}                 uint8\_t \mbox{\hyperlink{struct____packed_a5ac1f983c1f0d391c753aa0cd0bba663}{type}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00282}\mbox{\hyperlink{umass_8c_a6e90738697fb0ea9de27dc3a021074a2}{00282}} \textcolor{preprocessor}{\#define IDB\_TYPE\_CCI            0x00}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00283}\mbox{\hyperlink{struct____packed_afaa3de78de0d4d4b0917929a089c90a3}{00283}}                 uint8\_t \mbox{\hyperlink{struct____packed_afaa3de78de0d4d4b0917929a089c90a3}{value}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00284}\mbox{\hyperlink{umass_8c_af331a46ec04eb97b1529799235690913}{00284}} \textcolor{preprocessor}{\#define IDB\_VALUE\_PASS          0x00}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00285}\mbox{\hyperlink{umass_8c_a80d3bf01d603816aca1b45edcd013b7d}{00285}} \textcolor{preprocessor}{\#define IDB\_VALUE\_FAIL          0x01}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00286}\mbox{\hyperlink{umass_8c_a86234116ec08813ec5f7035e276446be}{00286}} \textcolor{preprocessor}{\#define IDB\_VALUE\_PHASE         0x02}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00287}\mbox{\hyperlink{umass_8c_ae5748e694cb01433974301bab5624904}{00287}} \textcolor{preprocessor}{\#define IDB\_VALUE\_PERSISTENT    0x03}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00288}\mbox{\hyperlink{umass_8c_a0c521f74f10f11289bbb9d58993e9f5b}{00288}} \textcolor{preprocessor}{\#define IDB\_VALUE\_STATUS\_MASK   0x03}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00289}\mbox{\hyperlink{struct____packed_a12484860ffba8f2995a5b9b91564f184}{00289}}         \} \mbox{\hyperlink{struct____packed}{\_\_packed}} common;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00291}00291         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00292}\mbox{\hyperlink{struct____packed_aacb4f8a2075481e2a12499be80820a27}{00292}}                 uint8\_t \mbox{\hyperlink{struct____packed_aacb4f8a2075481e2a12499be80820a27}{asc}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00293}\mbox{\hyperlink{struct____packed_a77bdb5e8a9027342c48976d69464111f}{00293}}                 uint8\_t \mbox{\hyperlink{struct____packed_a77bdb5e8a9027342c48976d69464111f}{ascq}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00294}\mbox{\hyperlink{struct____packed_a48d995a55725e3fd250874073b8b22b4}{00294}}         \} \mbox{\hyperlink{struct____packed}{\_\_packed}} ufi;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00295}00295 \} \mbox{\hyperlink{struct____packed}{\_\_packed}} umass\_cbi\_sbl\_t;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00297}00297 \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}};                  \textcolor{comment}{/* see below */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00299}\mbox{\hyperlink{umass_8c_ad05c04fd0b3dd85f8a0f87658085fe01}{00299}} \textcolor{keyword}{typedef} void (\mbox{\hyperlink{umass_8c_ad05c04fd0b3dd85f8a0f87658085fe01}{umass\_callback\_t}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, \textcolor{keyword}{union }ccb *ccb,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00300}00300         uint32\_t residue, uint8\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00301}00301 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00302}\mbox{\hyperlink{umass_8c_a2c06f068c4eac3fff24312e002868fa1}{00302}} \textcolor{preprocessor}{\#define STATUS\_CMD\_OK           0       }\textcolor{comment}{/* everything ok */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00303}\mbox{\hyperlink{umass_8c_abaedde3117d8bd850988ae32ebc4cd6f}{00303}} \textcolor{preprocessor}{\#define STATUS\_CMD\_UNKNOWN      1       }\textcolor{comment}{/* will have to fetch sense */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00304}\mbox{\hyperlink{umass_8c_a3c09eaee077e85e1eaa4aabcd61aca15}{00304}} \textcolor{preprocessor}{\#define STATUS\_CMD\_FAILED       2       }\textcolor{comment}{/* transfer was ok, command failed */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00305}\mbox{\hyperlink{umass_8c_af1cf6a1fbb450ee49fe30cd36d83b862}{00305}} \textcolor{preprocessor}{\#define STATUS\_WIRE\_FAILED      3       }\textcolor{comment}{/* couldn't even get command across */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00306}00306 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00307}\mbox{\hyperlink{umass_8c_a26070144fb5c25de9a94100a55ba8b39}{00307}} \textcolor{keyword}{typedef} uint8\_t (\mbox{\hyperlink{umass_8c_a26070144fb5c25de9a94100a55ba8b39}{umass\_transform\_t}})(\textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t *cmd\_ptr,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00308}00308         uint8\_t \mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00310}00310 \textcolor{comment}{/* Wire and command protocol */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00311}\mbox{\hyperlink{umass_8c_aa50a7ba710bed3bdbf2c2aa7482eb37c}{00311}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_BBB         0x0001  }\textcolor{comment}{/* USB wire protocol */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00312}\mbox{\hyperlink{umass_8c_a067ba005fab72ecda4b4236acce9bb5c}{00312}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_CBI         0x0002}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00313}\mbox{\hyperlink{umass_8c_a1d3098dd9a0ab9467a2f94ce736133e6}{00313}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_CBI\_I       0x0004}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00314}\mbox{\hyperlink{umass_8c_ab93438c89ef9a7a79b8f8182721330d7}{00314}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_WIRE        0x00ff  }\textcolor{comment}{/* USB wire protocol mask */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00315}\mbox{\hyperlink{umass_8c_a3f208b685bb1cbf0e49795557d2d626c}{00315}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_SCSI        0x0100  }\textcolor{comment}{/* command protocol */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00316}\mbox{\hyperlink{umass_8c_ab68063eb8f49c26fd1e3742bcd6f1959}{00316}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_ATAPI       0x0200}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00317}\mbox{\hyperlink{umass_8c_a1fd2a80dec7b5e7e7df0a77f6eb71127}{00317}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_UFI         0x0400}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00318}\mbox{\hyperlink{umass_8c_aaa6947982f25b407fa15e28f84e83bda}{00318}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_RBC         0x0800}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00319}\mbox{\hyperlink{umass_8c_ad723cd91a563daeca4d483d44c09f9b1}{00319}} \textcolor{preprocessor}{\#define UMASS\_PROTO\_COMMAND     0xff00  }\textcolor{comment}{/* command protocol mask */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00320}00320 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00321}00321 \textcolor{comment}{/* Device specific quirks */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00322}\mbox{\hyperlink{umass_8c_a8f99e4d1de871f758811e8d5c1dacd4c}{00322}} \textcolor{preprocessor}{\#define NO\_QUIRKS               0x0000}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00323}00323         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00324}00324 \textcolor{comment}{         * The drive does not support Test Unit Ready. Convert to Start Unit}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00325}00325 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00326}\mbox{\hyperlink{umass_8c_a55f81776fe4bc3859e3916a8d4153945}{00326}} \textcolor{preprocessor}{\#define NO\_TEST\_UNIT\_READY      0x0001}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00327}00327         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00328}00328 \textcolor{comment}{         * The drive does not reset the Unit Attention state after REQUEST}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00329}00329 \textcolor{comment}{         * SENSE has been sent. The INQUIRY command does not reset the UA}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00330}00330 \textcolor{comment}{         * either, and so CAM runs in circles trying to retrieve the initial}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00331}00331 \textcolor{comment}{         * INQUIRY data.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00332}00332 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00333}\mbox{\hyperlink{umass_8c_aacf6beca7f3d52bdf7bd937efd22a451}{00333}} \textcolor{preprocessor}{\#define RS\_NO\_CLEAR\_UA          0x0002}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00334}00334         \textcolor{comment}{/* The drive does not support START STOP.  */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00335}\mbox{\hyperlink{umass_8c_a8cbb85137b29a210adb87b273c061b28}{00335}} \textcolor{preprocessor}{\#define NO\_START\_STOP           0x0004}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00336}00336         \textcolor{comment}{/* Don't ask for full inquiry data (255b).  */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00337}\mbox{\hyperlink{umass_8c_a6d55c4c3ab565b328cd83360ff5ee864}{00337}} \textcolor{preprocessor}{\#define FORCE\_SHORT\_INQUIRY     0x0008}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00338}00338         \textcolor{comment}{/* Needs to be initialised the Shuttle way */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00339}\mbox{\hyperlink{umass_8c_a77a65d44399fa200ca34491fdae271f5}{00339}} \textcolor{preprocessor}{\#define SHUTTLE\_INIT            0x0010}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00340}00340         \textcolor{comment}{/* Drive needs to be switched to alternate iface 1 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00341}\mbox{\hyperlink{umass_8c_a136980aa2948a71c5107ad8b45eebbd1}{00341}} \textcolor{preprocessor}{\#define ALT\_IFACE\_1             0x0020}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00342}00342         \textcolor{comment}{/* Drive does not do 1Mb/s, but just floppy speeds (20kb/s) */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00343}\mbox{\hyperlink{umass_8c_a50bef086ca00abb99ccdfa2bbed9e7a3}{00343}} \textcolor{preprocessor}{\#define FLOPPY\_SPEED            0x0040}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00344}00344         \textcolor{comment}{/* The device can't count and gets the residue of transfers wrong */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00345}\mbox{\hyperlink{umass_8c_ad55a5f9825a404b0ae4b55e24c218171}{00345}} \textcolor{preprocessor}{\#define IGNORE\_RESIDUE          0x0080}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00346}00346         \textcolor{comment}{/* No GetMaxLun call */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00347}\mbox{\hyperlink{umass_8c_ae1ee83fad3ce5eed1a9d29270ac50bb8}{00347}} \textcolor{preprocessor}{\#define NO\_GETMAXLUN            0x0100}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00348}00348         \textcolor{comment}{/* The device uses a weird CSWSIGNATURE. */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00349}\mbox{\hyperlink{umass_8c_a75492ca33f647f612de304d83b6ab717}{00349}} \textcolor{preprocessor}{\#define WRONG\_CSWSIG            0x0200}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00350}00350         \textcolor{comment}{/* Device cannot handle INQUIRY so fake a generic response */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00351}\mbox{\hyperlink{umass_8c_a58bb10caeec9dc1b1b2055351a67621c}{00351}} \textcolor{preprocessor}{\#define NO\_INQUIRY              0x0400}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00352}00352         \textcolor{comment}{/* Device cannot handle INQUIRY EVPD, return CHECK CONDITION */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00353}\mbox{\hyperlink{umass_8c_a9e87418d5a77550205267696057c35f9}{00353}} \textcolor{preprocessor}{\#define NO\_INQUIRY\_EVPD         0x0800}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00354}00354         \textcolor{comment}{/* Pad all RBC requests to 12 bytes. */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00355}\mbox{\hyperlink{umass_8c_a31cfe86ca031c00fd678e8d38d656b82}{00355}} \textcolor{preprocessor}{\#define RBC\_PAD\_TO\_12           0x1000}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00356}00356         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00357}00357 \textcolor{comment}{         * Device reports number of sectors from READ\_CAPACITY, not max}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00358}00358 \textcolor{comment}{         * sector number.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00359}00359 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00360}\mbox{\hyperlink{umass_8c_a83ed683c2baac38ccdeb9e162d318880}{00360}} \textcolor{preprocessor}{\#define READ\_CAPACITY\_OFFBY1    0x2000}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00361}00361         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00362}00362 \textcolor{comment}{         * Device cannot handle a SCSI synchronize cache command.  Normally}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00363}00363 \textcolor{comment}{         * this quirk would be handled in the cam layer, but for IDE bridges}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00364}00364 \textcolor{comment}{         * we need to associate the quirk with the bridge and not the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00365}00365 \textcolor{comment}{         * underlying disk device.  This is handled by faking a success}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00366}00366 \textcolor{comment}{         * result.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00367}00367 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00368}\mbox{\hyperlink{umass_8c_a6359754d8636ae94d3a6e5b09b7a505c}{00368}} \textcolor{preprocessor}{\#define NO\_SYNCHRONIZE\_CACHE    0x4000}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00369}00369         \textcolor{comment}{/* Device does not support 'PREVENT/ALLOW MEDIUM REMOVAL'. */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00370}\mbox{\hyperlink{umass_8c_a80fda3839b9033ad468c2c44dea89fcc}{00370}} \textcolor{preprocessor}{\#define NO\_PREVENT\_ALLOW        0x8000}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00372}\mbox{\hyperlink{structumass__softc}{00372}} \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00373}\mbox{\hyperlink{structumass__softc_a171ab28ba237249982566d884890e0c6}{00373}}         \textcolor{keyword}{struct }scsi\_sense \mbox{\hyperlink{structumass__softc_a171ab28ba237249982566d884890e0c6}{cam\_scsi\_sense}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00374}\mbox{\hyperlink{structumass__softc_a9d75a2099f4e767aed8e68fc6081e022}{00374}}         \textcolor{keyword}{struct }\mbox{\hyperlink{usb__msctest_8c_a9a9a4bed35ed9499e9f916796f7fdd1d}{scsi\_test\_unit\_ready}} \mbox{\hyperlink{structumass__softc_a9d75a2099f4e767aed8e68fc6081e022}{cam\_scsi\_test\_unit\_ready}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00375}\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{00375}}         \textcolor{keyword}{struct }mtx \mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00376}00376         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00377}\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{00377}}                 uint8\_t *\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00378}\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{00378}}                 \textcolor{keyword}{union }\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} *\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00379}\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{00379}}                 \mbox{\hyperlink{umass_8c_ad05c04fd0b3dd85f8a0f87658085fe01}{umass\_callback\_t}} *\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00380}00380 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00381}\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{00381}}                 uint32\_t \mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}};      \textcolor{comment}{/* bytes */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00382}\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{00382}}                 uint32\_t \mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}};      \textcolor{comment}{/* bytes */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00383}\mbox{\hyperlink{structumass__softc_a31ba4ff7181d1528f04bd80a402fb2f5}{00383}}                 uint32\_t \mbox{\hyperlink{structumass__softc_a31ba4ff7181d1528f04bd80a402fb2f5}{data\_timeout}};      \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00384}\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{00384}}                 uint32\_t \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};  \textcolor{comment}{/* bytes */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00385}00385 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00386}\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{00386}}                 uint8\_t \mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[\mbox{\hyperlink{umass_8c_ab6446042c0aa42600ef2511fd1de02d2}{UMASS\_MAX\_CMDLEN}}];}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00387}\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{00387}}                 uint8\_t \mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}}; \textcolor{comment}{/* bytes */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00388}\mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{00388}}                 uint8\_t \mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00389}\mbox{\hyperlink{structumass__softc_ae39af3ab4cdb596f6e473549432caf09}{00389}}                 uint8\_t \mbox{\hyperlink{structumass__softc_ae39af3ab4cdb596f6e473549432caf09}{lun}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00390}\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{00390}}         \}       \mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00391}00391 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00392}00392         \textcolor{comment}{/* Bulk specific variables for transfers in progress */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00393}\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{00393}}         umass\_bbb\_cbw\_t \mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}};         \textcolor{comment}{/* command block wrapper */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00394}\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{00394}}         umass\_bbb\_csw\_t \mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}};         \textcolor{comment}{/* command status wrapper */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00395}00395 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00396}00396         \textcolor{comment}{/* CBI specific variables for transfers in progress */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00397}\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{00397}}         umass\_cbi\_sbl\_t \mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}};         \textcolor{comment}{/* status block */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00398}00398 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00399}\mbox{\hyperlink{structumass__softc_a4cea6936084a41d1a6acc5d99e837720}{00399}}         device\_t \mbox{\hyperlink{structumass__softc_a4cea6936084a41d1a6acc5d99e837720}{sc\_dev}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00400}\mbox{\hyperlink{structumass__softc_ae98657d8e8b583761f9d693080f326b6}{00400}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device}{usb\_device}} *\mbox{\hyperlink{structumass__softc_ae98657d8e8b583761f9d693080f326b6}{sc\_udev}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00401}\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{00401}}         \textcolor{keyword}{struct }cam\_sim *\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}};           \textcolor{comment}{/* SCSI Interface Module */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00402}\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{00402}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[\mbox{\hyperlink{umass_8c_af03ec61edc6e8350be26185af8d65fe5}{UMASS\_T\_MAX}}];}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00404}00404         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00405}00405 \textcolor{comment}{         * The command transform function is used to convert the SCSI}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00406}00406 \textcolor{comment}{         * commands into their derivatives, like UFI, ATAPI, and friends.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00407}00407 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00408}\mbox{\hyperlink{structumass__softc_ab543942faf68dce7798fe5370c7c6eb1}{00408}}         \mbox{\hyperlink{umass_8c_a26070144fb5c25de9a94100a55ba8b39}{umass\_transform\_t}} *\mbox{\hyperlink{structumass__softc_ab543942faf68dce7798fe5370c7c6eb1}{sc\_transform}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00409}00409 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00410}\mbox{\hyperlink{structumass__softc_abecd2a7bb5b8731abb484164a65d9955}{00410}}         uint32\_t \mbox{\hyperlink{structumass__softc_abecd2a7bb5b8731abb484164a65d9955}{sc\_unit}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00411}\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{00411}}         uint32\_t \mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}};            \textcolor{comment}{/* they got it almost right */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00412}\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{00412}}         uint32\_t \mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}};              \textcolor{comment}{/* wire and cmd protocol */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00413}00413 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00414}\mbox{\hyperlink{structumass__softc_afa861a71b2b0449870d0e1b347a1a450}{00414}}         uint8\_t \mbox{\hyperlink{structumass__softc_afa861a71b2b0449870d0e1b347a1a450}{sc\_name}}[16];}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00415}\mbox{\hyperlink{structumass__softc_af2788ddfb984e2f1755be938dd0683a6}{00415}}         uint8\_t \mbox{\hyperlink{structumass__softc_af2788ddfb984e2f1755be938dd0683a6}{sc\_iface\_no}};         \textcolor{comment}{/* interface number */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00416}\mbox{\hyperlink{structumass__softc_a047b3ab9c344020f90378c48c518ccfa}{00416}}         uint8\_t \mbox{\hyperlink{structumass__softc_a047b3ab9c344020f90378c48c518ccfa}{sc\_maxlun}};             \textcolor{comment}{/* maximum LUN number, inclusive */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00417}\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{00417}}         uint8\_t \mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00418}\mbox{\hyperlink{structumass__softc_abd2fdfdb35d24c13986dc42960eeccc0}{00418}}         uint8\_t \mbox{\hyperlink{structumass__softc_abd2fdfdb35d24c13986dc42960eeccc0}{sc\_status\_try}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00419}00419 \};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00421}\mbox{\hyperlink{structumass__probe__proto}{00421}} \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__probe__proto}{umass\_probe\_proto}} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00422}\mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{00422}}         uint32\_t \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00423}\mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{00423}}         uint32\_t \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00425}\mbox{\hyperlink{structumass__probe__proto_a5b113a6e94f04b7e7d1bdbf331991927}{00425}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structumass__probe__proto_a5b113a6e94f04b7e7d1bdbf331991927}{error}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00426}00426 \};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00427}00427 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00428}00428 \textcolor{comment}{/* prototypes */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00429}00429 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00430}\mbox{\hyperlink{umass_8c_a36da43000937a97d787898abcae30c35}{00430}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{umass_8c_a36da43000937a97d787898abcae30c35}{umass\_probe}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00431}\mbox{\hyperlink{umass_8c_affd7975fb2b3779516b44fe89283777e}{00431}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{umass_8c_affd7975fb2b3779516b44fe89283777e}{umass\_attach}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00432}\mbox{\hyperlink{umass_8c_ab4f7e7f4532e5a9003dbc5595f45e620}{00432}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{umass_8c_ab4f7e7f4532e5a9003dbc5595f45e620}{umass\_detach}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00433}00433 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00434}\mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{00434}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00435}\mbox{\hyperlink{umass_8c_ab8825268d7977bf9760bf47292980bb1}{00435}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_ab8825268d7977bf9760bf47292980bb1}{umass\_t\_bbb\_reset1\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00436}\mbox{\hyperlink{umass_8c_a5e651a161a32e99a5ed54f1caf77e8dd}{00436}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a5e651a161a32e99a5ed54f1caf77e8dd}{umass\_t\_bbb\_reset2\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00437}\mbox{\hyperlink{umass_8c_af9dc8a78d8ea5b429952639711560f06}{00437}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_af9dc8a78d8ea5b429952639711560f06}{umass\_t\_bbb\_reset3\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00438}\mbox{\hyperlink{umass_8c_a045ed152e96a5521d751eeeb73365d70}{00438}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a045ed152e96a5521d751eeeb73365d70}{umass\_t\_bbb\_command\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00439}\mbox{\hyperlink{umass_8c_a9c2e9418375d6223cfaecdf0069abc2e}{00439}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a9c2e9418375d6223cfaecdf0069abc2e}{umass\_t\_bbb\_data\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00440}\mbox{\hyperlink{umass_8c_a5e0eac4e18b998c25def904d7a8aadcf}{00440}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a5e0eac4e18b998c25def904d7a8aadcf}{umass\_t\_bbb\_data\_rd\_cs\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00441}\mbox{\hyperlink{umass_8c_a585e9e57566a529520dd1dcabb413f59}{00441}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a585e9e57566a529520dd1dcabb413f59}{umass\_t\_bbb\_data\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00442}\mbox{\hyperlink{umass_8c_ae165cb64f791c9e0540f05f78602820d}{00442}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_ae165cb64f791c9e0540f05f78602820d}{umass\_t\_bbb\_data\_wr\_cs\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00443}\mbox{\hyperlink{umass_8c_ac548d446d43d21edf5ea50d981ddf75f}{00443}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_ac548d446d43d21edf5ea50d981ddf75f}{umass\_t\_bbb\_status\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00444}\mbox{\hyperlink{umass_8c_aa084463c25b4d94f1f047b4c6ccb9030}{00444}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_aa084463c25b4d94f1f047b4c6ccb9030}{umass\_t\_cbi\_reset1\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00445}\mbox{\hyperlink{umass_8c_a3996889e310eb3daa1c9f2dedf46d955}{00445}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a3996889e310eb3daa1c9f2dedf46d955}{umass\_t\_cbi\_reset2\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00446}\mbox{\hyperlink{umass_8c_a9e306ed1dfe99a3f59614d353970b4ec}{00446}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a9e306ed1dfe99a3f59614d353970b4ec}{umass\_t\_cbi\_reset3\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00447}\mbox{\hyperlink{umass_8c_aa78a857cb4a4fb4e019e0746b1c84218}{00447}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_aa78a857cb4a4fb4e019e0746b1c84218}{umass\_t\_cbi\_reset4\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00448}\mbox{\hyperlink{umass_8c_a13c32ace56a336014c018aa957a8fc3f}{00448}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a13c32ace56a336014c018aa957a8fc3f}{umass\_t\_cbi\_command\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00449}\mbox{\hyperlink{umass_8c_a4e391180479d73668eca570a57cb4ba4}{00449}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a4e391180479d73668eca570a57cb4ba4}{umass\_t\_cbi\_data\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00450}\mbox{\hyperlink{umass_8c_adb742f551331ea66868919c48e359d1c}{00450}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_adb742f551331ea66868919c48e359d1c}{umass\_t\_cbi\_data\_rd\_cs\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00451}\mbox{\hyperlink{umass_8c_a48bc0eefc8d251e820b11a3b2bb4e263}{00451}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a48bc0eefc8d251e820b11a3b2bb4e263}{umass\_t\_cbi\_data\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00452}\mbox{\hyperlink{umass_8c_a6954bd847ad7661d3493e3fff9a3862c}{00452}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a6954bd847ad7661d3493e3fff9a3862c}{umass\_t\_cbi\_data\_wr\_cs\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00453}\mbox{\hyperlink{umass_8c_a546729a0836d1d909770ca42e337a8d7}{00453}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{umass_8c_a546729a0836d1d909770ca42e337a8d7}{umass\_t\_cbi\_status\_callback}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00455}00455 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_aeb9c6b950df5ae0a330acb14207437bc}{umass\_cancel\_ccb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00456}00456 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a34c20618ef2dd8092cb991aee01a6700}{umass\_init\_shuttle}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00457}00457 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a2b924b3addc9468a47aeee869534e146}{umass\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00458}00458 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a0d68cfc83a358a46d4f1ed07bec46f03}{umass\_t\_bbb\_data\_clear\_stall\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00459}00459                     uint8\_t, uint8\_t, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00460}00460 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a96c25210a24c4dbbbe595720ddd4cfcf}{umass\_command\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, uint8\_t, \textcolor{keywordtype}{void} *,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00461}00461                     uint32\_t, uint32\_t, \mbox{\hyperlink{umass_8c_ad05c04fd0b3dd85f8a0f87658085fe01}{umass\_callback\_t}} *, \textcolor{keyword}{union} ccb *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00462}00462 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{umass_8c_a10782a02944ba80c083cc6ba0b917d6a}{umass\_bbb\_get\_max\_lun}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00463}00463 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a57b59f4cb01271e56859ee827f9ffb75}{umass\_cbi\_start\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00464}00464 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a04aabc728a1b5dcc0dabba3fecb880da}{umass\_t\_cbi\_data\_clear\_stall\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00465}00465                     uint8\_t, uint8\_t, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00466}00466 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{umass_8c_add2eba527c287d51f00b0ae13e1ed52a}{umass\_cam\_attach\_sim}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00467}00467 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a4ee5d4945bef5449e2601d0199eac30f}{umass\_cam\_attach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00468}00468 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a89136e12d615a897f05822c8f11cfcdb}{umass\_cam\_detach\_sim}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00469}00469 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a199617ee8728b4e11ee0f9fc186fdd5a}{umass\_cam\_action}}(\textcolor{keyword}{struct} cam\_sim *, \textcolor{keyword}{union} ccb *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00470}00470 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a76c15b06f306ac00fb26810758185551}{umass\_cam\_poll}}(\textcolor{keyword}{struct} cam\_sim *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00471}00471 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_af0b2c1f4d76cf3b5760a5ebecdeb97f9}{umass\_cam\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, \textcolor{keyword}{union} ccb *, uint32\_t,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00472}00472                     uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00473}00473 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a3e60896026039901261ad9b692f9e97b}{umass\_cam\_sense\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, \textcolor{keyword}{union} ccb *, uint32\_t,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00474}00474                     uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00475}00475 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{umass_8c_a0980cc2a0e330cf9c4215f6e2cb5df09}{umass\_cam\_quirk\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, \textcolor{keyword}{union} ccb *, uint32\_t,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00476}00476                     uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00477}00477 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{umass_8c_aa6529fb2f51039a4a3bea6d11e0d0ab5}{umass\_scsi\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, uint8\_t *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00478}00478 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{umass_8c_a2f87d24c52fead5277457669a81b0e60}{umass\_rbc\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, uint8\_t *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00479}00479 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{umass_8c_a7e53890b7c36f59db41961d7787dc38e}{umass\_ufi\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, uint8\_t *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00480}00480 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{umass_8c_a69356b374e1499c670450daa8c9cc1ea}{umass\_atapi\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, uint8\_t *,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00481}00481                     uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00482}00482 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{umass_8c_a70703ce4bde53c37ac782543828c1a92}{umass\_no\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, uint8\_t *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00483}00483 \textcolor{keyword}{static} uint8\_t  \mbox{\hyperlink{umass_8c_a8d9733b1a2da33a84e25f0746d7e0337}{umass\_std\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, \textcolor{keyword}{union} ccb *, uint8\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00484}00484                     *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00485}00485 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00486}00486 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00487}00487 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     umass\_bbb\_dump\_cbw(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, umass\_bbb\_cbw\_t *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00488}00488 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     umass\_bbb\_dump\_csw(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, umass\_bbb\_csw\_t *);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00489}00489 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     umass\_cbi\_dump\_cmd(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, \textcolor{keywordtype}{void} *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00490}00490 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     umass\_dump\_buffer(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *, uint8\_t *, uint32\_t,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00491}00491                     uint32\_t);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00492}00492 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00493}00493 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00494}\mbox{\hyperlink{umass_8c_a9f5c2f3d20917a1190a1004189e1285e}{00494}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{umass_8c_a9f5c2f3d20917a1190a1004189e1285e}{umass\_bbb\_config}}[\mbox{\hyperlink{umass_8c_ac95cbd24722141236a34149bbf831c69}{UMASS\_T\_BBB\_MAX}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00495}00495         [\mbox{\hyperlink{umass_8c_a0dea8924adcf01d3b768adc189195a71}{UMASS\_T\_BBB\_RESET1}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00496}00496                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00497}00497                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00498}00498                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00499}00499                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00500}00500                 .callback = \&\mbox{\hyperlink{umass_8c_ab8825268d7977bf9760bf47292980bb1}{umass\_t\_bbb\_reset1\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00501}00501                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00502}00502                 .interval = 500,        \textcolor{comment}{/* 500 milliseconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00503}00503         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00504}00504 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00505}00505         [\mbox{\hyperlink{umass_8c_a7131c51faf3f7dfa8180d873c5eea816}{UMASS\_T\_BBB\_RESET2}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00506}00506                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00507}00507                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00508}00508                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00509}00509                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00510}00510                 .callback = \&\mbox{\hyperlink{umass_8c_a5e651a161a32e99a5ed54f1caf77e8dd}{umass\_t\_bbb\_reset2\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00511}00511                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00512}00512                 .interval = 50, \textcolor{comment}{/* 50 milliseconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00513}00513         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00514}00514 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00515}00515         [\mbox{\hyperlink{umass_8c_af8b0322efcc2cf2814d409966f7614e9}{UMASS\_T\_BBB\_RESET3}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00516}00516                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00517}00517                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00518}00518                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00519}00519                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00520}00520                 .callback = \&\mbox{\hyperlink{umass_8c_af9dc8a78d8ea5b429952639711560f06}{umass\_t\_bbb\_reset3\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00521}00521                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00522}00522                 .interval = 50, \textcolor{comment}{/* 50 milliseconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00523}00523         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00524}00524 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00525}00525         [\mbox{\hyperlink{umass_8c_aadffbb2c2620889c6daa1a1b3ccd323a}{UMASS\_T\_BBB\_COMMAND}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00526}00526                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00527}00527                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00528}00528                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00529}00529                 .bufsize = \textcolor{keyword}{sizeof}(umass\_bbb\_cbw\_t),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00530}00530                 .callback = \&\mbox{\hyperlink{umass_8c_a045ed152e96a5521d751eeeb73365d70}{umass\_t\_bbb\_command\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00531}00531                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00532}00532         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00533}00533 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00534}00534         [\mbox{\hyperlink{umass_8c_a3a3362d016fd8c9deea8c4241edad3f8}{UMASS\_T\_BBB\_DATA\_READ}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00535}00535                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00536}00536                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00537}00537                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00538}00538                 .bufsize = \mbox{\hyperlink{umass_8c_a127c097a67064d4bba92e26f485ed39d}{UMASS\_BULK\_SIZE}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00539}00539                 .flags = \{.proxy\_buffer = 1,.short\_xfer\_ok = 1,.ext\_buffer=1,\},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00540}00540                 .callback = \&\mbox{\hyperlink{umass_8c_a9c2e9418375d6223cfaecdf0069abc2e}{umass\_t\_bbb\_data\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00541}00541                 .timeout = 0,   \textcolor{comment}{/* overwritten later */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00542}00542         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00543}00543 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00544}00544         [\mbox{\hyperlink{umass_8c_a9e505cb8fe4004266c19b527f283b0ac}{UMASS\_T\_BBB\_DATA\_RD\_CS}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00545}00545                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00546}00546                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00547}00547                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00548}00548                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00549}00549                 .callback = \&\mbox{\hyperlink{umass_8c_a5e0eac4e18b998c25def904d7a8aadcf}{umass\_t\_bbb\_data\_rd\_cs\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00550}00550                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00551}00551         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00552}00552 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00553}00553         [\mbox{\hyperlink{umass_8c_ac7a17a20135cb1bf4172b647f90301ce}{UMASS\_T\_BBB\_DATA\_WRITE}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00554}00554                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00555}00555                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00556}00556                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00557}00557                 .bufsize = \mbox{\hyperlink{umass_8c_a127c097a67064d4bba92e26f485ed39d}{UMASS\_BULK\_SIZE}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00558}00558                 .flags = \{.proxy\_buffer = 1,.short\_xfer\_ok = 1,.ext\_buffer=1,\},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00559}00559                 .callback = \&\mbox{\hyperlink{umass_8c_a585e9e57566a529520dd1dcabb413f59}{umass\_t\_bbb\_data\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00560}00560                 .timeout = 0,   \textcolor{comment}{/* overwritten later */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00561}00561         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00562}00562 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00563}00563         [\mbox{\hyperlink{umass_8c_a9b8f0c7bf3719039cd37ece14dc64301}{UMASS\_T\_BBB\_DATA\_WR\_CS}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00564}00564                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00565}00565                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00566}00566                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00567}00567                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00568}00568                 .callback = \&\mbox{\hyperlink{umass_8c_ae165cb64f791c9e0540f05f78602820d}{umass\_t\_bbb\_data\_wr\_cs\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00569}00569                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00570}00570         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00571}00571 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00572}00572         [\mbox{\hyperlink{umass_8c_a908ea85dad04d97117a64af8b796e78a}{UMASS\_T\_BBB\_STATUS}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00573}00573                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00574}00574                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00575}00575                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00576}00576                 .bufsize = \textcolor{keyword}{sizeof}(umass\_bbb\_csw\_t),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00577}00577                 .flags = \{.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00578}00578                 .callback = \&\mbox{\hyperlink{umass_8c_ac548d446d43d21edf5ea50d981ddf75f}{umass\_t\_bbb\_status\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00579}00579                 .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00580}00580         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00581}00581 \};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00582}00582 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00583}\mbox{\hyperlink{umass_8c_a77df139a8a537aba4de8c3fa98b13d43}{00583}} \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{umass_8c_a77df139a8a537aba4de8c3fa98b13d43}{umass\_cbi\_config}}[\mbox{\hyperlink{umass_8c_ab650a4fa6cd4d32ff892811e1130e73a}{UMASS\_T\_CBI\_MAX}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00584}00584         [\mbox{\hyperlink{umass_8c_a695b041c10588247f7c5ef8ceb9b2673}{UMASS\_T\_CBI\_RESET1}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00585}00585                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00586}00586                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00587}00587                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00588}00588                 .bufsize = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}) +}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00589}00589                     \mbox{\hyperlink{umass_8c_ac369c62a68386805c6d4e13371e70b03}{UMASS\_CBI\_DIAGNOSTIC\_CMDLEN}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00590}00590                 .callback = \&\mbox{\hyperlink{umass_8c_aa084463c25b4d94f1f047b4c6ccb9030}{umass\_t\_cbi\_reset1\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00591}00591                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00592}00592                 .interval = 500,        \textcolor{comment}{/* 500 milliseconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00593}00593         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00594}00594 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00595}00595         [\mbox{\hyperlink{umass_8c_ab95ef0a60706d310877aaf315edcdc97}{UMASS\_T\_CBI\_RESET2}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00596}00596                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00597}00597                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00598}00598                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00599}00599                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00600}00600                 .callback = \&\mbox{\hyperlink{umass_8c_a3996889e310eb3daa1c9f2dedf46d955}{umass\_t\_cbi\_reset2\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00601}00601                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00602}00602                 .interval = 50, \textcolor{comment}{/* 50 milliseconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00603}00603         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00604}00604 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00605}00605         [\mbox{\hyperlink{umass_8c_aa43a85af5bfd73457d24d5d319c468e6}{UMASS\_T\_CBI\_RESET3}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00606}00606                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00607}00607                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00608}00608                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00609}00609                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00610}00610                 .callback = \&\mbox{\hyperlink{umass_8c_a9e306ed1dfe99a3f59614d353970b4ec}{umass\_t\_cbi\_reset3\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00611}00611                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00612}00612                 .interval = 50, \textcolor{comment}{/* 50 milliseconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00613}00613         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00614}00614 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00615}00615         [\mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{UMASS\_T\_CBI\_COMMAND}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00616}00616                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00617}00617                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00618}00618                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00619}00619                 .bufsize = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}) +}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00620}00620                     \mbox{\hyperlink{umass_8c_ab6446042c0aa42600ef2511fd1de02d2}{UMASS\_MAX\_CMDLEN}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00621}00621                 .callback = \&\mbox{\hyperlink{umass_8c_a13c32ace56a336014c018aa957a8fc3f}{umass\_t\_cbi\_command\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00622}00622                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00623}00623         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00624}00624 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00625}00625         [\mbox{\hyperlink{umass_8c_adb196dd0010f4e1f26f7ec0081756d14}{UMASS\_T\_CBI\_DATA\_READ}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00626}00626                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00627}00627                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00628}00628                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00629}00629                 .bufsize = \mbox{\hyperlink{umass_8c_a127c097a67064d4bba92e26f485ed39d}{UMASS\_BULK\_SIZE}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00630}00630                 .flags = \{.proxy\_buffer = 1,.short\_xfer\_ok = 1,.ext\_buffer=1,\},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00631}00631                 .callback = \&\mbox{\hyperlink{umass_8c_a4e391180479d73668eca570a57cb4ba4}{umass\_t\_cbi\_data\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00632}00632                 .timeout = 0,   \textcolor{comment}{/* overwritten later */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00633}00633         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00634}00634 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00635}00635         [\mbox{\hyperlink{umass_8c_a5d3047e254b63401cef270eaedbb957d}{UMASS\_T\_CBI\_DATA\_RD\_CS}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00636}00636                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00637}00637                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00638}00638                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00639}00639                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00640}00640                 .callback = \&\mbox{\hyperlink{umass_8c_adb742f551331ea66868919c48e359d1c}{umass\_t\_cbi\_data\_rd\_cs\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00641}00641                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00642}00642         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00643}00643 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00644}00644         [\mbox{\hyperlink{umass_8c_a3041249aac35eae7fd2d8601e207b1ff}{UMASS\_T\_CBI\_DATA\_WRITE}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00645}00645                 .type = \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00646}00646                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00647}00647                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00648}00648                 .bufsize = \mbox{\hyperlink{umass_8c_a127c097a67064d4bba92e26f485ed39d}{UMASS\_BULK\_SIZE}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00649}00649                 .flags = \{.proxy\_buffer = 1,.short\_xfer\_ok = 1,.ext\_buffer=1,\},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00650}00650                 .callback = \&\mbox{\hyperlink{umass_8c_a48bc0eefc8d251e820b11a3b2bb4e263}{umass\_t\_cbi\_data\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00651}00651                 .timeout = 0,   \textcolor{comment}{/* overwritten later */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00652}00652         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00653}00653 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00654}00654         [\mbox{\hyperlink{umass_8c_ae46c543e7e0ae600e34f10924b1f5320}{UMASS\_T\_CBI\_DATA\_WR\_CS}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00655}00655                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00656}00656                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00657}00657                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00658}00658                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00659}00659                 .callback = \&\mbox{\hyperlink{umass_8c_a6954bd847ad7661d3493e3fff9a3862c}{umass\_t\_cbi\_data\_wr\_cs\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00660}00660                 .timeout = 5000,        \textcolor{comment}{/* 5 seconds */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00661}00661         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00662}00662 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00663}00663         [\mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{UMASS\_T\_CBI\_STATUS}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00664}00664                 .type = \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00665}00665                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00666}00666                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00667}00667                 .flags = \{.short\_xfer\_ok = 1,.no\_pipe\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00668}00668                 .bufsize = \textcolor{keyword}{sizeof}(umass\_cbi\_sbl\_t),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00669}00669                 .callback = \&\mbox{\hyperlink{umass_8c_a546729a0836d1d909770ca42e337a8d7}{umass\_t\_cbi\_status\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00670}00670                 .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00671}00671         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00672}00672 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00673}00673         [\mbox{\hyperlink{umass_8c_a650ab8f293b106f3e60096bd17ccae47}{UMASS\_T\_CBI\_RESET4}}] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00674}00674                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00675}00675                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00676}00676                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00677}00677                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00678}00678                 .callback = \&\mbox{\hyperlink{umass_8c_aa78a857cb4a4fb4e019e0746b1c84218}{umass\_t\_cbi\_reset4\_callback}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00679}00679                 .timeout = 5000,        \textcolor{comment}{/* ms */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00680}00680         \},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00681}00681 \};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00682}00682 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00683}00683 \textcolor{comment}{/* If device cannot return valid inquiry data, fake it */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00684}\mbox{\hyperlink{umass_8c_a9c7c5e3b4f4fdbb93312055fcb043f85}{00684}} \textcolor{keyword}{static} \textcolor{keyword}{const} uint8\_t \mbox{\hyperlink{umass_8c_a9c7c5e3b4f4fdbb93312055fcb043f85}{fake\_inq\_data}}[SHORT\_INQUIRY\_LENGTH] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00685}00685         0, \textcolor{comment}{/* removable */} 0x80, SCSI\_REV\_2, SCSI\_REV\_2,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00686}00686          \textcolor{comment}{/* additional\_length */} 31, 0, 0, 0}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00687}00687 \};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00688}00688 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00689}\mbox{\hyperlink{umass_8c_a87ccba5c10d2df479f319948292407bf}{00689}} \textcolor{preprocessor}{\#define UFI\_COMMAND\_LENGTH      12      }\textcolor{comment}{/* UFI commands are always 12 bytes */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00690}\mbox{\hyperlink{umass_8c_aac310e35fd0222643fba8e0fe1431557}{00690}} \textcolor{preprocessor}{\#define ATAPI\_COMMAND\_LENGTH    12      }\textcolor{comment}{/* ATAPI commands are always 12 bytes */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00691}00691 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00692}\mbox{\hyperlink{umass_8c_a11d33b46304057ca6af2993fd1414a1b}{00692}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{umass_8c_a11d33b46304057ca6af2993fd1414a1b}{umass\_devclass}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00693}00693 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00694}\mbox{\hyperlink{umass_8c_ac8fe3f2b1043dbf2514bd4b7a12075aa}{00694}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{umass_8c_ac8fe3f2b1043dbf2514bd4b7a12075aa}{umass\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00695}00695         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00696}00696         DEVMETHOD(device\_probe, \mbox{\hyperlink{umass_8c_a36da43000937a97d787898abcae30c35}{umass\_probe}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00697}00697         DEVMETHOD(device\_attach, \mbox{\hyperlink{umass_8c_affd7975fb2b3779516b44fe89283777e}{umass\_attach}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00698}00698         DEVMETHOD(device\_detach, \mbox{\hyperlink{umass_8c_ab4f7e7f4532e5a9003dbc5595f45e620}{umass\_detach}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00699}00699 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00700}00700         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00701}00701 \};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00702}00702 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00703}\mbox{\hyperlink{umass_8c_a5390aa00bb5901ba1cb150bbb5d80b2f}{00703}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{umass_8c_a5390aa00bb5901ba1cb150bbb5d80b2f}{umass\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00704}00704         .name = \textcolor{stringliteral}{"{}umass"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00705}00705         .methods = \mbox{\hyperlink{umass_8c_ac8fe3f2b1043dbf2514bd4b7a12075aa}{umass\_methods}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00706}00706         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00707}00707 \};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00708}00708 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00709}\mbox{\hyperlink{umass_8c_a499c4a0a60f0d061a4e391226a7349ab}{00709}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \_\_used \mbox{\hyperlink{umass_8c_a499c4a0a60f0d061a4e391226a7349ab}{umass\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00710}00710         \textcolor{comment}{/* generic mass storage class */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00711}00711         \{\mbox{\hyperlink{usbdi_8h_a74c0bae2d55b3014e0583ec8ea4d5dc0}{USB\_IFACE\_CLASS}}(\mbox{\hyperlink{usb_8h_ae81b41321fc379102099b7f2e5c9739e}{UICLASS\_MASS}}),\},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00712}00712 \};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00713}00713 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00714}\mbox{\hyperlink{umass_8c_ab8b1af7aabc374021be46a53d1ff1894}{00714}} \mbox{\hyperlink{umass_8c_ab8b1af7aabc374021be46a53d1ff1894}{DRIVER\_MODULE}}(umass, uhub, \mbox{\hyperlink{umass_8c_a5390aa00bb5901ba1cb150bbb5d80b2f}{umass\_driver}}, \mbox{\hyperlink{umass_8c_a11d33b46304057ca6af2993fd1414a1b}{umass\_devclass}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00715}\mbox{\hyperlink{umass_8c_a617e4f66ff6252f751837b4275756e19}{00715}} \mbox{\hyperlink{umass_8c_a617e4f66ff6252f751837b4275756e19}{MODULE\_DEPEND}}(umass, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00716}\mbox{\hyperlink{umass_8c_ab866e6f9cf39a5a377e6bd9e1851a39d}{00716}} \mbox{\hyperlink{umass_8c_a617e4f66ff6252f751837b4275756e19}{MODULE\_DEPEND}}(umass, cam, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00717}\mbox{\hyperlink{umass_8c_a8d2b99da68662fd703bbf9a1ace20a7d}{00717}} \mbox{\hyperlink{umass_8c_a8d2b99da68662fd703bbf9a1ace20a7d}{MODULE\_VERSION}}(umass, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00718}\mbox{\hyperlink{umass_8c_a27e1dadee86d8a606204ba07ea0a19f0}{00718}} \mbox{\hyperlink{umass_8c_a27e1dadee86d8a606204ba07ea0a19f0}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{umass_8c_a499c4a0a60f0d061a4e391226a7349ab}{umass\_devs}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00719}00719 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00720}00720 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00721}00721 \textcolor{comment}{ * USB device probe/attach/detach}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00722}00722 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00723}00723 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00724}00724 \textcolor{keyword}{static} uint16\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00725}\mbox{\hyperlink{umass_8c_a8b54ced53d82fe1ba5c594f11022f441}{00725}} \mbox{\hyperlink{umass_8c_a8b54ced53d82fe1ba5c594f11022f441}{umass\_get\_proto}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__interface}{usb\_interface}} *iface)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00726}00726 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00727}00727         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface__descriptor}{usb\_interface\_descriptor}} *\mbox{\hyperlink{if__usievar_8h_a1e6927fa1486224044e568f9c370519b}{id}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00728}00728         uint16\_t retval;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00729}00729 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00730}00730         retval = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00731}00731 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00732}00732         \textcolor{comment}{/* Check for a standards compliant device */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00733}00733         \textcolor{keywordtype}{id} = \mbox{\hyperlink{usb__device_8c_a4b209681fa34e4570ab0544d0ae9002f}{usbd\_get\_interface\_descriptor}}(iface);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00734}00734         \textcolor{keywordflow}{if} ((\textcolor{keywordtype}{id} == NULL) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00735}00735             (\mbox{\hyperlink{if__usievar_8h_a1e6927fa1486224044e568f9c370519b}{id}}-\/>bInterfaceClass != \mbox{\hyperlink{usb_8h_ae81b41321fc379102099b7f2e5c9739e}{UICLASS\_MASS}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00736}00736                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00737}00737         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00738}00738         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{if__usievar_8h_a1e6927fa1486224044e568f9c370519b}{id}}-\/>bInterfaceSubClass) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00739}00739         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a46b53cbd6c85c0370cb95f6c794f3cb6}{UISUBCLASS\_SCSI}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00740}00740                 retval |= \mbox{\hyperlink{umass_8c_a3f208b685bb1cbf0e49795557d2d626c}{UMASS\_PROTO\_SCSI}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00741}00741                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00742}00742         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ac7f097a596578d3e10e64f1a92abf0af}{UISUBCLASS\_UFI}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00743}00743                 retval |= \mbox{\hyperlink{umass_8c_a1fd2a80dec7b5e7e7df0a77f6eb71127}{UMASS\_PROTO\_UFI}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00744}00744                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00745}00745         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_adac80750cfb657f0b49f4c034a66e9c0}{UISUBCLASS\_RBC}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00746}00746                 retval |= \mbox{\hyperlink{umass_8c_aaa6947982f25b407fa15e28f84e83bda}{UMASS\_PROTO\_RBC}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00747}00747                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00748}00748         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ab5340fa65d4ce7fd2fab56217353adf5}{UISUBCLASS\_SFF8020I}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00749}00749         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a69f402413b1a0a498d69595bca6e9b73}{UISUBCLASS\_SFF8070I}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00750}00750                 retval |= \mbox{\hyperlink{umass_8c_ab68063eb8f49c26fd1e3742bcd6f1959}{UMASS\_PROTO\_ATAPI}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00751}00751                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00752}00752         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00753}00753                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00754}00754         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00755}00755 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00756}00756         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{if__usievar_8h_a1e6927fa1486224044e568f9c370519b}{id}}-\/>bInterfaceProtocol) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00757}00757         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af350e5cf52fce4d57b325025f62b5ad3}{UIPROTO\_MASS\_CBI}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00758}00758                 retval |= \mbox{\hyperlink{umass_8c_a067ba005fab72ecda4b4236acce9bb5c}{UMASS\_PROTO\_CBI}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00759}00759                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00760}00760         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aeeb352a02ec9e8d20027e5cdc4a26c0d}{UIPROTO\_MASS\_CBI\_I}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00761}00761                 retval |= \mbox{\hyperlink{umass_8c_a1d3098dd9a0ab9467a2f94ce736133e6}{UMASS\_PROTO\_CBI\_I}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00762}00762                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00763}00763         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aeb293868bfe932dadea8632821cff6c8}{UIPROTO\_MASS\_BBB\_OLD}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00764}00764         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a1dd4ef2dd3103277eab1c96c2a8ccae3}{UIPROTO\_MASS\_BBB}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00765}00765                 retval |= \mbox{\hyperlink{umass_8c_aa50a7ba710bed3bdbf2c2aa7482eb37c}{UMASS\_PROTO\_BBB}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00766}00766                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00767}00767         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00768}00768                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00769}00769         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00770}00770 done:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00771}00771         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00772}00772 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00773}00773 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00774}00774 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00775}00775 \textcolor{comment}{ * Match the device we are seeing with the devices supported.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00776}00776 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00777}00777 \textcolor{keyword}{static} \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__probe__proto}{umass\_probe\_proto}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00778}\mbox{\hyperlink{umass_8c_a7a7604208acf00d7b5d9871a1b871aa4}{00778}} \mbox{\hyperlink{structumass__probe__proto}{umass\_probe\_proto}}(device\_t dev, struct \mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00779}00779 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00780}00780         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__probe__proto}{umass\_probe\_proto}} ret;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00781}00781         uint32\_t \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} = \mbox{\hyperlink{umass_8c_a8f99e4d1de871f758811e8d5c1dacd4c}{NO\_QUIRKS}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00782}00782         uint32\_t \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} = \mbox{\hyperlink{umass_8c_a8b54ced53d82fe1ba5c594f11022f441}{umass\_get\_proto}}(uaa-\/>iface);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00783}00783 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00784}00784         memset(\&ret, 0, \textcolor{keyword}{sizeof}(ret));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00785}00785         ret.\mbox{\hyperlink{structumass__probe__proto_a5b113a6e94f04b7e7d1bdbf331991927}{error}} = BUS\_PROBE\_GENERIC;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00786}00786 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00787}00787         \textcolor{comment}{/* Check if we should deny probing. */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00788}00788         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122aebe5db61310af41d5e2837d9131c31dd}{UQ\_MSC\_IGNORE}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00789}00789                 ret.\mbox{\hyperlink{structumass__probe__proto_a5b113a6e94f04b7e7d1bdbf331991927}{error}} = ENXIO;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00790}00790                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00791}00791         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00792}00792 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00793}00793         \textcolor{comment}{/* Search for protocol enforcement */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00794}00794 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00795}00795         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122ad0499f392e22bb1b0aa9f892f694bd02}{UQ\_MSC\_FORCE\_WIRE\_BBB}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00796}00796                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \&= \string~UMASS\_PROTO\_WIRE;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00797}00797                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} |= \mbox{\hyperlink{umass_8c_aa50a7ba710bed3bdbf2c2aa7482eb37c}{UMASS\_PROTO\_BBB}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00798}00798         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a71b87da01d00aa26caacdd32c16a11e1}{UQ\_MSC\_FORCE\_WIRE\_CBI}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00799}00799                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \&= \string~UMASS\_PROTO\_WIRE;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00800}00800                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} |= \mbox{\hyperlink{umass_8c_a067ba005fab72ecda4b4236acce9bb5c}{UMASS\_PROTO\_CBI}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00801}00801         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a428d72ea9419360a6e7452f8a9ebaab3}{UQ\_MSC\_FORCE\_WIRE\_CBI\_I}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00802}00802                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \&= \string~UMASS\_PROTO\_WIRE;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00803}00803                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} |= \mbox{\hyperlink{umass_8c_a1d3098dd9a0ab9467a2f94ce736133e6}{UMASS\_PROTO\_CBI\_I}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00804}00804         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00805}00805 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00806}00806         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a2e3e6393f16a0d9d51f3a1ca94aa8e22}{UQ\_MSC\_FORCE\_PROTO\_SCSI}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00807}00807                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \&= \string~UMASS\_PROTO\_COMMAND;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00808}00808                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} |= \mbox{\hyperlink{umass_8c_a3f208b685bb1cbf0e49795557d2d626c}{UMASS\_PROTO\_SCSI}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00809}00809         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a00ca5a4a4dbe77edee4a3a95d5c4cbae}{UQ\_MSC\_FORCE\_PROTO\_ATAPI}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00810}00810                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \&= \string~UMASS\_PROTO\_COMMAND;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00811}00811                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} |= \mbox{\hyperlink{umass_8c_ab68063eb8f49c26fd1e3742bcd6f1959}{UMASS\_PROTO\_ATAPI}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00812}00812         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122ae6fec6bc5bd0736707a5076efb898676}{UQ\_MSC\_FORCE\_PROTO\_UFI}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00813}00813                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \&= \string~UMASS\_PROTO\_COMMAND;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00814}00814                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} |= \mbox{\hyperlink{umass_8c_a1fd2a80dec7b5e7e7df0a77f6eb71127}{UMASS\_PROTO\_UFI}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00815}00815         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122aea9c5305f6d79b6bead597ff82bb3796}{UQ\_MSC\_FORCE\_PROTO\_RBC}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00816}00816                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \&= \string~UMASS\_PROTO\_COMMAND;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00817}00817                 \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} |= \mbox{\hyperlink{umass_8c_aaa6947982f25b407fa15e28f84e83bda}{UMASS\_PROTO\_RBC}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00818}00818         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00819}00819 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00820}00820         \textcolor{comment}{/* Check if the protocol is invalid */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00821}00821 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00822}00822         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \& \mbox{\hyperlink{umass_8c_ad723cd91a563daeca4d483d44c09f9b1}{UMASS\_PROTO\_COMMAND}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00823}00823                 ret.\mbox{\hyperlink{structumass__probe__proto_a5b113a6e94f04b7e7d1bdbf331991927}{error}} = ENXIO;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00824}00824                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00825}00825         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00826}00826 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00827}00827         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} \& \mbox{\hyperlink{umass_8c_ab93438c89ef9a7a79b8f8182721330d7}{UMASS\_PROTO\_WIRE}}) == 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00828}00828                 ret.\mbox{\hyperlink{structumass__probe__proto_a5b113a6e94f04b7e7d1bdbf331991927}{error}} = ENXIO;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00829}00829                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00830}00830         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00831}00831 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00832}00832         \textcolor{comment}{/* Search for quirks */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00833}00833 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00834}00834         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a0a687573a2ea4b726b1ebb9135687dbe}{UQ\_MSC\_NO\_TEST\_UNIT\_READY}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00835}00835                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a55f81776fe4bc3859e3916a8d4153945}{NO\_TEST\_UNIT\_READY}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00836}00836         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122abb021305327f9e9214201cb3c5553967}{UQ\_MSC\_NO\_RS\_CLEAR\_UA}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00837}00837                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_aacf6beca7f3d52bdf7bd937efd22a451}{RS\_NO\_CLEAR\_UA}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00838}00838         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a21b54ed4b0834fa053ef970e3dc0e4e2}{UQ\_MSC\_NO\_START\_STOP}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00839}00839                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a8cbb85137b29a210adb87b273c061b28}{NO\_START\_STOP}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00840}00840         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a9200d2807a191f09a8358d567bfb97d8}{UQ\_MSC\_NO\_GETMAXLUN}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00841}00841                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_ae1ee83fad3ce5eed1a9d29270ac50bb8}{NO\_GETMAXLUN}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00842}00842         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a2d106c794110ba589c4dee66dbf04a7a}{UQ\_MSC\_NO\_INQUIRY}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00843}00843                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a58bb10caeec9dc1b1b2055351a67621c}{NO\_INQUIRY}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00844}00844         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122abfeff3ddebe51e48da9c9ffe1371298e}{UQ\_MSC\_NO\_INQUIRY\_EVPD}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00845}00845                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a9e87418d5a77550205267696057c35f9}{NO\_INQUIRY\_EVPD}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00846}00846         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a32c969ea0e10e1412af76a4e80620e9f}{UQ\_MSC\_NO\_PREVENT\_ALLOW}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00847}00847                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a80fda3839b9033ad468c2c44dea89fcc}{NO\_PREVENT\_ALLOW}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00848}00848         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122aa85c3dbe04dacb46d02af9b9679c405e}{UQ\_MSC\_NO\_SYNC\_CACHE}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00849}00849                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a6359754d8636ae94d3a6e5b09b7a505c}{NO\_SYNCHRONIZE\_CACHE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00850}00850         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a23589714a3225a6477a9a14bd430b797}{UQ\_MSC\_SHUTTLE\_INIT}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00851}00851                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a77a65d44399fa200ca34491fdae271f5}{SHUTTLE\_INIT}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00852}00852         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a3bb8174352755a7f6c462a6fddaab3d1}{UQ\_MSC\_ALT\_IFACE\_1}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00853}00853                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a136980aa2948a71c5107ad8b45eebbd1}{ALT\_IFACE\_1}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00854}00854         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122ae96185933236049045bbfe52ca506a0e}{UQ\_MSC\_FLOPPY\_SPEED}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00855}00855                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a50bef086ca00abb99ccdfa2bbed9e7a3}{FLOPPY\_SPEED}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00856}00856         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a33a7aa4537ea2ba8707a5b7b6b3346d4}{UQ\_MSC\_IGNORE\_RESIDUE}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00857}00857                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_ad55a5f9825a404b0ae4b55e24c218171}{IGNORE\_RESIDUE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00858}00858         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a89e298ddd82bd868694fd0bfe273551e}{UQ\_MSC\_WRONG\_CSWSIG}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00859}00859                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a75492ca33f647f612de304d83b6ab717}{WRONG\_CSWSIG}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00860}00860         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a92aa4c6ae492bcc61dd8ae8e54e5efad}{UQ\_MSC\_RBC\_PAD\_TO\_12}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00861}00861                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a31cfe86ca031c00fd678e8d38d656b82}{RBC\_PAD\_TO\_12}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00862}00862         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122adfb9262ddcb72c1c906516c0fce6732f}{UQ\_MSC\_READ\_CAP\_OFFBY1}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00863}00863                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a83ed683c2baac38ccdeb9e162d318880}{READ\_CAPACITY\_OFFBY1}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00864}00864         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122aa5815a98ed91dfbba0076e9c15acd1b4}{UQ\_MSC\_FORCE\_SHORT\_INQ}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00865}00865                 \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} |= \mbox{\hyperlink{umass_8c_a6d55c4c3ab565b328cd83360ff5ee864}{FORCE\_SHORT\_INQUIRY}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00866}00866 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00867}00867 done:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00868}00868         ret.\mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}} = \mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00869}00869         ret.\mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}} = \mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00870}00870         \textcolor{keywordflow}{return} (ret);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00871}00871 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00872}00872 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00873}00873 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00874}\mbox{\hyperlink{umass_8c_a634d799bf6e625f6d0fa5924ed388120}{00874}} \mbox{\hyperlink{umass_8c_a36da43000937a97d787898abcae30c35}{umass\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00875}00875 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00876}00876         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00877}00877         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__probe__proto}{umass\_probe\_proto}} temp;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00878}00878 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00879}00879         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00880}00880                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00881}00881         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00882}00882         temp = \mbox{\hyperlink{umass_8c_a7a7604208acf00d7b5d9871a1b871aa4}{umass\_probe\_proto}}(dev, uaa);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00883}00883 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00884}00884         \textcolor{keywordflow}{return} (temp.\mbox{\hyperlink{structumass__probe__proto_a5b113a6e94f04b7e7d1bdbf331991927}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00885}00885 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00886}00886 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00887}00887 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00888}\mbox{\hyperlink{umass_8c_a1bc2292cc0672ea49009263a4bdec535}{00888}} \mbox{\hyperlink{umass_8c_affd7975fb2b3779516b44fe89283777e}{umass\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00889}00889 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00890}00890         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00891}00891         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00892}00892         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__probe__proto}{umass\_probe\_proto}} temp = \mbox{\hyperlink{umass_8c_a7a7604208acf00d7b5d9871a1b871aa4}{umass\_probe\_proto}}(dev, uaa);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00893}00893         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface__descriptor}{usb\_interface\_descriptor}} *\mbox{\hyperlink{if__usievar_8h_a1e6927fa1486224044e568f9c370519b}{id}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00894}00894         \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00895}00895 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00896}00896         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00897}00897 \textcolor{comment}{         * NOTE: the softc struct is cleared in device\_set\_driver.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00898}00898 \textcolor{comment}{         * We can safely call umass\_detach without specifically}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00899}00899 \textcolor{comment}{         * initializing the struct.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00900}00900 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00901}00901 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00902}00902         sc-\/>\mbox{\hyperlink{structumass__softc_a4cea6936084a41d1a6acc5d99e837720}{sc\_dev}} = dev;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00903}00903         sc-\/>\mbox{\hyperlink{structumass__softc_ae98657d8e8b583761f9d693080f326b6}{sc\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00904}00904         sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} = temp.\mbox{\hyperlink{structumass__probe__proto_aaab9e5aaa5865fffd046698f621a21e1}{proto}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00905}00905         sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} = temp.\mbox{\hyperlink{structumass__probe__proto_a8011a5b8e257844c8cffc442f8d71a7e}{quirks}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00906}00906         sc-\/>\mbox{\hyperlink{structumass__softc_abecd2a7bb5b8731abb484164a65d9955}{sc\_unit}} = device\_get\_unit(dev);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00907}00907 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00908}00908         snprintf(sc-\/>\mbox{\hyperlink{structumass__softc_afa861a71b2b0449870d0e1b347a1a450}{sc\_name}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_afa861a71b2b0449870d0e1b347a1a450}{sc\_name}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00909}00909             \textcolor{stringliteral}{"{}\%s"{}}, device\_get\_nameunit(dev));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00910}00910 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00911}00911         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00912}00912 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00913}00913         mtx\_init(\&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}}, device\_get\_nameunit(dev), }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00914}00914             NULL, MTX\_DEF | MTX\_RECURSE);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00915}00915 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00916}00916         \textcolor{comment}{/* get interface index */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00917}00917 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00918}00918         \textcolor{keywordtype}{id} = \mbox{\hyperlink{usb__device_8c_a4b209681fa34e4570ab0544d0ae9002f}{usbd\_get\_interface\_descriptor}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_aaf4432c55ec34c0e4eb0cb3ddfb08ffd}{iface}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00919}00919         \textcolor{keywordflow}{if} (\textcolor{keywordtype}{id} == NULL) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00920}00920                 device\_printf(dev, \textcolor{stringliteral}{"{}failed to get "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00921}00921                     \textcolor{stringliteral}{"{}interface number\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00922}00922                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00923}00923         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00924}00924         sc-\/>\mbox{\hyperlink{structumass__softc_af2788ddfb984e2f1755be938dd0683a6}{sc\_iface\_no}} = \textcolor{keywordtype}{id}-\/>bInterfaceNumber;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00925}00925 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00926}00926 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00927}00927         device\_printf(dev, \textcolor{stringliteral}{"{} "{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00928}00928 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00929}00929         \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_ad723cd91a563daeca4d483d44c09f9b1}{UMASS\_PROTO\_COMMAND}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00930}00930         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_a3f208b685bb1cbf0e49795557d2d626c}{UMASS\_PROTO\_SCSI}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00931}00931                 printf(\textcolor{stringliteral}{"{}SCSI"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00932}00932                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00933}00933         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_ab68063eb8f49c26fd1e3742bcd6f1959}{UMASS\_PROTO\_ATAPI}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00934}00934                 printf(\textcolor{stringliteral}{"{}8070i (ATAPI)"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00935}00935                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00936}00936         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_a1fd2a80dec7b5e7e7df0a77f6eb71127}{UMASS\_PROTO\_UFI}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00937}00937                 printf(\textcolor{stringliteral}{"{}UFI"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00938}00938                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00939}00939         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_aaa6947982f25b407fa15e28f84e83bda}{UMASS\_PROTO\_RBC}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00940}00940                 printf(\textcolor{stringliteral}{"{}RBC"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00941}00941                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00942}00942         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00943}00943                 printf(\textcolor{stringliteral}{"{}(unknown 0x\%02x)"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00944}00944                     sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_ad723cd91a563daeca4d483d44c09f9b1}{UMASS\_PROTO\_COMMAND}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00945}00945                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00946}00946         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00947}00947 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00948}00948         printf(\textcolor{stringliteral}{"{} over "{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00949}00949 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00950}00950         \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_ab93438c89ef9a7a79b8f8182721330d7}{UMASS\_PROTO\_WIRE}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00951}00951         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_aa50a7ba710bed3bdbf2c2aa7482eb37c}{UMASS\_PROTO\_BBB}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00952}00952                 printf(\textcolor{stringliteral}{"{}Bulk-\/Only"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00953}00953                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00954}00954         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_a067ba005fab72ecda4b4236acce9bb5c}{UMASS\_PROTO\_CBI}}:            \textcolor{comment}{/* uses Comand/Bulk pipes */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00955}00955                 printf(\textcolor{stringliteral}{"{}CBI"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00956}00956                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00957}00957         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_a1d3098dd9a0ab9467a2f94ce736133e6}{UMASS\_PROTO\_CBI\_I}}:        \textcolor{comment}{/* uses Comand/Bulk/Interrupt pipes */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00958}00958                 printf(\textcolor{stringliteral}{"{}CBI with CCI"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00959}00959                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00960}00960         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00961}00961                 printf(\textcolor{stringliteral}{"{}(unknown 0x\%02x)"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00962}00962                     sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_ab93438c89ef9a7a79b8f8182721330d7}{UMASS\_PROTO\_WIRE}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00963}00963         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00964}00964 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00965}00965         printf(\textcolor{stringliteral}{"{}; quirks = 0x\%04x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00966}00966 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00967}00967 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00968}00968         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a136980aa2948a71c5107ad8b45eebbd1}{ALT\_IFACE\_1}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00969}00969                 err = \mbox{\hyperlink{usb__device_8c_a04693d160af658ae93ddddeac41e6ef2}{usbd\_set\_alt\_interface\_index}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00970}00970                     (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}}, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00971}00971 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00972}00972                 \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00973}00973                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_USB, \textcolor{stringliteral}{"{}could not switch to "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00974}00974                             \textcolor{stringliteral}{"{}Alt Interface 1\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00975}00975                         \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00976}00976                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00977}00977         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00978}00978         \textcolor{comment}{/* allocate all required USB transfers */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00979}00979 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00980}00980         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_aa50a7ba710bed3bdbf2c2aa7482eb37c}{UMASS\_PROTO\_BBB}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00981}00981                 err = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00982}00982                     \&uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}}, sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}, \mbox{\hyperlink{umass_8c_a9f5c2f3d20917a1190a1004189e1285e}{umass\_bbb\_config}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00983}00983                     \mbox{\hyperlink{umass_8c_ac95cbd24722141236a34149bbf831c69}{UMASS\_T\_BBB\_MAX}}, sc, \&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00984}00984 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00985}00985                 \textcolor{comment}{/* skip reset first time */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00986}00986                 sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = \mbox{\hyperlink{umass_8c_aadffbb2c2620889c6daa1a1b3ccd323a}{UMASS\_T\_BBB\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00987}00987 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00988}00988         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& (\mbox{\hyperlink{umass_8c_a067ba005fab72ecda4b4236acce9bb5c}{UMASS\_PROTO\_CBI}} | \mbox{\hyperlink{umass_8c_a1d3098dd9a0ab9467a2f94ce736133e6}{UMASS\_PROTO\_CBI\_I}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00989}00989                 err = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00990}00990                     \&uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}}, sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}, \mbox{\hyperlink{umass_8c_a77df139a8a537aba4de8c3fa98b13d43}{umass\_cbi\_config}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00991}00991                     \mbox{\hyperlink{umass_8c_ab650a4fa6cd4d32ff892811e1130e73a}{UMASS\_T\_CBI\_MAX}}, sc, \&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00992}00992 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00993}00993                 \textcolor{comment}{/* skip reset first time */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00994}00994                 sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = \mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{UMASS\_T\_CBI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00995}00995 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00996}00996         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00997}00997                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ac568d752239d287fca75588222df1bdf}{USB\_ERR\_INVAL}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00998}00998         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l00999}00999 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01000}01000         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01001}01001                 device\_printf(dev, \textcolor{stringliteral}{"{}could not setup required "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01002}01002                     \textcolor{stringliteral}{"{}transfers, \%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01003}01003                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01004}01004         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01005}01005 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01006}01006         \textcolor{keywordflow}{if} (umass\_throttle > 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01007}01007                 uint8\_t x;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01008}01008                 \textcolor{keywordtype}{int} iv;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01009}01009 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01010}01010                 iv = umass\_throttle;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01011}01011 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01012}01012                 \textcolor{keywordflow}{if} (iv < 1)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01013}01013                         iv = 1;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01014}01014                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (iv > 8000)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01015}01015                         iv = 8000;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01016}01016 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01017}01017                 \textcolor{keywordflow}{for} (x = 0; x != \mbox{\hyperlink{umass_8c_af03ec61edc6e8350be26185af8d65fe5}{UMASS\_T\_MAX}}; x++) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01018}01018                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[x] != NULL)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01019}01019                                 \mbox{\hyperlink{usb__transfer_8c_abb9eced73c15f8c188ea09e378c09c03}{usbd\_xfer\_set\_interval}}(sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[x], iv);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01020}01020                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01021}01021         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01022}01022 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01023}01023         sc-\/>\mbox{\hyperlink{structumass__softc_ab543942faf68dce7798fe5370c7c6eb1}{sc\_transform}} =}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01024}01024             (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_a3f208b685bb1cbf0e49795557d2d626c}{UMASS\_PROTO\_SCSI}}) ? \&\mbox{\hyperlink{umass_8c_aa6529fb2f51039a4a3bea6d11e0d0ab5}{umass\_scsi\_transform}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01025}01025             (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_a1fd2a80dec7b5e7e7df0a77f6eb71127}{UMASS\_PROTO\_UFI}}) ? \&\mbox{\hyperlink{umass_8c_a7e53890b7c36f59db41961d7787dc38e}{umass\_ufi\_transform}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01026}01026             (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_ab68063eb8f49c26fd1e3742bcd6f1959}{UMASS\_PROTO\_ATAPI}}) ? \&\mbox{\hyperlink{umass_8c_a69356b374e1499c670450daa8c9cc1ea}{umass\_atapi\_transform}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01027}01027             (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_aaa6947982f25b407fa15e28f84e83bda}{UMASS\_PROTO\_RBC}}) ? \&\mbox{\hyperlink{umass_8c_a2f87d24c52fead5277457669a81b0e60}{umass\_rbc\_transform}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01028}01028             \&\mbox{\hyperlink{umass_8c_a70703ce4bde53c37ac782543828c1a92}{umass\_no\_transform}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01029}01029 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01030}01030         \textcolor{comment}{/* from here onwards the device can be used. */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01031}01031 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01032}01032         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a77a65d44399fa200ca34491fdae271f5}{SHUTTLE\_INIT}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01033}01033                 \mbox{\hyperlink{umass_8c_a34c20618ef2dd8092cb991aee01a6700}{umass\_init\_shuttle}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01034}01034         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01035}01035         \textcolor{comment}{/* get the maximum LUN supported by the device */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01036}01036 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01037}01037         \textcolor{keywordflow}{if} (((sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_ab93438c89ef9a7a79b8f8182721330d7}{UMASS\_PROTO\_WIRE}}) == \mbox{\hyperlink{umass_8c_aa50a7ba710bed3bdbf2c2aa7482eb37c}{UMASS\_PROTO\_BBB}}) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01038}01038             !(sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_ae1ee83fad3ce5eed1a9d29270ac50bb8}{NO\_GETMAXLUN}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01039}01039                 sc-\/>\mbox{\hyperlink{structumass__softc_a047b3ab9c344020f90378c48c518ccfa}{sc\_maxlun}} = \mbox{\hyperlink{umass_8c_a10782a02944ba80c083cc6ba0b917d6a}{umass\_bbb\_get\_max\_lun}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01040}01040         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01041}01041                 sc-\/>\mbox{\hyperlink{structumass__softc_a047b3ab9c344020f90378c48c518ccfa}{sc\_maxlun}} = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01042}01042 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01043}01043         \textcolor{comment}{/* Prepare the SCSI command block */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01044}01044         sc-\/>\mbox{\hyperlink{structumass__softc_a171ab28ba237249982566d884890e0c6}{cam\_scsi\_sense}}.opcode = REQUEST\_SENSE;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01045}01045         sc-\/>\mbox{\hyperlink{structumass__softc_a9d75a2099f4e767aed8e68fc6081e022}{cam\_scsi\_test\_unit\_ready}}.opcode = TEST\_UNIT\_READY;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01046}01046 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01047}01047         \textcolor{comment}{/* register the SIM */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01048}01048         err = \mbox{\hyperlink{umass_8c_add2eba527c287d51f00b0ae13e1ed52a}{umass\_cam\_attach\_sim}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01049}01049         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01050}01050                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01051}01051         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01052}01052         \textcolor{comment}{/* scan the SIM */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01053}01053         \mbox{\hyperlink{umass_8c_a4ee5d4945bef5449e2601d0199eac30f}{umass\_cam\_attach}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01054}01054 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01055}01055         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_GEN, \textcolor{stringliteral}{"{}Attach finished\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01056}01056 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01057}01057         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01058}01058 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01059}01059 detach:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01060}01060         \mbox{\hyperlink{umass_8c_ab4f7e7f4532e5a9003dbc5595f45e620}{umass\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01061}01061         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01062}01062 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01063}01063 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01064}01064 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01065}\mbox{\hyperlink{umass_8c_a5c298cda25ac10a903af8384f2fe6aec}{01065}} \mbox{\hyperlink{umass_8c_ab4f7e7f4532e5a9003dbc5595f45e620}{umass\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01066}01066 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01067}01067         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01068}01068 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01069}01069         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_USB, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01070}01070 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01071}01071         \textcolor{comment}{/* teardown our statemachine */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01072}01072 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01073}01073         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}, \mbox{\hyperlink{umass_8c_af03ec61edc6e8350be26185af8d65fe5}{UMASS\_T\_MAX}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01074}01074 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01075}01075         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01076}01076 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01077}01077         \textcolor{comment}{/* cancel any leftover CCB's */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01078}01078 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01079}01079         \mbox{\hyperlink{umass_8c_aeb9c6b950df5ae0a330acb14207437bc}{umass\_cancel\_ccb}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01080}01080 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01081}01081         \mbox{\hyperlink{umass_8c_a89136e12d615a897f05822c8f11cfcdb}{umass\_cam\_detach\_sim}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01082}01082 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01083}01083         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01084}01084 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01085}01085         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01086}01086 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01087}01087         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01088}01088 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01089}01089 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01090}01090 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01091}\mbox{\hyperlink{umass_8c_a34c20618ef2dd8092cb991aee01a6700}{01091}} \mbox{\hyperlink{umass_8c_a34c20618ef2dd8092cb991aee01a6700}{umass\_init\_shuttle}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01092}01092 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01093}01093         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01094}01094         uint8\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}[2] = \{0, 0\};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01095}01095 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01096}01096         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01097}01097 \textcolor{comment}{         * The Linux driver does this, but no one can tell us what the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01098}01098 \textcolor{comment}{         * command does.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01099}01099 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01100}01100         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a6da49500e864a3c33c9eed3dd49d3e59}{UT\_READ\_VENDOR\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01101}01101         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = 1;            \textcolor{comment}{/* XXX unknown command */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01102}01102         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01103}01103         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[0] = sc-\/>\mbox{\hyperlink{structumass__softc_af2788ddfb984e2f1755be938dd0683a6}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01104}01104         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01105}01105         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01106}01106         \mbox{\hyperlink{usbdi_8h_adf0c9751da27fa2e6a3b52a9bfd5f7d1}{usbd\_do\_request}}(sc-\/>\mbox{\hyperlink{structumass__softc_ae98657d8e8b583761f9d693080f326b6}{sc\_udev}}, NULL, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \&\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01107}01107 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01108}01108         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_GEN, \textcolor{stringliteral}{"{}Shuttle init returned 0x\%02x\%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01109}01109             \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}[0], \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}[1]);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01110}01110 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01111}01111 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01112}01112 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01113}01113 \textcolor{comment}{ * Generic functions to handle transfers}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01114}01114 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01115}01115 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01116}01116 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01117}\mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{01117}} \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t xfer\_index)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01118}01118 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01119}01119         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_GEN, \textcolor{stringliteral}{"{}transfer index = "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01120}01120             \textcolor{stringliteral}{"{}\%d\(\backslash\)n"{}}, xfer\_index);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01121}01121 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01122}01122         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[xfer\_index]) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01123}01123                 sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = xfer\_index;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01124}01124                 \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[xfer\_index]);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01125}01125         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01126}01126                 \mbox{\hyperlink{umass_8c_aeb9c6b950df5ae0a330acb14207437bc}{umass\_cancel\_ccb}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01127}01127         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01128}01128 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01129}01129 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01130}01130 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01131}\mbox{\hyperlink{umass_8c_a2b924b3addc9468a47aeee869534e146}{01131}} \mbox{\hyperlink{umass_8c_a2b924b3addc9468a47aeee869534e146}{umass\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01132}01132 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01133}01133         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_GEN, \textcolor{stringliteral}{"{}resetting device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01134}01134 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01135}01135         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01136}01136 \textcolor{comment}{         * stop the last transfer, if not already stopped:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01137}01137 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01138}01138         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}}]);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01139}01139         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01140}01140 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01141}01141 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01142}01142 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01143}\mbox{\hyperlink{umass_8c_aeb9c6b950df5ae0a330acb14207437bc}{01143}} \mbox{\hyperlink{umass_8c_aeb9c6b950df5ae0a330acb14207437bc}{umass\_cancel\_ccb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01144}01144 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01145}01145         \textcolor{keyword}{union }ccb *ccb;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01146}01146 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01147}01147         \mbox{\hyperlink{usbdi_8h_a107993503e7d0b7e1178eddef27e57a9}{USB\_MTX\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01148}01148 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01149}01149         ccb = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01150}01150         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01151}01151         sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01152}01152 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01153}01153         \textcolor{keywordflow}{if} (ccb) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01154}01154                 (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01155}01155                     (sc, ccb, (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}} -\/}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01156}01156                     sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}), \mbox{\hyperlink{umass_8c_af1cf6a1fbb450ee49fe30cd36d83b862}{STATUS\_WIRE\_FAILED}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01157}01157         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01158}01158 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01159}01159 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01160}01160 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01161}\mbox{\hyperlink{umass_8c_a9f772566b1ec5ff5a9c8b462c8fcf79e}{01161}} \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01162}01162 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01163}01163         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01164}01164 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01165}01165         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01166}01166                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_GEN, \textcolor{stringliteral}{"{}transfer error, \%s -\/> "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01167}01167                     \textcolor{stringliteral}{"{}reset\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01168}01168         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01169}01169         \mbox{\hyperlink{umass_8c_aeb9c6b950df5ae0a330acb14207437bc}{umass\_cancel\_ccb}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01170}01170 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01171}01171 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01172}01172 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01173}01173 \textcolor{comment}{ * BBB protocol specific functions}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01174}01174 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01175}01175 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01176}01176 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01177}\mbox{\hyperlink{umass_8c_ac60c00e774c83ca92e0bca37d9c5dcdf}{01177}} \mbox{\hyperlink{umass_8c_ab8825268d7977bf9760bf47292980bb1}{umass\_t\_bbb\_reset1\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01178}01178 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01179}01179         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01180}01180         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01181}01181         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01182}01182 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01183}01183         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01184}01184         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01185}01185                 \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_a7131c51faf3f7dfa8180d873c5eea816}{UMASS\_T\_BBB\_RESET2}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01186}01186                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01187}01187 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01188}01188         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01189}01189                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01190}01190 \textcolor{comment}{                 * Reset recovery (5.3.4 in Universal Serial Bus Mass Storage Class)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01191}01191 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01192}01192 \textcolor{comment}{                 * For Reset Recovery the host shall issue in the following order:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01193}01193 \textcolor{comment}{                 * a) a Bulk-\/Only Mass Storage Reset}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01194}01194 \textcolor{comment}{                 * b) a Clear Feature HALT to the Bulk-\/In endpoint}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01195}01195 \textcolor{comment}{                 * c) a Clear Feature HALT to the Bulk-\/Out endpoint}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01196}01196 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01197}01197 \textcolor{comment}{                 * This is done in 3 steps, using 3 transfers:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01198}01198 \textcolor{comment}{                 * UMASS\_T\_BBB\_RESET1}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01199}01199 \textcolor{comment}{                 * UMASS\_T\_BBB\_RESET2}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01200}01200 \textcolor{comment}{                 * UMASS\_T\_BBB\_RESET3}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01201}01201 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01202}01202 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01203}01203                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}BBB reset!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01204}01204 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01205}01205                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01206}01206                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{umass_8c_ab4366a21c8add102c374fe8baeddadcb}{UR\_BBB\_RESET}};     \textcolor{comment}{/* bulk only reset */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01207}01207                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01208}01208                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[0] = sc-\/>\mbox{\hyperlink{structumass__softc_af2788ddfb984e2f1755be938dd0683a6}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01209}01209                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01210}01210                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01211}01211 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01212}01212                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01213}01213                 \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01214}01214 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01215}01215                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01216}01216                 \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01217}01217                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01218}01218                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01219}01219 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01220}01220         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01221}01221                 \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01222}01222                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01223}01223         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01224}01224 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01225}01225 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01226}01226 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01227}\mbox{\hyperlink{umass_8c_a84e5951762bd524bf86e910b1b14b548}{01227}} \mbox{\hyperlink{umass_8c_a5e651a161a32e99a5ed54f1caf77e8dd}{umass\_t\_bbb\_reset2\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01228}01228 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01229}01229         \mbox{\hyperlink{umass_8c_a0d68cfc83a358a46d4f1ed07bec46f03}{umass\_t\_bbb\_data\_clear\_stall\_callback}}(xfer, \mbox{\hyperlink{umass_8c_af8b0322efcc2cf2814d409966f7614e9}{UMASS\_T\_BBB\_RESET3}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01230}01230             \mbox{\hyperlink{umass_8c_a3a3362d016fd8c9deea8c4241edad3f8}{UMASS\_T\_BBB\_DATA\_READ}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01231}01231 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01232}01232 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01233}01233 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01234}\mbox{\hyperlink{umass_8c_a8fa5e3ad96f0b49ac5d7acc1d7753651}{01234}} \mbox{\hyperlink{umass_8c_af9dc8a78d8ea5b429952639711560f06}{umass\_t\_bbb\_reset3\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01235}01235 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01236}01236         \mbox{\hyperlink{umass_8c_a0d68cfc83a358a46d4f1ed07bec46f03}{umass\_t\_bbb\_data\_clear\_stall\_callback}}(xfer, \mbox{\hyperlink{umass_8c_aadffbb2c2620889c6daa1a1b3ccd323a}{UMASS\_T\_BBB\_COMMAND}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01237}01237             \mbox{\hyperlink{umass_8c_ac7a17a20135cb1bf4172b647f90301ce}{UMASS\_T\_BBB\_DATA\_WRITE}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01238}01238 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01239}01239 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01240}01240 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01241}\mbox{\hyperlink{umass_8c_a0d68cfc83a358a46d4f1ed07bec46f03}{01241}} \mbox{\hyperlink{umass_8c_a0d68cfc83a358a46d4f1ed07bec46f03}{umass\_t\_bbb\_data\_clear\_stall\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01242}01242     uint8\_t next\_xfer, uint8\_t stall\_xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01243}01243 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01244}01244         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01245}01245 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01246}01246         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01247}01247         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01248}01248 tr\_transferred:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01249}01249                 \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, next\_xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01250}01250                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01251}01251 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01252}01252         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01253}01253                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8c_a4088ac29158c7fdb2c7b466ca3473ab9}{usbd\_clear\_stall\_callback}}(xfer, sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[stall\_xfer])) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01254}01254                         \textcolor{keywordflow}{goto} tr\_transferred;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01255}01255                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01256}01256                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01257}01257 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01258}01258         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01259}01259                 \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01260}01260                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01261}01261         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01262}01262 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01263}01263 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01264}01264 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01265}\mbox{\hyperlink{umass_8c_ad26f3ab0501655f024b15e068f130b54}{01265}} \mbox{\hyperlink{umass_8c_a045ed152e96a5521d751eeeb73365d70}{umass\_t\_bbb\_command\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01266}01266 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01267}01267         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01268}01268         \textcolor{keyword}{union }ccb *ccb = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01269}01269         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01270}01270         uint32\_t tag;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01272}01272         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01273}01273         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01274}01274                 \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01275}01275                     (sc, ((sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} == \mbox{\hyperlink{umass_8c_adc4b177c894d6bf0c0065c0e8c6a31df}{DIR\_IN}}) ? \mbox{\hyperlink{umass_8c_a3a3362d016fd8c9deea8c4241edad3f8}{UMASS\_T\_BBB\_DATA\_READ}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01276}01276                     (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} == \mbox{\hyperlink{umass_8c_a91459a263a21d175edba77e9aed856e4}{DIR\_OUT}}) ? \mbox{\hyperlink{umass_8c_ac7a17a20135cb1bf4172b647f90301ce}{UMASS\_T\_BBB\_DATA\_WRITE}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01277}01277                     \mbox{\hyperlink{umass_8c_a908ea85dad04d97117a64af8b796e78a}{UMASS\_T\_BBB\_STATUS}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01278}01278                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01279}01279 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01280}01280         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01281}01281 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01282}01282                 sc-\/>\mbox{\hyperlink{structumass__softc_abd2fdfdb35d24c13986dc42960eeccc0}{sc\_status\_try}} = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01283}01283 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01284}01284                 \textcolor{keywordflow}{if} (ccb) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01285}01285                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01286}01286 \textcolor{comment}{                         * the initial value is not important,}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01287}01287 \textcolor{comment}{                         * as long as the values are unique:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01288}01288 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01289}01289                         tag = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.dCBWTag) + 1;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01290}01290 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01291}01291                         \mbox{\hyperlink{usb__endian_8h_a864b3f3abc2ce39bc4c60fadac2a7303}{USETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.dCBWSignature, \mbox{\hyperlink{umass_8c_a15cfcf912acb56af1b66380542dcf7f6}{CBWSIGNATURE}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01292}01292                         \mbox{\hyperlink{usb__endian_8h_a864b3f3abc2ce39bc4c60fadac2a7303}{USETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.dCBWTag, tag);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01293}01293 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01294}01294                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01295}01295 \textcolor{comment}{                         * dCBWDataTransferLength:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01296}01296 \textcolor{comment}{                         *   This field indicates the number of bytes of data that the host}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01297}01297 \textcolor{comment}{                         *   intends to transfer on the IN or OUT Bulk endpoint(as indicated by}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01298}01298 \textcolor{comment}{                         *   the Direction bit) during the execution of this command. If this}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01299}01299 \textcolor{comment}{                         *   field is set to 0, the device will expect that no data will be}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01300}01300 \textcolor{comment}{                         *   transferred IN or OUT during this command, regardless of the value}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01301}01301 \textcolor{comment}{                         *   of the Direction bit defined in dCBWFlags.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01302}01302 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01303}01303                         \mbox{\hyperlink{usb__endian_8h_a864b3f3abc2ce39bc4c60fadac2a7303}{USETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.dCBWDataTransferLength, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01304}01304 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01305}01305                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01306}01306 \textcolor{comment}{                         * dCBWFlags:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01307}01307 \textcolor{comment}{                         *   The bits of the Flags field are defined as follows:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01308}01308 \textcolor{comment}{                         *     Bits 0-\/6  reserved}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01309}01309 \textcolor{comment}{                         *     Bit  7    Direction -\/ this bit shall be ignored if the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01310}01310 \textcolor{comment}{                         *                           dCBWDataTransferLength field is zero.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01311}01311 \textcolor{comment}{                         *               0 = data Out from host to device}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01312}01312 \textcolor{comment}{                         *               1 = data In from device to host}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01313}01313 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01314}01314                         sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.bCBWFlags = ((sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} == \mbox{\hyperlink{umass_8c_adc4b177c894d6bf0c0065c0e8c6a31df}{DIR\_IN}}) ?}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01315}01315                             \mbox{\hyperlink{umass_8c_ae8a2116019faea706c66bc3638995400}{CBWFLAGS\_IN}} : \mbox{\hyperlink{umass_8c_adb6bd8dfe82d0ed3eb1c2caed92d8a9e}{CBWFLAGS\_OUT}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01316}01316                         sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.bCBWLUN = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ae39af3ab4cdb596f6e473549432caf09}{lun}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01317}01317 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01318}01318                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}} > \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.CBWCDB)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01319}01319                                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.CBWCDB);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01320}01320                                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}Truncating long command!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01321}01321                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01322}01322                         sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.bCDBLength = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01323}01323 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01324}01324                         \textcolor{comment}{/* copy SCSI command data */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01325}01325                         memcpy(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.CBWCDB, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01326}01326                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01327}01327 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01328}01328                         \textcolor{comment}{/* clear remaining command area */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01329}01329                         memset(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.CBWCDB +}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01330}01330                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}}, 0,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01331}01331                             \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.CBWCDB) -\/}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01332}01332                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01333}01333 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01334}01334                         \mbox{\hyperlink{umass_8c_a0825cea09ef3ea56dbb615b12a733075}{DIF}}(UDMASS\_BBB, umass\_bbb\_dump\_cbw(sc, \&sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01335}01335 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01336}01336                         pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01337}01337                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, \&sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01338}01338                         \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01339}01339 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01340}01340                         \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01341}01341                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01342}01342                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01343}01343 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01344}01344         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01345}01345                 \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01346}01346                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01347}01347         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01348}01348 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01349}01349 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01350}01350 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01351}\mbox{\hyperlink{umass_8c_aeb1a6ae9b23c818091ff4eb84c122b08}{01351}} \mbox{\hyperlink{umass_8c_a9c2e9418375d6223cfaecdf0069abc2e}{umass\_t\_bbb\_data\_read\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01352}01352 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01353}01353         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01354}01354         uint32\_t max\_bulk = \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01355}01355         \textcolor{keywordtype}{int} \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, sumlen;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01356}01356 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01357}01357         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, \&sumlen, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01358}01358 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01359}01359         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01360}01360         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01361}01361                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} -\/= \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01362}01362                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}} += \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01363}01363                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} += \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01364}01364 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01365}01365                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} < sumlen) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01366}01366                         \textcolor{comment}{/* short transfer */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01367}01367                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01368}01368                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01369}01369         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01370}01370                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}max\_bulk=\%d, data\_rem=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01371}01371                     max\_bulk, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01372}01372 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01373}01373                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} == 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01374}01374                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_a908ea85dad04d97117a64af8b796e78a}{UMASS\_T\_BBB\_STATUS}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01375}01375                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01376}01376                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01377}01377                 \textcolor{keywordflow}{if} (max\_bulk > sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01378}01378                         max\_bulk = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01379}01379                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01380}01380                 \mbox{\hyperlink{usb__transfer_8c_a014ff29f7e1e09061a93f6179a904bba}{usbd\_xfer\_set\_timeout}}(xfer, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a31ba4ff7181d1528f04bd80a402fb2f5}{data\_timeout}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01381}01381 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01382}01382                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, 0, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01383}01383                     max\_bulk);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01384}01384 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01385}01385                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01386}01386                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01387}01387 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01388}01388         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01389}01389                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01390}01390                         \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01391}01391                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01392}01392                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_a9e505cb8fe4004266c19b527f283b0ac}{UMASS\_T\_BBB\_DATA\_RD\_CS}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01393}01393                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01394}01394                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01395}01395         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01396}01396 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01397}01397 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01398}01398 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01399}\mbox{\hyperlink{umass_8c_a08c558899854fe19b5335bf15bc3cb8f}{01399}} \mbox{\hyperlink{umass_8c_a5e0eac4e18b998c25def904d7a8aadcf}{umass\_t\_bbb\_data\_rd\_cs\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01400}01400 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01401}01401         \mbox{\hyperlink{umass_8c_a0d68cfc83a358a46d4f1ed07bec46f03}{umass\_t\_bbb\_data\_clear\_stall\_callback}}(xfer, \mbox{\hyperlink{umass_8c_a908ea85dad04d97117a64af8b796e78a}{UMASS\_T\_BBB\_STATUS}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01402}01402             \mbox{\hyperlink{umass_8c_a3a3362d016fd8c9deea8c4241edad3f8}{UMASS\_T\_BBB\_DATA\_READ}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01403}01403 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01404}01404 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01405}01405 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01406}\mbox{\hyperlink{umass_8c_aeaca1bd348a62010a0f4b1edf937fa80}{01406}} \mbox{\hyperlink{umass_8c_a585e9e57566a529520dd1dcabb413f59}{umass\_t\_bbb\_data\_write\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01407}01407 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01408}01408         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01409}01409         uint32\_t max\_bulk = \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01410}01410         \textcolor{keywordtype}{int} \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, sumlen;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01411}01411 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01412}01412         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, \&sumlen, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01413}01413 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01414}01414         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01415}01415         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01416}01416                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} -\/= \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01417}01417                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}} += \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01418}01418                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} += \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01419}01419 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01420}01420                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} < sumlen) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01421}01421                         \textcolor{comment}{/* short transfer */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01422}01422                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01423}01423                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01424}01424         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01425}01425                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}max\_bulk=\%d, data\_rem=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01426}01426                     max\_bulk, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01427}01427 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01428}01428                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} == 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01429}01429                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_a908ea85dad04d97117a64af8b796e78a}{UMASS\_T\_BBB\_STATUS}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01430}01430                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01431}01431                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01432}01432                 \textcolor{keywordflow}{if} (max\_bulk > sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01433}01433                         max\_bulk = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01434}01434                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01435}01435                 \mbox{\hyperlink{usb__transfer_8c_a014ff29f7e1e09061a93f6179a904bba}{usbd\_xfer\_set\_timeout}}(xfer, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a31ba4ff7181d1528f04bd80a402fb2f5}{data\_timeout}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01436}01436 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01437}01437                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, 0, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01438}01438                     max\_bulk);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01439}01439 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01440}01440                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01441}01441                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01442}01442 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01443}01443         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01444}01444                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01445}01445                         \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01446}01446                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01447}01447                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_a9b8f0c7bf3719039cd37ece14dc64301}{UMASS\_T\_BBB\_DATA\_WR\_CS}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01448}01448                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01449}01449                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01450}01450         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01451}01451 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01452}01452 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01453}01453 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01454}\mbox{\hyperlink{umass_8c_a3a0e2c6abbb77e844129c6a0af0e920a}{01454}} \mbox{\hyperlink{umass_8c_ae165cb64f791c9e0540f05f78602820d}{umass\_t\_bbb\_data\_wr\_cs\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01455}01455 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01456}01456         \mbox{\hyperlink{umass_8c_a0d68cfc83a358a46d4f1ed07bec46f03}{umass\_t\_bbb\_data\_clear\_stall\_callback}}(xfer, \mbox{\hyperlink{umass_8c_a908ea85dad04d97117a64af8b796e78a}{UMASS\_T\_BBB\_STATUS}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01457}01457             \mbox{\hyperlink{umass_8c_ac7a17a20135cb1bf4172b647f90301ce}{UMASS\_T\_BBB\_DATA\_WRITE}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01458}01458 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01459}01459 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01460}01460 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01461}\mbox{\hyperlink{umass_8c_a78f01a04964c348816b852b055676d28}{01461}} \mbox{\hyperlink{umass_8c_ac548d446d43d21edf5ea50d981ddf75f}{umass\_t\_bbb\_status\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01462}01462 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01463}01463         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01464}01464         \textcolor{keyword}{union }ccb *ccb = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01465}01465         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01466}01466         uint32\_t residue;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01467}01467         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01468}01468 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01469}01469         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01470}01470 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01471}01471         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01472}01472         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01473}01473 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01474}01474                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01475}01475 \textcolor{comment}{                 * Do a full reset if there is something wrong with the CSW:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01476}01476 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01477}01477                 sc-\/>\mbox{\hyperlink{structumass__softc_abd2fdfdb35d24c13986dc42960eeccc0}{sc\_status\_try}} = 1;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01478}01478 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01479}01479                 \textcolor{comment}{/* Zero missing parts of the CSW: */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01480}01480 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01481}01481                 \textcolor{keywordflow}{if} (actlen < (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01482}01482                         memset(\&sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}, 0, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01483}01483 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01484}01484                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01485}01485                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, 0, \&sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}, actlen);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01486}01486 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01487}01487                 \mbox{\hyperlink{umass_8c_a0825cea09ef3ea56dbb615b12a733075}{DIF}}(UDMASS\_BBB, umass\_bbb\_dump\_csw(sc, \&sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01488}01488 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01489}01489                 residue = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.dCSWDataResidue);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01490}01490 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01491}01491                 \textcolor{keywordflow}{if} ((!residue) || (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_ad55a5f9825a404b0ae4b55e24c218171}{IGNORE\_RESIDUE}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01492}01492                         residue = (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}} -\/}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01493}01493                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01494}01494                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01495}01495                 \textcolor{keywordflow}{if} (residue > sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01496}01496                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}truncating residue from \%d "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01497}01497                             \textcolor{stringliteral}{"{}to \%d bytes\(\backslash\)n"{}}, residue, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01498}01498                         residue = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01499}01499                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01500}01500                 \textcolor{comment}{/* translate weird command-\/status signatures: */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01501}01501                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a75492ca33f647f612de304d83b6ab717}{WRONG\_CSWSIG}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01502}01502                         uint32\_t temp = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.dCSWSignature);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01503}01503 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01504}01504                         \textcolor{keywordflow}{if} ((temp == \mbox{\hyperlink{umass_8c_ac6475d6b62832d14fc958683e6b35f53}{CSWSIGNATURE\_OLYMPUS\_C1}}) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01505}01505                             (temp == \mbox{\hyperlink{umass_8c_a4907e1fe6f49511970fd6bac4f89388b}{CSWSIGNATURE\_IMAGINATION\_DBX1}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01506}01506                                 \mbox{\hyperlink{usb__endian_8h_a864b3f3abc2ce39bc4c60fadac2a7303}{USETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.dCSWSignature, \mbox{\hyperlink{umass_8c_a6d29dee6ca7f61ee7407eb0c9df8fe0a}{CSWSIGNATURE}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01507}01507                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01508}01508                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01509}01509                 \textcolor{comment}{/* check CSW and handle eventual error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01510}01510                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.dCSWSignature) != \mbox{\hyperlink{umass_8c_a6d29dee6ca7f61ee7407eb0c9df8fe0a}{CSWSIGNATURE}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01511}01511                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}bad CSW signature 0x\%08x != 0x\%08x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01512}01512                             \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.dCSWSignature), \mbox{\hyperlink{umass_8c_a6d29dee6ca7f61ee7407eb0c9df8fe0a}{CSWSIGNATURE}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01513}01513                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01514}01514 \textcolor{comment}{                         * Invalid CSW: Wrong signature or wrong tag might}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01515}01515 \textcolor{comment}{                         * indicate that we lost synchronization. Reset the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01516}01516 \textcolor{comment}{                         * device.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01517}01517 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01518}01518                         \textcolor{keywordflow}{goto} tr\_error;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01519}01519                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.dCSWTag) != \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.dCBWTag)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01520}01520                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}Invalid CSW: tag 0x\%08x should be "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01521}01521                             \textcolor{stringliteral}{"{}0x\%08x\(\backslash\)n"{}}, \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.dCSWTag),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01522}01522                             \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(sc-\/>\mbox{\hyperlink{structumass__softc_aec10c6d5a8a96207671360f05cc396b2}{cbw}}.dCBWTag));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01523}01523                         \textcolor{keywordflow}{goto} tr\_error;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01524}01524                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.bCSWStatus > \mbox{\hyperlink{umass_8c_a05601fcfef35de03cf867dc6c6f5410a}{CSWSTATUS\_PHASE}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01525}01525                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}Invalid CSW: status \%d > \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01526}01526                             sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.bCSWStatus, \mbox{\hyperlink{umass_8c_a05601fcfef35de03cf867dc6c6f5410a}{CSWSTATUS\_PHASE}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01527}01527                         \textcolor{keywordflow}{goto} tr\_error;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01528}01528                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.bCSWStatus == \mbox{\hyperlink{umass_8c_a05601fcfef35de03cf867dc6c6f5410a}{CSWSTATUS\_PHASE}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01529}01529                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}Phase error, residue = "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01530}01530                             \textcolor{stringliteral}{"{}\%d\(\backslash\)n"{}}, residue);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01531}01531                         \textcolor{keywordflow}{goto} tr\_error;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01532}01532                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} > sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01533}01533                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}Buffer overrun \%d > \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01534}01534                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01535}01535                         \textcolor{keywordflow}{goto} tr\_error;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01536}01536                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_acdfc34a155a0973e6fdbc70e12ce897c}{csw}}.bCSWStatus == \mbox{\hyperlink{umass_8c_aee89dc947347ceec52385e1428cdf087}{CSWSTATUS\_FAILED}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01537}01537                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}Command failed, residue = "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01538}01538                             \textcolor{stringliteral}{"{}\%d\(\backslash\)n"{}}, residue);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01539}01539 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01540}01540                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01541}01541 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01542}01542                         sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = \mbox{\hyperlink{umass_8c_aadffbb2c2620889c6daa1a1b3ccd323a}{UMASS\_T\_BBB\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01543}01543 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01544}01544                         (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01545}01545                             (sc, ccb, residue, \mbox{\hyperlink{umass_8c_a3c09eaee077e85e1eaa4aabcd61aca15}{STATUS\_CMD\_FAILED}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01546}01546                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01547}01547                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01548}01548 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01549}01549                         sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = \mbox{\hyperlink{umass_8c_aadffbb2c2620889c6daa1a1b3ccd323a}{UMASS\_T\_BBB\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01550}01550 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01551}01551                         (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01552}01552                             (sc, ccb, residue, \mbox{\hyperlink{umass_8c_a2c06f068c4eac3fff24312e002868fa1}{STATUS\_CMD\_OK}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01553}01553                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01554}01554                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01555}01555 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01556}01556         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01557}01557                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01558}01558                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01559}01559                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01560}01560 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01561}01561         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01562}01562 tr\_error:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01563}01563                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}Failed to read CSW: \%s, try \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01564}01564                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}), sc-\/>\mbox{\hyperlink{structumass__softc_abd2fdfdb35d24c13986dc42960eeccc0}{sc\_status\_try}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01565}01565 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01566}01566                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01567}01567                     (sc-\/>\mbox{\hyperlink{structumass__softc_abd2fdfdb35d24c13986dc42960eeccc0}{sc\_status\_try}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01568}01568                         \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01569}01569                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01570}01570                         sc-\/>\mbox{\hyperlink{structumass__softc_abd2fdfdb35d24c13986dc42960eeccc0}{sc\_status\_try}} = 1;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01571}01571                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_a9e505cb8fe4004266c19b527f283b0ac}{UMASS\_T\_BBB\_DATA\_RD\_CS}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01572}01572                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01573}01573                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01574}01574         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01575}01575 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01576}01576 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01577}01577 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01578}\mbox{\hyperlink{umass_8c_a96c25210a24c4dbbbe595720ddd4cfcf}{01578}} \mbox{\hyperlink{umass_8c_a96c25210a24c4dbbbe595720ddd4cfcf}{umass\_command\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t dir,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01579}01579     \textcolor{keywordtype}{void} *data\_ptr, uint32\_t data\_len,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01580}01580     uint32\_t data\_timeout, \mbox{\hyperlink{umass_8c_ad05c04fd0b3dd85f8a0f87658085fe01}{umass\_callback\_t}} *callback,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01581}01581     \textcolor{keyword}{union} ccb *ccb)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01582}01582 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01583}01583         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ae39af3ab4cdb596f6e473549432caf09}{lun}} = ccb-\/>ccb\_h.target\_lun;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01584}01584 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01585}01585         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01586}01586 \textcolor{comment}{         * NOTE: assumes that "{}sc-\/>sc\_transfer.cmd\_data"{} and}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01587}01587 \textcolor{comment}{         * "{}sc-\/>sc\_transfer.cmd\_len"{} has been properly}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01588}01588 \textcolor{comment}{         * initialized.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01589}01589 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01590}01590 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01591}01591         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} = data\_len ? dir : \mbox{\hyperlink{umass_8c_a665390e734d124195aa8d263d475c73a}{DIR\_NONE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01592}01592         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}} = data\_ptr;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01593}01593         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}} = data\_len;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01594}01594         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} = data\_len;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01595}01595         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a31ba4ff7181d1528f04bd80a402fb2f5}{data\_timeout}} = (data\_timeout + \mbox{\hyperlink{umass_8c_a2dfa91e088fb25608bdc861f7f035ed8}{UMASS\_TIMEOUT}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01596}01596 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01597}01597         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01598}01598         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}} = callback;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01599}01599         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} = ccb;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01600}01600 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01601}01601         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}}]) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01602}01602                 \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}}]);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01603}01603         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01604}01604                 \mbox{\hyperlink{umass_8c_aeb9c6b950df5ae0a330acb14207437bc}{umass\_cancel\_ccb}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01605}01605         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01606}01606 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01607}01607 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01608}01608 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01609}\mbox{\hyperlink{umass_8c_a10782a02944ba80c083cc6ba0b917d6a}{01609}} \mbox{\hyperlink{umass_8c_a10782a02944ba80c083cc6ba0b917d6a}{umass\_bbb\_get\_max\_lun}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01610}01610 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01611}01611         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01612}01612         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01613}01613         uint8\_t buf = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01614}01614 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01615}01615         \textcolor{comment}{/* The Get Max Lun command is a class-\/specific request. */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01616}01616         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_a4f2e0216ffe1d8145cd1385e42c9a707}{UT\_READ\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01617}01617         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{umass_8c_a6950b30cda57ceb3ff2d75caea266f1b}{UR\_BBB\_GET\_MAX\_LUN}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01618}01618         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01619}01619         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[0] = sc-\/>\mbox{\hyperlink{structumass__softc_af2788ddfb984e2f1755be938dd0683a6}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01620}01620         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01621}01621         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01622}01622 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01623}01623         err = \mbox{\hyperlink{usbdi_8h_adf0c9751da27fa2e6a3b52a9bfd5f7d1}{usbd\_do\_request}}(sc-\/>\mbox{\hyperlink{structumass__softc_ae98657d8e8b583761f9d693080f326b6}{sc\_udev}}, NULL, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \&buf);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01624}01624         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01625}01625                 buf = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01626}01626 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01627}01627                 \textcolor{comment}{/* Device doesn't support Get Max Lun request. */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01628}01628                 printf(\textcolor{stringliteral}{"{}\%s: Get Max Lun not supported (\%s)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01629}01629                     sc-\/>\mbox{\hyperlink{structumass__softc_afa861a71b2b0449870d0e1b347a1a450}{sc\_name}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01630}01630         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01631}01631         \textcolor{keywordflow}{return} (buf);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01632}01632 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01633}01633 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01634}01634 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01635}01635 \textcolor{comment}{ * Command/Bulk/Interrupt (CBI) specific functions}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01636}01636 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01637}01637 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01638}01638 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01639}\mbox{\hyperlink{umass_8c_a57b59f4cb01271e56859ee827f9ffb75}{01639}} \mbox{\hyperlink{umass_8c_a57b59f4cb01271e56859ee827f9ffb75}{umass\_cbi\_start\_status}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01640}01640 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01641}01641         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[\mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{UMASS\_T\_CBI\_STATUS}}]) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01642}01642                 \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{UMASS\_T\_CBI\_STATUS}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01643}01643         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01644}01644                 \textcolor{keyword}{union }ccb *ccb = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01645}01645 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01646}01646                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01647}01647 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01648}01648                 sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = \mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{UMASS\_T\_CBI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01649}01649 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01650}01650                 (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01651}01651                     (sc, ccb, (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}} -\/}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01652}01652                     sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}), \mbox{\hyperlink{umass_8c_abaedde3117d8bd850988ae32ebc4cd6f}{STATUS\_CMD\_UNKNOWN}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01653}01653         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01654}01654 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01655}01655 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01656}01656 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01657}\mbox{\hyperlink{umass_8c_a4d3568825562748f8ffb88a84dca078a}{01657}} \mbox{\hyperlink{umass_8c_aa084463c25b4d94f1f047b4c6ccb9030}{umass\_t\_cbi\_reset1\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01658}01658 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01659}01659         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01660}01660         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01661}01661         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01662}01662         uint8\_t buf[\mbox{\hyperlink{umass_8c_ac369c62a68386805c6d4e13371e70b03}{UMASS\_CBI\_DIAGNOSTIC\_CMDLEN}}];}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01663}01663 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01664}01664         uint8\_t i;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01665}01665 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01666}01666         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01667}01667         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01668}01668                 \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_ab95ef0a60706d310877aaf315edcdc97}{UMASS\_T\_CBI\_RESET2}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01669}01669                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01670}01670 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01671}01671         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01672}01672                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01673}01673 \textcolor{comment}{                 * Command Block Reset Protocol}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01674}01674 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01675}01675 \textcolor{comment}{                 * First send a reset request to the device. Then clear}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01676}01676 \textcolor{comment}{                 * any possibly stalled bulk endpoints.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01677}01677 \textcolor{comment}{                 *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01678}01678 \textcolor{comment}{                 * This is done in 3 steps, using 3 transfers:}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01679}01679 \textcolor{comment}{                 * UMASS\_T\_CBI\_RESET1}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01680}01680 \textcolor{comment}{                 * UMASS\_T\_CBI\_RESET2}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01681}01681 \textcolor{comment}{                 * UMASS\_T\_CBI\_RESET3}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01682}01682 \textcolor{comment}{                 * UMASS\_T\_CBI\_RESET4 (only if there is an interrupt endpoint)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01683}01683 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01684}01684 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01685}01685                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_CBI, \textcolor{stringliteral}{"{}CBI reset!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01686}01686 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01687}01687                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01688}01688                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{umass_8c_a6e48f91b4a59177504cc59daabb6c655}{UR\_CBI\_ADSC}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01689}01689                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01690}01690                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[0] = sc-\/>\mbox{\hyperlink{structumass__softc_af2788ddfb984e2f1755be938dd0683a6}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01691}01691                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01692}01692                 \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{umass_8c_ac369c62a68386805c6d4e13371e70b03}{UMASS\_CBI\_DIAGNOSTIC\_CMDLEN}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01693}01693 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01694}01694                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01695}01695 \textcolor{comment}{                 * The 0x1d code is the SEND DIAGNOSTIC command. To}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01696}01696 \textcolor{comment}{                 * distinguish between the two, the last 10 bytes of the CBL}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01697}01697 \textcolor{comment}{                 * is filled with 0xff (section 2.2 of the CBI}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01698}01698 \textcolor{comment}{                 * specification)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01699}01699 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01700}01700                 buf[0] = 0x1d;          \textcolor{comment}{/* Command Block Reset */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01701}01701                 buf[1] = 0x04;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01702}01702 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01703}01703                 \textcolor{keywordflow}{for} (i = 2; i < \mbox{\hyperlink{umass_8c_ac369c62a68386805c6d4e13371e70b03}{UMASS\_CBI\_DIAGNOSTIC\_CMDLEN}}; i++) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01704}01704                         buf[i] = 0xff;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01705}01705                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01706}01706 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01707}01707                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01708}01708                 \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01709}01709                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01710}01710                 \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, buf, \textcolor{keyword}{sizeof}(buf));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01711}01711 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01712}01712                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01713}01713                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 1, \textcolor{keyword}{sizeof}(buf));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01714}01714                 \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer, 2);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01715}01715                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01716}01716                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01717}01717 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01718}01718         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01719}01719                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01720}01720                         \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01721}01721                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01722}01722                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_ab95ef0a60706d310877aaf315edcdc97}{UMASS\_T\_CBI\_RESET2}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01723}01723                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01724}01724         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01725}01725 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01726}01726 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01727}01727 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01728}\mbox{\hyperlink{umass_8c_a1a34466518553d7e6f844bf3a7893841}{01728}} \mbox{\hyperlink{umass_8c_a3996889e310eb3daa1c9f2dedf46d955}{umass\_t\_cbi\_reset2\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01729}01729 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01730}01730         \mbox{\hyperlink{umass_8c_a04aabc728a1b5dcc0dabba3fecb880da}{umass\_t\_cbi\_data\_clear\_stall\_callback}}(xfer, \mbox{\hyperlink{umass_8c_aa43a85af5bfd73457d24d5d319c468e6}{UMASS\_T\_CBI\_RESET3}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01731}01731             \mbox{\hyperlink{umass_8c_adb196dd0010f4e1f26f7ec0081756d14}{UMASS\_T\_CBI\_DATA\_READ}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01732}01732 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01733}01733 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01734}01734 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01735}\mbox{\hyperlink{umass_8c_aa2ac15a0645d54312066c544cc1d21df}{01735}} \mbox{\hyperlink{umass_8c_a9e306ed1dfe99a3f59614d353970b4ec}{umass\_t\_cbi\_reset3\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01736}01736 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01737}01737         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01738}01738 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01739}01739         \mbox{\hyperlink{umass_8c_a04aabc728a1b5dcc0dabba3fecb880da}{umass\_t\_cbi\_data\_clear\_stall\_callback}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01740}01740             (xfer, (sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[\mbox{\hyperlink{umass_8c_a650ab8f293b106f3e60096bd17ccae47}{UMASS\_T\_CBI\_RESET4}}] \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01741}01741             sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[\mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{UMASS\_T\_CBI\_STATUS}}]) ?}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01742}01742             \mbox{\hyperlink{umass_8c_a650ab8f293b106f3e60096bd17ccae47}{UMASS\_T\_CBI\_RESET4}} : \mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{UMASS\_T\_CBI\_COMMAND}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01743}01743             \mbox{\hyperlink{umass_8c_a3041249aac35eae7fd2d8601e207b1ff}{UMASS\_T\_CBI\_DATA\_WRITE}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01744}01744 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01745}01745 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01746}01746 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01747}\mbox{\hyperlink{umass_8c_a30d31d2abf77f185e01ba4ead3fafe35}{01747}} \mbox{\hyperlink{umass_8c_aa78a857cb4a4fb4e019e0746b1c84218}{umass\_t\_cbi\_reset4\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01748}01748 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01749}01749         \mbox{\hyperlink{umass_8c_a04aabc728a1b5dcc0dabba3fecb880da}{umass\_t\_cbi\_data\_clear\_stall\_callback}}(xfer, \mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{UMASS\_T\_CBI\_COMMAND}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01750}01750             \mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{UMASS\_T\_CBI\_STATUS}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01751}01751 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01752}01752 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01753}01753 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01754}\mbox{\hyperlink{umass_8c_a04aabc728a1b5dcc0dabba3fecb880da}{01754}} \mbox{\hyperlink{umass_8c_a04aabc728a1b5dcc0dabba3fecb880da}{umass\_t\_cbi\_data\_clear\_stall\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01755}01755     uint8\_t next\_xfer, uint8\_t stall\_xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01756}01756 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01757}01757         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01758}01758 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01759}01759         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01760}01760         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01761}01761 tr\_transferred:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01762}01762                 \textcolor{keywordflow}{if} (next\_xfer == \mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{UMASS\_T\_CBI\_STATUS}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01763}01763                         \mbox{\hyperlink{umass_8c_a57b59f4cb01271e56859ee827f9ffb75}{umass\_cbi\_start\_status}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01764}01764                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01765}01765                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, next\_xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01766}01766                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01767}01767                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01768}01768 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01769}01769         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01770}01770                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8c_a4088ac29158c7fdb2c7b466ca3473ab9}{usbd\_clear\_stall\_callback}}(xfer, sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}[stall\_xfer])) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01771}01771                         \textcolor{keywordflow}{goto} tr\_transferred;    \textcolor{comment}{/* should not happen */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01772}01772                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01773}01773                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01774}01774 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01775}01775         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01776}01776                 \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01777}01777                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01778}01778         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01779}01779 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01780}01780 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01781}01781 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01782}\mbox{\hyperlink{umass_8c_a2c531bb461a18764350625cee5463589}{01782}} \mbox{\hyperlink{umass_8c_a13c32ace56a336014c018aa957a8fc3f}{umass\_t\_cbi\_command\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01783}01783 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01784}01784         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01785}01785         \textcolor{keyword}{union }ccb *ccb = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01786}01786         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01787}01787         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01788}01788 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01789}01789         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01790}01790         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01791}01791 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01792}01792                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} == \mbox{\hyperlink{umass_8c_a665390e734d124195aa8d263d475c73a}{DIR\_NONE}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01793}01793                         \mbox{\hyperlink{umass_8c_a57b59f4cb01271e56859ee827f9ffb75}{umass\_cbi\_start\_status}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01794}01794                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01795}01795                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01796}01796                             (sc, (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} == \mbox{\hyperlink{umass_8c_adc4b177c894d6bf0c0065c0e8c6a31df}{DIR\_IN}}) ?}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01797}01797                             \mbox{\hyperlink{umass_8c_adb196dd0010f4e1f26f7ec0081756d14}{UMASS\_T\_CBI\_DATA\_READ}} : \mbox{\hyperlink{umass_8c_a3041249aac35eae7fd2d8601e207b1ff}{UMASS\_T\_CBI\_DATA\_WRITE}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01798}01798                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01799}01799                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01800}01800 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01801}01801         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01802}01802 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01803}01803                 \textcolor{keywordflow}{if} (ccb) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01804}01804                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01805}01805 \textcolor{comment}{                         * do a CBI transfer with cmd\_len bytes from}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01806}01806 \textcolor{comment}{                         * cmd\_data, possibly a data phase of data\_len}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01807}01807 \textcolor{comment}{                         * bytes from/to the device and finally a status}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01808}01808 \textcolor{comment}{                         * read phase.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01809}01809 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01810}01810 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01811}01811                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01812}01812                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{umass_8c_a6e48f91b4a59177504cc59daabb6c655}{UR\_CBI\_ADSC}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01813}01813                         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01814}01814                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[0] = sc-\/>\mbox{\hyperlink{structumass__softc_af2788ddfb984e2f1755be938dd0683a6}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01815}01815                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01816}01816                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength[0] = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01817}01817                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength[1] = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01818}01818 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01819}01819                         pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01820}01820                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01821}01821                         pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01822}01822                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01823}01823                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01824}01824 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01825}01825                         \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01826}01826                         \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 1, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01827}01827                         \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01828}01828                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}} ? 2 : 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01829}01829 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01830}01830                         \mbox{\hyperlink{umass_8c_a0825cea09ef3ea56dbb615b12a733075}{DIF}}(UDMASS\_CBI,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01831}01831                             umass\_cbi\_dump\_cmd(sc,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01832}01832                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01833}01833                             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01834}01834 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01835}01835                         \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01836}01836                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01837}01837                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01838}01838 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01839}01839         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01840}01840                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01841}01841 \textcolor{comment}{                 * STALL on the control pipe can be result of the command error.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01842}01842 \textcolor{comment}{                 * Attempt to clear this STALL same as for bulk pipe also}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01843}01843 \textcolor{comment}{                 * results in command completion interrupt, but ASC/ASCQ there}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01844}01844 \textcolor{comment}{                 * look like not always valid, so don't bother about it.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01845}01845 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01846}01846                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}}) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01847}01847                     (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}} == \&\mbox{\hyperlink{umass_8c_af0b2c1f4d76cf3b5760a5ebecdeb97f9}{umass\_cam\_cb}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01848}01848                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01849}01849                         (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01850}01850                             (sc, ccb, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01851}01851                             \mbox{\hyperlink{umass_8c_abaedde3117d8bd850988ae32ebc4cd6f}{STATUS\_CMD\_UNKNOWN}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01852}01852                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01853}01853                         \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01854}01854                         \textcolor{comment}{/* skip reset */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01855}01855                         sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = \mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{UMASS\_T\_CBI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01856}01856                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01857}01857                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01858}01858         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01859}01859 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01860}01860 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01861}01861 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01862}\mbox{\hyperlink{umass_8c_ae46451c94aa8aece3b22d4fd55c39869}{01862}} \mbox{\hyperlink{umass_8c_a4e391180479d73668eca570a57cb4ba4}{umass\_t\_cbi\_data\_read\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01863}01863 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01864}01864         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01865}01865         uint32\_t max\_bulk = \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01866}01866         \textcolor{keywordtype}{int} \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, sumlen;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01867}01867 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01868}01868         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, \&sumlen, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01869}01869 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01870}01870         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01871}01871         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01872}01872                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} -\/= \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01873}01873                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}} += \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01874}01874                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} += \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01875}01875 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01876}01876                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} < sumlen) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01877}01877                         \textcolor{comment}{/* short transfer */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01878}01878                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01879}01879                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01880}01880         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01881}01881                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_CBI, \textcolor{stringliteral}{"{}max\_bulk=\%d, data\_rem=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01882}01882                     max\_bulk, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01883}01883 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01884}01884                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} == 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01885}01885                         \mbox{\hyperlink{umass_8c_a57b59f4cb01271e56859ee827f9ffb75}{umass\_cbi\_start\_status}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01886}01886                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01887}01887                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01888}01888                 \textcolor{keywordflow}{if} (max\_bulk > sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01889}01889                         max\_bulk = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01890}01890                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01891}01891                 \mbox{\hyperlink{usb__transfer_8c_a014ff29f7e1e09061a93f6179a904bba}{usbd\_xfer\_set\_timeout}}(xfer, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a31ba4ff7181d1528f04bd80a402fb2f5}{data\_timeout}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01892}01892 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01893}01893                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, 0, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01894}01894                     max\_bulk);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01895}01895 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01896}01896                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01897}01897                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01898}01898 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01899}01899         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01900}01900                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01901}01901                     (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}} != \&\mbox{\hyperlink{umass_8c_af0b2c1f4d76cf3b5760a5ebecdeb97f9}{umass\_cam\_cb}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01902}01902                         \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01903}01903                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01904}01904                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_a5d3047e254b63401cef270eaedbb957d}{UMASS\_T\_CBI\_DATA\_RD\_CS}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01905}01905                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01906}01906                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01907}01907         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01908}01908 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01909}01909 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01910}01910 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01911}\mbox{\hyperlink{umass_8c_a895dfa073d0baaed839d742ab87eeb9d}{01911}} \mbox{\hyperlink{umass_8c_adb742f551331ea66868919c48e359d1c}{umass\_t\_cbi\_data\_rd\_cs\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01912}01912 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01913}01913         \mbox{\hyperlink{umass_8c_a04aabc728a1b5dcc0dabba3fecb880da}{umass\_t\_cbi\_data\_clear\_stall\_callback}}(xfer, \mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{UMASS\_T\_CBI\_STATUS}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01914}01914             \mbox{\hyperlink{umass_8c_adb196dd0010f4e1f26f7ec0081756d14}{UMASS\_T\_CBI\_DATA\_READ}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01915}01915 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01916}01916 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01917}01917 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01918}\mbox{\hyperlink{umass_8c_aa63839ae95ef03922d0e3e27e0aa4ea9}{01918}} \mbox{\hyperlink{umass_8c_a48bc0eefc8d251e820b11a3b2bb4e263}{umass\_t\_cbi\_data\_write\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01919}01919 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01920}01920         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01921}01921         uint32\_t max\_bulk = \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01922}01922         \textcolor{keywordtype}{int} \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, sumlen;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01923}01923 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01924}01924         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}}, \&sumlen, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01925}01925 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01926}01926         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01927}01927         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01928}01928                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} -\/= \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01929}01929                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}} += \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01930}01930                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} += \mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01931}01931 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01932}01932                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}} < sumlen) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01933}01933                         \textcolor{comment}{/* short transfer */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01934}01934                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01935}01935                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01936}01936         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01937}01937                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_CBI, \textcolor{stringliteral}{"{}max\_bulk=\%d, data\_rem=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01938}01938                     max\_bulk, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01939}01939 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01940}01940                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}} == 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01941}01941                         \mbox{\hyperlink{umass_8c_a57b59f4cb01271e56859ee827f9ffb75}{umass\_cbi\_start\_status}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01942}01942                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01943}01943                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01944}01944                 \textcolor{keywordflow}{if} (max\_bulk > sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01945}01945                         max\_bulk = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_ab76aa524290e1c64c60f37fe4a6770c4}{data\_rem}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01946}01946                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01947}01947                 \mbox{\hyperlink{usb__transfer_8c_a014ff29f7e1e09061a93f6179a904bba}{usbd\_xfer\_set\_timeout}}(xfer, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a31ba4ff7181d1528f04bd80a402fb2f5}{data\_timeout}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01948}01948 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01949}01949                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, 0, sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01950}01950                     max\_bulk);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01951}01951 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01952}01952                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01953}01953                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01954}01954 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01955}01955         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01956}01956                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01957}01957                     (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}} != \&\mbox{\hyperlink{umass_8c_af0b2c1f4d76cf3b5760a5ebecdeb97f9}{umass\_cam\_cb}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01958}01958                         \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01959}01959                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01960}01960                         \mbox{\hyperlink{umass_8c_a6de29ecf8c188abb89c57406d07648c8}{umass\_transfer\_start}}(sc, \mbox{\hyperlink{umass_8c_ae46c543e7e0ae600e34f10924b1f5320}{UMASS\_T\_CBI\_DATA\_WR\_CS}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01961}01961                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01962}01962                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01963}01963         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01964}01964 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01965}01965 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01966}01966 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01967}\mbox{\hyperlink{umass_8c_a61a776048269cfa94ccb509481521b8c}{01967}} \mbox{\hyperlink{umass_8c_a6954bd847ad7661d3493e3fff9a3862c}{umass\_t\_cbi\_data\_wr\_cs\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01968}01968 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01969}01969         \mbox{\hyperlink{umass_8c_a04aabc728a1b5dcc0dabba3fecb880da}{umass\_t\_cbi\_data\_clear\_stall\_callback}}(xfer, \mbox{\hyperlink{umass_8c_a5259b3442d9b8f4abe617a1aee538cde}{UMASS\_T\_CBI\_STATUS}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01970}01970             \mbox{\hyperlink{umass_8c_a3041249aac35eae7fd2d8601e207b1ff}{UMASS\_T\_CBI\_DATA\_WRITE}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01971}01971 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01972}01972 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01973}01973 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01974}\mbox{\hyperlink{umass_8c_a51a071d106c3b47b4984d4a169c90a13}{01974}} \mbox{\hyperlink{umass_8c_a546729a0836d1d909770ca42e337a8d7}{umass\_t\_cbi\_status\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01975}01975 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01976}01976         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01977}01977         \textcolor{keyword}{union }ccb *ccb = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01978}01978         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01979}01979         uint32\_t residue;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01980}01980         uint8\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01981}01981         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01982}01982 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01983}01983         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01984}01984 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01985}01985         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01986}01986         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01987}01987 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01988}01988                 \textcolor{keywordflow}{if} (actlen < (\textcolor{keywordtype}{int})\textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01989}01989                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01990}01990                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01991}01991                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01992}01992                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, 0, \&sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01993}01993 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01994}01994                 residue = (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}} -\/}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01995}01995                     sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a210e222ec9d7f7fc301728b7df008b54}{actlen}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01996}01996 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01997}01997                 \textcolor{comment}{/* dissect the information in the buffer */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01998}01998 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l01999}01999                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a01fd418bd74cac030a14f91ac70a9209}{sc\_proto}} \& \mbox{\hyperlink{umass_8c_a1fd2a80dec7b5e7e7df0a77f6eb71127}{UMASS\_PROTO\_UFI}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02000}02000                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02001}02001 \textcolor{comment}{                         * Section 3.4.3.1.3 specifies that the UFI command}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02002}02002 \textcolor{comment}{                         * protocol returns an ASC and ASCQ in the interrupt}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02003}02003 \textcolor{comment}{                         * data block.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02004}02004 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02005}02005 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02006}02006                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_CBI, \textcolor{stringliteral}{"{}UFI CCI, ASC = 0x\%02x, "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02007}02007                             \textcolor{stringliteral}{"{}ASCQ = 0x\%02x\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}.ufi.asc,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02008}02008                             sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}.ufi.ascq);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02009}02009 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02010}02010                         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = (((sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}.ufi.asc == 0) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02011}02011                             (sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}.ufi.ascq == 0)) ?}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02012}02012                             \mbox{\hyperlink{umass_8c_a2c06f068c4eac3fff24312e002868fa1}{STATUS\_CMD\_OK}} : \mbox{\hyperlink{umass_8c_a3c09eaee077e85e1eaa4aabcd61aca15}{STATUS\_CMD\_FAILED}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02013}02013 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02014}02014                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02015}02015 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02016}02016                         sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = \mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{UMASS\_T\_CBI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02017}02017 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02018}02018                         (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02019}02019                             (sc, ccb, residue, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02020}02020 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02021}02021                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02022}02022 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02023}02023                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02024}02024                         \textcolor{comment}{/* Command Interrupt Data Block */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02025}02025 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02026}02026                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_CBI, \textcolor{stringliteral}{"{}type=0x\%02x, value=0x\%02x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02027}02027                             sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}.common.type, sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}.common.value);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02028}02028 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02029}02029                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}.common.type == \mbox{\hyperlink{umass_8c_a6e90738697fb0ea9de27dc3a021074a2}{IDB\_TYPE\_CCI}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02030}02030                                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = (sc-\/>\mbox{\hyperlink{structumass__softc_a476a3609912822fa2aa9244ea90379a3}{sbl}}.common.value \& \mbox{\hyperlink{umass_8c_a0c521f74f10f11289bbb9d58993e9f5b}{IDB\_VALUE\_STATUS\_MASK}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02031}02031 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02032}02032                                 \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = ((\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} == \mbox{\hyperlink{umass_8c_af331a46ec04eb97b1529799235690913}{IDB\_VALUE\_PASS}}) ? \mbox{\hyperlink{umass_8c_a2c06f068c4eac3fff24312e002868fa1}{STATUS\_CMD\_OK}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02033}02033                                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} == \mbox{\hyperlink{umass_8c_a80d3bf01d603816aca1b45edcd013b7d}{IDB\_VALUE\_FAIL}}) ? \mbox{\hyperlink{umass_8c_a3c09eaee077e85e1eaa4aabcd61aca15}{STATUS\_CMD\_FAILED}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02034}02034                                     (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} == \mbox{\hyperlink{umass_8c_ae5748e694cb01433974301bab5624904}{IDB\_VALUE\_PERSISTENT}}) ? \mbox{\hyperlink{umass_8c_a3c09eaee077e85e1eaa4aabcd61aca15}{STATUS\_CMD\_FAILED}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02035}02035                                     \mbox{\hyperlink{umass_8c_af1cf6a1fbb450ee49fe30cd36d83b862}{STATUS\_WIRE\_FAILED}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02036}02036 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02037}02037                                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02038}02038 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02039}02039                                 sc-\/>\mbox{\hyperlink{structumass__softc_aa1be9c4e78b019933e160b4d50d3d16e}{sc\_last\_xfer\_index}} = \mbox{\hyperlink{umass_8c_ae8842d19a8d81035361850b0d0a130a5}{UMASS\_T\_CBI\_COMMAND}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02040}02040 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02041}02041                                 (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a87db9853e73113e84cbffd7df4f95754}{callback}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02042}02042                                     (sc, ccb, residue, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02043}02043 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02044}02044                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02045}02045                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02046}02046                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02047}02047 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02048}02048                 \textcolor{comment}{/* fallthrough */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02049}02049 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02050}02050         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02051}02051 tr\_setup:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02052}02052                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02053}02053                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02054}02054                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02055}02055 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02056}02056         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02057}02057                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_CBI, \textcolor{stringliteral}{"{}Failed to read CSW: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02058}02058                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02059}02059                 \mbox{\hyperlink{umass_8c_a7ac4f14b3dac554a978d7de0d86b26d6}{umass\_tr\_error}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02060}02060                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02061}02061         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02062}02062 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02063}02063 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02064}02064 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02065}02065 \textcolor{comment}{ * CAM specific functions (used by SCSI, UFI, 8070i (ATAPI))}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02066}02066 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02067}02067 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02068}02068 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02069}\mbox{\hyperlink{umass_8c_add2eba527c287d51f00b0ae13e1ed52a}{02069}} \mbox{\hyperlink{umass_8c_add2eba527c287d51f00b0ae13e1ed52a}{umass\_cam\_attach\_sim}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02070}02070 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02071}02071         \textcolor{keyword}{struct }cam\_devq *devq;          \textcolor{comment}{/* Per device Queue */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02072}02072         cam\_status \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02073}02073 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02074}02074         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02075}02075 \textcolor{comment}{         * A HBA is attached to the CAM layer.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02076}02076 \textcolor{comment}{         *}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02077}02077 \textcolor{comment}{         * The CAM layer will then after a while start probing for devices on}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02078}02078 \textcolor{comment}{         * the bus. The number of SIMs is limited to one.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02079}02079 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02080}02080 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02081}02081         devq = cam\_simq\_alloc(1 \textcolor{comment}{/* maximum openings */} );}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02082}02082         \textcolor{keywordflow}{if} (devq == NULL) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02083}02083                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02084}02084         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02085}02085         sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}} = cam\_sim\_alloc}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02086}02086             (\&\mbox{\hyperlink{umass_8c_a199617ee8728b4e11ee0f9fc186fdd5a}{umass\_cam\_action}}, \&\mbox{\hyperlink{umass_8c_a76c15b06f306ac00fb26810758185551}{umass\_cam\_poll}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02087}02087             \mbox{\hyperlink{umass_8c_a5725b09a7ddc0f4e1378de63c03d3f22}{DEVNAME\_SIM}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02088}02088             sc \textcolor{comment}{/* priv */} ,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02089}02089             sc-\/>\mbox{\hyperlink{structumass__softc_abecd2a7bb5b8731abb484164a65d9955}{sc\_unit}} \textcolor{comment}{/* unit number */} ,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02090}02090             \&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}} \textcolor{comment}{/* mutex */} ,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02091}02091             1 \textcolor{comment}{/* maximum device openings */} ,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02092}02092             0 \textcolor{comment}{/* maximum tagged device openings */} ,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02093}02093             devq);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02094}02094 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02095}02095         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02096}02096                 cam\_simq\_free(devq);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02097}02097                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02098}02098         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02099}02099 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02100}02100         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02101}02101         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = xpt\_bus\_register(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}, sc-\/>\mbox{\hyperlink{structumass__softc_a4cea6936084a41d1a6acc5d99e837720}{sc\_dev}}, sc-\/>\mbox{\hyperlink{structumass__softc_abecd2a7bb5b8731abb484164a65d9955}{sc\_unit}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02102}02102         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} != CAM\_SUCCESS) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02103}02103                 cam\_sim\_free(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}, \textcolor{comment}{/* free\_devq */} TRUE);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02104}02104                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02105}02105                 printf(\textcolor{stringliteral}{"{}\%s: xpt\_bus\_register failed with status \%\#x\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02106}02106                     \_\_func\_\_, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02107}02107                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02108}02108         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02109}02109         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structumass__softc_a34d12296a71a8286ed9c8a44adf9a60f}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02110}02110 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02111}02111         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02112}02112 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02113}02113 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02114}02114 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02115}\mbox{\hyperlink{umass_8c_a4ee5d4945bef5449e2601d0199eac30f}{02115}} \mbox{\hyperlink{umass_8c_a4ee5d4945bef5449e2601d0199eac30f}{umass\_cam\_attach}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02116}02116 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02117}02117 \textcolor{preprocessor}{\#ifndef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02118}02118         \textcolor{keywordflow}{if} (bootverbose)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02119}02119 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02120}02120                 printf(\textcolor{stringliteral}{"{}\%s:\%d:\%d: Attached to scbus\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02121}02121                     sc-\/>\mbox{\hyperlink{structumass__softc_afa861a71b2b0449870d0e1b347a1a450}{sc\_name}}, cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02122}02122                     sc-\/>\mbox{\hyperlink{structumass__softc_abecd2a7bb5b8731abb484164a65d9955}{sc\_unit}}, cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02123}02123 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02124}02124 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02125}02125 \textcolor{comment}{/* umass\_cam\_detach}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02126}02126 \textcolor{comment}{ *      detach from the CAM layer}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02127}02127 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02128}02128 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02129}02129 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02130}\mbox{\hyperlink{umass_8c_a89136e12d615a897f05822c8f11cfcdb}{02130}} \mbox{\hyperlink{umass_8c_a89136e12d615a897f05822c8f11cfcdb}{umass\_cam\_detach\_sim}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02131}02131 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02132}02132         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02133}02133 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02134}02134         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02135}02135                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = xpt\_bus\_deregister(cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02136}02136                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02137}02137                         \textcolor{comment}{/* accessing the softc is not possible after this */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02138}02138                         sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}-\/>softc = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02139}02139                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%s: \%s:\%d:\%d caling "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02140}02140                             \textcolor{stringliteral}{"{}cam\_sim\_free sim \%p refc \%u mtx \%p\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02141}02141                             \_\_func\_\_, sc-\/>\mbox{\hyperlink{structumass__softc_afa861a71b2b0449870d0e1b347a1a450}{sc\_name}}, cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02142}02142                             sc-\/>\mbox{\hyperlink{structumass__softc_abecd2a7bb5b8731abb484164a65d9955}{sc\_unit}}, sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02143}02143                             sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}-\/>refcount, sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}-\/>mtx);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02144}02144                         cam\_sim\_free(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}, \textcolor{comment}{/* free\_devq */} TRUE);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02145}02145                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02146}02146                         panic(\textcolor{stringliteral}{"{}\%s: \%s: CAM layer is busy: errno \%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02147}02147                             \_\_func\_\_, sc-\/>\mbox{\hyperlink{structumass__softc_afa861a71b2b0449870d0e1b347a1a450}{sc\_name}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02148}02148                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02149}02149                 sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}} = NULL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02150}02150         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02151}02151 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02152}02152 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02153}02153 \textcolor{comment}{/* umass\_cam\_action}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02154}02154 \textcolor{comment}{ *      CAM requests for action come through here}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02155}02155 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02156}02156 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02157}02157 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02158}\mbox{\hyperlink{umass_8c_a199617ee8728b4e11ee0f9fc186fdd5a}{02158}} \mbox{\hyperlink{umass_8c_a199617ee8728b4e11ee0f9fc186fdd5a}{umass\_cam\_action}}(\textcolor{keyword}{struct} cam\_sim *sim, \textcolor{keyword}{union} ccb *ccb)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02159}02159 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02160}02160         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = cam\_sim\_softc(sim);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02161}02161 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02162}02162         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02163}02163                 \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.status = CAM\_SEL\_TIMEOUT;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02164}02164                 xpt\_done(\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02165}02165                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02166}02166         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02167}02167 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02168}02168         \textcolor{comment}{/* Perform the requested action */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02169}02169         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.func\_code) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02170}02170         \textcolor{keywordflow}{case} XPT\_SCSI\_IO:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02171}02171                 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02172}02172                         uint8\_t *cmd;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02173}02173                         uint8\_t \mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02174}02174 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02175}02175                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.ccb\_h.flags \& CAM\_CDB\_POINTER) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02176}02176                                 cmd = (uint8\_t *)(\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.cdb\_io.cdb\_ptr);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02177}02177                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02178}02178                                 cmd = (uint8\_t *)(\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.cdb\_io.cdb\_bytes);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02179}02179                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02180}02180 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02181}02181                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%d:\%d:\%jx:XPT\_SCSI\_IO: "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02182}02182                             \textcolor{stringliteral}{"{}cmd: 0x\%02x, flags: 0x\%02x, "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02183}02183                             \textcolor{stringliteral}{"{}\%db cmd/\%db data/\%db sense\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02184}02184                             cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}), \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02185}02185                             (uintmax\_t)\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.target\_lun, cmd[0],}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02186}02186                             \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.flags \& CAM\_DIR\_MASK, \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.cdb\_len,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02187}02187                             \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.dxfer\_len, \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.sense\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02188}02188 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02189}02189                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02190}02190                                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%d:\%d:\%jx:XPT\_SCSI\_IO: "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02191}02191                                     \textcolor{stringliteral}{"{}I/O in progress, deferring\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02192}02192                                     cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}), \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02193}02193                                     (uintmax\_t)\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.target\_lun);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02194}02194                                 \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.status = CAM\_SCSI\_BUSY;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02195}02195                                 xpt\_done(\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02196}02196                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02197}02197                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02198}02198                         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.flags \& CAM\_DIR\_MASK) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02199}02199                         \textcolor{keywordflow}{case} CAM\_DIR\_IN:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02200}02200                                 \mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} = \mbox{\hyperlink{umass_8c_adc4b177c894d6bf0c0065c0e8c6a31df}{DIR\_IN}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02201}02201                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02202}02202                         \textcolor{keywordflow}{case} CAM\_DIR\_OUT:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02203}02203                                 \mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} = \mbox{\hyperlink{umass_8c_a91459a263a21d175edba77e9aed856e4}{DIR\_OUT}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02204}02204                                 \mbox{\hyperlink{umass_8c_a0825cea09ef3ea56dbb615b12a733075}{DIF}}(UDMASS\_SCSI,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02205}02205                                     umass\_dump\_buffer(sc, \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.data\_ptr,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02206}02206                                     \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.dxfer\_len, 48));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02207}02207                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02208}02208                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02209}02209                                 \mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}} = \mbox{\hyperlink{umass_8c_a665390e734d124195aa8d263d475c73a}{DIR\_NONE}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02210}02210                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02211}02211 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02212}02212                         \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.status = CAM\_REQ\_INPROG | CAM\_SIM\_QUEUED;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02213}02213 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02214}02214                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02215}02215 \textcolor{comment}{                         * sc-\/>sc\_transform will convert the command to the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02216}02216 \textcolor{comment}{                         * command format needed by the specific command set}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02217}02217 \textcolor{comment}{                         * and return the converted command in}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02218}02218 \textcolor{comment}{                         * "{}sc-\/>sc\_transfer.cmd\_data"{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02219}02219 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02220}02220                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{umass_8c_a8d9733b1a2da33a84e25f0746d7e0337}{umass\_std\_transform}}(sc, \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}, cmd, \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.cdb\_len)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02221}02221                                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] == INQUIRY) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02222}02222                                         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *pserial;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02223}02223 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02224}02224                                         pserial = \mbox{\hyperlink{usb__device_8c_a5a41e5bc08f275438c7eb66d9883cd93}{usb\_get\_serial}}(sc-\/>\mbox{\hyperlink{structumass__softc_ae98657d8e8b583761f9d693080f326b6}{sc\_udev}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02225}02225 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02226}02226                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02227}02227 \textcolor{comment}{                                         * Umass devices don't generally report their serial numbers}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02228}02228 \textcolor{comment}{                                         * in the usual SCSI way.  Emulate it here.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02229}02229 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02230}02230                                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[1] \& SI\_EVPD) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02231}02231                                             (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[2] == SVPD\_UNIT\_SERIAL\_NUMBER) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02232}02232                                             (pserial[0] != \textcolor{charliteral}{'\(\backslash\)0'})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02233}02233                                                 \textcolor{keyword}{struct }scsi\_vpd\_unit\_serial\_number *vpd\_serial;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02234}02234 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02235}02235                                                 vpd\_serial = (\textcolor{keyword}{struct }scsi\_vpd\_unit\_serial\_number *)ccb-\/>csio.data\_ptr;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02236}02236                                                 vpd\_serial-\/>length = strlen(pserial);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02237}02237                                                 \textcolor{keywordflow}{if} (vpd\_serial-\/>length > \textcolor{keyword}{sizeof}(vpd\_serial-\/>serial\_num))}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02238}02238                                                         vpd\_serial-\/>length = \textcolor{keyword}{sizeof}(vpd\_serial-\/>serial\_num);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02239}02239                                                 memcpy(vpd\_serial-\/>serial\_num, pserial, vpd\_serial-\/>length);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02240}02240                                                 ccb-\/>csio.scsi\_status = SCSI\_STATUS\_OK;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02241}02241                                                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02242}02242                                                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02243}02243                                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02244}02244                                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02245}02245 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02246}02246                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02247}02247 \textcolor{comment}{                                         * Handle EVPD inquiry for broken devices first}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02248}02248 \textcolor{comment}{                                         * NO\_INQUIRY also implies NO\_INQUIRY\_EVPD}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02249}02249 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02250}02250                                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& (\mbox{\hyperlink{umass_8c_a9e87418d5a77550205267696057c35f9}{NO\_INQUIRY\_EVPD}} | \mbox{\hyperlink{umass_8c_a58bb10caeec9dc1b1b2055351a67621c}{NO\_INQUIRY}})) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02251}02251                                             (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[1] \& SI\_EVPD)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02252}02252                                                 scsi\_set\_sense\_data(\&ccb-\/>csio.sense\_data,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02253}02253                                                         \textcolor{comment}{/*sense\_format*/} SSD\_TYPE\_NONE,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02254}02254                                                         \textcolor{comment}{/*current\_error*/} 1,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02255}02255                                                         \textcolor{comment}{/*sense\_key*/} SSD\_KEY\_ILLEGAL\_REQUEST,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02256}02256                                                         \textcolor{comment}{/*asc*/} 0x24,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02257}02257                                                         \textcolor{comment}{/*ascq*/} 0x00,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02258}02258                                                         \textcolor{comment}{/*extra args*/} SSD\_ELEM\_NONE);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02259}02259                                                 ccb-\/>csio.scsi\_status = SCSI\_STATUS\_CHECK\_COND;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02260}02260                                                 ccb-\/>ccb\_h.status =}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02261}02261                                                     CAM\_SCSI\_STATUS\_ERROR |}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02262}02262                                                     CAM\_AUTOSNS\_VALID |}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02263}02263                                                     CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02264}02264                                                 xpt\_freeze\_devq(ccb-\/>ccb\_h.path, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02265}02265                                                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02266}02266                                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02267}02267                                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02268}02268                                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02269}02269 \textcolor{comment}{                                         * Return fake inquiry data for}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02270}02270 \textcolor{comment}{                                         * broken devices}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02271}02271 \textcolor{comment}{                                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02272}02272                                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a58bb10caeec9dc1b1b2055351a67621c}{NO\_INQUIRY}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02273}02273                                                 memcpy(ccb-\/>csio.data\_ptr, \&\mbox{\hyperlink{umass_8c_a9c7c5e3b4f4fdbb93312055fcb043f85}{fake\_inq\_data}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02274}02274                                                     \textcolor{keyword}{sizeof}(\mbox{\hyperlink{umass_8c_a9c7c5e3b4f4fdbb93312055fcb043f85}{fake\_inq\_data}}));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02275}02275                                                 ccb-\/>csio.scsi\_status = SCSI\_STATUS\_OK;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02276}02276                                                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02277}02277                                                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02278}02278                                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02279}02279                                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02280}02280                                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a6d55c4c3ab565b328cd83360ff5ee864}{FORCE\_SHORT\_INQUIRY}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02281}02281                                                 ccb-\/>csio.dxfer\_len = SHORT\_INQUIRY\_LENGTH;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02282}02282                                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02283}02283                                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] == PREVENT\_ALLOW) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02284}02284                                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a80fda3839b9033ad468c2c44dea89fcc}{NO\_PREVENT\_ALLOW}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02285}02285                                                 ccb-\/>csio.scsi\_status = SCSI\_STATUS\_OK;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02286}02286                                                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02287}02287                                                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02288}02288                                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02289}02289                                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02290}02290                                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] == SYNCHRONIZE\_CACHE) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02291}02291                                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a6359754d8636ae94d3a6e5b09b7a505c}{NO\_SYNCHRONIZE\_CACHE}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02292}02292                                                 ccb-\/>csio.scsi\_status = SCSI\_STATUS\_OK;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02293}02293                                                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02294}02294                                                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02295}02295                                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02296}02296                                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02297}02297                                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] == START\_STOP\_UNIT) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02298}02298                                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a8cbb85137b29a210adb87b273c061b28}{NO\_START\_STOP}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02299}02299                                                 ccb-\/>csio.scsi\_status = SCSI\_STATUS\_OK;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02300}02300                                                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02301}02301                                                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02302}02302                                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02303}02303                                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02304}02304                                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02305}02305                                 \mbox{\hyperlink{umass_8c_a96c25210a24c4dbbbe595720ddd4cfcf}{umass\_command\_start}}(sc, dir, ccb-\/>csio.\mbox{\hyperlink{structumass__softc_af121f86585e10bf80968a0605d097069}{data\_ptr}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02306}02306                                     ccb-\/>csio.dxfer\_len,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02307}02307                                     ccb-\/>ccb\_h.timeout,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02308}02308                                     \&\mbox{\hyperlink{umass_8c_af0b2c1f4d76cf3b5760a5ebecdeb97f9}{umass\_cam\_cb}}, ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02309}02309                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02310}02310                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02311}02311                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02312}02312         \textcolor{keywordflow}{case} XPT\_PATH\_INQ:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02313}02313                 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02314}02314                         \textcolor{keyword}{struct }ccb\_pathinq *cpi = \&ccb-\/>cpi;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02315}02315 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02316}02316                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%d:\%d:\%jx:XPT\_PATH\_INQ:.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02317}02317                             sc ? cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}) : -\/1, ccb-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02318}02318                             (uintmax\_t)ccb-\/>ccb\_h.target\_lun);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02319}02319 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02320}02320                         \textcolor{comment}{/* host specific information */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02321}02321                         cpi-\/>version\_num = 1;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02322}02322                         cpi-\/>hba\_inquiry = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02323}02323                         cpi-\/>target\_sprt = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02324}02324                         cpi-\/>hba\_misc = PIM\_NO\_6\_BYTE;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02325}02325                         cpi-\/>hba\_eng\_cnt = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02326}02326                         cpi-\/>max\_target = \mbox{\hyperlink{umass_8c_a9bcd1efc276270831b04dccabedd201c}{UMASS\_SCSIID\_MAX}};     \textcolor{comment}{/* one target */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02327}02327                         cpi-\/>initiator\_id = \mbox{\hyperlink{umass_8c_af9001c1f22fcf0b7a78869ed95643c14}{UMASS\_SCSIID\_HOST}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02328}02328                         strlcpy(cpi-\/>sim\_vid, \textcolor{stringliteral}{"{}FreeBSD"{}}, SIM\_IDLEN);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02329}02329                         strlcpy(cpi-\/>hba\_vid, \textcolor{stringliteral}{"{}USB SCSI"{}}, HBA\_IDLEN);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02330}02330                         strlcpy(cpi-\/>dev\_name, cam\_sim\_name(sim), DEV\_IDLEN);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02331}02331                         cpi-\/>unit\_number = cam\_sim\_unit(sim);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02332}02332                         cpi-\/>bus\_id = sc-\/>\mbox{\hyperlink{structumass__softc_abecd2a7bb5b8731abb484164a65d9955}{sc\_unit}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02333}02333                         cpi-\/>protocol = PROTO\_SCSI;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02334}02334                         cpi-\/>protocol\_version = SCSI\_REV\_2;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02335}02335                         cpi-\/>transport = XPORT\_USB;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02336}02336                         cpi-\/>transport\_version = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02337}02337 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02338}02338                         \textcolor{keywordflow}{if} (sc == NULL) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02339}02339                                 cpi-\/>base\_transfer\_speed = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02340}02340                                 cpi-\/>max\_lun = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02341}02341                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02342}02342                                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a50bef086ca00abb99ccdfa2bbed9e7a3}{FLOPPY\_SPEED}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02343}02343                                         cpi-\/>base\_transfer\_speed =}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02344}02344                                             \mbox{\hyperlink{umass_8c_a7100aa0c2695267b2da3c4a03b27406a}{UMASS\_FLOPPY\_TRANSFER\_SPEED}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02345}02345                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02346}02346                                         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(sc-\/>\mbox{\hyperlink{structumass__softc_ae98657d8e8b583761f9d693080f326b6}{sc\_udev}})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02347}02347                                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffafeaa1573d94f4b3f0c4a4caa423eb81e}{USB\_SPEED\_SUPER}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02348}02348                                                 cpi-\/>base\_transfer\_speed =}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02349}02349                                                     \mbox{\hyperlink{umass_8c_aa525d1c81f76c3c5b771bbdacca47b87}{UMASS\_SUPER\_TRANSFER\_SPEED}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02350}02350                                                 cpi-\/>maxio = maxphys;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02351}02351                                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02352}02352                                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa57eeede6d769b09c01ac9c9c62fef8c9}{USB\_SPEED\_HIGH}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02353}02353                                                 cpi-\/>base\_transfer\_speed =}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02354}02354                                                     \mbox{\hyperlink{umass_8c_ab641a0da8cc0cff3d4bade0a840e4cb2}{UMASS\_HIGH\_TRANSFER\_SPEED}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02355}02355                                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02356}02356                                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02357}02357                                                 cpi-\/>base\_transfer\_speed =}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02358}02358                                                     \mbox{\hyperlink{umass_8c_a5f4c990724cf7f390a29a73d08e0591b}{UMASS\_FULL\_TRANSFER\_SPEED}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02359}02359                                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02360}02360                                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02361}02361                                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02362}02362                                 cpi-\/>max\_lun = sc-\/>\mbox{\hyperlink{structumass__softc_a047b3ab9c344020f90378c48c518ccfa}{sc\_maxlun}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02363}02363                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02364}02364 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02365}02365                         cpi-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02366}02366                         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02367}02367                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02368}02368                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02369}02369         \textcolor{keywordflow}{case} XPT\_RESET\_DEV:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02370}02370                 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02371}02371                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%d:\%d:\%jx:XPT\_RESET\_DEV:.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02372}02372                             cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}), ccb-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02373}02373                             (uintmax\_t)ccb-\/>ccb\_h.target\_lun);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02374}02374 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02375}02375                         \mbox{\hyperlink{umass_8c_a2b924b3addc9468a47aeee869534e146}{umass\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02376}02376 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02377}02377                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02378}02378                         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02379}02379                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02380}02380                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02381}02381         \textcolor{keywordflow}{case} XPT\_GET\_TRAN\_SETTINGS:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02382}02382                 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02383}02383                         \textcolor{keyword}{struct }ccb\_trans\_settings *cts = \&ccb-\/>cts;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02384}02384 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02385}02385                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%d:\%d:\%jx:XPT\_GET\_TRAN\_SETTINGS:.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02386}02386                             cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}), ccb-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02387}02387                             (uintmax\_t)ccb-\/>ccb\_h.target\_lun);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02388}02388 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02389}02389                         cts-\/>protocol = PROTO\_SCSI;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02390}02390                         cts-\/>protocol\_version = SCSI\_REV\_2;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02391}02391                         cts-\/>transport = XPORT\_USB;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02392}02392                         cts-\/>transport\_version = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02393}02393                         cts-\/>xport\_specific.valid = 0;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02394}02394 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02395}02395                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02396}02396                         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02397}02397                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02398}02398                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02399}02399         \textcolor{keywordflow}{case} XPT\_SET\_TRAN\_SETTINGS:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02400}02400                 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02401}02401                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%d:\%d:\%jx:XPT\_SET\_TRAN\_SETTINGS:.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02402}02402                             cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}), ccb-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02403}02403                             (uintmax\_t)ccb-\/>ccb\_h.target\_lun);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02404}02404 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02405}02405                         ccb-\/>ccb\_h.status = CAM\_FUNC\_NOTAVAIL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02406}02406                         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02407}02407                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02408}02408                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02409}02409         \textcolor{keywordflow}{case} XPT\_CALC\_GEOMETRY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02410}02410                 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02411}02411                         cam\_calc\_geometry(\&ccb-\/>ccg, \textcolor{comment}{/* extended */} 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02412}02412                         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02413}02413                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02414}02414                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02415}02415         \textcolor{keywordflow}{case} XPT\_NOOP:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02416}02416                 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02417}02417                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%d:\%d:\%jx:XPT\_NOOP:.\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02418}02418                             sc ? cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}) : -\/1, ccb-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02419}02419                             (uintmax\_t)ccb-\/>ccb\_h.target\_lun);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02420}02420 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02421}02421                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02422}02422                         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02423}02423                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02424}02424                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02425}02425         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02426}02426                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}\%d:\%d:\%jx:func\_code 0x\%04x: "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02427}02427                     \textcolor{stringliteral}{"{}Not implemented\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02428}02428                     sc ? cam\_sim\_path(sc-\/>\mbox{\hyperlink{structumass__softc_a6e7dbdc772916e4a946b44bedd6f0210}{sc\_sim}}) : -\/1, ccb-\/>ccb\_h.target\_id,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02429}02429                     (uintmax\_t)ccb-\/>ccb\_h.target\_lun, ccb-\/>ccb\_h.func\_code);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02430}02430 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02431}02431                 ccb-\/>ccb\_h.status = CAM\_FUNC\_NOTAVAIL;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02432}02432                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02433}02433                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02434}02434         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02435}02435 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02436}02436 done:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02437}02437         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02438}02438 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02439}02439 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02440}02440 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02441}\mbox{\hyperlink{umass_8c_a76c15b06f306ac00fb26810758185551}{02441}} \mbox{\hyperlink{umass_8c_a76c15b06f306ac00fb26810758185551}{umass\_cam\_poll}}(\textcolor{keyword}{struct} cam\_sim *sim)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02442}02442 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02443}02443         \textcolor{keyword}{struct }\mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc = cam\_sim\_softc(sim);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02444}02444 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02445}02445         \textcolor{keywordflow}{if} (sc == NULL)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02446}02446                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02447}02447 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02448}02448         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}CAM poll\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02449}02449 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02450}02450         \mbox{\hyperlink{usb__transfer_8c_ab2036eadf83fca25cf0d8cdec16d7227}{usbd\_transfer\_poll}}(sc-\/>\mbox{\hyperlink{structumass__softc_a4e8dc8629f3a1a2c8b9d5e333cfb8559}{sc\_xfer}}, \mbox{\hyperlink{umass_8c_af03ec61edc6e8350be26185af8d65fe5}{UMASS\_T\_MAX}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02451}02451 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02452}02452 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02453}02453 \textcolor{comment}{/* umass\_cam\_cb}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02454}02454 \textcolor{comment}{ *      finalise a completed CAM command}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02455}02455 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02456}02456 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02457}02457 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02458}\mbox{\hyperlink{umass_8c_af0b2c1f4d76cf3b5760a5ebecdeb97f9}{02458}} \mbox{\hyperlink{umass_8c_af0b2c1f4d76cf3b5760a5ebecdeb97f9}{umass\_cam\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, \textcolor{keyword}{union} \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}} *\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}, uint32\_t residue,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02459}02459     uint8\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02460}02460 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02461}02461         \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.resid = residue;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02462}02462 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02463}02463         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02464}02464         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_a2c06f068c4eac3fff24312e002868fa1}{STATUS\_CMD\_OK}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02465}02465                 \mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02466}02466                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a83ed683c2baac38ccdeb9e162d318880}{READ\_CAPACITY\_OFFBY1}}) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02467}02467                     (\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>ccb\_h.func\_code == XPT\_SCSI\_IO) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02468}02468                     (\mbox{\hyperlink{structumass__softc_a1a9f7f5238aa2a9abcd048048b4a5298}{ccb}}-\/>csio.cdb\_io.cdb\_bytes[0] == READ\_CAPACITY)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02469}02469                         \textcolor{keyword}{struct }scsi\_read\_capacity\_data *rcap;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02470}02470                         uint32\_t maxsector;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02471}02471 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02472}02472                         rcap = (\textcolor{keywordtype}{void} *)(ccb-\/>csio.data\_ptr);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02473}02473                         maxsector = scsi\_4btoul(rcap-\/>addr) -\/ 1;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02474}02474                         scsi\_ulto4b(maxsector, rcap-\/>addr);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02475}02475                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02476}02476                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02477}02477 \textcolor{comment}{                 * We have to add SVPD\_UNIT\_SERIAL\_NUMBER to the list}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02478}02478 \textcolor{comment}{                 * of pages supported by the device -\/ otherwise, CAM}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02479}02479 \textcolor{comment}{                 * will never ask us for the serial number if the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02480}02480 \textcolor{comment}{                 * device cannot handle that by itself.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02481}02481 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02482}02482                 \textcolor{keywordflow}{if} (ccb-\/>ccb\_h.func\_code == XPT\_SCSI\_IO \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02483}02483                     sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] == INQUIRY \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02484}02484                     (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[1] \& SI\_EVPD) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02485}02485                     sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[2] == SVPD\_SUPPORTED\_PAGE\_LIST \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02486}02486                     (\mbox{\hyperlink{usb__device_8c_a5a41e5bc08f275438c7eb66d9883cd93}{usb\_get\_serial}}(sc-\/>\mbox{\hyperlink{structumass__softc_ae98657d8e8b583761f9d693080f326b6}{sc\_udev}})[0] != \textcolor{charliteral}{'\(\backslash\)0'})) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02487}02487                         \textcolor{keyword}{struct }ccb\_scsiio *csio;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02488}02488                         \textcolor{keyword}{struct }scsi\_vpd\_supported\_page\_list *page\_list;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02489}02489 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02490}02490                         csio = \&ccb-\/>csio;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02491}02491                         page\_list = (\textcolor{keyword}{struct }scsi\_vpd\_supported\_page\_list *)csio-\/>data\_ptr;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02492}02492                         if (page\_list-\/>length + 1 < SVPD\_SUPPORTED\_PAGES\_SIZE) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02493}02493                                 page\_list-\/>list[page\_list-\/>length] = SVPD\_UNIT\_SERIAL\_NUMBER;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02494}02494                                 page\_list-\/>length++;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02495}02495                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02496}02496                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02497}02497                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02498}02498                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02499}02499 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02500}02500         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_abaedde3117d8bd850988ae32ebc4cd6f}{STATUS\_CMD\_UNKNOWN}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02501}02501         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_a3c09eaee077e85e1eaa4aabcd61aca15}{STATUS\_CMD\_FAILED}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02502}02502 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02503}02503                 \textcolor{comment}{/* fetch sense data */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02504}02504 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02505}02505                 \textcolor{comment}{/* the rest of the command was filled in at attach */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02506}02506                 sc-\/>\mbox{\hyperlink{structumass__softc_a171ab28ba237249982566d884890e0c6}{cam\_scsi\_sense}}.length = ccb-\/>csio.sense\_len;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02507}02507 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02508}02508                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Fetching \%d bytes of "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02509}02509                     \textcolor{stringliteral}{"{}sense data\(\backslash\)n"{}}, ccb-\/>csio.sense\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02510}02510 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02511}02511                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{umass_8c_a8d9733b1a2da33a84e25f0746d7e0337}{umass\_std\_transform}}(sc, ccb, \&sc-\/>\mbox{\hyperlink{structumass__softc_a171ab28ba237249982566d884890e0c6}{cam\_scsi\_sense}}.opcode,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02512}02512                     \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_a171ab28ba237249982566d884890e0c6}{cam\_scsi\_sense}}))) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02513}02513                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a6d55c4c3ab565b328cd83360ff5ee864}{FORCE\_SHORT\_INQUIRY}}) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02514}02514                             (sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] == INQUIRY)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02515}02515                                 ccb-\/>csio.sense\_len = SHORT\_INQUIRY\_LENGTH;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02516}02516                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02517}02517                         \mbox{\hyperlink{umass_8c_a96c25210a24c4dbbbe595720ddd4cfcf}{umass\_command\_start}}(sc, \mbox{\hyperlink{umass_8c_adc4b177c894d6bf0c0065c0e8c6a31df}{DIR\_IN}}, \&ccb-\/>csio.sense\_data.error\_code,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02518}02518                             ccb-\/>csio.sense\_len, ccb-\/>ccb\_h.timeout,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02519}02519                             \&\mbox{\hyperlink{umass_8c_a3e60896026039901261ad9b692f9e97b}{umass\_cam\_sense\_cb}}, ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02520}02520                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02521}02521                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02522}02522 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02523}02523         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02524}02524                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02525}02525 \textcolor{comment}{                 * The wire protocol failed and will hopefully have}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02526}02526 \textcolor{comment}{                 * recovered. We return an error to CAM and let CAM}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02527}02527 \textcolor{comment}{                 * retry the command if necessary.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02528}02528 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02529}02529                 xpt\_freeze\_devq(ccb-\/>ccb\_h.path, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02530}02530                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP\_ERR | CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02531}02531                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02532}02532                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02533}02533         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02534}02534 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02535}02535 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02536}02536 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02537}02537 \textcolor{comment}{ * Finalise a completed autosense operation}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02538}02538 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02539}02539 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02540}\mbox{\hyperlink{umass_8c_a3e60896026039901261ad9b692f9e97b}{02540}} \mbox{\hyperlink{umass_8c_a3e60896026039901261ad9b692f9e97b}{umass\_cam\_sense\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, \textcolor{keyword}{union} ccb *ccb, uint32\_t residue,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02541}02541     uint8\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02542}02542 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02543}02543         uint8\_t *cmd;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02544}02544 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02545}02545         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02546}02546         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_a2c06f068c4eac3fff24312e002868fa1}{STATUS\_CMD\_OK}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02547}02547         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_abaedde3117d8bd850988ae32ebc4cd6f}{STATUS\_CMD\_UNKNOWN}}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02548}02548         \textcolor{keywordflow}{case} \mbox{\hyperlink{umass_8c_a3c09eaee077e85e1eaa4aabcd61aca15}{STATUS\_CMD\_FAILED}}: \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02549}02549                 \textcolor{keywordtype}{int} key, sense\_len;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02550}02550 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02551}02551                 ccb-\/>csio.sense\_resid = residue;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02552}02552                 sense\_len = ccb-\/>csio.sense\_len -\/ ccb-\/>csio.sense\_resid;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02553}02553                 key = scsi\_get\_sense\_key(\&ccb-\/>csio.sense\_data, sense\_len,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02554}02554                                          \textcolor{comment}{/*show\_errors*/} 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02555}02555 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02556}02556                 \textcolor{keywordflow}{if} (ccb-\/>csio.ccb\_h.flags \& CAM\_CDB\_POINTER) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02557}02557                         cmd = (uint8\_t *)(ccb-\/>csio.cdb\_io.cdb\_ptr);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02558}02558                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02559}02559                         cmd = (uint8\_t *)(ccb-\/>csio.cdb\_io.cdb\_bytes);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02560}02560                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02561}02561 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02562}02562                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02563}02563 \textcolor{comment}{                 * Getting sense data always succeeds (apart from wire}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02564}02564 \textcolor{comment}{                 * failures):}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02565}02565 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02566}02566                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_aacf6beca7f3d52bdf7bd937efd22a451}{RS\_NO\_CLEAR\_UA}}) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02567}02567                     (cmd[0] == INQUIRY) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02568}02568                     (key == SSD\_KEY\_UNIT\_ATTENTION)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02569}02569                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02570}02570 \textcolor{comment}{                         * Ignore unit attention errors in the case where}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02571}02571 \textcolor{comment}{                         * the Unit Attention state is not cleared on}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02572}02572 \textcolor{comment}{                         * REQUEST SENSE. They will appear again at the next}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02573}02573 \textcolor{comment}{                         * command.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02574}02574 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02575}02575                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02576}02576                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (key == SSD\_KEY\_NO\_SENSE) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02577}02577                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02578}02578 \textcolor{comment}{                         * No problem after all (in the case of CBI without}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02579}02579 \textcolor{comment}{                         * CCI)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02580}02580 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02581}02581                         ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02582}02582                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_aacf6beca7f3d52bdf7bd937efd22a451}{RS\_NO\_CLEAR\_UA}}) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02583}02583                             (cmd[0] == READ\_CAPACITY) \&\&}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02584}02584                     (key == SSD\_KEY\_UNIT\_ATTENTION)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02585}02585                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02586}02586 \textcolor{comment}{                         * Some devices do not clear the unit attention error}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02587}02587 \textcolor{comment}{                         * on request sense. We insert a test unit ready}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02588}02588 \textcolor{comment}{                         * command to make sure we clear the unit attention}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02589}02589 \textcolor{comment}{                         * condition, then allow the retry to proceed as}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02590}02590 \textcolor{comment}{                         * usual.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02591}02591 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02592}02592 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02593}02593                         xpt\_freeze\_devq(ccb-\/>ccb\_h.path, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02594}02594                         ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02595}02595                             | CAM\_AUTOSNS\_VALID | CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02596}02596                         ccb-\/>csio.scsi\_status = SCSI\_STATUS\_CHECK\_COND;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02597}02597 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02598}02598 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02599}02599                         DELAY(300000);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02600}02600 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02601}02601                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Doing a sneaky"{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02602}02602                             \textcolor{stringliteral}{"{}TEST\_UNIT\_READY\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02603}02603 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02604}02604                         \textcolor{comment}{/* the rest of the command was filled in at attach */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02605}02605 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02606}02606                         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structumass__softc_ab543942faf68dce7798fe5370c7c6eb1}{sc\_transform}})(sc,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02607}02607                             \&sc-\/>\mbox{\hyperlink{structumass__softc_a9d75a2099f4e767aed8e68fc6081e022}{cam\_scsi\_test\_unit\_ready}}.opcode,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02608}02608                             \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_a9d75a2099f4e767aed8e68fc6081e022}{cam\_scsi\_test\_unit\_ready}})) == 1) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02609}02609                                 \mbox{\hyperlink{umass_8c_a96c25210a24c4dbbbe595720ddd4cfcf}{umass\_command\_start}}(sc, \mbox{\hyperlink{umass_8c_a665390e734d124195aa8d263d475c73a}{DIR\_NONE}}, NULL, 0,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02610}02610                                     ccb-\/>ccb\_h.timeout,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02611}02611                                     \&\mbox{\hyperlink{umass_8c_a0980cc2a0e330cf9c4215f6e2cb5df09}{umass\_cam\_quirk\_cb}}, ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02612}02612                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02613}02613                         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02614}02614                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02615}02615                         xpt\_freeze\_devq(ccb-\/>ccb\_h.path, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02616}02616                         \textcolor{keywordflow}{if} (key >= 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02617}02617                                 ccb-\/>ccb\_h.status = CAM\_SCSI\_STATUS\_ERROR}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02618}02618                                     | CAM\_AUTOSNS\_VALID | CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02619}02619                                 ccb-\/>csio.scsi\_status = SCSI\_STATUS\_CHECK\_COND;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02620}02620                         \} \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02621}02621                                 ccb-\/>ccb\_h.status = CAM\_AUTOSENSE\_FAIL}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02622}02622                                     | CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02623}02623                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02624}02624                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02625}02625                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02626}02626         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02627}02627         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02628}02628                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Autosense failed, "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02629}02629                     \textcolor{stringliteral}{"{}status \%d\(\backslash\)n"{}}, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02630}02630                 xpt\_freeze\_devq(ccb-\/>ccb\_h.path, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02631}02631                 ccb-\/>ccb\_h.status = CAM\_AUTOSENSE\_FAIL | CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02632}02632                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02633}02633         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02634}02634 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02635}02635 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02636}02636 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02637}02637 \textcolor{comment}{ * This completion code just handles the fact that we sent a test-\/unit-\/ready}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02638}02638 \textcolor{comment}{ * after having previously failed a READ CAPACITY with CHECK\_COND.  The CCB}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02639}02639 \textcolor{comment}{ * status for CAM is already set earlier.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02640}02640 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02641}02641 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02642}\mbox{\hyperlink{umass_8c_a0980cc2a0e330cf9c4215f6e2cb5df09}{02642}} \mbox{\hyperlink{umass_8c_a0980cc2a0e330cf9c4215f6e2cb5df09}{umass\_cam\_quirk\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, \textcolor{keyword}{union} ccb *ccb, uint32\_t residue,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02643}02643     uint8\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}})}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02644}02644 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02645}02645         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Test unit ready "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02646}02646             \textcolor{stringliteral}{"{}returned status \%d\(\backslash\)n"{}}, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02647}02647 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02648}02648         xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02649}02649 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02650}02650 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02651}02651 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02652}02652 \textcolor{comment}{ * SCSI specific functions}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02653}02653 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02654}02654 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02655}02655 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02656}\mbox{\hyperlink{umass_8c_aa6529fb2f51039a4a3bea6d11e0d0ab5}{02656}} \mbox{\hyperlink{umass_8c_aa6529fb2f51039a4a3bea6d11e0d0ab5}{umass\_scsi\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t *cmd\_ptr,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02657}02657     uint8\_t cmd\_len)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02658}02658 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02659}02659         \textcolor{keywordflow}{if} ((cmd\_len == 0) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02660}02660             (cmd\_len > \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}))) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02661}02661                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Invalid command "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02662}02662                     \textcolor{stringliteral}{"{}length: \%d bytes\(\backslash\)n"{}}, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02663}02663                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02664}02664         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02665}02665         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}} = cmd\_len;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02666}02666 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02667}02667         \textcolor{keywordflow}{switch} (cmd\_ptr[0]) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02668}02668         \textcolor{keywordflow}{case} TEST\_UNIT\_READY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02669}02669                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a55f81776fe4bc3859e3916a8d4153945}{NO\_TEST\_UNIT\_READY}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02670}02670                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Converted TEST\_UNIT\_READY "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02671}02671                             \textcolor{stringliteral}{"{}to START\_UNIT\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02672}02672                         memset(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, 0, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02673}02673                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] = START\_STOP\_UNIT;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02674}02674                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[4] = SSS\_START;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02675}02675                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02676}02676                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02677}02677                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02678}02678 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02679}02679         \textcolor{keywordflow}{case} INQUIRY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02680}02680                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02681}02681 \textcolor{comment}{                 * some drives wedge when asked for full inquiry}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02682}02682 \textcolor{comment}{                 * information.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02683}02683 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02684}02684                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a6d55c4c3ab565b328cd83360ff5ee864}{FORCE\_SHORT\_INQUIRY}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02685}02685                         memcpy(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, cmd\_ptr, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02686}02686                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[4] = SHORT\_INQUIRY\_LENGTH;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02687}02687                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02688}02688                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02689}02689                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02690}02690         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02691}02691 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02692}02692         memcpy(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, cmd\_ptr, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02693}02693         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02694}02694 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02695}02695 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02696}02696 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02697}\mbox{\hyperlink{umass_8c_a2f87d24c52fead5277457669a81b0e60}{02697}} \mbox{\hyperlink{umass_8c_a2f87d24c52fead5277457669a81b0e60}{umass\_rbc\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t *cmd\_ptr, uint8\_t cmd\_len)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02698}02698 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02699}02699         \textcolor{keywordflow}{if} ((cmd\_len == 0) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02700}02700             (cmd\_len > \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}))) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02701}02701                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Invalid command "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02702}02702                     \textcolor{stringliteral}{"{}length: \%d bytes\(\backslash\)n"{}}, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02703}02703                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02704}02704         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02705}02705         \textcolor{keywordflow}{switch} (cmd\_ptr[0]) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02706}02706                 \textcolor{comment}{/* these commands are defined in RBC: */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02707}02707         \textcolor{keywordflow}{case} READ\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02708}02708         \textcolor{keywordflow}{case} READ\_CAPACITY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02709}02709         \textcolor{keywordflow}{case} START\_STOP\_UNIT:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02710}02710         \textcolor{keywordflow}{case} SYNCHRONIZE\_CACHE:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02711}02711         \textcolor{keywordflow}{case} WRITE\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02712}02712         \textcolor{keywordflow}{case} VERIFY\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02713}02713         \textcolor{keywordflow}{case} INQUIRY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02714}02714         \textcolor{keywordflow}{case} MODE\_SELECT\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02715}02715         \textcolor{keywordflow}{case} MODE\_SENSE\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02716}02716         \textcolor{keywordflow}{case} TEST\_UNIT\_READY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02717}02717         \textcolor{keywordflow}{case} WRITE\_BUFFER:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02718}02718                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02719}02719 \textcolor{comment}{                 * The following commands are not listed in my copy of the}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02720}02720 \textcolor{comment}{                 * RBC specs. CAM however seems to want those, and at least}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02721}02721 \textcolor{comment}{                 * the Sony DSC device appears to support those as well}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02722}02722 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02723}02723         \textcolor{keywordflow}{case} REQUEST\_SENSE:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02724}02724         \textcolor{keywordflow}{case} PREVENT\_ALLOW:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02725}02725 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02726}02726                 memcpy(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, cmd\_ptr, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02727}02727 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02728}02728                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a31cfe86ca031c00fd678e8d38d656b82}{RBC\_PAD\_TO\_12}}) \&\& (cmd\_len < 12)) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02729}02729                         memset(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}} + cmd\_len,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02730}02730                             0, 12 -\/ cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02731}02731                         cmd\_len = 12;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02732}02732                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02733}02733                 sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}} = cmd\_len;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02734}02734                 \textcolor{keywordflow}{return} (1);             \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02735}02735 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02736}02736                 \textcolor{comment}{/* All other commands are not legal in RBC */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02737}02737         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02738}02738                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Unsupported RBC "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02739}02739                     \textcolor{stringliteral}{"{}command 0x\%02x\(\backslash\)n"{}}, cmd\_ptr[0]);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02740}02740                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02741}02741         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02742}02742 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02743}02743 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02744}02744 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02745}\mbox{\hyperlink{umass_8c_a7e53890b7c36f59db41961d7787dc38e}{02745}} \mbox{\hyperlink{umass_8c_a7e53890b7c36f59db41961d7787dc38e}{umass\_ufi\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t *cmd\_ptr,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02746}02746     uint8\_t cmd\_len)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02747}02747 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02748}02748         \textcolor{keywordflow}{if} ((cmd\_len == 0) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02749}02749             (cmd\_len > \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}))) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02750}02750                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Invalid command "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02751}02751                     \textcolor{stringliteral}{"{}length: \%d bytes\(\backslash\)n"{}}, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02752}02752                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02753}02753         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02754}02754         \textcolor{comment}{/* An UFI command is always 12 bytes in length */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02755}02755         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}} = \mbox{\hyperlink{umass_8c_a87ccba5c10d2df479f319948292407bf}{UFI\_COMMAND\_LENGTH}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02756}02756 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02757}02757         \textcolor{comment}{/* Zero the command data */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02758}02758         memset(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, 0, \mbox{\hyperlink{umass_8c_a87ccba5c10d2df479f319948292407bf}{UFI\_COMMAND\_LENGTH}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02759}02759 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02760}02760         \textcolor{keywordflow}{switch} (cmd\_ptr[0]) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02761}02761                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02762}02762 \textcolor{comment}{                 * Commands of which the format has been verified. They}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02763}02763 \textcolor{comment}{                 * should work. Copy the command into the (zeroed out)}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02764}02764 \textcolor{comment}{                 * destination buffer.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02765}02765 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02766}02766         \textcolor{keywordflow}{case} TEST\_UNIT\_READY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02767}02767                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a55f81776fe4bc3859e3916a8d4153945}{NO\_TEST\_UNIT\_READY}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02768}02768                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02769}02769 \textcolor{comment}{                         * Some devices do not support this command. Start}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02770}02770 \textcolor{comment}{                         * Stop Unit should give the same results}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02771}02771 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02772}02772                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_UFI, \textcolor{stringliteral}{"{}Converted TEST\_UNIT\_READY "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02773}02773                             \textcolor{stringliteral}{"{}to START\_UNIT\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02774}02774 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02775}02775                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] = START\_STOP\_UNIT;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02776}02776                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[4] = SSS\_START;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02777}02777                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02778}02778                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02779}02779                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02780}02780 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02781}02781         \textcolor{keywordflow}{case} REZERO\_UNIT:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02782}02782         \textcolor{keywordflow}{case} REQUEST\_SENSE:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02783}02783         \textcolor{keywordflow}{case} FORMAT\_UNIT:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02784}02784         \textcolor{keywordflow}{case} INQUIRY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02785}02785         \textcolor{keywordflow}{case} START\_STOP\_UNIT:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02786}02786         \textcolor{keywordflow}{case} SEND\_DIAGNOSTIC:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02787}02787         \textcolor{keywordflow}{case} PREVENT\_ALLOW:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02788}02788         \textcolor{keywordflow}{case} READ\_CAPACITY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02789}02789         \textcolor{keywordflow}{case} READ\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02790}02790         \textcolor{keywordflow}{case} WRITE\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02791}02791         \textcolor{keywordflow}{case} POSITION\_TO\_ELEMENT:       \textcolor{comment}{/* SEEK\_10 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02792}02792         \textcolor{keywordflow}{case} WRITE\_AND\_VERIFY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02793}02793         \textcolor{keywordflow}{case} VERIFY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02794}02794         \textcolor{keywordflow}{case} MODE\_SELECT\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02795}02795         \textcolor{keywordflow}{case} MODE\_SENSE\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02796}02796         \textcolor{keywordflow}{case} READ\_12:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02797}02797         \textcolor{keywordflow}{case} WRITE\_12:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02798}02798         \textcolor{keywordflow}{case} READ\_FORMAT\_CAPACITIES:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02799}02799                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02800}02800 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02801}02801                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02802}02802 \textcolor{comment}{                 * SYNCHRONIZE\_CACHE isn't supported by UFI, nor should it be}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02803}02803 \textcolor{comment}{                 * required for UFI devices, so it is appropriate to fake}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02804}02804 \textcolor{comment}{                 * success.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02805}02805 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02806}02806         \textcolor{keywordflow}{case} SYNCHRONIZE\_CACHE:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02807}02807                 \textcolor{keywordflow}{return} (2);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02808}02808 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02809}02809         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02810}02810                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Unsupported UFI "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02811}02811                     \textcolor{stringliteral}{"{}command 0x\%02x\(\backslash\)n"{}}, cmd\_ptr[0]);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02812}02812                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02813}02813         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02814}02814 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02815}02815         memcpy(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, cmd\_ptr, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02816}02816         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02817}02817 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02818}02818 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02819}02819 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02820}02820 \textcolor{comment}{ * 8070i (ATAPI) specific functions}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02821}02821 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02822}02822 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02823}\mbox{\hyperlink{umass_8c_a69356b374e1499c670450daa8c9cc1ea}{02823}} \mbox{\hyperlink{umass_8c_a69356b374e1499c670450daa8c9cc1ea}{umass\_atapi\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t *cmd\_ptr,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02824}02824     uint8\_t cmd\_len)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02825}02825 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02826}02826         \textcolor{keywordflow}{if} ((cmd\_len == 0) ||}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02827}02827             (cmd\_len > \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}))) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02828}02828                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Invalid command "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02829}02829                     \textcolor{stringliteral}{"{}length: \%d bytes\(\backslash\)n"{}}, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02830}02830                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02831}02831         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02832}02832         \textcolor{comment}{/* An ATAPI command is always 12 bytes in length. */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02833}02833         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a6dfa9d528526a271886d0d04d9ae185c}{cmd\_len}} = \mbox{\hyperlink{umass_8c_aac310e35fd0222643fba8e0fe1431557}{ATAPI\_COMMAND\_LENGTH}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02834}02834 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02835}02835         \textcolor{comment}{/* Zero the command data */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02836}02836         memset(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, 0, \mbox{\hyperlink{umass_8c_aac310e35fd0222643fba8e0fe1431557}{ATAPI\_COMMAND\_LENGTH}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02837}02837 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02838}02838         \textcolor{keywordflow}{switch} (cmd\_ptr[0]) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02839}02839                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02840}02840 \textcolor{comment}{                 * Commands of which the format has been verified. They}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02841}02841 \textcolor{comment}{                 * should work. Copy the command into the destination}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02842}02842 \textcolor{comment}{                 * buffer.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02843}02843 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02844}02844         \textcolor{keywordflow}{case} INQUIRY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02845}02845                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02846}02846 \textcolor{comment}{                 * some drives wedge when asked for full inquiry}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02847}02847 \textcolor{comment}{                 * information.}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02848}02848 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02849}02849                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a6d55c4c3ab565b328cd83360ff5ee864}{FORCE\_SHORT\_INQUIRY}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02850}02850                         memcpy(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, cmd\_ptr, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02851}02851 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02852}02852                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[4] = SHORT\_INQUIRY\_LENGTH;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02853}02853                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02854}02854                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02855}02855                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02856}02856 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02857}02857         \textcolor{keywordflow}{case} TEST\_UNIT\_READY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02858}02858                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structumass__softc_a2de9a6711ecb6c151be9638e13d1b5e4}{sc\_quirks}} \& \mbox{\hyperlink{umass_8c_a55f81776fe4bc3859e3916a8d4153945}{NO\_TEST\_UNIT\_READY}}) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02859}02859                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Converted TEST\_UNIT\_READY "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02860}02860                             \textcolor{stringliteral}{"{}to START\_UNIT\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02861}02861                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[0] = START\_STOP\_UNIT;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02862}02862                         sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}[4] = SSS\_START;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02863}02863                         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02864}02864                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02865}02865                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02866}02866 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02867}02867         \textcolor{keywordflow}{case} REZERO\_UNIT:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02868}02868         \textcolor{keywordflow}{case} REQUEST\_SENSE:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02869}02869         \textcolor{keywordflow}{case} START\_STOP\_UNIT:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02870}02870         \textcolor{keywordflow}{case} SEND\_DIAGNOSTIC:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02871}02871         \textcolor{keywordflow}{case} PREVENT\_ALLOW:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02872}02872         \textcolor{keywordflow}{case} READ\_CAPACITY:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02873}02873         \textcolor{keywordflow}{case} READ\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02874}02874         \textcolor{keywordflow}{case} WRITE\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02875}02875         \textcolor{keywordflow}{case} POSITION\_TO\_ELEMENT:       \textcolor{comment}{/* SEEK\_10 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02876}02876         \textcolor{keywordflow}{case} SYNCHRONIZE\_CACHE:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02877}02877         \textcolor{keywordflow}{case} MODE\_SELECT\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02878}02878         \textcolor{keywordflow}{case} MODE\_SENSE\_10:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02879}02879         \textcolor{keywordflow}{case} READ\_BUFFER:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02880}02880         \textcolor{keywordflow}{case} 0x42:                      \textcolor{comment}{/* READ\_SUBCHANNEL */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02881}02881         \textcolor{keywordflow}{case} 0x43:                      \textcolor{comment}{/* READ\_TOC */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02882}02882         \textcolor{keywordflow}{case} 0x44:                      \textcolor{comment}{/* READ\_HEADER */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02883}02883         \textcolor{keywordflow}{case} 0x47:                      \textcolor{comment}{/* PLAY\_MSF (Play Minute/Second/Frame) */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02884}02884         \textcolor{keywordflow}{case} 0x48:                      \textcolor{comment}{/* PLAY\_TRACK */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02885}02885         \textcolor{keywordflow}{case} 0x49:                      \textcolor{comment}{/* PLAY\_TRACK\_REL */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02886}02886         \textcolor{keywordflow}{case} 0x4b:                      \textcolor{comment}{/* PAUSE */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02887}02887         \textcolor{keywordflow}{case} 0x51:                      \textcolor{comment}{/* READ\_DISK\_INFO */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02888}02888         \textcolor{keywordflow}{case} 0x52:                      \textcolor{comment}{/* READ\_TRACK\_INFO */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02889}02889         \textcolor{keywordflow}{case} 0x54:                      \textcolor{comment}{/* SEND\_OPC */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02890}02890         \textcolor{keywordflow}{case} 0x59:                      \textcolor{comment}{/* READ\_MASTER\_CUE */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02891}02891         \textcolor{keywordflow}{case} 0x5b:                      \textcolor{comment}{/* CLOSE\_TR\_SESSION */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02892}02892         \textcolor{keywordflow}{case} 0x5c:                      \textcolor{comment}{/* READ\_BUFFER\_CAP */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02893}02893         \textcolor{keywordflow}{case} 0x5d:                      \textcolor{comment}{/* SEND\_CUE\_SHEET */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02894}02894         \textcolor{keywordflow}{case} 0xa1:                      \textcolor{comment}{/* BLANK */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02895}02895         \textcolor{keywordflow}{case} 0xa5:                      \textcolor{comment}{/* PLAY\_12 */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02896}02896         \textcolor{keywordflow}{case} 0xa6:                      \textcolor{comment}{/* EXCHANGE\_MEDIUM */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02897}02897         \textcolor{keywordflow}{case} 0xad:                      \textcolor{comment}{/* READ\_DVD\_STRUCTURE */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02898}02898         \textcolor{keywordflow}{case} 0xbb:                      \textcolor{comment}{/* SET\_CD\_SPEED */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02899}02899         \textcolor{keywordflow}{case} 0xe5:                      \textcolor{comment}{/* READ\_TRACK\_INFO\_PHILIPS */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02900}02900                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02901}02901 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02902}02902         \textcolor{keywordflow}{case} READ\_12:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02903}02903         \textcolor{keywordflow}{case} WRITE\_12:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02904}02904         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02905}02905                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_SCSI, \textcolor{stringliteral}{"{}Unsupported ATAPI "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02906}02906                     \textcolor{stringliteral}{"{}command 0x\%02x -\/ trying anyway\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02907}02907                     cmd\_ptr[0]);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02908}02908                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02909}02909         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02910}02910 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02911}02911         memcpy(sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a02a88015d5bea791cb2039daeee78ddf}{cmd\_data}}, cmd\_ptr, cmd\_len);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02912}02912         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02913}02913 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02914}02914 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02915}02915 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02916}\mbox{\hyperlink{umass_8c_a70703ce4bde53c37ac782543828c1a92}{02916}} \mbox{\hyperlink{umass_8c_a70703ce4bde53c37ac782543828c1a92}{umass\_no\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t *cmd,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02917}02917     uint8\_t cmdlen)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02918}02918 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02919}02919         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* failure */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02920}02920 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02921}02921 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02922}02922 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02923}\mbox{\hyperlink{umass_8c_a8d9733b1a2da33a84e25f0746d7e0337}{02923}} \mbox{\hyperlink{umass_8c_a8d9733b1a2da33a84e25f0746d7e0337}{umass\_std\_transform}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, \textcolor{keyword}{union} ccb *ccb,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02924}02924     uint8\_t *cmd, uint8\_t cmdlen)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02925}02925 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02926}02926         uint8\_t retval;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02927}02927 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02928}02928         retval = (sc-\/>\mbox{\hyperlink{structumass__softc_ab543942faf68dce7798fe5370c7c6eb1}{sc\_transform}}) (sc, cmd, cmdlen);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02929}02929 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02930}02930         \textcolor{keywordflow}{if} (retval == 2) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02931}02931                 ccb-\/>ccb\_h.status = CAM\_REQ\_CMP;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02932}02932                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02933}02933                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02934}02934         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (retval == 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02935}02935                 xpt\_freeze\_devq(ccb-\/>ccb\_h.path, 1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02936}02936                 ccb-\/>ccb\_h.status = CAM\_REQ\_INVALID | CAM\_DEV\_QFRZN;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02937}02937                 xpt\_done(ccb);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02938}02938                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02939}02939         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02940}02940         \textcolor{comment}{/* Command should be executed */}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02941}02941         \textcolor{keywordflow}{return} (1);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02942}02942 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02943}02943 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02944}02944 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02945}02945 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02946}02946 umass\_bbb\_dump\_cbw(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, umass\_bbb\_cbw\_t *cbw)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02947}02947 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02948}02948         uint8\_t *c = cbw-\/>CBWCDB;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02949}02949 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02950}02950         uint32\_t dlen = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(cbw-\/>dCBWDataTransferLength);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02951}02951         uint32\_t tag = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(cbw-\/>dCBWTag);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02952}02952 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02953}02953         uint8\_t clen = cbw-\/>bCDBLength;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02954}02954         uint8\_t flags = cbw-\/>bCBWFlags;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02955}02955         uint8\_t lun = cbw-\/>bCBWLUN;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02956}02956 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02957}02957         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}CBW \%d: cmd = \%db "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02958}02958             \textcolor{stringliteral}{"{}(0x\%02x\%02x\%02x\%02x\%02x\%02x\%s), "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02959}02959             \textcolor{stringliteral}{"{}data = \%db, lun = \%d, dir = \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02960}02960             tag, clen,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02961}02961             c[0], c[1], c[2], c[3], c[4], c[5], (clen > 6 ? \textcolor{stringliteral}{"{}..."{}} : \textcolor{stringliteral}{"{}"{}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02962}02962             dlen, lun, (flags == \mbox{\hyperlink{umass_8c_ae8a2116019faea706c66bc3638995400}{CBWFLAGS\_IN}} ? \textcolor{stringliteral}{"{}in"{}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02963}02963             (flags == \mbox{\hyperlink{umass_8c_adb6bd8dfe82d0ed3eb1c2caed92d8a9e}{CBWFLAGS\_OUT}} ? \textcolor{stringliteral}{"{}out"{}} : \textcolor{stringliteral}{"{}<invalid>"{}})));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02964}02964 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02965}02965 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02966}02966 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02967}02967 umass\_bbb\_dump\_csw(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, umass\_bbb\_csw\_t *csw)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02968}02968 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02969}02969         uint32\_t sig = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(csw-\/>dCSWSignature);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02970}02970         uint32\_t tag = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(csw-\/>dCSWTag);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02971}02971         uint32\_t res = \mbox{\hyperlink{usb__endian_8h_aad306e3f757f924966cddfe6dfa9dc44}{UGETDW}}(csw-\/>dCSWDataResidue);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02972}02972         uint8\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = csw-\/>bCSWStatus;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02973}02973 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02974}02974         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}CSW \%d: sig = 0x\%08x (\%s), tag = 0x\%08x, "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02975}02975             \textcolor{stringliteral}{"{}res = \%d, status = 0x\%02x (\%s)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02976}02976             tag, sig, (sig == \mbox{\hyperlink{umass_8c_a6d29dee6ca7f61ee7407eb0c9df8fe0a}{CSWSIGNATURE}} ? \textcolor{stringliteral}{"{}valid"{}} : \textcolor{stringliteral}{"{}invalid"{}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02977}02977             tag, res,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02978}02978             \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}, (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} == \mbox{\hyperlink{umass_8c_a0eb3a9534c70bd126379d425c54498aa}{CSWSTATUS\_GOOD}} ? \textcolor{stringliteral}{"{}good"{}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02979}02979             (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} == \mbox{\hyperlink{umass_8c_aee89dc947347ceec52385e1428cdf087}{CSWSTATUS\_FAILED}} ? \textcolor{stringliteral}{"{}failed"{}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02980}02980             (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} == \mbox{\hyperlink{umass_8c_a05601fcfef35de03cf867dc6c6f5410a}{CSWSTATUS\_PHASE}} ? \textcolor{stringliteral}{"{}phase"{}} : \textcolor{stringliteral}{"{}<invalid>"{}}))));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02981}02981 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02982}02982 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02983}02983 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02984}02984 umass\_cbi\_dump\_cmd(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, \textcolor{keywordtype}{void} *cmd, uint8\_t cmdlen)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02985}02985 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02986}02986         uint8\_t *c = cmd;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02987}02987         uint8\_t dir = sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a0134c04eac798916150a4e4aff75dbea}{dir}};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02988}02988 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02989}02989         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_BBB, \textcolor{stringliteral}{"{}cmd = \%db "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02990}02990             \textcolor{stringliteral}{"{}(0x\%02x\%02x\%02x\%02x\%02x\%02x\%s), "{}}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02991}02991             \textcolor{stringliteral}{"{}data = \%db, dir = \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02992}02992             cmdlen,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02993}02993             c[0], c[1], c[2], c[3], c[4], c[5], (cmdlen > 6 ? \textcolor{stringliteral}{"{}..."{}} : \textcolor{stringliteral}{"{}"{}}),}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02994}02994             sc-\/>\mbox{\hyperlink{structumass__softc_a7ccf04dc5c49157c8109231e7792ee0e}{sc\_transfer}}.\mbox{\hyperlink{structumass__softc_a471768bc5c923935e5a18087befa3d06}{data\_len}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02995}02995             (dir == \mbox{\hyperlink{umass_8c_adc4b177c894d6bf0c0065c0e8c6a31df}{DIR\_IN}} ? \textcolor{stringliteral}{"{}in"{}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02996}02996             (dir == \mbox{\hyperlink{umass_8c_a91459a263a21d175edba77e9aed856e4}{DIR\_OUT}} ? \textcolor{stringliteral}{"{}out"{}} :}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02997}02997             (dir == \mbox{\hyperlink{umass_8c_a665390e734d124195aa8d263d475c73a}{DIR\_NONE}} ? \textcolor{stringliteral}{"{}no data phase"{}} : \textcolor{stringliteral}{"{}<invalid>"{}}))));}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02998}02998 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l02999}02999 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03000}03000 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03001}03001 umass\_dump\_buffer(\textcolor{keyword}{struct} \mbox{\hyperlink{structumass__softc}{umass\_softc}} *sc, uint8\_t *buffer, uint32\_t buflen,}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03002}03002     uint32\_t printlen)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03003}03003 \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03004}03004         uint32\_t i, j;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03005}03005         \textcolor{keywordtype}{char} s1[40];}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03006}03006         \textcolor{keywordtype}{char} s2[40];}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03007}03007         \textcolor{keywordtype}{char} s3[5];}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03008}03008 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03009}03009         s1[0] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03010}03010         s3[0] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03011}03011 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03012}03012         sprintf(s2, \textcolor{stringliteral}{"{} buffer=\%p, buflen=\%d"{}}, buffer, buflen);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03013}03013         \textcolor{keywordflow}{for} (i = 0; (i < buflen) \&\& (i < printlen); i++) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03014}03014                 j = i \% 16;}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03015}03015                 \textcolor{keywordflow}{if} (j == 0 \&\& i != 0) \{}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03016}03016                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_GEN, \textcolor{stringliteral}{"{}0x \%s\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03017}03017                             s1, s2);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03018}03018                         s2[0] = \textcolor{charliteral}{'\(\backslash\)0'};}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03019}03019                 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03020}03020                 sprintf(\&s1[j * 2], \textcolor{stringliteral}{"{}\%02x"{}}, buffer[i] \& 0xff);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03021}03021         \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03022}03022         \textcolor{keywordflow}{if} (buflen > printlen)}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03023}03023                 sprintf(s3, \textcolor{stringliteral}{"{} ..."{}});}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03024}03024         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(sc, UDMASS\_GEN, \textcolor{stringliteral}{"{}0x \%s\%s\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03025}03025             s1, s2, s3);}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03026}03026 \}}
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03027}03027 }
\DoxyCodeLine{\Hypertarget{umass_8c_source_l03028}03028 \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
