aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)AuthorFilesLines
2015-03-27USB: f81232: rename private struct member namePeter Hung1-4/+4
Change private struct member name from line_status to modem_status. It will store MSR for some functions used Signed-off-by: Peter Hung <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-03-26usb: host/sl811-hcd: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
drivers/usb/host/sl811-hcd.c:1812:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Fengguang Wu <[email protected]> Acked-by: Lad, Prabhakar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26chipidea: pci: make it depends on NOP_USB_XCEIVAndy Shevchenko1-0/+1
After commit ba1aff67f99a (chipidea: pci: register nop PHY) the PCI glue driver requires nop-PHY to be selected. Thus, make it an explicit dependency. Reported-by: kbuild test robot <[email protected]> Fixes: ba1aff67f99a (chipidea: pci: register nop PHY) Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26chipidea: introduce specific Kconfig options for glue driversAndy Shevchenko2-7/+12
This patch introduces USB_CHIPIDEA_PCI and USB_CHIPIDEA_OF Kconfig options, one per each specific glue driver. This is needed to provide different dependencies they have. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26usb: chipidea: use hrtimer for otg fsm timersLi Jun3-197/+190
Current otg fsm timers are using controller 1ms irq and count it, this patch is to replace it with hrtimer solution, use one hrtimer for all otg timers. Signed-off-by: Li Jun <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26usb: otg-fsm: move 2 otg fsm timers definition to otg_fsm_timerLi Jun2-16/+5
B_DATA_PLS(data-line pulse time) and B_SSEND_SRP(session end to SRP init) are also from OTG&EH 2.0 Specification and they are not chipidea specific. Signed-off-by: Li Jun <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26usb: chipidea: otg: remove unnecessary B_SESS_VLD timerLi Jun2-33/+1
Since BSV irq is enabled for B-device all the time, so B_SESS_VLD timer is not required, and also no need to check BSV status when B_ASE0_BRST timer timeout. Signed-off-by: Li Jun <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26USB: host: ohci-at91: remove useless uclk clockBoris Brezillon1-15/+3
Now that the system clock driver is forwarding set_rate request to the parent clock, we can safely call clk_set_rate on the system clk and get rid of the uclk field. Signed-off-by: Boris Brezillon <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26cdc-wdm: error returns need to be translatedOliver Neukum1-1/+1
One more case of error codes not correctly being correctly returned to user space. Signed-off-by: Olive Neukum <[email protected]>0 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26cdc-wdm: fix endianness bug in debug statementsOliver Neukum1-5/+7
Values directly from descriptors given in debug statements must be converted to native endianness. Signed-off-by: Oliver Neukum <[email protected]> CC: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26cdc-wdm: unify error handling in writeOliver Neukum1-15/+16
This makes sure the error handling path is the same for all error conditions, thus reducing code duplication. Signed-off-by: Oliver Neukum <[email protected]>0 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26cdc-acm: convert to not directly using urb->statusOliver Neukum1-3/+4
A step on the road to passing status as a parameter Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26cdc-acm: surpress misleading messageOliver Neukum1-1/+1
During the entry intro suspend a misleading message can be printed. Surpress it by checking the specific error. Signed-off-by: Oliver Neukum <[email protected]>0 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26cdc-acm: fix race between callback and unthrottleOliver Neukum1-2/+10
Abn URB may be may marked free only after the buffer has been processed or there is a small window during which it could be submitted on another CPU and overwrite an unprocessed buffer Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26usb/misc/usb3503: Always read refclk frequency from DTBen Gamari1-23/+24
This is necessary to set REF_SEL appropriately in uses where refclk is always available. Signed-off-by: Ben Gamari <[email protected]> Acked-by: Marek Szyprowski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26cdc-wdm: return correct error codesOliver Neukum1-1/+1
Lieing to user space is wrong. The real reason for a failure to write should be returned to user space. Signed-off-by: Oliver Neukum <[email protected]>0 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26usb: ehci-orion: add more constants for register valuesThomas Petazzoni1-6/+12
This commit adds new register values for the USB_CMD and USB_MODE registers, which allows to avoid the usage of a number of magic values in orion_usb_phy_v1_setup(). Signed-off-by: Thomas Petazzoni <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26USB: Move usb_disabled() towards top of the fileViresh Kumar1-16/+16
Move usb_disabled() and module_param()/core_param() towards the top of the file, where 'nousb' is defined, as they are all related. Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26USB: Use usb_disabled() consistentlyViresh Kumar1-2/+2
At few places we have used usb_disabled() and at other places used 'nousb' directly. Lets be consistent and use usb_disabled(); Signed-off-by: Viresh Kumar <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26usb: Add driver for Altus Metrum ChaosKey device (v2)Keith Packard3-0/+543
This is a hardware random number generator. The driver provides both a /dev/chaoskeyX entry and hooks the entropy source up to the kernel hwrng interface. More information about the device can be found at http://chaoskey.org The USB ID for ChaosKey was allocated from the OpenMoko USB vendor space and is visible as 'USBtrng' here: http://wiki.openmoko.org/wiki/USB_Product_IDs v2: Respond to review from Oliver Neukum <[email protected]> * Delete extensive debug infrastructure and replace it with calls to dev_dbg. * Allocate I/O buffer separately from device structure to obey requirements for non-coherant architectures. * Initialize mutexes before registering device to ensure that open cannot be invoked before the device is ready to proceed. * Return number of bytes read instead of -EINTR when partial read operation is aborted due to a signal. * Make sure device mutex is unlocked in read error paths. * Add MAINTAINERS entry for the driver Signed-off-by: Keith Packard <[email protected]> Cc: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-26usb: chipidea: usbmisc_imx: fix returnvar.cocci warningskbuild test robot1-2/+1
drivers/usb/chipidea/usbmisc_imx.c:277:5-8: Unneeded variable: "ret". Return "0" on line 297 Removes unneeded variable used to store return value. Generated by: scripts/coccinelle/misc/returnvar.cocci Cc: Julia Lawall <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Fengguang Wu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-25fs: move struct kiocb to fs.hChristoph Hellwig2-0/+2
struct kiocb now is a generic I/O container, so move it to fs.h. Also do a #include diet for aio.h while we're at it. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
2015-03-25USB: ftdi_sio: Use jtag quirk for SNAP Connect E10Doug Goldstein1-2/+6
This patch uses the existing CALAO Systems ftdi_8u2232c_probe in order to avoid attaching a TTY to the JTAG port as this board is based on the CALAO Systems reference design and needs the same fix up. Signed-off-by: Doug Goldstein <[email protected]> CC: stable <[email protected]> [johan: clean up probe logic ] Signed-off-by: Johan Hovold <[email protected]>
2015-03-24Merge tag 'fixes-for-v4.0-rc6' of ↵Greg Kroah-Hartman1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: usb: fix for v4.0-rc6 Here's a single fix to isp1760 calling spin_unlock_irqsave() as we should have. Signed-off-by: Felipe Balbi <[email protected]>
2015-03-24Merge tag 'usb-for-v4.1' of ↵Greg Kroah-Hartman51-1993/+2771
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.1 merge window As usual, a big pile of commits. This time a total of 111 non-merge commits. Other than the usual set of cleanups and non-critical fixes, we have some interesting work for AM335x's MUSB babble recovery. Now that takes a lot less time and we don't have to Reset MUSB all the time. The printer gadget has been converted to configfs interface and the atmel udc has learned suspend/resume with wakeup. Signed-off-by: Felipe Balbi <[email protected]>
2015-03-24usb: isp1760: fix spin unlock in the error path of isp1760_udc_startSudeep Holla1-1/+1
Commit a124820de5fd ("usb: isp1760: fix possible deadlock in isp1760_udc_irq") replaced spin_{un,}lock with spin_{un,}lock_irq{save,restore}. However it missed an error path resulting in the smatch warning as below: drivers/usb/isp1760/isp1760-udc.c:1230 isp1760_udc_start() warn: inconsistent returns 'irqsave:flags'. Locked on: line 1207 Unlocked on: line 1199 This patch fixes the spin unlock in the error path in isp1760_udc_start thereby removing the smatch warning mentioned above. Reported-by: Dan Carpenter <[email protected]> Cc: Laurent Pinchart <[email protected]> Cc: Felipe Balbi <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-24usb: musb: Fix fifo reads for dm816x with musb_dspsTony Lindgren1-1/+24
Looks like dm81xx can only do 32-bit fifo reads like am35x. Let's set up musb-dsps with a custom read_fifo function based on the compatible flag. Otherwise we can get the following errors when starting dhclient on a asix USB Ethernet adapter: asix 2-1:1.0 eth2: asix_rx_fixup() Bad Header Length 0xffff003c, offset 4 While at it, let's also remove pointless cast of the driver data. Cc: Bin Liu <[email protected]> Cc: Brian Hutchinson <[email protected]> Cc: George Cherian <[email protected]> Cc: Sergei Shtylyov <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-24usb: phy: Fix USB_ULPI_VIEWPORT Kconfig dependencyIvan T. Ivanov1-1/+1
USB_ULPI_VIEWPORT didn't depend on USB_ULPI, while USB_ULPI is using non user selectable USB_ULPI_VIEWPORT. Fix this. Signed-off-by: Ivan T. Ivanov <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-24usb: gadget: f_printer: fix dependenciesAndrzej Pietrasiewicz1-0/+1
If f_printer is selected without legacy g_printer, it should depend on USB_CONFIGFS which pulls in libcomposite. Signed-off-by: Andrzej Pietrasiewicz <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-23usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllersLu Baolu1-1/+1
When a device with an isochronous endpoint is plugged into the Intel xHCI host controller, and the driver submits multiple frames per URB, the xHCI driver will set the Block Event Interrupt (BEI) flag on all but the last TD for the URB. This causes the host controller to place an event on the event ring, but not send an interrupt. When the last TD for the URB completes, BEI is cleared, and we get an interrupt for the whole URB. However, under Intel xHCI host controllers, if the event ring is full of events from transfers with BEI set, an "Event Ring is Full" event will be posted to the last entry of the event ring, but no interrupt is generated. Host will cease all transfer and command executions and wait until software completes handling the pending events in the event ring. That means xHC stops, but event of "event ring is full" is not notified. As the result, the xHC looks like dead to user. This patch is to apply XHCI_AVOID_BEI quirk to Intel xHC devices. And it should be backported to kernels as old as 3.0, that contains the commit 69e848c2090a ("Intel xhci: Support EHCI/xHCI port switching."). Signed-off-by: Lu Baolu <[email protected]> Tested-by: Alistair Grant <[email protected]> Cc: [email protected] Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-23usb: xhci: handle Config Error Change (CEC) in xhci driverLu Baolu1-1/+8
Linux xHCI driver doesn't report and handle port cofig error change. If Port Configure Error for root hub port occurs, CEC bit in PORTSC would be set by xHC and remains 1. This happends when the root port fails to configure its link partner, e.g. the port fails to exchange port capabilities information using Port Capability LMPs. Then the Port Status Change Events will be blocked until all status change bits(CEC is one of the change bits) are cleared('0') (refer to xHCI spec 4.19.2). Otherwise, the port status change event for this root port will not be generated anymore, then root port would look like dead for user and can't be recovered until a Host Controller Reset(HCRST). This patch is to check CEC bit in PORTSC in xhci_get_port_status() and set a Config Error in the return status if CEC is set. This will cause a ClearPortFeature request, where CEC bit is cleared in xhci_clear_port_change_bit(). [The commit log is based on initial Marvell patch posted at http://marc.info/?l=linux-kernel&m=142323612321434&w=2] Reported-by: Gregory CLEMENT <[email protected]> Signed-off-by: Lu Baolu <[email protected]> Cc: stable <[email protected]> # v3.2+ Signed-off-by: Mathias Nyman <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-23Merge 4.0-rc5 into usb-nextGreg Kroah-Hartman19-1049/+346
We want the USB fixes in here as well to resolve merge conflicts. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-22Merge tag 'usb-4.0-rc5' of ↵Linus Torvalds16-653/+79
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / PHY driver fixes from Greg KH: "Here's a number of USB and PHY driver fixes for 4.0-rc5. The largest thing here is a revert of a gadget function driver patch that removes 500 lines of code. Other than that, it's a number of reported bugs fixes and new quirk/id entries. All have been in linux-next for a while" * tag 'usb-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits) usb: common: otg-fsm: only signal connect after switching to peripheral uas: Add US_FL_NO_ATA_1X for Initio Corporation controllers / devices USB: ehci-atmel: rework clk handling MAINTAINERS: add entry for USB OTG FSM usb: chipidea: otg: add a_alt_hnp_support response for B device phy: omap-usb2: Fix missing clk_prepare call when using old dt name phy: ti/omap: Fix modalias phy: core: Fixup return value of phy_exit when !pm_runtime_enabled phy: miphy28lp: Convert to devm_kcalloc and fix wrong sizof phy: miphy365x: Convert to devm_kcalloc and fix wrong sizeof phy: twl4030-usb: Remove redundant assignment for twl->linkstat phy: exynos5-usbdrd: Fix off-by-one valid value checking for args->args[0] phy: Find the right match in devm_phy_destroy() phy: rockchip-usb: Fixup rockchip_usb_phy_power_on failure path phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation phy: samsung-usb2: Remove NULL terminating entry from phys array phy: hix5hd2-sata: Check return value of platform_get_resource phy: exynos-dp-video: Kill exynos_dp_video_phy_pwr_isol function Revert "usb: gadget: zero: Add support for interrupt EP" Revert "xhci: Clear the host side toggle manually when endpoint is 'soft reset'" ...
2015-03-21Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds1-3/+2
Pull SCSI target fixes from Nicholas Bellinger: "Here are current target-pending fixes for v4.0-rc5 code that have made their way into the queue over the last weeks. The fixes this round include: - Fix long-standing iser-target logout bug related to early conn_logout_comp completion, resulting in iscsi_conn use-after-tree OOpsen. (Sagi + nab) - Fix long-standing tcm_fc bug in ft_invl_hw_context() failure handing for DDP hw offload. (DanC) - Fix incorrect use of unprotected __transport_register_session() in tcm_qla2xxx + other single local se_node_acl fabrics. (Bart) - Fix reference leak in target_submit_cmd() -> target_get_sess_cmd() for ack_kref=1 failure path. (Bart) - Fix pSCSI backend ->get_device_type() statistics OOPs with un-configured device. (Olaf + nab) - Fix virtual LUN=0 target_configure_device failure OOPs at modprobe time. (Claudio + nab) - Fix FUA write false positive failure regression in v4.0-rc1 code. (Christophe Vu-Brugier + HCH)" * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0 target: Fix virtual LUN=0 target_configure_device failure OOPs target/pscsi: Fix NULL pointer dereference in get_device_type tcm_fc: missing curly braces in ft_invl_hw_context() target: Fix reference leak in target_get_sess_cmd() error path loop/usb/vhost-scsi/xen-scsiback: Fix use of __transport_register_session tcm_qla2xxx: Fix incorrect use of __transport_register_session iscsi-target: Avoid early conn_logout_comp for iser connections Revert "iscsi-target: Avoid IN_LOGOUT failure case for iser-target" target: Disallow changing of WRITE cache/FUA attrs after export
2015-03-19loop/usb/vhost-scsi/xen-scsiback: Fix use of __transport_register_sessionBart Van Assche1-3/+2
This patch changes loopback, usb-gadget, vhost-scsi and xen-scsiback fabric code to invoke transport_register_session() instead of the unprotected flavour, to ensure se_tpg->session_lock is taken when adding new session list nodes to se_tpg->tpg_sess_list. Note that since these four fabric drivers already hold their own internal TPG mutexes when accessing se_tpg->tpg_sess_list, and consist of a single se_session created through configfs attribute access, no list corruption can currently occur. So for correctness sake, go ahead and use the se_tpg->session_lock protected version for these four fabric drivers. Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Nicholas Bellinger <[email protected]>
2015-03-19USB: keyspan_pda: add new device idNathaniel W Filardo1-0/+3
Add USB VID/PID for Xircom PGMFHUB USB/serial component. (The hub and SCSI bridge on that hardware are recognized out of the box by existing drivers.) Tested VID/PID using new_id and loopback connection and was met with success, but that's all the testing done. Signed-off-by: Nathaniel Wesley Filardo <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-03-19usb: gadget: atmel_usba: use endian agnostic IO on ARMBen Dooks2-8/+18
Change from using the __raw IO accesors to the endian agnostic versions of readl/writel_relaxed when not on AVR32. This fixes issues with running big endian on ARMv7. Signed-off-by: Ben Dooks <[email protected]> -- CC: Nicolas Ferre <[email protected]> CC: Felipe Balbi <[email protected]> CC: Greg Kroah-Hartman <[email protected]> CC: [email protected] Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: dwc2: pci: Correctly compile dwc2-pci as a module or built-inJohn Youn1-4/+2
The dwc2-pci driver should be compiled as a module when configured to do so. If the dwc2-pci is configured as a module but actually built-in, it can cause build errors due to the fact that the generic-phy will be allowed to compile as a module causing undefined references. Reported-by: Alan Cox <[email protected]> Signed-off-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: gadget: constify of_device_id arrayFabian Frederick1-1/+1
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: gadget: goku_udc: Remove uses of seq_<foo> return valuesJoe Perches1-111/+122
The seq_printf/seq_puts/seq_putc return values, because they are frequently misused, will eventually be converted to void. See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Miscellanea: o Coalesce formats, realign arguments o Create static functions for statement expression macros o Use c90 style comments instead of c99 Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: renesas_usbhs: fix spinlock suspected in a gadget complete functionYoshihiro Shimoda1-3/+19
According to the gadget.h, a "complete" function will always be called with interrupts disabled. However, sometimes usbhsg_queue_pop() function is called with interrupts enabled. So, this function should be held by usbhs_lock() to disable interruption. Also, this driver has to call spin_unlock() to avoid spinlock recursion by this driver before calling usb_gadget_giveback_request(). Otherwise, there is possible to cause a spinlock suspected in a gadget complete function. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: common: otg-fsm: only signal connect after switching to peripheralPeter Chen1-2/+2
We should signal connect (pull up dp) after we have already at peripheral mode, otherwise, the dp may be toggled due to we reset controller or do disconnect during the initialization for peripheral, then, the host may be confused during the enumeration, eg, it finds the reset can't succeed, but the device is still there, see below error message. hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad? hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad? hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad? hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad? hub 1-0:1.0: unable to enumerate USB device on port 1 Fixes: the issue existed when the otg fsm code was added. Cc: <[email protected]> # v3.16+ Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: phy: Find the right match in devm_usb_phy_matchAxel Lin1-1/+3
The res parameter passed to devm_usb_phy_match() is the location where the pointer to the usb_phy is stored, hence it needs to be dereferenced before comparing to the match data in order to find the correct match. Fixes: 410219dcd2ba ("usb: otg: utils: devres: Add API's to associate a device with the phy") Signed-off-by: Axel Lin <[email protected]> Cc: <[email protected]> # v3.6+ Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: chipidea: udc: apply new usb_udc_vbus_handler interfacePeter Chen1-5/+5
It can move all pullup/pulldown operation control to udc-core through usb_gadget_connect/usb_gadget_disconnect according to vbus status. Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: udc: add usb_udc_vbus_handlerPeter Chen1-1/+33
This commit updates udc core vbus status, and try to connect or disconnect gadget. Signed-off-by: Peter Chen <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: udc: store usb_udc pointer in struct usb_gadgetPeter Chen1-25/+9
Instead of iterate to find usb_udc according to usb_gadget, this way is easier. Alan Stern suggests this way too: http://marc.info/?l=linux-usb&m=142168496528894&w=2 Acked-by: Alan Stern <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-19usb: dwc2: avoid leaking DMA channels on disconnectionVincent Palatin1-0/+8
When the HCD is disconnected, the DMA transfers still in-flight were cleaned-up but the count of available DMA channels (e.g. available_host_channels) was not reset. The pool of DMA channels can be depleted when doing unclean disconnection of USB peripherals, and reaches the point where no transfer was possible until the next reboot/reload of the driver. Tested by putting a programmable USB mux on the port and randomly plugging/unpluging a USB HUB with USB mass-storage key, USB-audio and USB-ethernet dongle connected to its downstream ports, and also doing the disconnection early while the devices are still enumerating to get more URBs in-flight. After the patch, the devices are still enumerating after thousands of cycles, while the port was totally dead before. Signed-off-by: Vincent Palatin <[email protected]> Acked-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2015-03-18usb: phy: msm: Remove dead codeStephen Boyd2-17/+3
This code is no longer used now that mach-msm has been removed. Delete it. Cc: Felipe Balbi <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: [email protected] Cc: David Brown <[email protected]> Cc: Bryan Huntsman <[email protected]> Cc: Daniel Walker <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-18ehci-msm: Remove dead dependencyStephen Boyd1-1/+1
This dependency no longer exists now that mach-msm has been removed. Delete it. Cc: Greg Kroah-Hartman <[email protected]> Cc: Alan Stern <[email protected]> Cc: [email protected] Cc: David Brown <[email protected]> Cc: Bryan Huntsman <[email protected]> Cc: Daniel Walker <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-03-18usb: gadget: constify of_device_id arrayFabian Frederick1-1/+1
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>