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.

296 }<br />

297<br />

298 US_DEBUGP("-- transfer complete\n");<br />

299 return USB_STOR_XFER_GOOD;<br />

300<br />

301 /* stalled */<br />

302 case -EPIPE:<br />

303 /* for control endpoints, (used by CB[I]) a stall indicates<br />

304 * a failed command */<br />

305 if (usb_pipecontrol(pipe)) {<br />

306 US_DEBUGP("-- stall on control pipe\n");<br />

307 return USB_STOR_XFER_STALLED;<br />

308 }<br />

309<br />

310 /* for other sorts <strong>of</strong> endpoint, clear the stall */<br />

311 US_DEBUGP("clearing endpoint halt for pipe 0x%x\n", pipe);<br />

312 if (usb_stor_clear_halt(us, pipe) < 0)<br />

313 return USB_STOR_XFER_ERROR;<br />

314 return USB_STOR_XFER_STALLED;<br />

315<br />

316 /* timeout or excessively long NAK */<br />

317 case -ETIMEDOUT:<br />

318 US_DEBUGP("-- timeout or NAK\n");<br />

319 return USB_STOR_XFER_ERROR;<br />

320<br />

321 /* babble - the device tried to send more than we wanted to read */<br />

322 case -EOVERFLOW:<br />

323 US_DEBUGP("-- babble\n");<br />

324 return USB_STOR_XFER_LONG;<br />

160<br />

325<br />

326 /* the transfer was cancelled by abort, disconnect, or timeout */<br />

327 case -ECONNRESET:<br />

328 US_DEBUGP("-- transfer cancelled\n");<br />

329 return USB_STOR_XFER_ERROR;<br />

330<br />

331 /* short scatter-gather read transfer */<br />

332 case -EREMOTEIO:<br />

333 US_DEBUGP("-- short read transfer\n");<br />

334 return USB_STOR_XFER_SHORT;<br />

335<br />

336 /* abort or disconnect in progress */<br />

337 case -EIO:<br />

338 US_DEBUGP("-- abort or disconnect in progress\n");

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

Saved successfully!

Ooh no, something went wrong!