aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
* usb: penwell_otg: put back PHY to normal mode before charger detectionHao Wu2010-12-091-0/+2
| | | | | | | This patch puts PHY back to normal mode before access MSIC register for charger detection. This fixed issue, boot up with connected to PC case. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: add runtime pm support for otgJiebing Li2010-12-091-0/+77
| | | | | | | This patch enables runtime pm support for langwell_udc controller driver. Signed-off-by: Jiebing Li <jiebing.li@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: add runtime pm support for otgHao Wu2010-12-091-18/+98
| | | | | | | This patch contains update on transceiver driver interfaces. Mainly to support runtime pm for OTG. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: core: add runtime pm support for Intel Medfield platformAndy Luo2010-12-091-7/+22
| | | | | | | This patch enables runtime pm support for usb host driver Signed-off-by: Andy Luo <yifei.luo@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: ehci-langwell-pci: add transceiver driver interface for runtime pmHao Wu2010-12-091-1/+46
| | | | | | | This patch adds transceiver driver interface for runtime pm, in order to support OTG case. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: penwell_otg: add runtime pm supportHao Wu2010-12-091-21/+155
| | | | | | Add runtime pm support in penwell_otg transceiver driver. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: fixup missing size field for non transceiver buildAlan Cox2010-12-091-0/+1
| | | | Signed-off-by: Alan Cox <alan@linux.intel.com>
* usb: langwell_udc: add HighSpeed/FullSpeed events notificationHao Wu2010-12-091-2/+14
| | | | | | | | | | It adds notification to Intel Penwell otg transceiver driver for HighSpeed/FullSpeed. This change mainly to support battery charging current negotiation for Charging Downstream Port(CDP) case. USB OTG Transceiver driver will notify battery driver about charging current limitation change according to different Speed Mode (HS/FS). Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: penwell_otg: add charging current negotiation and notification supportHao Wu2010-12-091-71/+405
| | | | | | | | | | | This patch adds charging current negotiation in Transceiver driver for SDP/CDP/DCP cases and it also provides notification/query interfaces to Battery driver for charging current information notification. *It requires device controller/gadget driver modification to fully support SDP/CDP cases. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: penwell_otg: add USB charger detectionHao Wu2010-12-091-17/+238
| | | | | | | | | | This patch enables penwell USB OTG Transceiver driver USB Charger Detection support. It can detect different types of USB charger based on MSIC. SDP (Standard Downstream Port - USB Host port charger), DCP (Dedicated Charging Port - USB Wall charger), CDP (Charging Downstream Port - Special USB Host port charger). Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: penwell_otg: Add Intel Penwell USB OTG Transceiver driverHao Wu2010-12-093-0/+2343
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description This driver tries to implement host/device role switch according to OTG 2.0 spec on MFLD. The actual host and device functions are accomplished in modified EHCI driver and Intel Penwell USB OTG device controller driver. This is the first version and it only support Host Peripheral role switch per different USB cable. Development work is still on going, more features will be submitted soon after verified. Dependency CONFIG_INTEL_SCU_IPC - IPC driver. Enable driver in Kernel "Device Drivers" ---> "USB support" ---> "Intel Penwell USB OTG dual-role support" Kernel configs CONFIG_INTEL_SCU_IPC=y CONFIG_USB=y CONFIG_USB_OTG=y CONFIG_USB_OTG_UTILS=y CONFIG_PENWELL_OTG=y Todo List USB Charging Support Power management (runtime) MHL-USB coexistence HNP/HNP Polling/SRP ADP(Attach Detection Protocol) Support Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: ehci-pci: add Intel Penwell USB Host Power budget limitationHao Wu2010-12-091-0/+5
| | | | | | | Intel Penwell USB Host only can provide 200mA via its OTG port. so add power budget limitaition for power supply safety on OTG port. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: set vbus_active flag according to stateHao Wu2010-12-091-4/+20
| | | | | | | | This patch adds active bit setting in order to avoid issues with composite gadget on pullup functions which query on this bit. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: enable PHY Low Power Mode for PenwellJiebing Li2010-12-091-12/+6
| | | | | | | This patch enables PHY Low Power mode to save power for Penwell case. Signed-off-by: Jiebing Li <jiebing.li@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: add Intel Penwell USB Device Controller supportJiebing Li2010-12-093-39/+17
| | | | | | | | | Add Intel Penwell USB Device Controller Support in langwell_udc driver. This driver will support both langwell/penwell USB Device controller with this patch. Signed-off-by: JiebingLi <jiebing.li@intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: ehci-pci: Support Intel Medfield Platform USB OTG HostHao Wu2010-12-092-3/+3
| | | | | | | This patch enables EHCI USB host function for Intel Medfield Platform USB OTG host function. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_otg: use simple IPC command to control VBus powerHao Wu2010-12-091-37/+11
| | | | | | | | | | | | | Direct access to PMIC register is not safe and will impact battery charging. New IPC command supported in SCU FW for VBus power control. USB OTG driver will switch to such commands instead of direct access to PMIC register for safety and SCU FW will handle the actual work after got the request(IPC command). Due to this change, usb driver should wait more time for sync OTGSC with USBCFG by SCU. Update wait time from 2ms to 5ms. Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: ehci-langwell-pci: support common OTG data structure for Intel MID platformHao Wu2010-12-092-48/+119
| | | | | | | | | | | | | | | This patch modified ehci host pci controller driver for langwell, support common OTG data structure for Intel MID platform. Main changes: - Update OTG related data structure. - Provide start_host/stop_host function to transceiver. - Provide register/unregister function. modified: drivers/usb/host/ehci-hcd.c modified: drivers/usb/host/ehci-langwell-pci.c Signed-off-by: Hao Wu <hao.wu@intel.com>
* ehci: Support Intel Moorestown EHCI controller SRAM QH/QTD/ITD/SITD pool cachingJacob Pan2010-12-094-9/+62
| | | | | | | | | | | | The Intel Moorestown platform has MPH and OTG EHCI controllers that have internal SRAM that could be used as descriptors DMA pool caching. The SRAM is exposed via PCI BAR1. The limitation here is the SRAM access should be 32bit aligned. A separate patch "EHCI: Make ehci_qh structure items all 32bit aligned" has been submitted to linux-usb mailling list. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com>
* ehci: Support for Intel Moorestown MPH and OTG hostAlek Du2010-12-097-3/+256
| | | | | | | | | | | | The Intel Moorestown platform has EHCI MPH and EHCI OTG host. This patch adds PCI probe part for them. The HNP part and SRAM part will be added in another patch. This patch depends on the OTG transceive and OTG client patch from Hang Yuan that should be accepted already. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Hao Wu <hao.wu@intel.com>
* usb: langwell_udc: use common OTG data structure for Intel MID platformHao Wu2010-12-092-54/+132
| | | | | | | | | | | | | | | This patch provided the support to common OTG data structure. Main changes: - Notify otg related events using notifier and remove direct access to otg data structure(state machine). - Provide start_peripheral/stop_peripheral function to transceiver. - Provide client register/unregister function. modified: drivers/usb/gadget/langwell_udc.c modified: drivers/usb/gadget/langwell_udc.h Signed-off-by: Hao Wu <hao.wu@intel.com>
* Merge branch 'for-greg' of git://gitorious.org/usb/usb into workGreg Kroah-Hartman2010-11-303-38/+91
|\
| * usb: musb: do not use dma for control transfersAnand Gadiyar2010-11-223-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Inventra DMA engine used with the MUSB controller in many SoCs cannot use DMA for control transfers on EP0, but can use DMA for all other transfers. The USB core maps urbs for DMA if hcd->self.uses_dma is true. (hcd->self.uses_dma is true for MUSB as well). Split the uses_dma flag into two - one that says if the controller needs to use PIO for control transfers, and another which says if the controller uses DMA (for all other transfers). Also, populate this flag for all MUSB by default. (Tested on OMAP3 and OMAP4 boards, with EHCI and MUSB HCDs simultaneously in use). Signed-off-by: Maulik Mankad <x0082077@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: Oliver Neukum <oliver@neukum.org> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Cc: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: musb: gadget: fix compilation warningAjay Kumar Gupta2010-11-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Fixes below compilation warning when musb driver is compiled for PIO mode: drivers/usb/musb/musb_gadget.c: In function 'musb_g_rx': drivers/usb/musb/musb_gadget.c:840: warning: label 'exit' defined but not used Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: musb: clear RXCSR_AUTOCLEAR before PIO readMing Lei2010-11-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If RXCSR_AUTOCLEAR flag is not cleard before PIO reading, one packet may be recieved by musb fifo, but no chance to notify software, so cause packet loss, follows the detailed process: - PIO read one packet - musb fifo auto clear the MUSB_RXCSR_RXPKTRDY - musb continue to recieve the next packet, and MUSB_RXCSR_RXPKTRDY is set - software clear the MUSB_RXCSR_RXPKTRDY, so there is no chance for musb to notify software that the 2nd recieved packet. The patch does fix the g_ether issue below: - use fifo_mode 3 to enable double buffer - 'ping -s 1024 IP_OF_BEAGLE_XM' - one usb packet of 512 byte is lost, so ping failed, which can be observed by wireshark note: Beagle xm takes musb rtl1.8 and may fallback to pio mode for unaligned buffer. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: musb: unmap dma buffer when switching to PIOHema Kalliguddi2010-11-221-38/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffer is mapped to dma when dma channel is allocated. If, for some reason, dma channel programming fails, musb code will fallback to PIO mode to transfer that request. In that case, we need to unmap the buffer back to CPU. MUSB RTL1.8 and above cannot handle buffers which are not 32bit aligned. That happens to every request sent by g_ether gadget driver. Since the buffer sent was unaligned, we need to fallback to PIO. Because of that, g_ether was failing due to missing buffer unmapping. With this patch and [1] g_ether works fine with all MUSB revisions. Verified with OMAP3630 board, which has MUSB RTL1.8 using g_ether and g_zero. [1] http://www.spinics.net/lists/linux-usb/msg38400.html Signed-off-by: Hema HK <hemahk@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* | Merge branch 'for-usb-linus' of ↵Greg Kroah-Hartman2010-11-304-0/+215
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into work
| * | xhci: Don't let the USB core disable SuperSpeed ports.Sarah Sharp2010-11-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disabling SuperSpeed ports is a Very Bad Thing (TM). It disables SuperSpeed terminations, which means that devices will never connect at SuperSpeed on that port. For USB 2.0/1.1 ports, disabling the port meant that the USB core could always get a connect status change later. That's not true with USB 3.0 ports. Do not let the USB core disable SuperSpeed ports. We can't rely on the device speed in the port status registers, since that isn't valid until there's a USB device connected to the port. Instead, we use the port speed array that's created from the Extended Capabilities registers. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Don Zickus <dzickus@redhat.com> Cc: stable@kernel.org
| * | xhci: Setup array of USB 2.0 and USB 3.0 ports.Sarah Sharp2010-11-192-0/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An xHCI host controller contains USB 2.0 and USB 3.0 ports, which can occur in any order in the PORTSC registers. We cannot read the port speed bits in the PORTSC registers at init time to determine the port speed, since those bits are only valid when a USB device is plugged into the port. Instead, we read the "Supported Protocol Capability" registers in the xHC Extended Capabilities space. Those describe the protocol, port offset in the PORTSC registers, and port count. We use those registers to create two arrays of pointers to the PORTSC registers, one for USB 3.0 ports, and another for USB 2.0 ports. A third array keeps track of the port protocol major revision, and is indexed with the internal xHCI port number. This commit is a bit big, but it should be queued for stable because the "Don't let the USB core disable SuperSpeed ports" patch depends on it. There is no other way to determine which ports are SuperSpeed ports without this patch. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Don Zickus <dzickus@redhat.com> Cc: stable@kernel.org
| * | xhci: Fix reset-device and configure-endpoint commandsPaul Zimmerman2010-11-191-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have been having problems with the USB-IF Gold Tree tests when plugging and unplugging devices from the tree. I have seen that the reset-device and configure-endpoint commands, which are invoked from xhci_discover_or_reset_device() and xhci_configure_endpoint(), will sometimes time out. After much debugging, I determined that the commands themselves do not actually time out, but rather their completion events do not get delivered to the right place. This happens when the command ring has just wrapped around, and it's enqueue pointer is left pointing to the link TRB. xhci_discover_or_reset_device() and xhci_configure_endpoint() use the enqueue pointer directly as their command TRB pointer, without checking whether it's pointing to the link TRB. When the completion event arrives, if the command TRB is pointing to the link TRB, the check against the command ring dequeue pointer in handle_cmd_in_cmd_wait_list() fails, so the completion inside the command does not get signaled. The patch below fixes the timeout problem for me. This should be queued for the 2.6.35 and 2.6.36 stable trees. 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 autosuspend bug in usb-serialAlan Stern2010-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1437) fixes a bug in the usb-serial autosuspend handling. Since the usb-serial core now has autosuspend support, it must set the .supports_autosuspend member in every serial driver it registers. Otherwise the usb_autopm_get_interface() call won't work. This fixes Bugzilla #23012. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: stable@kernel.org Reported-by: Kevin Smith <thirdwiggin@gmail.com> Reported-and-tested-by: Simon Gerber <gesimu@gmail.com> Reported-and-tested-by: Matteo Croce <matteo@openwrt.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | USB: ehci: disable LPM and PPCD for nVidia MCP89 chipsBrian J. Tarricone2010-11-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested on MacBookAir3,1. Without this, we get EPROTO errors when fetching device config descriptors. Signed-off-by: Brian Tarricone <brian@tarricone.org> Reported-by: Benoit Gschwind <gschwind@gnu-log.net> Tested-by: Edgar Hucek <gimli@dark-green.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | USB: serial: ftdi_sio: Vardaan USB RS422/485 converter PID addedJacques Viviers2010-11-302-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the PID for the Vardaan Enterprises VEUSB422R3 USB to RS422/485 converter. It uses the same chip as the FTDI_8U232AM_PID 0x6001. This should also work with the stable branches for: 2.6.31, 2.6.32, 2.6.33, 2.6.34, 2.6.35, 2.6.36 Signed-off-by: Jacques Viviers <jacques.viviers@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | USB: yurex: add .llseek fop to file_operationsTomoki Sekiyama2010-11-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default llseek operation behavior was changed by the patch named "vfs: make no_llseek the default" after the yurex driver had been merged, so the llseek to yurex is now ignored. This patch add llseek fop with default_llseek to yurex driver to catch up to the change. Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | USB: ftdi_sio: Add ID for RT Systems USB-29B radio cableMichael Stuermer2010-11-302-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Another variant of the RT Systems programming cable for ham radios. Signed-off-by: Michael Stuermer <ms@mallorn.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | Merge branch 'usb-linus' of ↵Linus Torvalds2010-11-2419-48/+151
|\| | | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: EHCI: fix obscure race in ehci_endpoint_disable USB: gadget: AT91: fix typo in atmel_usba_udc driver USB: isp1362-hcd - fix section mismatch warning USB: EHCI: AMD periodic frame list table quirk USB: OTG: langwell_otg: fix up some sysfs attribute permissions USB: misc: usbsevseg: fix up some sysfs attribute permissions USB: misc: usbled: fix up some sysfs attribute permissions USB: misc: trancevibrator: fix up a sysfs attribute permission USB: misc: cypress_cy7c63: fix up some sysfs attribute permissions USB: storage: sierra_ms: fix sysfs file attribute USB: ehci: fix debugfs 'lpm' permissions USB: atm: ueagle-atm: fix up some permissions on the sysfs files xhci: Fix command ring replay after resume. xHCI: fix wMaxPacketSize mask xHCI: release spinlock when setup interrupt xhci: Remove excessive printks with shared IRQs.
| * USB: EHCI: fix obscure race in ehci_endpoint_disableAlan Stern2010-11-161-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1435) fixes an obscure and unlikely race in ehci-hcd. When an async URB is unlinked, the corresponding QH is removed from the async list. If the QH's endpoint is then disabled while the URB is being given back, ehci_endpoint_disable() won't find the QH on the async list, causing it to believe that the QH has been lost. This will lead to a memory leak at best and quite possibly to an oops. The solution is to trust usbcore not to lose track of endpoints. If the QH isn't on the async list then it doesn't need to be taken off the list, but the driver should still wait for the QH to become IDLE before disabling it. In theory this fixes Bugzilla #20182. In fact the race is so rare that it's not possible to tell whether the bug is still present. However, adding delays and making other changes to force the race seems to show that the patch works. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Stefan Richter <stefanr@s5r6.in-berlin.de> CC: David Brownell <david-b@pacbell.net> CC: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: gadget: AT91: fix typo in atmel_usba_udc driverJosh Wu2010-11-161-1/+1
| | | | | | | | | | | | | | | | compile fix for bug introduced by 969affff547027) Signed-off-by: Josh Wu <josh.wu@atmel.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: isp1362-hcd - fix section mismatch warningAxel Lin2010-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix section mismatch warning by using "__devinit" annotation for isp1362_probe. WARNING: drivers/usb/host/isp1362-hcd.o(.data+0x0): Section mismatch in reference from the variable isp1362_driver to the function .init.text:isp1362_probe() The variable isp1362_driver references the function __init isp1362_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console, Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: EHCI: AMD periodic frame list table quirkAndiry Xu2010-11-164-5/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On AMD SB700/SB800/Hudson-2/3 platforms, USB EHCI controller may read/write to memory space not allocated to USB controller if there is longer than normal latency on DMA read encountered. In this condition the exposure will be encountered only if the driver has following format of Periodic Frame List link pointer structure: For any idle periodic schedule, the Frame List link pointers that have the T-bit set to 1 intending to terminate the use of frame list link pointer as a physical memory pointer. Idle periodic schedule Frame List Link pointer shoule be in the following format to avoid the issue: Frame list link pointer should be always contains a valid pointer to a inactive QHead with T-bit set to 0. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: OTG: langwell_otg: fix up some sysfs attribute permissionsGreg Kroah-Hartman2010-11-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | They should not be writable by any user. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Hao Wu <hao.wu@intel.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Alek Du <alek.du@intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: misc: usbsevseg: fix up some sysfs attribute permissionsGreg Kroah-Hartman2010-11-151-6/+4
| | | | | | | | | | | | | | | | | | They should not be writable by any user. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Harrison Metzger <harrisonmetz@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: misc: usbled: fix up some sysfs attribute permissionsGreg Kroah-Hartman2010-11-151-1/+1
| | | | | | | | | | | | | | | | They should not be writable by any user. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: misc: trancevibrator: fix up a sysfs attribute permissionGreg Kroah-Hartman2010-11-151-1/+1
| | | | | | | | | | | | | | | | | | It should not be writable by any user. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Sam Hocevar <sam@zoy.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: misc: cypress_cy7c63: fix up some sysfs attribute permissionsGreg Kroah-Hartman2010-11-151-4/+2
| | | | | | | | | | | | | | | | | | They should not be writable by any user. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oliver Bock <bock@tfh-berlin.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: storage: sierra_ms: fix sysfs file attributeGreg Kroah-Hartman2010-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | A non-writable sysfs file shouldn't have writable attributes. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Kevin Lloyd <klloyd@sierrawireless.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: ehci: fix debugfs 'lpm' permissionsGreg Kroah-Hartman2010-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The permissions for the lpm debugfs file is incorrect, this fixes it. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alek Du <alek.du@intel.com> Cc: Jacob Pan <jacob.jun.pan@intel.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: atm: ueagle-atm: fix up some permissions on the sysfs filesGreg Kroah-Hartman2010-11-151-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | Some of the sysfs files had the incorrect permissions. Some didn't make sense at all (writable for a file that you could not write to?) Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matthieu Castet <castet.matthieu@free.fr> Cc: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Damien Bergamini <damien.bergamini@free.fr> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Merge branch 'for-usb-linus' of ↵Greg Kroah-Hartman2010-11-154-13/+70
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus * 'for-usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci: xhci: Fix command ring replay after resume. xHCI: fix wMaxPacketSize mask xHCI: release spinlock when setup interrupt xhci: Remove excessive printks with shared IRQs.
| | * xhci: Fix command ring replay after resume.Sarah Sharp2010-11-151-10/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Andiry's xHCI bus suspend patch introduced the possibly of a host controller replaying old commands on the command ring, if the host successfully restores the registers after a resume. After a resume from suspend, the xHCI driver must restore the registers, including the command ring pointer. I had suggested that Andiry set the command ring pointer to the current command ring dequeue pointer, so that the driver wouldn't have to zero the command ring. Unfortunately, setting the command ring pointer to the current dequeue pointer won't work because the register assumes the pointer is 64-byte aligned, and TRBs on the command ring are 16-byte aligned. The lower seven bits will always be masked off, leading to the written pointer being up to 3 TRBs behind the intended pointer. Here's a log excerpt. On init, the xHCI driver places a vendor-specific command on the command ring: [ 215.750958] xhci_hcd 0000:01:00.0: Vendor specific event TRB type = 48 [ 215.750960] xhci_hcd 0000:01:00.0: NEC firmware version 30.25 [ 215.750962] xhci_hcd 0000:01:00.0: Command ring deq = 0x3781e010 (DMA) When we resume, the command ring dequeue pointer to be written should have been 0x3781e010. Instead, it's 0x3781e000: [ 235.557846] xhci_hcd 0000:01:00.0: // Setting command ring address to 0x3781e001 [ 235.557848] xhci_hcd 0000:01:00.0: `MEM_WRITE_DWORD(3'b000, 64'hffffc900100bc038, 64'h3781e001, 4'hf); [ 235.557850] xhci_hcd 0000:01:00.0: `MEM_WRITE_DWORD(3'b000, 32'hffffc900100bc020, 32'h204, 4'hf); [ 235.557866] usb usb9: root hub lost power or was reset (I can't see the results of this bug because the xHCI restore always fails on this box, and the xHCI driver re-allocates everything.) The fix is to zero the command ring and put the software and hardware enqueue and dequeue pointer back to the beginning of the ring. We do this before the system suspends, to be paranoid and prevent the BIOS from starting the host without clearing the command ring pointer, which might cause the host to muck with stale memory. (The pointer isn't required to be in the suspend power well, but it could be.) The command ring pointer is set again after the host resumes. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Tested-by: Andiry Xu <andiry.xu@amd.com>