summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2012-08-10ENGR00219771: Fix high-speed usb hub connection detection failure for FaradayJingchang Lu
Only disable the high-speed device disconnection detction for level-1 device, or the connection detecting would fail. Signed-off-by: Jingchang Lu <b35083@freescale.com>
2012-08-10ENGR00219354: Fix USB host driver compiled as module fail problemJingchang Lu
Signed-off-by: Jingchang Lu <b35083@freescale.com>
2012-08-10ENGR00181396-2: high-speed USB device disconnection managementJingchang Lu
Detection of high-speed USB device disconnection should be enable on connection and disable on disconnection. Signed-off-by: Jingchang Lu <b35083@freescale.com>
2012-03-07ENGR00176147-1: usb: fix some wakeup problemsPeter Chen
- Do not call hcd core adjust wakeup flag code. It may change wakeup flag, and cause port change detect(PCD) enable setting change. - For ID wakeup, it should not call host's fsl_usb_recover_hcd at ID interrupt. The coming ID switch event will resume host. - Do not need enable wakeup interrupt for host at platform driver resume routine, it may introduce unnessary wakeup interrupt during bus resume. The wakeup will be enabled again when usb host goes to controller again due to autosuspend. - When there is no gadget enabled, the otg port is still at host mode with interrupt enabled, so when male Micro-B to female A-type cable with usb device plugs in, there will be PCD interrupt before hcd core leaves suspend mode. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-03-07ENGR00176061-1 usb: otg: delete discharge vbus operation at otg driverPeter Chen
It may be useless at most of platforms, the user can enable discharge vbus if he/she wants speed up vbus lower speed during OTG switch. Besides, disable vbus interrupt during vbus change due to device <--> host mode switch. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-02-22ENGR00174734-2 usb: fix bugs that dp and dm are floating at device modePeter Chen
At i.mx6x, the data line (dp and dm) are floating at device mode, that is to say data line will be any values (0-3.6v). So if the usb wakeup is enabled, there will be a wakeup interrupt that causes usb to active mode. In order to fix this problem well, we need to do below things: - Need to discharge both dp and dm - It needs to discharge data line when we switch to device mode and usb cable is disconnected from the host, but not to disable discharge after line state is SE0, the reason is that if we do not pulldown the data line, the line state will be floating again, and possible cause the wakeup interrupt. - It needs to disable discharge data line when the usb cable connects at device mode and usb device is connected at host mode, otherwise it will affect signal quality. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-02-13ENGR00174242 usb: device: Improve discharge dp operationPeter Chen
The discharge dp function needs to be added at below situation: - USB cable is disconnected from the PC - When the usb mode switchs to device mode Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-02-10ENGR00174128-1 Revert "Remove the discharge for VBUS and DP-1"Peter Chen
As dp/dm is floating with no usb cable and switch host mode to device mode situation, it do needs this discharge dp patch But, discharge vbus doesn't be needed at suspend_irq, so keep it removing. This reverts commit 0924b71278650fa3891a8f6ea70f91242ca6e5fd. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-02-09ENGR00174124: Revert "[USB Host]change the default wakeup value of RH"Peter Chen
This patch creates two bugs at current i.mx usb framework. - The high speed device can't be recognized at the first time. - The usb device can't be recognized after system resume with usb vbus. The reason why it creates bugs that it changes (auto)suspend/resume process for usb core. This reverts commit e5c4318450e1fe7c61950214e779658c6cea0da7. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-02-09ENGR00174037-2 Add HSIC suspend/resume featureTony LIU
device part - implement reset_device interface for HSIC host Signed-off-by: Tony LIU <junjie.liu@freescale.com>
2012-02-01ENGR00173378-2 usb: device: the udc stop flag should not be set at suspendPeter Chen
It should not do re-enumeration at udc resume if the vbus is on and host just sends suspend to device Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-31net: remove mm.h inclusion from netdevice.hAlexey Dobriyan
Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually). To prevent mm.h inclusion via other channels also extract "enum dma_data_direction" definition into separate header. This tiny piece is what gluing netdevice.h with mm.h via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h". Removal of mm.h from scatterlist.h was tried and was found not feasible on most archs, so the link was cutoff earlier. Hope people are OK with tiny include file. Note, that mm_types.h is still dragged in, but it is a separate story. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-01-30ENGR00172476 [USB Host]change the default wakeup value of RHTony LIU
- change the default wakeup value of RH from enabled to disabled Signed-off-by: Tony LIU <junjie.liu@freescale.com>
2012-01-19ENGR00171544 usb-core: usb host will be broken after system pm testPeter Chen
At i.mx6q sabrelite, there is a usb hub on board. After several suspend suspend/resume iterations, the usb host will be broken. It is IC limitation, and similar with: 574b9641d5846e58273dac6bf80fcf1ff312c5c9 Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: make shi <b15407@freescale.com>
2012-01-09ENGR00171043 gadget-audio: Kernel panic after insert g_audio at second timePeter Chen
The reason is it does not call usb_ep_disable at gadget disable routine. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00171027-3 usbcore:after plug in/out on the hub,host can't workTony LIU
This issue will happen only when suspend bit is set but phcd is not set The root cause of this issue is the IC defect. - If the suspend bit is set without phcd bit set, host controller can't resume normally - The workaround is after set suspend bit, we need set the following bit in USB PHY at once: HW_USBPHY_PWD_RXPWDRX HW_USBPHY_PWD_RXPWDDIFF HW_USBPHY_PWD_RXPWD1PT1 HW_USBPHY_PWD_RXPWDENV HW_USBPHY_PWD_TXPWDv2I HW_USBPHY_PWD_TXPWDIBIAS HW_USBPHY_PWD_TXPWDFS - Furthermore, after resume, we must clear these bits during the K state - IC has no plan to fix this issue - This issue only happen on MX6Q/MX28 core part Signed-off-by: Tony LIU <junjie.liu@freescale.com>
2012-01-09ENGR00171027-2 [USB_HOST]after plug in/out on the hub,host can't workTony LIU
This issue will happen only when suspend bit is set but phcd is not set The root cause of this issue is the IC defect. - If the suspend bit is set without phcd bit set, host controller can't resume normally - The workaround is after set suspend bit, we need set the following bit in USB PHY at once: HW_USBPHY_PWD_RXPWDRX HW_USBPHY_PWD_RXPWDDIFF HW_USBPHY_PWD_RXPWD1PT1 HW_USBPHY_PWD_RXPWDENV HW_USBPHY_PWD_TXPWDv2I HW_USBPHY_PWD_TXPWDIBIAS HW_USBPHY_PWD_TXPWDFS - Furthermore, after resume, we must clear these bits during the K state - IC has no plan to fix this issue - This issue only happen on MX6Q/MX28 driver part Signed-off-by: Tony LIU <junjie.liu@freescale.com>
2012-01-09ENGR00170819-1 usb-gadget: add usb audio supportPeter Chen
- Only 44.1Khz audio are supported at i.MX6q, since only 44.1Khz local playback are supported at i.MX6q. - Since there is no feedback at current usb audio framework, it may have pop noise/no sound after play some minutes. - About how to test: please refer Documentation/arm/imx/udc.txt Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00170144 [USB-Host] Fix the following USB hub issue on mx6qTony LIU
- After auto suspend, attach device to hub will cause host can't work any more - after system suspend, attach device to hub will cause host can't work any more - HSDISCONNECTDEC logic error - Set RUNSTOP in bus suspend, if no short delay, host can't work any more Signed-off-by: Tony LIU <junjie.liu@freescale.com>
2012-01-09ENGR00170530 usb-udc: Some tiny bug fixesPeter Chen
Most of them are from community - Using correct dequeue method - Fix the ISOC_XFER condition judgement - Need to wmb before prime - Fix some conditions of udc->max_ep judgement Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09usb: gadget: audio: queue wLength-sized requestsFelipe Balbi
On Audio class, the wLength field of the Setup packet, contains the data payload size of the following Data phase. Instead of harcoding values, use wLength. This also fixes a bug where Gadget driver had to receive 3 bytes, but it was queueing a ZLP. Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-01-09usb: gadget: audio: actually support both speedsFelipe Balbi
While testing g_audio with HighSpeed UDC on a FS Hub, we had no configurations to present to the host. That's because both speeds where mutually exclusive. Signed-off-by: Felipe Balbi <balbi@ti.com>
2012-01-09USB: gadget: section mismatch warning fixedMichal Nazarewicz
In may gadgets bind and bind like functions were in a init section as they were only run during initialisation. However, being callback functions they were referenced from structures in “normal” sections. Changing the tag from “__init” to “__ref” fixes the warnings. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-09ENGR00169885-1 usb-udc: add remote wakeup supportPeter Chen
Meanwhile, fix the bug that there is no prime for GetStatus at status phase About how to test remote wakeup, please see: Documentation/arm/imx/udc.txt Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09build fix and driver fixJason Liu
Signed-off-by: Jason Liu <jason.hui@linaro.org>
2012-01-09ENGR00169661:Remove the discharge for VBUS and DPTony LIU
- VBUS discharge code should be removed from suspend_irq function - On Arik, there is a huge capacitance(C86), even discharge VBUS, the Drop of VBUS is still very slow - On Arik, the B session valid threshold is not 0.8V or 1.4V, it is about 2V~3V, so we can receive B session valid interrupt very soon - No DP discharge needed, but wait for SE0 is needed Signed-off-by: Tony LIU <junjie.liu@freescale.com>
2012-01-09usb: gadget: file_storage: fix race on unloadingYauheni Kaliuta
There is a race, reproduced rarely if you unload the module when host finishes mass storage device initialization (reading partition table and so on): fsg_unbind() code first closes lun files then waits for worker thread to finish its work, as the result the thread may operate on already closed device with an oops and backtrace: [ 484.937225] [<b00e403c>] (touch_atime+0x4/0x140) from [<b00a1498>] (generic_file_aio_read+0x678/0x6f0) [ 484.946563] [<b00a1498>] (generic_file_aio_read+0x678/0x6f0) from [<b00d08c4>] (do_sync_read+0xb0/0xf4) [ 484.955963] [<b00d08c4>] (do_sync_read+0xb0/0xf4) from [<b00d1478>] (vfs_read+0xac/0x144) [ 484.964172] [<b00d1478>] (vfs_read+0xac/0x144) from [<af24c6a8>] (fsg_setup+0x7f4/0x900 [g_file_storage]) [ 484.973785] [<af24c6a8>] (fsg_setup+0x7f4/0x900 [g_file_storage]) from [<af24da14>] (fsg_main_thread+0x85c/0x175c [g_file_storage]) [ 484.985626] [<af24da14>] (fsg_main_thread+0x85c/0x175c [g_file_storage]) from [<b0077c48>] (kthread+0x7c/0x84) [ 484.995666] [<b0077c48>] (kthread+0x7c/0x84) from [<b002f950>] (kernel_thread_exit+0x0/0x8) [ 485.004028] Code: eaffffd0 e28dd008 e8bd8df0 e92d40f7 (e591400c) Change the order in unbind: wait for the thread first, then close the files. Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-09usb: gadget: file_storage: fix race on unloadingYauheni Kaliuta
There is a race, reproduced rarely if you unload the module when host finishes mass storage device initialization (reading partition table and so on): fsg_unbind() code first closes lun files then waits for worker thread to finish its work, as the result the thread may operate on already closed device with an oops and backtrace: [ 484.937225] [<b00e403c>] (touch_atime+0x4/0x140) from [<b00a1498>] (generic_file_aio_read+0x678/0x6f0) [ 484.946563] [<b00a1498>] (generic_file_aio_read+0x678/0x6f0) from [<b00d08c4>] (do_sync_read+0xb0/0xf4) [ 484.955963] [<b00d08c4>] (do_sync_read+0xb0/0xf4) from [<b00d1478>] (vfs_read+0xac/0x144) [ 484.964172] [<b00d1478>] (vfs_read+0xac/0x144) from [<af24c6a8>] (fsg_setup+0x7f4/0x900 [g_file_storage]) [ 484.973785] [<af24c6a8>] (fsg_setup+0x7f4/0x900 [g_file_storage]) from [<af24da14>] (fsg_main_thread+0x85c/0x175c [g_file_storage]) [ 484.985626] [<af24da14>] (fsg_main_thread+0x85c/0x175c [g_file_storage]) from [<b0077c48>] (kthread+0x7c/0x84) [ 484.995666] [<b0077c48>] (kthread+0x7c/0x84) from [<b002f950>] (kernel_thread_exit+0x0/0x8) [ 485.004028] Code: eaffffd0 e28dd008 e8bd8df0 e92d40f7 (e591400c) Change the order in unbind: wait for the thread first, then close the files. Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@nokia.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-09ENGR00161644 usb-gadget: prime directly for status dTD of ep0Peter Chen
During the setup transfer, if prime status just after prime the data, but before the data completes, there is a potential problem: The device's qTD has NO direction bit, If the IN request(Status Stage) is added to qTD list while the OUT (Data Stage) is priming, then the IN will not prime by software, it will prime automatically by controller as OUT. We met one usb hang issue during repeat plug in/out test at i.mx6q that the data status has finished but status has never finished, it is most likely above issue. After this fix, the repeat plug in/out test passes successfully. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00162583-2 usb driver: avoid class driver access register after usb is offPeter Chen
- An well-behavior class driver should disable their endpoints after being notified disconnect with host, we use all endpoints are stopped (ep->stopped) to indicates the class driver will not visit device driver any more. the ep-stopped will be initialized as 1 for non-control endpoint it will be 0 after fsl_ep_enable, and be 1 after fsl_ep_disable. Where is a non-sleep wait routine at disconnect event for waiting all endpoints are stopped - Some controller's (like i.mx6q) DP will change from J to SE0 slowly after the cable disconnects with host, in that case there will be a wakeup interrupt after driver enables the wakeup interrupt. For i.mx6q, there is a discharge routine for DP after the disconnection. - Should not wait vbus to low during first otg switch, as the wait will be timeout when the usb cable is connecting to host. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00161643-3 UTP : bugfixHuang Shijie
The origin code lossed one line. fix it. Signed-off-by: Huang Shijie <b32955@freescale.com>
2012-01-09ENGR00161598 [MX6] OTG Driver:fix OTG function issuemake shi
- Add Wait for Vbus change stable function for remove Vbus interrupt. - fix insert a HOST cable ,device modprobe issue. Signed-off-by: make shi <b15407@freescale.com>
2012-01-09ENGR00161383 [MX6Q] USB OTG: enable OTG drivermake shi
Enable OTG driver on mx6q board Signed-off-by: make shi <b15407@freescale.com>
2012-01-09ENGR00161314-2 mx6q usb-host: add hsic supportPeter Chen
Device part Add HSIC run and HSIC phy's definition Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00160834 UTP : replace kzalloc() with vmalloc()Huang Shijie
When allocating large memory, such as 128K, vmalloc() uses single page for the allocation process, while kzalloc() has to consume a continuous pages for the allocation. In low memory case, the kzalloc() may fails. So use the vmalloc() instead. Also add some sanity check for the NULL pointer. Signed-off-by: Huang Shijie <b32955@freescale.com>
2012-01-09ENGR00139279 MX6Q: support the MFGTOOLHuang Shijie
fix ioctls. Signed-off-by: Huang Shijie <b32955@freescale.com>
2012-01-09ENGR00155880 USB device: Fix RNDIS Full Speed hang during initializationAnish Trivedi
When setup irq is received, the status phase of the transfer is primed on ep0 before the data phase. The usb requests are added to the list of transfer descriptors (maintained by driver) in reverse of their expected completion order. Completion order is data followed by status, however the list of tds contains status followed by data. Upon completion of the data request, the irq handler proceeds to check the 1st td in the list -- the status request. In full speed mode, the status phase has not yet completed at this time, so the td's ACTIVE bit is still set. This leads irq handler to ignore the completion interrupt without checking the actual td for the data request that caused the interrupt. In high speed mode, this issue does not bear itself out because the status request also completes by the time the irq handler goes to process the data completion interrupt. The simple fix for this issue is to prime the status request AFTER the data request, so that the list of tds maintained by the driver contains the tds in the order of expected completion. Signed-off-by: Anish Trivedi <anish@freescale.com>
2012-01-09ENGR00155761 usb-host: fix the buiild warning with upstream reviewing patchPeter Chen
Warning message: /home/b29397/work/projects/linux-2.6-imx/drivers/usb/host/ehci.h: 748: warning: function declaration isn't a prototype Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00155764 usb-host: fix the system hang when access register with clocks OFFPeter Chen
Fix the system hang when access usb registers with usb's clocks are OFF, open the usb clock before visiting the usb registers resolves this problem Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09usb: ehci: make HC see up-to-date qh/qtd descriptor ASAPMing Lei
This patch introduces the helper of ehci_sync_mem to flush qtd/qh into memory immediately on some ARM, so that HC can see the up-to-date qtd/qh descriptor asap. This patch fixs one performance bug on ARM Cortex A9 dual core platform, which has been reported on quite a few ARM machines (OMAP4, Tegra 2, snowball...), see details from link of https://bugs.launchpad.net/bugs/709245. The patch has been tested ok on OMAP4 panda A1 board, and the performance of 'dd' over usb mass storage can be increased from 4~5MB/sec to 14~16MB/sec after applying this patch. Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Ming Lei <ming.lei@canonical.com>
2012-01-09ENGR00155396 usb-host: fix below build warningPeter Chen
drivers/usb/host/ehci-hub.c:109: warning: 'ehci_adjust_port_wakeup_flags' defined but not used Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00154704 usb-gadget: wmb is needed after dtd pointer is updated for armv7Peter Chen
At armv7 SoC, the dma_alloc_coherent returns non-cachable, but bufferable region, so the driver needs to drain write buffer by itself, if the controller needs to visit dma buffer immediately after cpu writes There is a discussion for this armv7 change: http://marc.info/?t=127918539100004&r=1&w=2 For this issue, the next dtd pointer is invalid sometimes, the reason is the region which is used to store dtd is dma buffer, so the data may not be written to memory when the controller visit this data. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00154703 usb-gadget: fix spin_lock recursion problem at SMP platformPeter Chen
- The spin_lock is at interrupt handler, so all code routines using at interrupt handler are forbidden to hold spin_lock again - Move the code which needs to be protected by spin_lock to workqueue, and it will be called when workqueue is scheduled. Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00154382 usb-udc: Set fsl arc usb driver as default usb device driverPeter Chen
Set fsl arc usb device driver as default usb device driver Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00152915-2 mx6q-usb: Add lock for low power mode operationPeter Chen
To avoid interrupting when usb enters/leaves low power mode Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00152493-2 mx6q: add usb functionPeter Chen
The changes for driver part - Merging some newest changes at 2.6.38 - Add high speed disconnect check at usb core Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00140950 mfg: fix the bug that ubiformat utility breaks utp protocolPeter Chen
ubiformat includes command, data, command periods, it breaks utp protocol for PUT commands. So we add two operations to fix it. One is sending busy to host before the data periods begins. The second is adding a new command to waiting ubiformat's command period. Signed-off-by: Li Xingyu <b02754@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09ENGR00141217-4 USB: Add USB Host/device/otg drivers supportZhang Yan
Add usb support for 2.6.38 Signed-off-by: Zhang Yan <b34916@freescale.com>
2012-01-09gadget: add stmp uut support to file storageFrank Li
This is gadget file storage changes needed for FSL universal updater tool (manufacturing flashing tool). ENGR00131456 mfg-tool: Add get cpu id ioctl at utp driver The watchdog operation is differ with SoC's for rom code, so the utp app needs to add or not add watchdog operation according to different SoCs. Signed-off-by: Frank Li <Frank.Li@freescale.com> Signed-off-by: Peter Chen <peter.chen@freescale.com>
2012-01-09usb: Add arc ehci driver to ehci core driverRob Herring
Signed-off-by: Rob Herring <r.herring@freescale.com>