summaryrefslogtreecommitdiffstats
path: root/include/linux/usb/ch9.h
Commit message (Collapse)AuthorAgeFilesLines
* USB: Add support for SuperSpeed isoc endpointsPaul Zimmerman2011-03-131-0/+2
| | | | | | | | | | | | | | | | Use the Mult and bMaxBurst values from the endpoint companion descriptor to calculate the max length of an isoc transfer. Add USB_SS_MULT macro to access Mult field of bmAttributes, at Sarah's suggestion. This patch should be queued for the 2.6.36 and 2.6.37 stable trees, since those were the first kernels to have isochronous support for SuperSpeed devices. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@kernel.org
* USB: fix unsafe USB_SS_MAX_STREAMS() definitionDmitry Torokhov2011-02-251-1/+1
| | | | | | | | Macro arguments used in expressions need to be enclosed in parenthesis to avoid unpleasant surprises. Signed-off-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: langwell_udc: add usb test mode supportLuo Andy2010-11-301-0/+10
| | | | | | | | This patch adds test mode support for Langwell gadget driver. Signed-off-by: Henry Yuan <hang.yuan@intel.com> Signed-off-by: Andy Luo <yifei.luo@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: usb3.0 ch9 definitionsTatyana Brokhman2010-10-221-1/+57
| | | | | | | | | | Adding SuperSpeed usb definitions as defined by ch9 of the USB3.0 spec. This patch is a preparation for adding SuperSpeed support to the gadget framework. Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB Gadget: Verify VBUS current before setting the device self-powered bitParirajan Muthalagu2010-10-221-0/+10
| | | | | | | | | Acked-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Praveena Nadahally <praveen.nadahally@stericsson.com> Signed-off-by: Parirajan Muthalagu <parirajan.muthalagu@stericsson.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: include/usb/*.h checkpatch cleanupGreg Kroah-Hartman2010-05-201-6/+6
| | | | | | | Lots of minor formatting cleanups in includes/usb/ to make checkpatch happier. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Add definition for the Pipe Usage descriptorMatthew Wilcox2010-05-201-0/+2
| | | | | | | | The Pipe Usage descriptor is needed for USB Attached SCSI Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Add parsing of SuperSpeed endpoint companion descriptor.Sarah Sharp2010-05-201-0/+2
| | | | | | | | | | | Allow the xHCI drivers (and any new USB 3.0 drivers) to parse the SuperSpeed endpoint companion descriptor to find the maximum number of bulk endpoint streams the endpoint supports. This is used to calculate the maximum total number of streams the driver can allocate. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: rename USB_SPEED_VARIABLE to USB_SPEED_WIRELESSGreg Kroah-Hartman2010-03-021-1/+1
| | | | | | | | | It's really the wireless speed, so rename the thing to make more sense. Based on a recommendation from David Vrabel Cc: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Move vendor subclass definition from usb/audio.h to usb/ch9.hLaurent Pinchart2009-09-231-0/+2
| | | | | | | | USB_SUBCLASS_VENDOR_SPEC is common to several USB classes and as such belongs to usb/ch9.h. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Move endpoint sync type definitions from usb/audio.h to usb/ch9.hLaurent Pinchart2009-09-231-0/+6
| | | | | | | | And use the new definitions in the USB Audio Class gadget driver. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Change names of SuperSpeed ep companion descriptor structs.Sarah Sharp2009-06-151-2/+2
| | | | | | | | | | | | Differentiate between SuperSpeed endpoint companion descriptor and the wireless USB endpoint companion descriptor. Make all structure names for this descriptor have "ss" (SuperSpeed) in them. David Vrabel asked for this change in http://marc.info/?l=linux-usb&m=124091465109367&w=2 Reported-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Parse and store the SuperSpeed endpoint companion descriptors.Sarah Sharp2009-06-151-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB 3.0 bus specification added an "Endpoint Companion" descriptor that is supposed to follow all SuperSpeed Endpoint descriptors. This descriptor is used to extend the bus protocol to allow more packets to be sent to an endpoint per "microframe". The word microframe was removed from the USB 3.0 specification because the host controller does not send Start Of Frame (SOF) symbols down the USB 3.0 wires. The descriptor defines a bMaxBurst field, which indicates the number of packets of wMaxPacketSize that a SuperSpeed device can send or recieve in a service interval. All non-control endpoints may set this value as high as 16 packets (bMaxBurst = 15). The descriptor also allows isochronous endpoints to further specify that they can send and receive multiple bursts per service interval. The bmAttributes allows them to specify a "Mult" of up to 3 (bmAttributes = 2). Bulk endpoints use bmAttributes to report the number of "Streams" they support. This was an extension of the endpoint pipe concept to allow multiple mass storage device commands to be outstanding for one bulk endpoint at a time. This should allow USB 3.0 mass storage devices to support SCSI command queueing. Bulk endpoints can say they support up to 2^16 (65,536) streams. The information in the endpoint companion descriptor must be stored with the other device, config, interface, and endpoint descriptors because the host controller needs to access them quickly, and we need to install some default values if a SuperSpeed device doesn't provide an endpoint companion descriptor. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Add SuperSpeed to the list of USB device speeds.Sarah Sharp2009-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Modify the USB core to handle the new USB 3.0 speed, "SuperSpeed". This is 5.0 Gbps (wire speed). There are probably more places that check for speed that I've missed. SuperSpeed devices have a 512 byte endpoint 0 max packet size. This shows up as a bMaxPacketSize0 set to 0x09 (see table 9-8 of the USB 3.0 bus spec). xHCI spec says that the xHC can handle intervals up to 2^15 microframes. That might change when real silicon becomes available. Add FIXME note for SuperSpeed isochronous endpoints. They can transmit up to 16 packets in one "burst" before they wait for an acknowledgment of the packets. They can do up to 3 bursts per microframe (determined by the mult value in the endpoint companion descriptor). The xHCI driver doesn't have support for isoc yet, so fix this later. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: pedantic: spelling correction in comment for ch9.hD.J. Capelis2009-03-241-1/+1
| | | | | | | | Just noticed this during a grep, figured I might as well send it in. From: D.J. Capelis <dev@capelis.dj> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: allow libusb to talk to unauthenticated WUSB devicesDavid Vrabel2009-03-241-1/+1
| | | | | | | | | | | | | | To permit a userspace application to associate with WUSB devices using numeric association, control transfers to unauthenticated WUSB devices must be allowed. This requires that wusbcore correctly sets the device state to UNAUTHENTICATED, DEFAULT and ADDRESS and that control transfers can be performed to UNAUTHENTICATED devices. Signed-off-by: David Vrabel <david.vrabel@csr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Move definitions from usb.h to usb/ch9.hJulia Lawall2009-03-241-0/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions: usb_endpoint_dir_in(epd) usb_endpoint_dir_out(epd) usb_endpoint_is_bulk_in(epd) usb_endpoint_is_bulk_out(epd) usb_endpoint_is_int_in(epd) usb_endpoint_is_int_out(epd) usb_endpoint_is_isoc_in(epd) usb_endpoint_is_isoc_out(epd) usb_endpoint_num(epd) usb_endpoint_type(epd) usb_endpoint_xfer_bulk(epd) usb_endpoint_xfer_control(epd) usb_endpoint_xfer_int(epd) usb_endpoint_xfer_isoc(epd) are moved from include/linux/usb.h to include/linux/usb/ch9.h. include/linux/usb/ch9.h makes more sense for these functions because they only depend on constants that are defined in this file. Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix comment about endianness of descriptorsPhil Endecott2008-12-171-2/+6
| | | | | | | | | | | | | This patch fixes a comment and clarifies the documentation about the endianness of descriptors. The current policy is that descriptors will be little-endian at the API even on big-endian systems; however the /proc/bus/usb API predates this policy and presents descriptors with some multibyte fields byte-swapped. Signed-off-by: Phil Endecott <usb_endian_patch@chezphil.org> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Add the USB 2.0 extension descriptor.Sarah Sharp2008-05-021-1/+11
| | | | | | | | | | | | | | This device descriptor was added by the recent USB Link Power Management (LPM) ECN. It indicates whether the USB device supports LPM. This descriptor is grouped under a Binary Device Object Store (BOS) descriptor. Update the BOS comments to indicate any USB device (not just wireless USB devices) can implement BOS descriptors. Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Standardize inclusion protection and add where missing.Robert P. J. Day2008-04-241-1/+1
| | | | | | | | | | | | | | | For the header files in include/linux/usb, add missing multiple inclusion protection and standardize what's already there. The apparent standards: * macro name of __LINUX_USB_headerfile_H * inclusion protection placed after leading comment block * macro name added as a comment on the final #endif * any obvious trivial whitespace cleanup associated with the above Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: defines for USB "Link Power Management" (LPM) ECNDavid Brownell2008-04-241-3/+11
| | | | | | | | | | | | | | | | | | There's a new PM-related change notice for the USB 2.0 specification called "Link Power Management" (LPM). It defines a new "L1 Suspend" state which resembles the current (L2) suspend state, except that it can be entered and exited much more quickly. It should thus be more useful for runtime PM, even though it doesn't mandate reduced power draw from VBUS. This patch provides the relevant #defines for usbcore. Actually implementing these mechanisms requires host silicon that can generate new USB packets, plus hubs handling some new requests and peripherals which understand the new packets. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add USB_DT_CS_RADIO_CONTROL define to ch9.hGreg Kroah-Hartman2008-04-241-0/+1
| | | | | | | | | This is needed by the wireless usb developers, and is part of the USB spec. Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: <linux/usb/ch9.h> minor doc updateDavid Brownell2007-04-271-6/+9
| | | | | | | | | Minor doc update to <linux/usb/ch9.h> ... say where USB_DT_CS_* came from and update the definitions to match how they're derived there. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add rationale on why usb descriptor structures have to be packedInaky Perez-Gonzalez2007-02-231-4/+18
| | | | | | | | | | Add argumentation in defense of using __attribute__((packed)) in USB descriptors authored by Dave Brownell. Necessary as in some cases it seems superfluous. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: descriptor structures have to be packedInaky Perez-Gonzalez2007-02-161-10/+10
| | | | | | | | | | | | | usb: descriptor structures have to be packed Many of the Wireless USB decriptors added to usb_ch9.h don't have the __attribute__((packed)) tag, and thus, they don't reflect the wire size. This patch fixes that. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: define USB_CLASS_MISC in <linux/usb/ch9.h>David Brownell2007-02-071-0/+1
| | | | | | | | Add USB_CLASS_MISC to <linux/usb/ch9.h> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h>David Brownell2007-02-071-0/+562
This moves <linux/usb_ch9.h> to <linux/usb/ch9.h> to reduce some of the clutter of usb header files. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>