summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)Author
2011-04-19Serial: Remove unused code.Govindraj.R
Remove stale code in serial_core layer. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19tty: Clean console safelyPetr Písař
Traditional \E[2J sequence erases console display but scroll-back buffer and underlying device (frame) buffer keep data that can be accessed by scrolling console back. This patch introduce new \E[J parameter 3 that allows to scramble scroll-back buffer explicitly. Session locking programs (screen, vlock) can use it to prevent attacker to browse locked console history. Signed-off-by: Petr Písař <ppisar@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19Serial: ifx6x60c: Remove duplicate includes of linux/tty.hJesper Juhl
Including linux/tty.h 3 times is a little over the top - once will do. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19tty: remove invalid location line in file headerJovi Zhang
remove invalid location line in each file header after location moved from driver/char to driver/tty Signed-off-by: Jovi Zhang <bookjovi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19serial: core, remove uart_update_termiosJiri Slaby
Now, uart_update_termios is empty, so it's time to remove it. We no longer need a live tty in .dtr_rts. So this should prune all the bugs where tty is zeroed in port->tty during tty_port_block_til_ready. There is one thing to note. We don't set ASYNC_NORMAL_ACTIVE now. It's because this is done already in tty_port_block_til_ready. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19serial: core, do not set DTR/RTS twice on startupJiri Slaby
In .dtr_rts we do: uart_set_mctrl(uport, TIOCM_DTR | TIOCM_RTS) and call uart_update_termios. It does: uart_set_mctrl(port, TIOCM_DTR | TIOCM_RTS) once again. As the only callsite of uart_update_termios is .dtr_rts, remove the uart_set_mctrl from uart_update_termios to not set it twice. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19serial: core, move termios handling to uart_startupJiri Slaby
We should not fiddle with speed and cflags in .dtr_rts hook. Actually we might not have tty at that moment already. So move the console cflag copy and speed setup into uart_startup. Actually the speed setup is already there, but we need to call it unconditionally (uart_startup is called from uart_open with hw_init = 0). This means we move uart_change_speed before dtr/rts setup in .dtr_rts. But this should not matter as the setup should be called after uart_change_speed anyway. Before: After: dtr/rts setup (dtr_rts) uart_change_speed (startup) uart_change_speed (update_termios) dtr/rts setup (dtr_rts) dtr/rts setup (update_termios) dtr/rts setup (update_termios) The second setup will dismiss with the next patch. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19Char: moxa, do not touch NORMAL_ACTIVE bitJiri Slaby
The bit is set in tty_port_block_til_ready (via moxa_open) and unset in tty_port_close (via moxa_close). No need to pin it in the driver. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19serial: altera_uart: Scan for a free port if platform device id is -1Tobias Klauser
Devices extracted from device tree all seem to have pdev->id set to -1. Up until now we mapped all devices with id -1 to the first device. This behaviour could lead to problems when using more than one Altera UART in a system. This patch changes the behaviour of the driver to scan for the next free id in case the id is -1. Because we cannot refer back to the assigned id in altera_uart_remove, the port instance needs to be stored in device drvdata. Reported-by: David Smoot <davidsmoot@gmail.com> Cc: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: fix fail path in tty_openJiri Slaby
When tty_add_file fails we omit to clean up. Fix that by calling tty_release appropriatelly. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: plug in deinitialize_tty_structJiri Slaby
Used the newly introduced deinitialize_tty_struct to properly shut down ldisc. It is intended to fix the Julian's reported problem. He reports that kmemleak checker warns about memory leak: unreferenced object 0xc0e19860 (size 8): comm cat, pid 1226, jiffies 4294919464 (age 287.476s) hex dump (first 8 bytes): 44 de 2d c1 01 00 00 00 D.-..... backtrace: [<c1065a74>] create_object+0x109/0x1ad [<c1063d2b>] kmem_cache_alloc+0x60/0x68 [<c113505c>] tty_ldisc_get+0x54/0x76 [<c11358c9>] tty_ldisc_init+0xa/0x20 [<c1130ab4>] initialize_tty_struct+0x2d/0x1ac [<c1130c8c>] tty_init_dev+0x59/0x10d [<c113136d>] tty_open+0x24a/0x3a2 ... Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Reported-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: introduce deinit helpers for proper ldisc shutdownJiri Slaby
Introduce deinitialize_tty_struct which should be called after initialize_tty_struct and before successfull tty_ldisc_setup. It calls tty_ldisc_deinit which is opposite of tty_ldisc_init. It only puts a reference to ldisc and assigns NULL to tty->ldisc. It will be used to shut down ldisc when tty_release cannot be called yet. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: unify pty_unix98_install fail path handlingJiri Slaby
Change it so that we call the deinit functions at one place at the end of the function (by gotos). And while at it use some sane label names. This is a preparation for the deinitialization of tty in the next patch. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: unify pty_install fail path handlingJiri Slaby
Change it so that we call the deinit functions at one place at the end of the function (by gotos). And while at it use some sane label names. This is a preparation for the deinitialization of tty in the next patch. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: unify tty_init_dev fail path handlingJiri Slaby
Change it so that we call the deinit functions at one place at the end of the function (by gotos). And while at it use some sane label names. This is a preparation for the deinitialization of tty in the next patch. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Julian Anastasov <ja@ssi.bg> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: rocket, remove unused variablesJiri Slaby
drivers/tty/rocket.c:1393:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1412:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1730:2: warning: Value stored to 'cp' is never read cp = &info->channel; ^ ~~~~~~~~~~~~~~ drivers/tty/rocket.c:1825:3: warning: Value stored to 'str' is never read str = "8"; ^ ~~~ [many 'str' warnings stripped] drivers/tty/rocket.c:2037:3: warning: Value stored to 'board_type' is never read board_type = "RocketModem"; ^ ~~~~~~~~~~~~~ [some 'board_type' warnings stripped] Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19Char: moxa, remove unused variablesJiri Slaby
drivers/tty/moxa.c:1287:2: warning: Value stored to 'port' is never read port = tty->index; ^ ~~~~~~~~~~ drivers/tty/moxa.c:1763:2: warning: Value stored to 'cflag' is never read cflag = termio->c_cflag; /* termio->c_cflag */ ^ ~~~~~~~~~~~~~~~ Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: VT, remove unused variablesJiri Slaby
drivers/tty/vt/vt.c:892:2: warning: Value stored to 'old_screen_size' is never read old_screen_size = vc->vc_screenbuf_size; ^ ~~~~~~~~~~~~~~~~~~~~~ drivers/tty/vt/vt.c:890:2: warning: Value stored to 'old_cols' is never read old_cols = vc->vc_cols; ^ ~~~~~~~~~~~ Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19Char: cyclades, fix unused variableJiri Slaby
drivers/tty/cyclades.c:1454:2: warning: Value stored to 'channel' is never read channel = info->line - card->first_line; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix it by moving it to the appropriate debug section where it is used. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19TTY: serial_core, remove unused variableJiri Slaby
drivers/tty/serial/serial_core.c:1980:2: warning: Value stored to 'tty' is never read tty = port->tty; ^ ~~~~~~~~~ Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Govindraj.R <govindraj.raja@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19tty: VT, remove unused variableJiri Slaby
drivers/tty/vt/vt_ioctl.c:1525:2: warning: Value stored to 'kbd' is never read kbd = kbd_table + console; ^ ~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19drivers/tty/vt/vt_ioctl.c: repair insane ?: expressionAndrew Morton
Cc: Arthur Taylor <art@ified.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19vt: Add K_OFF return value to vt_ioctl KDGKBMODEArthur Taylor
After adding support for K_OFF in KDSKBMODE, it was forgotten to add support for returning it in KDGKBMODE. Signed-off-by: Arthur Taylor <art@ified.ca> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-19vt: remove uneeded retval check before tty->ops->open inside tty_openHerton Ronaldo Krzesinski
The current check is uneeded, since !retval will always returns true, as retval returned from tty_add_file is checked earlier and tty_open exits if it's not zero. Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-18Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: xen-kbdfront - fix mouse getting stuck after save/restore Input: estimate number of events per packet Input: evdev - indicate buffer overrun with SYN_DROPPED Input: document event types and codes and their intended use Input: add KEY_IMAGES specifically for AL Image Browser Input: twl4030_keypad - fix potential NULL dereference in twl4030_kp_probe() Input: h3600_ts - fix error handling at connect Input: twl4030_keypad - avoid potential NULL-pointer dereference
2011-04-18Input: xen-kbdfront - fix mouse getting stuck after save/restoreIgor Mammedov
Mouse gets "stuck" after restore of PV guest but buttons are in working condition. If driver has been configured for ABS coordinates at start it will get XENKBD_TYPE_POS events and then suddenly after restore it'll start getting XENKBD_TYPE_MOTION events, that will be dropped later and they won't get into user-space. Regression was introduced by hunk 5 and 6 of 5ea5254aa0ad269cfbd2875c973ef25ab5b5e9db ("Input: xen-kbdfront - advertise either absolute or relative coordinates"). Driver on restore should ask xen for request-abs-pointer again if it is available. So restore parts that did it before 5ea5254. Acked-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Igor Mammedov <imammedo@redhat.com> [v1: Expanded the commit description] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-18Input: estimate number of events per packetJeff Brown
Calculate a default based on the number of ABS axes, REL axes, and MT slots for the device during input device registration. Signed-off-by: Jeff Brown <jeffbrown@android.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-04-18block: add blk_run_queue_asyncChristoph Hellwig
Instead of overloading __blk_run_queue to force an offload to kblockd add a new blk_run_queue_async helper to do it explicitly. I've kept the blk_queue_stopped check for now, but I suspect it's not needed as the check we do when the workqueue items runs should be enough. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-04-18md: fix up raid1/raid10 unplugging.NeilBrown
We just need to make sure that an unplug event wakes up the md thread, which is exactly what mddev_check_plugged does. Also remove some plug-related code that is no longer needed. Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-18md: incorporate new plugging into raid5.NeilBrown
In raid5 plugging is used for 2 things: 1/ collecting writes that require a bitmap update 2/ collecting writes in the hope that we can create full stripes - or at least more-full. We now release these different sets of stripes when plug_cnt is zero. Also in make_request, we call mddev_check_plug to hopefully increase plug_cnt, and wake up the thread at the end if plugging wasn't achieved for some reason. Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-18md: provide generic support for handling unplug callbacks.NeilBrown
When an md device adds a request to a queue, it can call mddev_check_plugged. If this succeeds then we know that the md thread will be woken up shortly, and ->plug_cnt will be non-zero until then, so some processing can be delayed. If it fails, then no unplug callback is expected and the make_request function needs to do whatever is required to make the request happen. Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-18md - remove old plugging code.NeilBrown
md has some plugging infrastructure for RAID5 to use because the normal plugging infrastructure required a 'request_queue', and when called from dm, RAID5 doesn't have one of those available. This relied on the ->unplug_fn callback which doesn't exist any more. So remove all of that code, both in md and raid5. Subsequent patches with restore the plugging functionality. Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-18md/dm - remove remains of plug_fn callback.NeilBrown
Now that unplugging is done differently, the unplug_fn callback is never called, so it can be completely discarded. Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-18md: use new plugging interface for RAID IO.NeilBrown
md/raid submits a lot of IO from the various raid threads. So adding start/finish plug calls to those so that some plugging happens. Signed-off-by: NeilBrown <neilb@suse.de>
2011-04-17i2c-algo-bit: Call pre/post_xfer for bit_testAlex Deucher
Apparently some distros set i2c-algo-bit.bit_test to 1 by default. In some cases this causes i2c_bit_add_bus to fail and prevents the i2c bus from being added. In the radeon case, we fail to add the ddc i2c buses which prevents the driver from being able to detect attached monitors. The i2c bus works fine even if bit_test fails. This is likely due to gpio switching that is required and handled in the pre/post_xfer hooks, so call the pre/post_xfer hooks in the bit test as well. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=36221 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org [.38 down to .34]
2011-04-17i2c: Improve deprecation warningsJean Delvare
When warning on the use of deprecated i2c_driver methods attach_adapter and detach_adapter, mention the name of the driver which needs to be updated. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2011-04-16Merge branch 'usb-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (43 commits) Revert "USB: isp1760-hcd: move imask clear after pending work is done" xHCI: Implement AMD PLL quirk xhci: Tell USB core both roothubs lost power. usbcore: Bug fix: system can't suspend with USB3.0 device connected to USB3.0 hub USB: Fix unplug of device with active streams USB: xhci - also free streams when resetting devices xhci: Fix NULL pointer deref in handle_port_status() USB: xhci - fix math in xhci_get_endpoint_interval() USB: xhci: simplify logic of skipping missed isoc TDs USB: xhci - remove excessive 'inline' markings USB: xhci: unsigned char never equals -1 USB: xhci - fix unsafe macro definitions USB: fix formatting of SuperSpeed endpoints in /proc/bus/usb/devices USB: isp1760-hcd: move imask clear after pending work is done USB: fsl_qe_udc: send ZLP when zero flag and length % maxpacket == 0 usb: qcserial add missing errorpath kfrees usb: qcserial avoid pointing to freed memory usb: Fix qcserial memory leak on rmmod USB: ftdi_sio: add ids for Hameg HO720 and HO730 USB: option: Added support for Samsung GT-B3730/GT-B3710 LTE USB modem. ...
2011-04-16Merge branches 'core-fixes-for-linus', 'perf-fixes-for-linus', ↵Linus Torvalds
'sched-fixes-for-linus', 'timer-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: futex: Set FLAGS_HAS_TIMEOUT during futex_wait restart setup * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf_event: Fix cgrp event scheduling bug in perf_enable_on_exec() perf: Fix a build error with some GCC versions * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: sched: Fix erroneous all_pinned logic sched: Fix sched-domain avg_load calculation * 'timer-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: RTC: rtc-mrst: follow on to the change of rtc_device_register() RTC: add missing "return 0" in new alarm func for rtc-bfin.c RTC: Fix s3c compile error due to missing s3c_rtc_setpie RTC: Fix early irqs caused by calling rtc_set_alarm too early * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, amd: Disable GartTlbWlkErr when BIOS forgets it x86, NUMA: Fix fakenuma boot failure x86/mrst: Fix boot crash caused by incorrect pin to irq mapping x86/ce4100: Add reg property to bridges
2011-04-15Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm: ARM: 6879/1: fix personality test wrt usage of domain handlers ARM: 6878/1: fix personality flag propagation across an exec ARM: 6877/1: the ADDR_NO_RANDOMIZE personality flag should be honored with mmap() ARM: 6876/1: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS ARM: pxa: convert incorrect IRQ_TO_IRQ() to irq_to_gpio() ARM: mmp: align NR_BUILTIN_GPIO with gpio interrupt number ARM: pxa: align NR_BUILTIN_GPIO with GPIO interrupt number ARM: pxa: always clear LPM bits for PXA168 MFPR pcmcia: limit pxa2xx_trizeps4 subdriver to trizeps4 platform pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform ARM: pxafb: Fix access to nonexistent member of pxafb_info ARM: 6872/1: arch:common:Makefile Remove unused config in the Makefile. ARM: 6868/1: Preserve the VFP state during fork ARM: 6867/1: Introduce THREAD_NOTIFY_COPY for copy_thread() hooks ARM: 6866/1: Do not restrict HIGHPTE to !OUTER_CACHE ARM: 6865/1: perf: ensure pass through zero is counted on overflow ARM: 6864/1: hw_breakpoint: clear DBGVCR out of reset ARM: Only allow PM_SLEEP with CPUs which support suspend ARM: Make consolidated PM sleep code depend on PM_SLEEP
2011-04-14RapidIO/mpc85xx: fix possible mport registration problemsAlexandre Bounine
Fix a possible problem with mport registration left non-cleared after fsl_rio_setup() exits on link error. Abort mport initialization if registration failed. This patch is applicable to 2.6.39-rc1 only. The problem does not exist for earlier versions. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Cc: Thomas Moll <thomas.moll@sysgo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-14RapidIO: add IDT CPS-1432 switch definitionsAlexandre Bounine
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-14drivers/misc/sgi-gru/grufile.c: fix the wrong members of gru_chipWanlong Gao
Fix the wrong members and the wrong function's definition, since the irq_chip had changed. Signed-off-by: Wanlong Gao <wanlong.gao@gmail.com> Cc: Jack Steiner <steiner@sgi.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-14leds/leds-regulator.c: fix handling of already enabled regulatorsAntonio Ospite
Make the driver aware of the initial status of the regulator. The leds-regulator driver was ignoring the initial status of the regulator; this resulted in rdev->use_count being incremented to 2 after calling regulator_led_set_value() in the .probe method when a regulator was already enabled at insmod time, which made it impossible to ever disable the regulator. Signed-off-by: Antonio Ospite <ospite@studenti.unina.it> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Antonio Ospite <ospite@studenti.unina.it> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Daniel Ribeiro <drwyrm@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-14drivers/rtc/rtc-mc13xxx.c: fix unterminated platform_device_id tableAxel Lin
The platform_device_id table is supposed to be zero-terminated. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-04-14Revert "USB: isp1760-hcd: move imask clear after pending work is done"Greg Kroah-Hartman
This reverts commit 5808544690300071f09eef9ab83a0fb1f60cf1cd. To quote Richard: I don't think this should be mainlined. It was a misunderstanding on my part. If you see all the other hdc drivers in the same location, they all do the same thing (i.e. clear the interrupt status first, then do the work) that "glitch" I think I saw was actually two back-to-back interrupts. Sebastian (the original author of isp1760) explained it to me a few days after my submission. sorry for the confusion Cc: Richard Retanubun <RichardRetanubun@ruggedcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-13xHCI: Implement AMD PLL quirkAndiry Xu
This patch disable the optional PM feature inside the Hudson3 platform under the following conditions: 1. If an isochronous device is connected to xHCI port and is active; 2. Optional PM feature that powers down the internal Bus PLL when the link is in low power state is enabled. The PM feature needs to be disabled to eliminate PLL startup delays when the link comes out of low power state. The performance of DMA data transfer could be impacted if system delay were encountered and in addition to the PLL start up delays. Disabling the PM would leave room for unpredictable system delays in order to guarantee uninterrupted data transfer to isochronous audio or video stream devices that require time sensitive information. If data in an audio/video stream was interrupted then erratic audio or video performance may be encountered. AMD PLL quirk is already implemented in OHCI/EHCI driver. After moving the quirk code to pci-quirks.c and export them, xHCI driver can call it directly without having the quirk implementation in itself. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13xhci: Tell USB core both roothubs lost power.Sarah Sharp
On a resume, when the power is lost during hibernate, the USB core will call hub_reset_resume for the xHCI USB 2.0 roothub, but not for the USB 3.0 roothub: [ 164.748310] usb usb1: root hub lost power or was reset [ 164.748353] usb usb2: root hub lost power or was reset [ 164.748487] usb usb3: root hub lost power or was reset [ 164.748488] xhci_hcd 0000:01:00.0: Stop HCD ... [ 164.870039] hub 4-0:1.0: hub_resume ... [ 164.870054] hub 3-0:1.0: hub_reset_resume This causes issues later, because the USB core assumes the USB 3.0 hub attached to the USB 3.0 roothub is still active. It attempts to queue a control URB for the external hub, which fails because all the device slot contexts were released when the USB 3.0 roothub lost power: [ 164.980044] hub 4-1:1.0: hub_resume [ 164.980047] xhci_hcd 0000:01:00.0: Get port status returned 0x10101 [ 164.980049] xHCI xhci_urb_enqueue called with unaddressed device [ 164.980053] hub 3-0:1.0: port 1: status 0101 change 0001 [ 164.980056] hub 4-1:1.0: hub_port_status failed (err = -22) [ 164.980060] xhci_hcd 0000:01:00.0: `MEM_WRITE_DWORD(3'b000, 32'hffffc90008948440, 32'h202e1, 4'hf); [ 164.980062] xHCI xhci_urb_enqueue called with unaddressed device [ 164.980066] xhci_hcd 0000:01:00.0: clear port connect change, actual port 0 status = 0x2e1 [ 164.980069] hub 4-1:1.0: hub_port_status failed (err = -22) [ 164.980072] xhci_hcd 0000:01:00.0: get port status, actual port 1 status = 0x2a0 [ 164.980074] xHCI xhci_urb_enqueue called with unaddressed device [ 164.980077] xhci_hcd 0000:01:00.0: Get port status returned 0x100 [ 164.980079] hub 4-1:1.0: hub_port_status failed (err = -22) [ 164.980082] xHCI xhci_urb_enqueue called with unaddressed device [ 164.980085] hub 4-1:1.0: hub_port_status failed (err = -22) [ 164.980088] hub 4-1:1.0: port 4: status 0000 change 0000 [ 164.980091] xHCI xhci_urb_enqueue called with unaddressed device [ 164.980094] hub 4-1:1.0: activate --> -22 [ 164.980113] xHCI xhci_urb_enqueue called with unaddressed device [ 164.980117] hub 4-1:1.0: hub_port_status failed (err = -22) [ 164.980119] xHCI xhci_urb_enqueue called with unaddressed device [ 164.980123] hub 4-1:1.0: can't resume port 4, status -22 [ 164.980126] hub 4-1:1.0: port 4 status ffff.ffff after resume, -22 [ 164.980129] usb 4-1.4: can't resume, status -22 [ 164.980131] hub 4-1:1.0: logical disconnect on port 4 This causes issues when a USB 3.0 hard drive is attached to the external USB 3.0 hub when the system is hibernated: [ 6249.849653] sd 8:0:0:0: [sdb] Unhandled error code [ 6249.849659] sd 8:0:0:0: [sdb] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [ 6249.849663] sd 8:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 2a 08 00 00 02 00 [ 6249.849671] end_request: I/O error, dev sdb, sector 10760 Make sure to inform the USB core that *both* xHCI roothubs lost power. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13usbcore: Bug fix: system can't suspend with USB3.0 device connected to ↵Andiry Xu
USB3.0 hub This patch clear PORT_POWER when suspend a USB3.0 device behind a USB3.0 external hub, so the system can suspend and resume. Note USB3.0 device may not work after system resume and this is a temporary workaround. The correct fix will be in future patches. Signed-off-by: Andiry Xu <andiry.xu@amd.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
2011-04-13USB: Fix unplug of device with active streamsMatthew Wilcox
If I unplug a device while the UAS driver is loaded, I get an oops in usb_free_streams(). This is because usb_unbind_interface() calls usb_disable_interface() which calls usb_disable_endpoint() which sets ep_out and ep_in to NULL. Then the UAS driver calls usb_pipe_endpoint() which returns a NULL pointer and passes an array of NULL pointers to usb_free_streams(). I think the correct fix for this is to check for the NULL pointer in usb_free_streams() rather than making the driver check for this situation. My original patch for this checked for dev->state == USB_STATE_NOTATTACHED, but the call to usb_disable_interface() is conditional, so not all drivers would want this check. Note from Sarah Sharp: This patch does avoid a potential dereference, but the real fix (which will be implemented later) is to set the .soft_unbind flag in the usb_driver structure for the UAS driver, and all drivers that allocate streams. The driver should free any streams when it is unbound from the interface. This avoids leaking stream rings in the xHCI driver when usb_disable_interface() is called. This should be queued for stable trees back to 2.6.35. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@kernel.org
2011-04-13USB: xhci - also free streams when resetting devicesDmitry Torokhov
Currently, when resetting a device, xHCI driver disables all but one endpoints and frees their rings, but leaves alone any streams that might have been allocated. Later, when users try to free allocated streams, we oops in xhci_setup_no_streams_ep_input_ctx() because ep->ring is NULL. Let's free not only rings but also stream data as well, so that calling free_streams() on a device that was reset will be safe. This should be queued for stable trees back to 2.6.35. Reviewed-by: Micah Elizabeth Scott <micah@vmware.com> Signed-off-by: Dmitry Torokhov <dtor@vmware.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable@kernel.org