aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2008-06-10pciehp: evaluate _OSC/OSHP before controller initKenji Kaneshige
Current pciehp evaluates _OSC/OSHP method after some controller initialization is done. So if evaluating _OSC/OSHP is failed, we need to cleanup already initialized data structures or hardware. This clearly is not robust way. With this patch, _OSC/OSHP evaluation is done first. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10pciehp: remove redundant pci_dev initializationKenji Kaneshige
Remove the redundant initialization of pci_dev member of struct controller in pciehp_probe(). It is initialized in pcie_init(). Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10Implement new suspend and hibernation callbacks for platform bussesRafael J. Wysocki
Implement new suspend and hibernation callbacks for the platform bus type. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg KH <greg@kroah.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10PCI: implement new suspend/resume callbacksRafael J. Wysocki
Implement new suspend and hibernation callbacks for the PCI bus type. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10Introduce new top level suspend and hibernation callbacksRafael J. Wysocki
Introduce 'struct pm_ops' and 'struct pm_ext_ops' ('ext' meaning 'extended') representing suspend and hibernation operations for bus types, device classes, device types and device drivers. Modify the PM core to use 'struct pm_ops' and 'struct pm_ext_ops' objects, if defined, instead of the ->suspend(), ->resume(), ->suspend_late(), and ->resume_early() callbacks (the old callbacks will be considered as legacy and gradually phased out). The main purpose of doing this is to separate suspend (aka S2RAM and standby) callbacks from hibernation callbacks in such a way that the new callbacks won't take arguments and the semantics of each of them will be clearly specified. This has been requested for multiple times by many people, including Linus himself, and the reason is that within the current scheme if ->resume() is called, for example, it's difficult to say why it's been called (ie. is it a resume from RAM or from hibernation or a suspend/hibernation failure etc.?). The second purpose is to make the suspend/hibernation callbacks more flexible so that device drivers can handle more than they can within the current scheme. For example, some drivers may need to prevent new children of the device from being registered before their ->suspend() callbacks are executed or they may want to carry out some operations requiring the availability of some other devices, not directly bound via the parent-child relationship, in order to prepare for the execution of ->suspend(), etc. Ultimately, we'd like to stop using the freezing of tasks for suspend and therefore the drivers' suspend/hibernation code will have to take care of the handling of the user space during suspend/hibernation. That, in turn, would be difficult within the current scheme, without the new ->prepare() and ->complete() callbacks. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10PCI/MSI: skip calling pci_find_capability from msi_set_mask_bitsHidetoshi Seto
The position of MSI capability is already cached in the msi_desc when we enter the msi_set_mask_bits(). Use it instead. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10PCI: remove CVS keywordsAdrian Bunk
This patch removes CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10pci-acpi: formatting cleanups for _OSCKenji Kaneshige
Minor cleanup in pci-acpi.c. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10pci-acpi: remove unused variable in __pci_osc_support_setKenji Kaneshige
The 'retval' variable in __pci_osc_support_set() is no longer used. Remove this unused variable. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10pci-acpi: add flag to indicate query had been doneKenji Kaneshige
Current pci-acpi implementation checks osc_data->support_stat to see if control bits had been already queried. It is not good from the viewpoint of easy understanding. So this patch adds new 'is_queried' flag to indicate query had been done. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10pci-acpi: use local buffer for _OSCKenji Kaneshige
Current pci-acpi implementation uses array in osc_data directly to evaluate _OSC. It needs to save the old data and restore it if _OSC evaluation fails. To make it more robust, we should use local array to evaluate _OSC. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10pci-acpi: remove duplicate code for _OSCKenji Kaneshige
Remove the duplicated code in acpi_query_osc() and acpi_run_osc(). It simplifies the code very much. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10PCI: Disable PME during PCI scanZhao Yakui
If a device supports #PME and can generate PME events from D0, we may see superfluous events before a driver is loaded (drivers should only enable PME as needed), preventing suspend from working if the corresponding GPE was enabled. Likewise, if the ACPI device has the _PRW object, the _PSW/_DSW object will be called in order to disable the wakeup functionality. But when it is allowed to wake up the sleeping state, OSPM will enable it again. So we should disable PME in the course of scanning PCI devices and enable it again only when PME events are actually required to be generated from the requested PCI state (for example, D3_hot or D3_cold). It is also safe to disable PME again when the PME is disabled for the PCI devices. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10Suspend/Resume bug in PCI layer wrt quirksRafael J. Wysocki
Some quirks should be called with interrupt disabled, we can't directly call them in .resume_early. Also the patch introduces pci_fixup_resume_early and pci_fixup_suspend, which matches current device core callbacks (.suspend/.resume_early). TBD: Somebody knows why we need quirk resume should double check if a quirk should be called in resume or resume_early. I changed some per my understanding, but can't make sure I fixed all. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10PCI: Replace deprecated __initcall with device_initcall.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-10PCI: make {pciehp,shpchp}_slot_with_bus staticAdrian Bunk
This patch makes the needlessly global {pciehp,shpchp}_slot_with_bus static. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2008-06-09Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/core: Remove IB_DEVICE_SEND_W_INV capability flag IB/umem: Avoid sign problems when demoting npages to integer
2008-06-09Merge git://git.infradead.org/users/cbou/battery-2.6.26Linus Torvalds
* git://git.infradead.org/users/cbou/battery-2.6.26: power_supply: Fix race in power_supply_uevent
2008-06-09Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/blackfin-2.6: Blackfin serial driver: fix up tty core set_ldisc API change breakage bug Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN Blackfin arch: fixup warnings with the new cplb saved values Blackfin Serial Driver: Clean up BF54x macro in blackfin UART driver.
2008-06-10power_supply: Fix race in power_supply_ueventDmitry Baryshkov
Commit 54d29ad33e3483bcc7ca433a21cf294854e5154a (Power Supply: fix race in device_create) introduced a race in power_supply_uevent. Previously it checked that power_supply is available by checking for dev->driver_data. But now dev->driver_data is set before power_supply->dev is initialised. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
2008-06-09Merge branch 'fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq: [CPUFREQ] Fix format string bug.
2008-06-09[CPUFREQ] Fix format string bug.Chris Wright
Format string bug. Not exploitable, as this is only writable by root, but worth fixing all the same. Spotted-by: Ilja van Sprundel <ilja@netric.org> Signed-off-by: Dave Jones <davej@redhat.com>
2008-06-09Merge branch 'merge' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] ehea: Remove dependency on MEMORY_HOTPLUG [POWERPC] Make walk_memory_resource available with MEMORY_HOTPLUG=n [POWERPC] Use dev_set_name in pci_64.c [POWERPC] Fix incorrect enabling of VMX when building signal or user context [POWERPC] boot/Makefile CONFIG_ variable fixes
2008-06-09IB/core: Remove IB_DEVICE_SEND_W_INV capability flagRoland Dreier
In 2.6.26, we added some support for send with invalidate work requests, including a device capability flag to indicate whether a device supports such requests. However, the support was incomplete: the completion structure was not extended with a field for the key contained in incoming send with invalidate requests. Full support for memory management extensions (send with invalidate, local invalidate, fast register through a send queue, etc) is planned for 2.6.27. Since send with invalidate is not very useful by itself, just remove the IB_DEVICE_SEND_W_INV bit before the 2.6.26 final release; we will add an IB_DEVICE_MEM_MGT_EXTENSIONS bit in 2.6.27, which makes things simpler for applications, since they will not have quite as confusing an array of fine-grained bits to check. Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-06-09usb: r8a66597-hcd: Add support for SH7723 USB hostYoshihiro Shimoda
R8A66597 is similar to SH7723 USB 2.0 Host/Function module. In addition, the USB of SH7366 is compatible with SH7723. It can support SH7723 USB host by changing Kconfig. Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2008-06-09[POWERPC] ehea: Remove dependency on MEMORY_HOTPLUGNathan Lynch
Now that walk_memory_resource() is available regardless of MEMORY_HOTPLUG's setting, this dependency is not needed. Signed-off-by: Nathan Lynch <ntl@pobox.com> Acked-by: Jeff Garzik <jeff@garzik.org> Acked-by: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-06-07Blackfin serial driver: fix up tty core set_ldisc API change breakage bugGraf Yang
This is the patch that follows Linus's modification about set_ldisc. Graf has built and tested it on BF537 using Linus's git Tree. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2008-06-06IB/umem: Avoid sign problems when demoting npages to integerRoland Dreier
On a 64-bit architecture, if ib_umem_get() is called with a size value that is so big that npages is negative when cast to int, then the length of the page list passed to get_user_pages(), namely min_t(int, npages, PAGE_SIZE / sizeof (struct page *)) will be negative, and get_user_pages() will immediately return 0 (at least since 900cf086, "Be more robust about bad arguments in get_user_pages()"). This leads to an infinite loop in ib_umem_get(), since the code boils down to: while (npages) { ret = get_user_pages(...); npages -= ret; } Fix this by taking the minimum as unsigned longs, so that the value of npages is never truncated. The impact of this bug isn't too severe, since the value of npages is checked against RLIMIT_MEMLOCK, so a process would need to have an astronomical limit or have CAP_IPC_LOCK to be able to trigger this, and such a process could already cause lots of mischief. But it does let buggy userspace code cause a kernel lock-up; for example I hit this with code that passes a negative value into a memory registartion function where it is promoted to a huge u64 value. Cc: <stable@kernel.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-06-06Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/ipath: Fix SM trap forwarding IB/ehca: Reject send WRs only for RESET, INIT and RTR state MAINTAINERS: Update NetEffect (iw_nes) entry IB/ipath: Fix device capability flags IB/ipath: Avoid test_bit() on u64 SDMA status value
2008-06-06Merge git://git.infradead.org/~dwmw2/mtd-2.6.26Linus Torvalds
* git://git.infradead.org/~dwmw2/mtd-2.6.26: [MTD] m25p80.c mutex unlock fix
2008-06-06ipwireless: Fix blocked sendingDavid Sterba
Packet sending is driven by two flags, tx_ready and tx_queued. It was possible, that there were queued data for sending and hardware was flagged as blocked but in fact it was not. The tx_queued was indicator but should be really a counter else first fragmented packet resets tx_queued flag, but there may be pending packets which do not get sent. New semantics: tx_ready - set, if hw is ready to send packet, no packet is being transferred right now set the flag right at the place where data are copied into hw memory and not earlier without checking if it was succesful tx_queued - count of enqueued packets, including fragments Tested-by: Michal Rokos <michal.rokos@gmail.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06hdaps: fix module loading on Thinkpad T61PTim Gardner
Adds DMI system identifier for ThinkPad T61. Originally written by Klaus S. Madsen. Taken from http://launchpadlibrarian.net/10864950/hdaps-t61.patch Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: maximilian attems <max@stro.at> Cc: Klaus S. Madsen <ubuntu@hjernemadsen.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06rtc: class driver for ppc_md RTC functionsDavid Woodhouse
This hooks up the platform-specific [gs]et_rtc_time functions so that kernels using CONFIG_RTC_CLASS have RTC support on most PowerPC platforms. A new driver, and one which we've been shipping in Fedora for a while already, since otherwise RTC support breaks. [akpm@linux-foundation.org: fix Kconfig indenting] Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paul Mackerras <paulus@samba.org> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Acked-by: David Brownell <david-b@pacbell.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06fbdev: export symbol fb_mode_optionGeoff Levand
Frame buffer and mode setting drivers can be built as modules, so fb_mode_option needs to be exported to support these. Prevents this error: ERROR: "fb_mode_option" [drivers/ps3/ps3av_mod.ko] undefined! Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06atmel_serial: filter out FP during baud rate detectionHaavard Skinnemoen
I made a change to u-boot that used the FP (Fractional Part) field of BRGR to achieve more accurate baud rate generation. Unfortunately, the atmel_serial driver looks at the whole BRGR register when trying to detect the baud rate that the port is currently running at, so setting FP to a nonzero value breaks the baud rate detection. I'll sit on the u-boot patch for a while longer, but this is clearly a bug in the atmel_serial driver which should be fixed. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06vt: fix vc_resize lockingNick Piggin
Lockdep says we can't take tasklist lock or sighand lock inside ctrl_lock. Signed-off-by: Nick Piggin <npiggin@suse.de> Acked-by: Alan Cox <alan@redhat.com> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06vt: fix background color on line feed, DEC invertJan Engelhardt
Original report: """I used to force my console to black-on-white by the command `setterm -inversescreen on`. In 2.6.26-rc4, I get lots of black background characters.""" Another addendum to commit c9e587ab. This was previously missed out since I was not aware of what vc_decscnm was for. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Reported-by: <thunder7@xs4all.nl> Tested-by: <thunder7@xs4all.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06cpufreq: fix null object access on Transmeta CPUCHIKAMA masaki
If cpu specific cpufreq driver(i.e. longrun) has "setpolicy" function, governor object isn't set into cpufreq_policy object at "__cpufreq_set_policy" function in driver/cpufreq/cpufreq.c . This causes a null object access at "store_scaling_setspeed" and "show_scaling_setspeed" function in driver/cpufreq/cpufreq.c when reading or writing through /sys interface (ex. cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed) Addresses: http://bugzilla.kernel.org/show_bug.cgi?id=10654 https://bugzilla.redhat.com/show_bug.cgi?id=443354 Signed-off-by: CHIKAMA Masaki <masaki.chikama@gmail.com> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Chuck Ebbert <cebbert@redhat.com> Acked-by: Dominik Brodowski <linux@dominikbrodowski.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06fbcon: fix wrong vmode bits copied on console switchKrzysztof Helt
The interlaced and double line mode bits should not be copied to new console when the console is switched. Otherwise, the new console may be set to incorrect refresh rate. Also, the x and y offsets does not need to be copied. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06rtc-ds1374: rename device to just "ds1374"Jean Delvare
Change the name of the device from "rtc-ds1374" to just "ds1374", to match what all other RTC drivers do. I seem to remember that this name was chosen to avoid possible confusion with an older ds1374 driver, but that driver was removed 3 months ago. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Kumar Gala <galak@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06Fix various old email addresses for dwmw2David Woodhouse
Although if people have questions about ARCnet, perhaps it's _better_ for them to be mailing dwmw2@cam.ac.uk about it... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06fujitsu-laptop: autoload module on Lifebook P1510DDan Williams
Signed-off-by: Dan Williams <dcbw@redhat.com> Cc: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Cc: Len Brown <len.brown@intel.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06drivers/char/ip2: fix Kconfig after ip2/ip2main mergeRoland.Kletzing
As commit 6089093e588ee3f6aed99d08b1cf5ea37c52cf97 ("ip2: fix crashes on load/unload") fixed the ip2 crashes on load/unload by making ip2/ip2main one module (ip2), Kconfig shouldn't mention a now non-existing module. Signed-off-by: Roland.Kletzing <devzero@web.de> Acked-by: Alan Cox <alan@redhat.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06edd: fix incorrect return of 1 from module_initAlexey Dobriyan
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Matt Domsch <Matt_Domsch@dell.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06serial: fix driver_name conflictsAnton Vorontsov
Some drivers are using too generic "serial" name for driver_name, this might cause issues, like this: Freescale QUICC Engine UART device driver proc_dir_entry 'serial' already registered Call Trace: [cf82de50] [c0007f7c] show_stack+0x4c/0x1ac (unreliable) [cf82de90] [c00b03fc] proc_register+0xfc/0x1ac [cf82dec0] [c00b05c8] create_proc_entry+0x60/0xac [cf82dee0] [c00b23dc] proc_tty_register_driver+0x60/0x98 [cf82def0] [c016dbd8] tty_register_driver+0x1b4/0x228 [cf82df20] [c0184d70] uart_register_driver+0x144/0x194 [cf82df40] [c030a378] ucc_uart_init+0x2c/0x94 [cf82df50] [c02f21a0] kernel_init+0x98/0x27c [cf82dff0] [c000fa74] kernel_thread+0x44/0x60 ^^ The board is using ucc_uart.c and 8250.c, both registered as "serial". This patch fixes two drivers that are using "serial" for driver_name and not "ttyS" for dev_name. Drivers that are using "ttyS" for dev_name, will conflict anyway, so we don't bother with these. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Alan Cox <alan@redhat.com> Acked-By: Timur Tabi <timur@freescale.com> Acked-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06modedb: fix incorrect sync and vmode flags for CVT modesKrzysztof Helt
The temporary structure for calculated CVT mode is not initialized. Few fields have only bits or-ed or and-ed so they may be left in incorrect (random) state. Testing of the tridentfb seems like a good exercise for the fbdev layer. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06md: do not compute parity unless it is on a failed driveDan Williams
If a block is computed (rather than read) then a check/repair operation may be lead to believe that the data on disk is correct, when infact it isn't. So only compute blocks for failed devices. This issue has been around since at least 2.6.12, but has become harder to hit in recent kernels since most reads bypass the cache. echo repair > /sys/block/mdN/md/sync_action will set the parity blocks to the correct state. Cc: <stable@kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06md: fix uninitialized use of mddev->recovery_waitDan Williams
If an array was created with --assume-clean we will oops when trying to set ->resync_max. Fix this by initializing ->recovery_wait in mddev_find. Cc: <stable@kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06md: fix prexor vs sync_request raceDan Williams
During the initial array synchronization process there is a window between when a prexor operation is scheduled to a specific stripe and when it completes for a sync_request to be scheduled to the same stripe. When this happens the prexor completes and the stripe is unconditionally marked "insync", effectively canceling the sync_request for the stripe. Prior to 2.6.23 this was not a problem because the prexor operation was done under sh->lock. The effect in older kernels being that the prexor would still erroneously mark the stripe "insync", but sync_request would be held off and re-mark the stripe as "!in_sync". Change the write completion logic to not mark the stripe "in_sync" if a prexor was performed. The effect of the change is to sometimes not set STRIPE_INSYNC. The worst this can do is cause the resync to stall waiting for STRIPE_INSYNC to be set. If this were happening, then STRIPE_SYNCING would be set and handle_issuing_new_read_requests would cause all available blocks to eventually be read, at which point prexor would never be used on that stripe any more and STRIPE_INSYNC would eventually be set. echo repair > /sys/block/mdN/md/sync_action will correct arrays that may have lost this race. Cc: <stable@kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-06-06spi: fix refcount-related spidev oops-on-rmmodDavid Brownell
This addresses other oopsing paths in "spidev" by changing how it manages refcounting. It decouples the lifecycle of the per-device data from the class device (not just the spi device): - Use class_{create,destroy} not class_{register,unregister}. - Use device_{create,destroy} not device_{register,unregister}. - Free the per-device data only when TWO conditions are true: * Driver is unbound from underlying SPI device, and * Device is no longer open (new) Also, spi_{get,set}_drvdata not dev_{get,set}_drvdata for simpler code. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Sebastian Siewior <bigeasy@tglx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>