aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2012-09-05target: simplify code around transport_get_sense_dataPaolo Bonzini1-36/+13
The error conditions in transport_get_sense_data are superfluous and complicate the code unnecessarily: * SCF_TRANSPORT_TASK_SENSE is checked in the caller; * it's simply part of the invariants of dev->transport->get_sense_buffer that it must be there if transport_complete ever returns 1, and that it must not return NULL. Besides, the entire callback will disappear with the next patch. * similarly in the caller we can expect that sense data is only sent for non-zero cmd->scsi_status. Signed-off-by: Paolo Bonzini <[email protected]> Cc: [email protected] Signed-off-by: Nicholas Bellinger <[email protected]>
2012-09-05target: move transport_get_sense_dataPaolo Bonzini1-55/+55
We will be calling it from transport_complete_cmd, avoid forward declarations. No semantic change. Signed-off-by: Paolo Bonzini <[email protected]> Cc: [email protected] Signed-off-by: Nicholas Bellinger <[email protected]>
2012-09-06regulator: tps6586x: add support for SYS railLaxman Dewangan2-2/+31
Device have SYS rail which is always ON. It is system power bus. LDO5 and LDO_RTC get powered through this rail internally. Add support for this rail and make the LDO5/LDO_RTC supply by it. Update document accordingly. [swarren: Instantiate the sys regulator from board-harmony-power.c to avoid regression.] Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-09-05USB: add device quirk for Joss Optical touchboardAlan Stern1-0/+4
This patch (as1604) adds a CONFIG_INTF_STRINGS quirk for the Joss infrared touchboard device. The device doesn't like to be asked for its interface strings. Signed-off-by: Alan Stern <[email protected]> Reported-by: adam ? <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05USB: ohci-at91: fix PIO handling in relation with number of portsNicolas Ferre1-0/+10
If the number of ports present on the SoC/board is not the maximum and that the platform data is not filled with all data, there is an easy way to mess the PIO setup for this interface. This quick fix addresses mis-configuration in USB host platform data that is common in at91 boards since commit 0ee6d1e (USB: ohci-at91: change maximum number of ports) that did not modified the associatd board files. Reported-by: Klaus Falkner <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]> Cc: Stable <[email protected]> [3.4+] Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05USB: ftdi_sio: PID for NZR SEM 16+ USBHorst Schirmeier2-0/+4
This adds the USB PID for the NZR SEM 16+ USB energy monitor device <http://www.nzr.de>. It works perfectly with the GPL software on <http://schou.dk/linux/sparometer/>. Signed-off-by: Horst Schirmeier <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05USB: ftdi-sio: add support for more Physik Instrumente devicesÉric Piel2-1/+37
Commit b69cc672052540 added support for the E-861. After acquiring a C-867, I realised that every Physik Instrumente's device has a different PID. They are listed in the Windows device driver's .inf file. So here are all PIDs for the current (and probably future) USB devices from Physik Instrumente. Compiled, but only actually tested on the E-861 and C-867. Signed-off-by: Éric Piel <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-058250_pci: Add additional WCH CHC353 devicesAlan Cox1-4/+37
These were reported in bugzilla long ago with a hack patch. Now we have a proper patch for one we can do the rest. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=25102 Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05parport: fix possible memory leak in parport_gsc_probe_port()Wei Yongjun1-0/+1
ops has been allocated in this function and should be freed before leaving from the error handling cases. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05Merge branch 'pinmux-dt' of ↵Olof Johansson42-203/+379
git://gitorious.org/sirfprima2-kernel/sirfprima2-kernel into next/dt This branch enables device tree bindings for the CSR Prima pin control subsystem. All patches acked by Linus W (pinctrl maintainer). * 'pinmux-dt' of git://gitorious.org/sirfprima2-kernel/sirfprima2-kernel: pinctrl: sirf: add DT-binding pinmux mapping support ARM: PRIMA2: rename prima2-cb.dts to prima2.dtsi as it only has SoC features ARM: PRIMA2: add missing interrupts property for pinctrl node + sync to Linux 3.6-rc4
2012-09-05Merge branch 'pnx4008-removal' of git://git.antcom.de/linux-2.6 into ↵Olof Johansson6-90/+7
next/cleanup Removes the pnx4008 platform support, which hasn't seen any active development since 2006 and seems to be unused these days. * 'pnx4008-removal' of git://git.antcom.de/linux-2.6: ARM: mach-pnx4008: Remove architecture
2012-09-05Merge branch 'soc-core' of ↵Olof Johansson374-2336/+5351
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/dt * 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: mach-shmobile: Add compilation support for dtbs using 'make dtbs' + sync to 3.6-rc3
2012-09-05ibmveth: Fix alignment of rx queue bugSantiago Leon1-17/+9
This patch fixes a bug found by Nish Aravamudan (https://lkml.org/lkml/2012/5/15/220) where the driver is not following the spec (it is not aligning the rx buffer on a 16-byte boundary) and the hypervisor aborts the registration, making the device unusable. The fix follows BenH's recommendation (https://lkml.org/lkml/2012/7/20/461) to replace the kmalloc+map for a single call to dma_alloc_coherent() because that function always aligns to a 16-byte boundary. The stable trees will run into this bug whenever the rx buffer kmalloc call returns something not aligned on a 16-byte boundary. Cc: <[email protected]> Signed-off-by: Santiago Leon <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-06drm: use drm_compat_ioctl for 32-bit appsKeith Packard11-0/+33
Most of the DRM drivers appear to be missing the .compat_ioctl file operation entry necessary for 32-bit application compatibility. This patch uses drm_compat_ioctl for all drivers which don't have their own, and which are using drm_ioctl for .unlocked_ioctl. This leaves drivers/gpu/drm/psb/psb_drv.c unchanged; it has a custom .unlocked_ioctl and will presumably need a custom .compat_ioctl as well. Signed-off-by: Keith Packard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2012-09-05serial: add a new helper functionHuang Shijie10-11/+11
In most of the time, the driver needs to check if the cts flow control is enabled. But now, the driver checks the ASYNC_CTS_FLOW flag manually, which is not a grace way. So add a new wraper function to make the code tidy and clean. Signed-off-by: Huang Shijie <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: omap: define helpers for pdata function pointersFelipe Balbi1-19/+47
this patch is in preparation to a few other changes which will align on the prototype for function pointers passed through pdata. It also helps cleaning up the driver a little by agregating checks for pdata in a single location. Tested-by: Shubhrajyoti D <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: omap: define and use to_uart_omap_port()Felipe Balbi1-18/+18
current code only works because struct uart_port is the first member on the uart_omap_port structure. If, for whatever reason, someone puts another member as the first of the structure, that cast won't work anymore. In order to be safe, let's use a container_of() which, for now, gets optimized into a cast anyway. Tested-by: Shubhrajyoti D <[email protected]> Acked-by: Santosh Shilimkar <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: Add note about migration to driver SCCNXPAlexander Shiyan1-0/+3
This patch adds note about migration to driver SCCNXP in the code of driver SC26XX and in MIPS SNI board initialization with example. Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: New serial driver SCCNXPAlexander Shiyan3-0/+1004
This driver is a replacement for a SC26XX driver with a lot of improvements and new features. The main differences from the SC26XX driver: - Removed dependency on MIPS. Driver can be used on any platform. - Added support for SCC2681, SCC2691, SCC2692, SC28L91, SC28L92, SC28L202, SCC68681 and SCC68692 ICs. - Using devm_-related functions. - Improved error handling of serial port, improved FIFO handling. - Ability to load multiple instances of drivers. To avoid the possibility of regression, driver SC26XX left in the system to confirm the stability of the driver on platforms where it is being used. Signed-off-by: Alexander Shiyan <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05parport_serial: Add support for the WCH353 2S/1P multi-IO cardGuainluca Anzolin2-9/+40
To allow parport_serial to handle the card the same PCI ids are blacklisted in 8250_pci.c using the existing software blacklist mechanism. The blacklist array is also renamed because it now covers this new use case. Since the two serial ports are auto-detected as XScale instead of 16550A clones, we also add a quirk to 8250_pci.c to skip autodetection and set the correct port type. Signed-off-by: Gianluca Anzolin <[email protected]> [Fold in fixes for the uart_8250 change] Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: Samsung: Silence some checkpatch errors and warningsSachin Kamat1-3/+3
Fixes the following errors and warnings: ERROR: trailing whitespace ERROR: return is not a function, parentheses are not required WARNING: suspect code indent for conditional statements (32, 36) Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: Samsung: Replace printk with dev_* functionsSachin Kamat1-7/+7
Silences checkpatch warnings regarding use of printks. Signed-off-by: Sachin Kamat <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: pl011: honour serial aliases in device treeMatthew Leach1-0/+36
If the order of UART nodes is changed in the device tree, then tty dev devices are attached to different serial ports causing the console to be directed to a different physical serial port. The "serial" aliases in the device tree should prevent this. This patch ensures that the UART driver creates tty devices that honour these aliases if a device tree is present. Acked-by: Linus Walleij <[email protected]> Reviewed-by: Will Deacon <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Matthew Leach <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: diminish usage of struct serial_uart_configPaul Gortmaker3-5/+7
This structure might have made sense many years ago, but at this point it is only used in one specific driver, and referenced in stale comments elsewhere. Rather than change the sunsu.c driver, simply move the struct to be within the exclusive domain of that driver, so it won't get inadvertently picked up and used by other serial drivers going forward. The comments referencing the now driver specific struct are updated accordingly. Note that 8250.c has a struct that is similar in usage, with the name serial8250_config; but is 100% independent and untouched here. Cc: "David S. Miller" <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial: sunsu.c - don't explicitly tie array size to dynamic entityPaul Gortmaker1-1/+1
The addition of 8250-like entities continues to grow, while this driver has a snapshot of a select few common 8250 UARTs. So it has no need to grow with the new additions, since it calls out its own (largely historic) static list which does not grow. Cc: "David S. Miller" <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05m32r_sio: remove dependency on struct serial_uart_configPaul Gortmaker1-34/+2
The struct serial_uart_config is hardly used at all, and the use case like this one are somewhat needless. Remove the trivial usage so that we can remove serial_uart_config. Since the type field isn't really used at all, we also delete the initialization and references of it here as well. Cc: Hirokazu Takata <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05serial/imx: improve error diagnosics for clock and pinctrl failuresUwe Kleine-König1-0/+3
These error paths are used more often now after deep changes to the clock code and pinctrl is still new for imx. So help debugging and give clues in the boot log. Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05tty: Split the serial_core helpers for setserial into twoAlan Cox1-71/+87
We want them split so that we can call them from setserial functionality where we copy to/from user space and do the locking, but also from sysfs where in future we'll want to came them within a sysfs context. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05tty: serial: imx: don't reinit clock in imx_setup_ufcr()Dirk Behme1-14/+4
Remove the clock configuration from imx_setup_ufcr(). This isn't needed here and will cause garbage output if done. To be be sure that we only touch the bits we want (TXTL and RXTL) we have to mask out all other bits of the UFCR register. Add one non-existing bit macro for this, too (bit 6, DCEDTE on i.MX6). Signed-off-by: Dirk Behme <[email protected]> CC: Shawn Guo <[email protected]> CC: Sascha Hauer <[email protected]> CC: Troy Kisky <[email protected]> CC: Xinyu Chen <[email protected]> Cc: stable <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05tty: serial: imx: console write routing is unsafe on SMPXinyu Chen1-1/+11
The console feature's write routing is unsafe on SMP with the startup/shutdown call. There could be several consumers of the console * the kernel printk * the init process using /dev/kmsg to call printk to show log * shell, which open /dev/console and write with sys_write() The shell goes into the normal uart open/write routing, but the other two go into the console operations. The open routing calls imx serial startup, which will write USR1/2 register without any lock and critical with imx_console_write call. Add a spin_lock for startup/shutdown/console_write routing. This patch is a port from Freescale's Android kernel. Signed-off-by: Xinyu Chen <[email protected]> Tested-by: Dirk Behme <[email protected]> CC: Sascha Hauer <[email protected]> Acked-by: Shawn Guo <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05drivers/tty/serial/sirfsoc_uart.c: drop frees of devm_ alloc'd dataJulia Lawall1-6/+2
devm free functions should not have to be explicitly used. A semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ @@ ( * devm_kfree(...); | * devm_free_irq(...); | * devm_iounmap(...); | * devm_release_region(...); | * devm_release_mem_region(...); ) // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05tty: serial: mpc5xxx: add support for mark/space parityWolfram Sang1-2/+6
Tested on a custom MPC5200B-board using some fancy industrial protocol. Verified that MPC512x has identical bits, so should work there as well. Signed-off-by: Wolfram Sang <[email protected]> Acked-by: Anatolij Gustschin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05drivers:tty:fix up ENOIOCTLCMD error handlingWanlong Gao1-1/+1
At commit 07d106d0, Linus pointed out that ENOIOCTLCMD should be translated as ENOTTY to user mode. For example: fd = open("/dev/tty", O_RDWR); ioctl(fd, -1, &argp); then the errno should be ENOTTY but not EINVAL. Signed-off-by: Wanlong Gao <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05tty: serial: max310x: Remove explicit use of devm_kfreeEmil Goode1-3/+0
There is no reason to explicitly call devm_kfree in probe or remove functions. Signed-off-by: Emil Goode <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05tty: serial: max310x: Check return code of gpiochip_removeEmil Goode1-3/+7
The gpiochip_remove function may fail to remove a gpio_chip if any GPIOs are still requested. This patch informs the caller of such a senario. Sparse is warning because the function prototype has a __must_check annotation. Sparse warning: drivers/tty/serial/max310x.c:1223:18: warning: ignoring return value of ‘gpiochip_remove’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Emil Goode <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05tty: serial: altera_uart: Use platform_{get,set}_drvdataTobias Klauser1-3/+3
Use the wrapper functions, so we can directly pass a struct platfrom_device. Signed-off-by: Tobias Klauser <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05tty: max3100: use module_spi_driverDevendra Naga1-11/+1
the driver's module init and exit functions can be replaced with module_spi_driver as they do only spi_register_driver and spi_unregister_driver in module's init and exit paths. Signed-off-by: Devendra Naga <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05drivers/tty/serial/amba-pl0{10,11}.c: use clk_prepare_enable and ↵Julia Lawall2-22/+8
clk_disable_unprepare Clk_prepare_enable and clk_disable_unprepare combine clk_prepare and clk_enable, and clk_disable and clk_unprepare. The9 make the code more concise, and ensure that clk_unprepare is called when clk_enable fails. A simplified version of the semantic patch that introduces calls to these functions is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ - clk_prepare(e); - clk_enable(e); + clk_prepare_enable(e); @@ expression e; @@ - clk_disable(e); - clk_unprepare(e); + clk_disable_unprepare(e); // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05usb: host: xhci: fix compilation error for non-PCI based stacksMoiz Sonasath1-0/+1
For non PCI-based stacks, this function call usb_disable_xhci_ports(to_pci_dev(hcd->self.controller)); made from xhci_shutdown is not applicable. Ideally, we wouldn't have any PCI-specific code on a generic driver such as the xHCI stack, but it looks like we should just stub usb_disable_xhci_ports() out for non-PCI devices. [ [email protected]: slight improvement to commit log ] This patch should be backported to kernels as old as 3.0, since the commit it fixes (e95829f474f0db3a4d940cae1423783edd966027 "xhci: Switch PPT ports to EHCI on shutdown.") was marked for stable. Signed-off-by: Moiz Sonasath<[email protected]> Signed-off-by: Ruchika Kharwar <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Cc: [email protected]
2012-09-05Merge branch 'fixes-for-3.6' of git://gitorious.org/linux-can/linux-canDavid S. Miller1-1/+10
Marc Kleine-Budde says: ==================== this patch is for the v3.6 release cycle. Benoît Locher fixed a repeated frame bug in the mcp251x driver. He implemented the workaround suggested by the errata sheet. ==================== Signed-off-by: David S. Miller <[email protected]>
2012-09-05usb: host: xhci-plat: use ioremap_nocacheRuchika Kharwar1-1/+1
Use the ioremap_nocache variant of the ioremap API in order to make sure our memory will be marked uncachable. This patch should be backported to kernels as old as 3.4, that contain the commit 3429e91a661e1f383aecc86c6bbcf65afb15c892 "usb: host: xhci: add platform driver support". Signed-off-by: Ruchika Kharwar <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Cc: [email protected]
2012-09-05usb: host: xhci: Fix Compliance Mode on SN65LVPE502CP HardwareAlexis R. Cortes3-0/+169
This patch is intended to work around a known issue on the SN65LVPE502CP USB3.0 re-driver that can delay the negotiation between a device and the host past the usual handshake timeout. If that happens on the first insertion, the host controller port will enter in Compliance Mode and NO port status event will be generated (as per xHCI Spec) making impossible to detect this event by software. The port will remain in compliance mode until a warm reset is applied to it. As a result of this, the port will seem "dead" to the user and no device connections or disconnections will be detected. For solving this, the patch creates a timer which polls every 2 seconds the link state of each host controller's port (this by reading the PORTSC register) and recovers the port by issuing a Warm reset every time Compliance mode is detected. If a xHC USB3.0 port has previously entered to U0, the compliance mode issue will NOT occur only until system resumes from sleep/hibernate, therefore, the compliance mode timer is stopped when all xHC USB 3.0 ports have entered U0. The timer is initialized again after each system resume. Since the issue is being caused by a piece of hardware, the timer will be enabled ONLY on those systems that have the SN65LVPE502CP installed (this patch uses DMI strings for detecting those systems) therefore making this patch to act as a quirk (XHCI_COMP_MODE_QUIRK has been added to the xhci stack). This patch applies for these systems: Vendor: Hewlett-Packard. System Models: Z420, Z620 and Z820. This patch should be backported to kernels as old as 3.2, as that was the first kernel to support warm reset. The kernels will need to contain both commit 10d674a82e553cb8a1f41027bb3c3e309b3f6804 "USB: When hot reset for USB3 fails, try warm reset" and commit 8bea2bd37df08aaa599aa361a9f8b836ba98e554 "usb: Add support for root hub port status CAS". The first patch add warm reset support, and the second patch modifies the USB core to issue a warm reset when the port is in compliance mode. Signed-off-by: Alexis R. Cortes <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Cc: [email protected]
2012-09-05xhci: Make handover code more robustMatthew Garrett1-2/+10
My test platform (Intel DX79SI) boots reliably under BIOS, but frequently crashes when booting via UEFI. I finally tracked this down to the xhci handoff code. It seems that reads from the device occasionally just return 0xff, resulting in xhci_find_next_cap_offset generating a value that's larger than the resource region. We then oops when attempting to read the value. Sanity checking that value lets us avoid the crash. I've no idea what's causing the underlying problem, and xhci still doesn't actually *work* even with this, but the machine at least boots which will probably make further debugging easier. This should be backported to kernels as old as 2.6.31, that contain the commit 66d4eadd8d067269ea8fead1a50fe87c2979a80d "USB: xhci: BIOS handoff and HW initialization." Signed-off-by: Matthew Garrett <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Cc: [email protected]
2012-09-05xhci: Fix a logical vs bitwise AND bugDan Carpenter1-1/+1
The intent was to test whether the flag was set. This patch should be backported to stable kernels as old as 3.0, since it fixes a bug in commit e95829f474f0db3a4d940cae1423783edd966027 "xhci: Switch PPT ports to EHCI on shutdown.", which was marked for stable. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Sarah Sharp <[email protected]> Cc: [email protected]
2012-09-05staging: zcache: fix cleancache race condition with shrinkerSeth Jennings1-4/+3
This patch fixes a race condition that results in memory corruption when using cleancache. The race exists between the zcache shrinker handler, shrink_zcache_memory() and cleancache_get_page(). In most cases, the shrinker will both evict a zbpg from its buddy list and flush it from tmem before a cleancache_get_page() occurs on that page. A subsequent cleancache_get_page() will fail in the tmem layer. In the rare case that two occur together and the cleancache_get_page() path gets through the tmem layer before the shrinker path can flush tmem, zbud_decompress() does a check to see if the zbpg is a "zombie", i.e. not on a buddy list, which means the shrinker is in the process of reclaiming it. If the zbpg is a zombie, zbud_decompress() returns -EINVAL. However, this return code is being ignored by the caller, zcache_pampd_get_data_and_free(), which results in the caller of cleancache_get_page() thinking that the page has been properly retrieved when it has not. This patch modifies zcache_pampd_get_data_and_free() to convey the failure up the stack so that the caller of cleancache_get_page() knows the page retrieval failed. This needs to be applied to stable trees as well. zcache-main.c was named zcache.c before v3.1, so I'm not sure how you want to handle trees earlier than that. Signed-off-by: Seth Jennings <[email protected]> Cc: stable <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05libertas sdio: fix suspend when interface is downDaniel Drake1-0/+5
When the interface is down, the hardware is powered off. However, the suspend handler currently tries to send host sleep commands (when wakeup params are set) in this configuration, causing a system hang when going into suspend (the commands will never complete). Avoid this by detecting this situation and simply returning from the suspend handler without doing anything special. Signed-off-by: Daniel Drake <[email protected]> Acked-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-05rt2800usb: Added rx packet length validity checkSergei Poselenov2-2/+10
On our system (ARM Cortex-M3 SOC running linux-2.6.33) frequent crashes were observed in the rt2800usb module because of the invalid length of the received packet (3392, 46920...). This patch adds the sanity check on the packet legth. Also, changed WARNING to ERROR in rt2x00lib_rxdone() so that the bad packet condition would be noticed. The fix was tested on the latest compat-wireless-3.5.1-1-snpc. Cc: [email protected] Signed-off-by: Sergei Poselenov <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-05rt2x00: Fix rfkill polling prior to interface start.Gertjan van Wingerde11-0/+69
We need to program the rfkill switch GPIO pin direction to input at device initialization time, not only when the interface is brought up. Doing this only when the interface is brought up could lead to rfkill detecting the switch is turned on erroneously and inability to create the interface and bringing it up. Reported-and-tested-by: Andreas Messer <[email protected]> Signed-off-by: Gertjan van Wingerde <[email protected]> Cc: <[email protected]> Acked-by: Ivo Van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-05rt2x00: Fix word size of rt2500usb MAC_CSR19 register.Gertjan van Wingerde2-9/+9
The register is 16 bits wide, not 32. Signed-off-by: Gertjan van Wingerde <[email protected]> Cc: <[email protected]> Acked-by: Ivo Van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-09-05rt2x00: Identify ASUS USB-N53 device.Gertjan van Wingerde1-1/+2
This is an RT3572 based device. Signed-off-by: Maximilian Engelhardt <[email protected]> Signed-off-by: Gertjan van Wingerde <[email protected]> Cc: <[email protected]> Acked-by: Ivo Van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>