07.06.2013 Views

Scsi - Index of

Scsi - Index of

Scsi - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

673 * @iso_frame_desc: Used to provide arrays <strong>of</strong> ISO transfer buffers and to<br />

674 * collect the transfer status for each buffer.<br />

675 *<br />

676 * This structure identifies USB transfer requests. URBs must be allocated by<br />

677 * calling usb_alloc_urb() and freed with a call to usb_free_urb().<br />

678 * Initialization may be done using various usb_fill_*_urb() functions. URBs<br />

679 * are submitted using usb_submit_urb(), and pending requests may be canceled<br />

680 * using usb_unlink_urb() or usb_kill_urb().<br />

681 *<br />

682 * Data Transfer Buffers:<br />

683 *<br />

684 * Normally drivers provide I/O buffers allocated with kmalloc() or otherwise<br />

685 * taken from the general page pool. That is provided by transfer_buffer<br />

686 * (control requests also use setup_packet), and host controller drivers<br />

687 * perform a dma mapping (and unmapping) for each buffer transferred. Those<br />

688 * mapping operations can be expensive on some platforms (perhaps using a dma<br />

689 * bounce buffer or talking to an IOMMU),<br />

690 * although they're cheap on commodity x86 and ppc hardware.<br />

691 *<br />

692 * Alternatively, drivers may pass the URB_NO_xxx_DMA_MAP transfer flags,<br />

693 * which tell the host controller driver that no such mapping is needed since<br />

694 * the device driver is DMA-aware. For example, a device driver might<br />

695 * allocate a DMA buffer with usb_buffer_alloc() or call usb_buffer_map().<br />

696 * When these transfer flags are provided, host controller drivers will<br />

697 * attempt to use the dma addresses found in the transfer_dma and/or<br />

698 * setup_dma fields rather than determining a dma address themselves. (Note<br />

699 * that transfer_buffer and setup_packet must still be set because not all<br />

700 * host controllers use DMA, nor do virtual root hubs).<br />

701 *<br />

66<br />

702 * Initialization:<br />

703 *<br />

704 * All URBs submitted must initialize the dev, pipe, transfer_flags (may be<br />

705 * zero), and complete fields.<br />

706 * The URB_ASYNC_UNLINK transfer flag affects later invocations <strong>of</strong><br />

707 * the usb_unlink_urb() routine. Note: Failure to set URB_ASYNC_UNLINK<br />

708 * with usb_unlink_urb() is deprecated. For synchronous unlinks use<br />

709 * usb_kill_urb() instead.<br />

710 *<br />

711 * All URBs must also initialize<br />

712 * transfer_buffer and transfer_buffer_length. They may provide the<br />

713 * URB_SHORT_NOT_OK transfer flag, indicating that short reads are<br />

714 * to be treated as errors; that flag is invalid for write requests.<br />

715 *

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

Saved successfully!

Ooh no, something went wrong!