07.06.2013 Views

Scsi - Index of

Scsi - Index of

Scsi - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

112 * define one <strong>of</strong> these if you don't want to - there is a default<br />

113 * routine that is present that should work in most cases. For those<br />

114 * driver authors that have the inclination and ability to write their<br />

115 * own strategy routine, this is where it is specified. Note - the<br />

116 * strategy routine is *ALWAYS* run in the context <strong>of</strong> the kernel eh<br />

117 * thread. Thus you are guaranteed to *NOT* be in an interrupt<br />

118 * handler when you execute this, and you are also guaranteed to<br />

119 * *NOT* have any other commands being queued while you are in the<br />

120 * strategy routine. When you return from this function, operations<br />

121 * return to normal.<br />

122 *<br />

123 * See scsi_error.c scsi_unjam_host for additional comments about<br />

124 * what this function should and should not be attempting to do.<br />

125 *<br />

126 * Status: REQUIRED (at least one <strong>of</strong> them)<br />

127 */<br />

128 int (* eh_strategy_handler)(struct <strong>Scsi</strong>_Host *);<br />

129 int (* eh_abort_handler)(struct scsi_cmnd *);<br />

130 int (* eh_device_reset_handler)(struct scsi_cmnd *);<br />

131 int (* eh_bus_reset_handler)(struct scsi_cmnd *);<br />

132 int (* eh_host_reset_handler)(struct scsi_cmnd *);<br />

133<br />

134 /*<br />

135 * This is an optional routine to notify the host that the scsi<br />

136 * timer just fired. The returns tell the timer routine what to<br />

137 * do about this:<br />

138 *<br />

139 * EH_HANDLED: I fixed the error, please complete the command<br />

140 * EH_RESET_TIMER: I need more time, reset the timer and<br />

141 * begin counting again<br />

142 * EH_NOT_HANDLED Begin normal error recovery<br />

143 *<br />

144 * Status: OPTIONAL<br />

145 */<br />

146 enum scsi_eh_timer_return (* eh_timed_out)(struct scsi_cmnd *);<br />

147<br />

148 /*<br />

149 * Before the mid layer attempts to scan for a new device where none<br />

150 * currently exists, it will call this entry in your driver. Should<br />

151 * your driver need to allocate any structs or perform any other init<br />

152 * items in order to send commands to a currently unused target/lun<br />

97<br />

153 * combo, then this is where you can perform those allocations. This<br />

154 * is specifically so that drivers won't have to perform any kind <strong>of</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!