aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-04-13USB: xhci: unsigned char never equals -1Dan Carpenter3-6/+9
There were some places that compared port_speed == -1 where port_speed is a u8. This doesn't work unless we cast the -1 to u8. Some places did it correctly. Instead of using -1 directly, I've created a DUPLICATE_ENTRY define which does the cast and is more descriptive as well. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2011-04-13USB: xhci - fix unsafe macro definitionsDmitry Torokhov1-3/+3
Macro arguments used in expressions need to be enclosed in parenthesis to avoid unpleasant surprises. This should be queued for kernels back to 2.6.31 Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Cc: [email protected]
2011-04-13USB: fix formatting of SuperSpeed endpoints in /proc/bus/usb/devicesDmitry Torokhov1-4/+6
Isochronous and interrupt SuperSpeed endpoints use the same mechanisms for decoding bInterval values as HighSpeed ones so adjust the code accordingly. Also bandwidth reservation for SuperSpeed matches highspeed, not low/full speed. Signed-off-by: Dmitry Torokhov <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: isp1760-hcd: move imask clear after pending work is doneRichard Retanubun1-1/+3
This patch moves the HcInterrupt register write to clear the pending interrupt to after the isr work is done, doing this removes glitches in the irq line. Signed-off-by: Richard Retanubun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: fsl_qe_udc: send ZLP when zero flag and length % maxpacket == 0Valentin Longchamp1-2/+18
The driver did not take the zero flag in the USB request. If the request length is the same as the endpoint's maxpacket, an additional ZLP with no data has to be transmitted. The method used here is inspired to what is done in fsl_udc_core.c (and pxa27x_udc.c and at91_udc.c) where this is supported. There already was a discussion about this topic with people from Keymile, and I propose here a better implementation: http://thread.gmane.org/gmane.linux.usb.general/38951 Signed-off-by: Valentin Longchamp <[email protected]> Acked-by: Li Yang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: qcserial add missing errorpath kfreesSteven Hardy1-0/+2
There are two -ENODEV error paths in qcprobe where the allocated private data is not freed, this patch adds the two missing kfrees to avoid leaking memory on the error path Signed-off-by: Steven Hardy <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: qcserial avoid pointing to freed memorySteven Hardy1-6/+9
Rework the qcprobe logic such that serial->private is not set when qcprobe exits with -ENODEV, otherwise serial->private will point to freed memory on -ENODEV Signed-off-by: Steven Hardy <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: Fix qcserial memory leak on rmmodSteven Hardy1-1/+13
qcprobe function allocates serial->private but this is never freed, this patch adds a new function qc_release() which frees serial->private, after calling usb_wwan_release Signed-off-by: Steven Hardy <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: ftdi_sio: add ids for Hameg HO720 and HO730Paul Friedrich2-0/+4
usb serial: ftdi_sio: add two missing USB ID's for Hameg interfaces HO720 and HO730 Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: option: Added support for Samsung GT-B3730/GT-B3710 LTE USB modem.Marius B. Kotsbak1-0/+5
Bind only modem AT command endpoint to option. Signed-off-by: Marius B. Kotsbak <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: pch_udc: unlock on allocation failureDan Carpenter1-3/+5
There was an unlock missing on the error path. Also I did a small cleanup by changing ep->dev->lock for just dev->lock. They're the same lock, but dev->lock is shorter and that's how it is used for the spin_unlock_irqrestore() call. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB host: Fix lockdep warning in AMD PLL quirkJoerg Roedel1-43/+74
Booting latest kernel on my test machine produces a lockdep warning from the usb_amd_find_chipset_info() function: WARNING: at /data/lemmy/linux.trees.git/kernel/lockdep.c:2465 lockdep_trace_alloc+0x95/0xc2() Hardware name: Snook Modules linked in: Pid: 959, comm: work_for_cpu Not tainted 2.6.39-rc2+ #22 Call Trace: [<ffffffff8103c0d4>] warn_slowpath_common+0x80/0x98 [<ffffffff812387e6>] ? T.492+0x24/0x26 [<ffffffff8103c101>] warn_slowpath_null+0x15/0x17 [<ffffffff81068667>] lockdep_trace_alloc+0x95/0xc2 [<ffffffff810ed9ac>] slab_pre_alloc_hook+0x18/0x3b [<ffffffff810ef227>] kmem_cache_alloc_trace+0x25/0xba [<ffffffff812387e6>] T.492+0x24/0x26 [<ffffffff81238816>] pci_get_subsys+0x2e/0x73 [<ffffffff8123886c>] pci_get_device+0x11/0x13 [<ffffffff814082a9>] usb_amd_find_chipset_info+0x3f/0x18a ... It turns out that this function calls pci_get_device under a spin_lock with irqs disabled, but the pci_get_device function is only allowed in preemptible context. This patch fixes the warning by making all data-structure modifications on temporal storage and commiting this back into the visible structure at the end. While at it, this patch also moves the pci_dev_put calls out of the spinlocks because this function might sleep too. Signed-off-by: Joerg Roedel <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb/gadget: don't leak hs_descriptorsSebastian Andrzej Siewior1-0/+1
We should free both descriptors. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: ohci-au1xxx: fix warning "__BIG_ENDIAN" is not definedYoichi Yuasa1-1/+1
In file included from drivers/usb/host/ohci-hcd.c:1028:0: drivers/usb/host/ohci-au1xxx.c:36:7: warning: "__BIG_ENDIAN" is not defined Signed-off-by: Yoichi Yuasa <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: ftdi_sio: add PID for OCT DK201 docking stationJohan Hovold2-0/+2
Add PID 0x0103 for serial port of the OCT DK201 docking station. Reported-by: Jan Hoogenraad <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: musb: omap2430: fix build failureJohan Hovold1-1/+2
Fix build failure introduced by commit 7acc6197b76edd0b932a7cbcc6cfad0a8a87f026 (usb: musb: Idle path retention and offmode support for OMAP3) when building without gadget support. CC drivers/usb/musb/omap2430.o drivers/usb/musb/omap2430.c: In function ‘musb_otg_notifications’: drivers/usb/musb/omap2430.c:262: error: ‘struct musb’ has no member named ‘gadget_driver’ Signed-off-by: Johan Hovold <[email protected]> Cc: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: EHCI: unlink unused QHs when the controller is stoppedAlan Stern1-6/+9
This patch (as1458) fixes a problem affecting ultra-reliable systems: When hardware failover of an EHCI controller occurs, the data structures do not get released correctly. This is because the routine responsible for removing unused QHs from the async schedule assumes the controller is running properly (the frame counter is used in determining how long the QH has been idle) -- but when a failover causes the controller to be electronically disconnected from the PCI bus, obviously it stops running. The solution is simple: Allow scan_async() to remove a QH from the async schedule if it has been idle for long enough _or_ if the controller is stopped. Signed-off-by: Alan Stern <[email protected]> Reported-and-Tested-by: Dan Duval <[email protected]> CC: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: gadget: eem: fix echo command processingYauheni Kaliuta1-2/+6
During processing of bunch of eem frames if "echo" command is found skb is cloned and the cloned version should be used to send reply. Unfortunately, the data of the original skb were actually used and the cloned skb is never freed. Using the cloned skb and freeing the skb in the completion callback for usb request. Signed-off-by: Yauheni Kaliuta <[email protected]> Reviewed-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: ftdi_sio: Added IDs for CTI USB Serial DevicesChristian Simon2-0/+11
I added new ProdutIds for two devices from CTI GmbH Leipzig. Signed-off-by: Christian Simon <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: r8a66597-udc: fix spinlock usageYoshihiro Shimoda1-0/+2
Because the disconnect function in the composite driver will call spin_lock, this driver has to call spin_unlock before calling driver->disconnet(). Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: Fix Kconfig unmet dependencies for Microblaze EHCIMichal Simek2-1/+1
Disable USB_ARCH_HAS_EHCI in arch Kconfig and enable it in usb Kconfig Warning log: warning: (MICROBLAZE) selects USB_ARCH_HAS_EHCI which has unmet direct dependencies (USB_SUPPORT) Signed-off-by: Michal Simek <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13USB: usb-gadget: unlock data->lock mutex on error path in ep_read()Alexey Khoroshilov1-1/+3
ep_read() acquires data->lock mutex in get_ready_ep() and releases it on all paths except for one: when usb_endpoint_xfer_isoc() failed. The patch adds mutex_unlock(&data->lock) at that path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13usb: fix ips1760-hcd printk format warningRandy Dunlap1-1/+1
Fix printk format build warning and grammar typo on same line. drivers/usb/host/isp1760-hcd.c:300: warning: format '%lu' expects type 'long unsigned int', but argument 4 has type 'size_t' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-04-13Merge branch 'fix' of ↵Russell King2794-8381/+7600
git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes
2011-04-13Merge branch 'for-greg' of git://gitorious.org/usb/usb into usb-linusGreg Kroah-Hartman8-16/+62
* 'for-greg' of git://gitorious.org/usb/usb: USB: musb: blackfin: work around anomaly 05000450 usb: musb: Fix the crash issue during reboot usb: musb: gadget: check the correct list_head usb: musb: temporarily make it bool USB: musb: dereferencing an iomem pointer USB: musb: silence printk format warning USB: musb: using 0 instead of NULL USB: musb: add missing unlock in cppi_interrupt() usb: musb: ux500: copy dma mask from platform device to musb device usb: musb: clear AUTOSET while clearing DMAENAB
2011-04-13block, blk-sysfs: Use the variable directly instead of a function callLiu Yuan1-2/+1
In the function blk_register_queue(), var _dev_ is already assigned by disk_to_dev().So use it directly instead of calling disk_to_dev() again. Signed-off-by: Liu Yuan <[email protected]> Modified by me to delete an empty line in the same function while in there anyway. Signed-off-by: Jens Axboe <[email protected]>
2011-04-13iwlegacy: fix tx_power initializationStanislaw Gruszka6-28/+11
priv->tx_power_next is not initialized to max supported power, but instead default value is used, what cause errors like [ 58.597834] iwl3945 0000:03:00.0: Requested user TXPOWER 15 above upper limit 14. [ 58.597839] iwl3945 0000:03:00.0: Error setting Tx power (-22). if maximum tx power read from the eeprom is smaller than default. In consequence card is unable to initialize properly. Fix the problem and cleanup tx power initialization. Reported-and-tested-by: Robin Dong <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-04-13Revert "tcp: disallow bind() to reuse addr/port"David S. Miller2-4/+3
This reverts commit c191a836a908d1dd6b40c503741f91b914de3348. It causes known regressions for programs that expect to be able to use SO_REUSEADDR to shutdown a socket, then successfully rebind another socket to the same ID. Programs such as haproxy and amavisd expect this to work. This should fix kernel bugzilla 32832. Signed-off-by: David S. Miller <[email protected]>
2011-04-13qlcnic: limit skb frags for non tso packetAmit Kumar Salecha2-0/+15
Machines are getting deadlock in four node cluster environment. All nodes are accessing (find /gfs2 -depth -print|cpio -ocv > /dev/null) 200 GB storage on a GFS2 filesystem. This result in memory fragmentation and driver receives 18 frags for 1448 byte packets. For non tso packet, fw drops the tx request, if it has >14 frags. Fixing it by pulling extra frags. Cc: [email protected] Signed-off-by: Amit Kumar Salecha <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-13net: can: mscan: fix build breakage in mpc5xxx_canAnatolij Gustschin1-1/+1
Commit 74888760d40b3ac9054f9c5fa07b566c0676ba2d "dt/net: Eliminate users of of_platform_{,un}register_driver" broke building mscan driver. Fix it. Signed-off-by: Anatolij Gustschin <[email protected]> Cc: Grant Likely <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Acked-by: Marc Kleine-Budde <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-04-13drm/i915: Initialise g4x watermarks for disabled pipesChris Wilson1-1/+4
We were using uninitialised watermarks values for disabled pipes which were combined into a single WM register and so corrupting the values for the enabled pipe and upsetting the display hardware. Reported-by: Riccardo Magliocchetti <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=32612 Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Keith Packard <[email protected]>
2011-04-13Merge branch 'for_linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86: x86 platform drivers: Build fix for intel_pmic_gpio
2011-04-13Merge branch 'for-linus' of ↵Linus Torvalds7-43/+53
git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/avr32-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/avr32-2.6: avr32: add ATAG_BOARDINFO don't check platform_get_irq's return value against zero avr32: init cannot ignore signals sent by force_sig_info() avr32: fix deadlock when reading clock list in debugfs avr32: Fix .size directive for cpu_enter_idle avr32: At32ap: pio fix typo "))" on gpio_irq_unmask prototype fix the wrong argument of the functions definition
2011-04-13Merge branch 'drm-fixes' of ↵Linus Torvalds28-125/+201
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (22 commits) Revert "i915: restore only the mode of this driver on lastclose" Revert "ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set." i915: select VIDEO_OUTPUT_CONTROL for ACPI_VIDEO drm/radeon/kms: properly program vddci on evergreen+ drm/radeon/kms: add voltage type to atom set voltage function drm/radeon/kms: fix pcie_p callbacks on btc and cayman drm/radeon/kms: fix suspend on rv530 asics drm/radeon/kms: clean up gart dummy page handling drm/radeon/kms: make radeon i2c put/get bytes less noisy drm/radeon/kms: pll tweaks for rv6xx drm/radeon: Fix KMS legacy backlight support if CONFIG_BACKLIGHT_CLASS_DEVICE=m. radeon: Fix KMS CP writeback on big endian machines. i915: restore only the mode of this driver on lastclose drm/nvc0: improve vm flush function drm/nv50-nvc0: remove some code that doesn't belong here drm/nv50: use "nv86" tlb flush method on everything except 0x50/0xac drm/nouveau: quirk for XFX GT-240X-YA drm/nv50-nvc0: work around an evo channel hang that some people see drm/nouveau: implement init table opcode 0x5c drm/nouveau: fix oops on unload with disabled LVDS panel ...
2011-04-13x86 platform drivers: Build fix for intel_pmic_gpioMatthew Garrett1-1/+1
Fix an incorrect function name so the driver builds. Signed-off-by: Matthew Garrett <[email protected]>
2011-04-13block: don't flush plugged IO on forced preemtion schedulingLinus Torvalds1-10/+10
We really only want to unplug the pending IO when the process actually goes to sleep. So move the test for flushing the plug up to the place where we actually deactivate the task - where we have properly checked for preemption and for the process really sleeping. Acked-by: Jens Axboe <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-04-13vm: fix vm_pgoff wrap in stack expansionLinus Torvalds1-5/+8
Commit 982134ba6261 ("mm: avoid wrapping vm_pgoff in mremap()") fixed the case of a expanding mapping causing vm_pgoff wrapping when you used mremap. But there was another case where we expand mappings hiding in plain sight: the automatic stack expansion. This fixes that case too. This one also found by Robert Święcki, using his nasty system call fuzzer tool. Good job. Reported-and-tested-by: Robert Święcki <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
2011-04-13avr32: add ATAG_BOARDINFOAndreas Bießmann2-0/+24
The ATAG_BOARDINFO is intended to hand over the information bd->bi_board_number from u-boot to the kernel. This piece of information can be used to implement some kind of board identification while booting the kernel. Therefore it is placed in .initdata section and can be accessed via the new symbol board_number only while initializing the kernel. Signed-off-by: Andreas Bießmann <[email protected]> Signed-off-by: Hans-Christian Egtvedt <[email protected]>
2011-04-13don't check platform_get_irq's return value against zeroUwe Kleine-König1-1/+1
platform_get_irq returns -ENXIO on failure, so !int_irq was probably always true. Better use (int)int_irq <= 0. Note that a return value of zero is still handled as error even though this could mean irq0. This is a followup to 305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 that changed the return value of platform_get_irq from 0 to -ENXIO on error. Acked-by: Hans-Christian Egtvedt <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Hans-Christian Egtvedt <[email protected]>
2011-04-13avr32: init cannot ignore signals sent by force_sig_info()Matt Fleming1-22/+0
We can delete the code that checks to see if we're sending an ignored signal to init because force_sig_info() already handles this case. force_sig_info() will kill init even if the signal handler is SIG_DFL and the scenario described in the comment where init might "generate the same exception over and over again" cannot occur (force_sig_info() clears SIGNAL_UNKILLABLE to ensure that init will die). Also, the use of is_global_init() is not correct in the multhreaded case, as Oleg Nesterov explains, "is_global_init() is not right in theory, /sbin/init can be multithreaded. And, this doesn't cover the sub-namespace inits... I'd suggest to check SIGNAL_UNKILLABLE, but looking closer I think you can simply remove this code." It seems this code was copied from arch/powerpc in March 2007 in commit 623b0355d5b1 "[AVR32] Clean up exception handling code" but the code was deleted from arch/powerpc in November 2009 in commit a0592d42fe3e "powerpc: kill the obsolete code under is_global_init()" So catch up with powerpc and delete the bogus code. Signed-off-by: Matt Fleming <[email protected]> Signed-off-by: Hans-Christian Egtvedt <[email protected]>
2011-04-13avr32: fix deadlock when reading clock list in debugfsOle Henrik Jahren1-8/+16
When writing out /sys/kernel/debug/at32ap_clk, clock list lock is being held while clk_get() is called. clk_get() attempts to take the same lock, which results in deadlock. Introduce and call lock free version, __clk_get(), instead. Signed-off-by: Ole Henrik Jahren <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Signed-off-by: Hans-Christian Egtvedt <[email protected]>
2011-04-13avr32: Fix .size directive for cpu_enter_idleBen Hutchings1-1/+1
gas used to accept (and ignore?) .size directives which referred to undefined symbols, as this does. In binutils 2.21 these are treated as errors. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Hans-Christian Egtvedt <[email protected]>
2011-04-13avr32: At32ap: pio fix typo "))" on gpio_irq_unmask prototypeJean-Christophe PLAGNIOL-VILLARD1-1/+1
introduce in commit d75f1bfdbccb Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Hans-Christian Egtvedt <[email protected]> Cc: Nicolas Ferre <[email protected]> Cc: Patrice Vilchez <[email protected]> Signed-off-by: Hans-Christian Egtvedt <[email protected]>
2011-04-13fix the wrong argument of the functions definitionWanlong Gao1-10/+10
The functions of eic_chip's memebers use the wrong argument . Signed-off-by: Wanlong Gao <[email protected]> Signed-off-by: Hans-Christian Egtvedt <[email protected]>
2011-04-13netfilter: ipset: set match and SET target fixesJozsef Kadlecsik1-2/+16
The SET target with --del-set did not work due to using wrongly the internal dimension of --add-set instead of --del-set. Also, the checkentries did not release the set references when returned an error. Bugs reported by Lennert Buytenhek. Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2011-04-13netfilter: ipset: bitmap:ip,mac type requires "src" for MACJozsef Kadlecsik1-0/+4
Enforce that the second "src/dst" parameter of the set match and SET target must be "src", because we have access to the source MAC only in the packet. The previous behaviour, that the type required the second parameter but actually ignored the value was counter-intuitive and confusing. Signed-off-by: Jozsef Kadlecsik <[email protected]> Signed-off-by: Patrick McHardy <[email protected]>
2011-04-13Merge branch 'master' of ↵Patrick McHardy3328-70002/+178342
ssh://master.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
2011-04-13UBIFS: fix compilation warnings when compiling with gcc 4.5Maksim Rayskiy1-58/+94
When compiling UBIFS with CONFIG_UBIFS_FS_DEBUG not set, gcc-4.5.2 generates a slew of "warning: statement with no effect" on references to non-void functions defined as 0. To avoid these warnings, replace #defines with dummy inline functions. Artem: massage the patch a bit, also remove the duplicate 'dbg_check_lprops()' prototype. Signed-off-by: Maksim Rayskiy <[email protected]> Acked-by: Mike Frysinger <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
2011-04-13USB: musb: blackfin: work around anomaly 05000450Mike Frysinger3-0/+37
DMA mode 1 data corruption anomaly on Blackfin systems. This issue is specific to the Blackfin silicon as the bug appears to be related to the connection of the musb ip to the bus/dma fabric. Data corruption when using USB DMA mode 1. (Issue manager 17-01-0105) DMA mode 1 allows large size transfers to generate a single interrupt at the end of the entire transfer. The transfer is split up in packets of length specified in the Maximum Packet Size field for that endpoint. If the transfer size is not an integer multiple of the Maximum Packet Size, a short packet will be present at the end of the transfer. Under certain conditions this packet may be corrupted in the USB FIFO. Workaround: Use DMA mode 1 to transfer (n* Maximum Packet Size) and schedule DMA mode 0 to transfer the short packet. As an example if your transfer size is 33168 bytes and Maximum Packet Size equals 512, schedule [33168 - (33168 mod 512)] in DMA mode 1 and the remainder (33168 mod 512) in DMA mode 0. Signed-off-by: Mike Frysinger <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2011-04-13usb: musb: Fix the crash issue during rebootHema HK1-0/+2
Below crash observed with commit 7acc6197b76edd0b932a7cbcc6cfad0a8a87f026 (usb: musb: Idle path retention and offmode support for OMAP3) during board reboot. The musb clock was disabled when musb_shutdown() was called by platform_drv_shutdown in which there are register accesses. call pm_runtime_get_sync() and pm_runtime_put_sync() in the musb_shutdown function. / # [ 172.368774] Unhandled fault: imprecise external abort (0x1406) at 0x400f0000 [ 172.376190] Internal error: : 1406 [#1] SMP [ 172.380554] last sysfs file: /sys/devices/platform/omap/omap_i2c.4/i2c-4/i2c-dev/i2c-4/dev [ 172.389221] Modules linked in: [ 172.392456] CPU: 0 Tainted: G W (2.6.38-06671-geddecbb #33) [ 172.399475] PC is at do_raw_spin_unlock+0x50/0xc0 [ 172.404418] LR is at _raw_spin_unlock_irqrestore+0x24/0x44 [ 172.410186] pc : [<c069bfdc>] lr : [<c085a7f8>] psr: 60000093 [ 172.410186] sp : ee993e40 ip : c0d00240 fp : bea9cf14 [ 172.422241] r10: 00000000 r9 : ee992000 r8 : c04b2fa8 [ 172.427703] r7 : 00000000 r6 : c0fa46c0 r5 : ef966124 r4 : ef966124 [ 172.434539] r3 : ef92cbc0 r2 : ef92cbc0 r1 : 00000000 r0 : ef966124 [ 172.441406] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user [ 172.448974] Control: 10c5387d Table: ae8d804a DAC: 00000015 [ 172.454986] Process init (pid: 1094, stack limit = 0xee9922f8) [ 172.461120] Stack: (0xee993e40 to 0xee994000) [ 172.465667] 3e40: a0000013 c085a7f8 ef966124 a0000013 c0fa46c0 c0761ab4 c0761a70 ef95c008 [ 172.474273] 3e60: ef95c014 c06e2fd0 c06e2fbc c06dea90 00000000 01234567 28121969 c04fccb4 [ 172.482849] 3e80: 00000000 c04fcd04 c0a302bc c04fce44 c0a02600 00000001 00000000 c085cd04 [ 172.491424] 3ea0: 00000000 00000002 c09ea000 c085afc0 ee993f24 00000000 00040001 00000445 [ 172.499999] 3ec0: a8eb9d34 00000027 00000000 00000000 00000000 c0a56a4c 00000000 00000000 [ 172.508575] 3ee0: 00000002 60000093 00000000 c0519aac 00000002 00000080 00000000 c0550420 [ 172.517150] 3f00: 00000000 00000002 ee970000 c0a56a3c c0a56a20 00000002 c0a56a3c 00000000 [ 172.525726] 3f20: c0a56a3c 0000000a c1580e00 c0a56a20 00000002 c0a56a3c c1580e00 c0a56a20 [ 172.534301] 3f40: ef92cbc0 c05173a0 00000001 ef92cbc0 c0576190 c04e3174 20000013 c0517324 [ 172.542877] 3f60: ef815c00 ee90b720 c04e3174 c0576190 00000001 ef92cbc0 c04b2f00 ffffffff [ 172.551483] 3f80: 00000058 c0517324 00000000 00000000 ffffffff 00000000 00000000 ffffffff [ 172.560058] 3fa0: 00000058 c04b2de0 00000000 00000000 fee1dead 28121969 01234567 00000000 [ 172.568634] 3fc0: 00000000 00000000 ffffffff 00000058 00000000 00000001 400aa000 bea9cf14 [ 172.577209] 3fe0: 000ea148 bea9c958 000aa750 40225728 60000010 fee1dead 00000000 00000000 [ 172.585784] [<c069bfdc>] (do_raw_spin_unlock+0x50/0xc0) from [<c085a7f8>] (_raw_spin_unlock_irqrestore+0x24/0x44) [ 172.596588] [<c085a7f8>] (_raw_spin_unlock_irqrestore+0x24/0x44) from [<c0761ab4>] (musb_shutdown+0x44/0x88) [ 172.606933] [<c0761ab4>] (musb_shutdown+0x44/0x88) from [<c06e2fd0>] (platform_drv_shutdown+0x14/0x18) [ 172.616699] [<c06e2fd0>] (platform_drv_shutdown+0x14/0x18) from [<c06dea90>] (device_shutdown+0x74/0xb4) [ 172.626647] [<c06dea90>] (device_shutdown+0x74/0xb4) from [<c04fccb4>] (kernel_restart_prepare+0x24/0x38) [ 172.636688] [<c04fccb4>] (kernel_restart_prepare+0x24/0x38) from [<c04fcd04>] (kernel_restart+0xc/0x48) [ 172.646545] [<c04fcd04>] (kernel_restart+0xc/0x48) from [<c04fce44>] (sys_reboot+0xfc/0x1d8) [ 172.655426] [<c04fce44>] (sys_reboot+0xfc/0x1d8) from [<c04b2de0>] (ret_fast_syscall+0x0/0x3c) [ 172.664459] Code: e3c3303f e594200c e593300c e1520003 (0a000002) [ 172.670867] ------------[ cut here ]------------ Signed-off-by: Hema HK <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>