aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64 (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2007-03-20[SCTP]: Increment error counters on user requested HBs.Vlad Yasevich1-2/+18
2960bis states (Section 8.3): D) Request an on-demand HEARTBEAT on a specific destination transport address of a given association. The endpoint should increment the respective error counter of the destination transport address each time a HEARTBEAT is sent to that address and not acknowledged within one RTO. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-20[SCTP]: Clean up stale data during association restartVlad Yasevich3-1/+8
During association restart we may have stale data sitting on the ULP queue waiting for ordering or reassembly. This data may cause severe problems if not cleaned up. In particular stale data pending ordering may cause problems with receive window exhaustion if our peer has decided to restart the association. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-20[IrDA]: Calling ppp_unregister_channel() from process contextSamuel Ortiz2-10/+26
We need to call ppp_unregister_channel() when IrNET disconnects, and this must be done from a process context. Bug reported and patch tested by Guennadi Liakhovetski. Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-20[IrDA]: irttp_dup spin_lock initialisationG. Liakhovetski1-0/+1
Without this initialization one gets kernel BUG at kernel/rtmutex_common.h:80! This patch should also be included in the -stable kernel. Signed-off-by: G. Liakhovetski <gl@dsa-ac.de> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-20[IrDA]: Delay needed when uploading firmware chunksNigel Williams1-0/+2
With 42101001.sb firmwares, we need a 10 ms delay between firmware chunks upload on irda-usb. Patch from Nigel Williams <nigelw@elder-gods.net> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-19USB: new Novatel device ids for option driverGreg Kroah-Hartman2-7/+13
This moves all of the Novatel device ids to the option driver, where they belong. Thanks to Novatel for providing a list of all supported devices. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19[SPARC64]: store-init needs trailing membar.David S. Miller4-0/+6
The manual says that it is required and we actually have crash reports where loads see stale data due to not having membars here. In one case the networking does: memset(skb, 0, offsetof(struct sk_buff, truesize)); and then some code later checks skb->nohdr for zero, but it's still the value that was there before the memset(). Note that arch/sparc64/lib/xor.S already got this right. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-19[MIPS] Export except_vec_vi_{mori,lui,ori} as text symbols.Ralf Baechle1-3/+3
Otherwise objdump will screw up disassembly. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19[MIPS] mips-boards: More liberal check for mips-board consoleThiemo Seufer1-1/+1
Allows overriding the MALTA/ATLAS/etc. default console setting with non-serial console devices. Signed-Off-By: Thiemo Seufer <ths@networkno.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19[MIPS] Misc fixes for plat_irq_dispatch functionsThiemo Seufer13-17/+16
o adds missing ST0_IM masks, which caused the logging of valid interrupts as spurious o stops pnx8550 to log every interrupt as spurious o adds cause register masks for ip22/ip32, which caused handling of masked interrupts o removes some superfluous parentheses in the SNI interrupt code Signed-Off-By: Thiemo Seufer <ths@networkno.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19[MIPS] Qemu: Fix Symmetric Uniprocessor support.Atsushi Nemoto2-3/+19
Might be useful for SMP debugging. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> [Rewritten Kconfig bits to deal better fit in the usual pattern of doing things - Ralf] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19[MIPS] VI: TRACE_IRQS_OFF clobbers $v0, so save & restore around call.Ralf Baechle1-0/+10
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-03-19USB: berry_charge: correct dbg string for second magic commandKen L Johnson1-1/+1
I was testing the berry_charge module with my Blackberry 8700c and had great success, thanks. Looking at the code for my own learning I noticed the following cut and paste error... just a nit. Signed-off-by: Ken L Johnson <ken@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19usblp: quirk flag and device entry for Seiko Epson M129C printerAlan Stern1-1/+5
This patch (as872) adds a device table entry and a new quirk flag to the usblp driver for the Seiko Epson Receipt printer. This printer returns Vendor-Specific values for bInterfaceClass and bInterfaceSubClass, but the bInterfaceProtocol value is valid and it works with usblp. The new quirks flag tells the driver to ignore the Class and SubClass values in the interface descriptor. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19airprime: USB ID for Novatel EV620 mini PCI-E cardMark Glines1-2/+3
Add an ID to recognise the Novatel EV620 wireless adapter. http://www.novatelwireless.com/products/expedite/ev620.html It looks like a mini PCI-Express adapter. The mPCIE connector includes USB pins... the card shows up to the system as a USB device, and powers itself from the PCI bus. The card I have isn't activated yet, so I can't get a PPP session up yet, but I have tested basic serial communication successfully in both 2.6.18 and 2.6.20 kernels, once the product ID was added. (the driver changed quite a bit between the two revs.) In both drivers, it responds to AT commands and such. Signed-off-by: Mark Glines <mark@glines.org> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19USB: necessary update for mos7720 driverOliver Neukum1-0/+1
these devices have a shared interrupt endpoint. For serialcore to pass an interrupt endpoint to a subdriver, the subdriver must define and _export_ a fitting callback. The mos7720 driver failed to do so. This led invariably to an oops upon open. This patch fixes it. The driver is useless without it. Please try to get this into 2.6.21 and the stable kernels that have this driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19USB: RAZR v3i unusual_devsPete Zaitcev1-0/+10
This adds an unusual_devs entry for the Motorola RAZR 3vi. From: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19USB: two more device ids for dm9601 usbnet driverJon Dowland1-0/+8
This patch for the linux-usb-devel tree adds two more product ids to the dm9601 driver. These ids were found on rebadged dm9601 devices in the wild. Signed-off-by: Jon Dowland <jon@alcopop.org> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19USB: fix usb-serial regressionJim Radford1-6/+5
This patch reverts d9a7ecacac5f8274d2afce09aadcf37bdb42b93a since it breaks drivers that need to access the ->port[] array in shutdown (most of them). Signed-Off: Jim Radford <radford@blackbean.org> Acked-by: Mark Lord <mlord@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19pata_ixp4xx_cf: fix interruptAlessandro Zummo1-1/+1
As per compact flash specifications, the default irq mode upon cf insertion is pulse mode. this patch fixes the driver to cope with that. Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-19pata_ixp4xx_cf: fix oops on detachTejun Heo1-1/+0
pata_ixp4xx_cf dodged dont-clear-drvdata-in-LLD bombing run as it used platform_set_drvdata() instead of dev_set_drvdata(). This causes OOPS on devres host release. Kill it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-19libata: kernel-doc fixRandy Dunlap1-1/+1
Warning(linux-2621-rc3g7/drivers/ata/libata-core.c:842): No description found for parameter 'unknown' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-19sata_inic162x: kill double region requestsTejun Heo1-4/+0
Regions are requested twice during initialization causing the second one to fail. This is regression introduced during iomap conversion. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-19drivers/ata/Kconfig: PATA_SCC depends on wrong platformAkira Iguchi1-1/+1
PATA_SCC depends on PPC_CELLEB. (not PPC_IBM_CELL_BLADE) Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-19sata_sil24: Add Adaptec 1220SA PCI IDJamie Clark1-0/+1
Add Adaptec 1220SA (SIL3132) to devices claimed by sata_sil24 Patch generated against 2.6.20.2 Signed-off-by: Jamie Clark <jclark@metaparadigm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-19libata: don't whine if ->prereset() returns -ENOENTTejun Heo1-1/+7
->prereset() returns -ENOENT to tell libata that the port is empty and reset sequencing should be stopped. This is not an error condition. Update ata_eh_reset() such that it sets device classes to ATA_DEV_NONE and return success in on -ENOENT. This makes spurious error message go away. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-03-19[S390] zcrypt: fix possible race when unloading zcrypt driver modulesRalph Wuerthner1-6/+6
Move try_module_get() call into spin protected block to prevent zcrypt driver module unload while submitting a request to driver. Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19[S390] zcrypt: fix possible dead lock in AP bus moduleRalph Wuerthner2-7/+24
AP bus module uses bus_for_each_dev() in software interrupt context to poll for completed requests which might cause dead locks. Solution: use private AP device list for polling in software interrupt context. Signed-off-by: Ralph Wuerthner <rwuerthn@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19[S390] Wire up sys_utimes.Heiko Carstens3-1/+9
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19[S390] reboot from and dump to SCSI under z/VM fails.Michael Holzheu2-5/+9
We used wrong length values for ipl and dump hardware structures. Since z/VM checks the ipl parameters more accurately than LPAR, the operations fail there. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19[S390] Wire up compat_sys_epoll_pwait.Heiko Carstens2-1/+12
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19[S390] strlcpy is smart enoughJean Delvare1-1/+1
strlcpy already accounts for the trailing zero in its length computation, so there is no need to substract one to the buffer size. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19[S390] memory detection: fix off by one bug.Heiko Carstens1-2/+8
diag 260 returns the address of the last addressable byte and not the size of memory. Since we want the size we have to add 1 to the return value. Disable diag 260 for non z/Arch mode since it doesn't work there anyway. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-19[S390] cio: qdio slsb setupUrsula Braun1-8/+18
Make sure set_slsb problems are handled correctly in qdio_do_qdio_fill_input() and qdio_do_qdio_fill_output. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-03-18[PATCH] Fix build error due to not including <linux/errno.h>Ralf Baechle1-0/+1
Since d9a9cdfb078d755e648d53ec25b7370f84ee5729 <linux/sysfs.h> is using ENOSYS without including <linux/errno.h> if CONFIG_SYSFS is disabled. Fixed by including <linux/errno.h>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18[PATCH] tty: Fix two reported pid leaksEric W. Biederman1-0/+5
These leaks were reported by: Catalin Marinas <catalin.marians@gmail.com> and I have been able to very by inspection they are possible. When converting tty_io.c to store pids as struct pid pointers instead of pid_t values it appears I overlooked two places where we stop using the pid value. The very obvious one is in do_tty_hangup, and the one the less obvious one in __proc_set_tty. When looking into the code __proc_set_tty only has pids that need to be put because of failures of other parts of the code to properly perform hangup processing. Fixing the leak here in __proc_set_tty is easy and obviously correct so I am doing that first. Fixing the places that should be performing hangup processing is much less obviously correct. So those I'm aiming those patches at -mm. for now, so the can age a while before they are merged. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18[PATCH] gpio_direction_output-needs-an-initial-value fixDavid Brownell1-0/+1
Build fix: sa1100/generic.c should already have included <asm/gpio.h>, but it didn't ... causing a build problem with a recent patch. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18[PATCH] i386: trust the PM-Timer calibration of the local APIC timerThomas Gleixner1-51/+27
When PM-Timer is available for local APIC timer calibration we can skip the verification of the calibrated time value. The resulting error is quite small on a bunch of evaluated platforms and is less harming than the observed false positives. We need to keep the verification on systems, which have no PM-Timer to avoid bogus local APIC timer calibrations in the range of factor 2-10, which can be observed when swicthing off the PM-timer support in the kernel configuration. The wrong calibration values are probably caused by SMM code trying to emulate a PS/2 keyboard from a (maybe connected or not) USB keyboard. This prohibits the accurate delivery of PIT interrupts, which are used to calibrate the local APIC timer. Unfortunately we have no way to disable this BIOS misfeature in the early boot process. Add also the dropped cpu_relax() back to the wait loops. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18[PATCH] Fix atomicity of TIF update in flush_thread() for x86_64Mathieu Desnoyers1-5/+8
Fix atomicity of TIF update in flush_thread() for x86_64 Race : parent process executing : sys_ptrace() (lock_kernel()) (ptrace_get_task_struct(pid)) arch_ptrace() ptrace_detach() ptrace_disable(child); clear_singlestep(child); clear_tsk_thread_flag(child, TIF_SINGLESTEP); (which clears the TIF_SINGLESTEP flag atomically from a different process) (put_task_struct(child)) (unlock_kernel()) And at the same time, in the child process : sys_execve() do_execve() search_binary_handler() load_elf_binary() flush_old_exec() flush_thread() doing a non-atomic thread flag update Signed-off-by: Rebecca Schultz <rschultz@google.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18[PATCH] machzwd warning fixAndrew Morton1-12/+12
drivers/char/watchdog/machzwd.c: In function 'zf_ioctl': drivers/char/watchdog/machzwd.c:327: warning: passing argument 1 of 'zf_ping' makes integer from pointer without a cast Also some coding-style repairs. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Al Viro <viro@ftp.linux.org.uk> Acked-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18[PATCH] ia64: platform_kernel_launch_event is noop on generic kernelJohn Keller1-0/+2
Add a missing #define for the platform_kernel_launch_event. Without this fix, a call to platform_kernel_launch_event() becomes a noop on generic kernels. SN systems require this fix to successfully kdump/kexec from certain hardware errors. [bwalle@suse.de: fix it] Signed-off-by: John Keller <jpk@sgi.com> Cc: Bernhard Walle <bwalle@suse.de> Acked-by: Simon Horman <horms@verge.net.au> Acked-by: Jay Lan <jlan@sgi.com> Acked-by: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18[PATCH] Fix wrong /proc/iomem on SGI AltixBernhard Walle1-2/+10
In sn_io_slot_fixup(), the parent is re-set from the bus to io(port|mem)_resource because the address is changed in a way that it's not child of the bus any more. However, only the root is set but not the parent/child/sibling relationship in the resource tree which causes 'cat /proc/iomem' to stop after this memory area. Depding on the poition in the tree the iomem may be nearly completely empty. Signed-off-by: Bernhard Walle <bwalle@suse.de> Cc: John Keller <jpk@sgi.com> Cc: Jay Lan <jlan@engr.sgi.com> Acked-by: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18[PATCH] X86_P4_CLOCKMOD must select CPU_FREQ_TABLEAdrian Bunk1-0/+1
CONFIG_CPU_FREQ=y CONFIG_CPU_FREQ_TABLE=m CONFIG_X86_P4_CLOCKMOD=y arch/x86_64/kernel/built-in.o: In function `cpufreq_p4_verify':p4-clockmod.c:(.text.cpufreq_p4_verify+0x8): undefined reference to `cpufreq_frequency_table_verify' arch/x86_64/kernel/built-in.o: In function `cpufreq_p4_cpu_exit':p4-clockmod.c:(.text.cpufreq_p4_cpu_exit+0x8): undefined reference to `cpufreq_frequency_table_put_attr' arch/x86_64/kernel/built-in.o: In function `cpufreq_p4_cpu_init':p4-clockmod.c:(.text.cpufreq_p4_cpu_init+0x13b): undefined reference to `cpufreq_frequency_table_get_attr' Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Dave Jones <davej@redhat.com> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-18KVM: MMU: Fix host memory corruption on i386 with >= 4GB ramAvi Kivity1-3/+3
PAGE_MASK is an unsigned long, so using it to mask physical addresses on i386 (which are 64-bit wide) leads to truncation. This can result in page->private of unrelated memory pages being modified, with disasterous results. Fix by not using PAGE_MASK for physical addresses; instead calculate the correct value directly from PAGE_SIZE. Also fix a similar BUG_ON(). Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-18KVM: MMU: Fix guest writes to nonpae pdeAvi Kivity1-12/+34
KVM shadow page tables are always in pae mode, regardless of the guest setting. This means that a guest pde (mapping 4MB of memory) is mapped to two shadow pdes (mapping 2MB each). When the guest writes to a pte or pde, we intercept the write and emulate it. We also remove any shadowed mappings corresponding to the write. Since the mmu did not account for the doubling in the number of pdes, it removed the wrong entry, resulting in a mismatch between shadow page tables and guest page tables, followed shortly by guest memory corruption. This patch fixes the problem by detecting the special case of writing to a non-pae pde and adjusting the address and number of shadow pdes zapped accordingly. Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-18KVM: Fix guest sysenter on vmxAvi Kivity1-4/+4
The vmx code currently treats the guest's sysenter support msrs as 32-bit values, which breaks 32-bit compat mode userspace on 64-bit guests. Fix by using the native word width of the machine. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-18KVM: Unset kvm_arch_ops if arch module loading failedAvi Kivity1-1/+3
Otherwise, the core module thinks the arch module is loaded, and won't let you reload it after you've fixed the bug. Signed-off-by: Avi Kivity <avi@qumranet.com>
2007-03-17[SPARC64]: Use Kconfig.preemptDavid S. Miller2-16/+8
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-17ide: remove CONFIG_IDEDMA_{ICS,PCI}_AUTO config optionsBartlomiej Zolnierkiewicz4-53/+1
All modern distributions have been setting these options to "y" for ages. (additionally "n" cases have been obsoleted for few years). Therefore use DMA by default and remove CONFIG_IDEDMA_{ICS,PCI}_AUTO (also remove no longer needed CONFIG_IDEDMA_AUTO). This fixes DMA support for rare configurations where CONFIG_IDEDMA_{ICS,PCI}_AUTO was set to "n" but "hdparm -d 1" was used to enable DMA support and which were forced to PIO mode by "ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=n" patch. There is no functionality loss because "ide=nodma" kernel option is still available. Cc: Patrick Horn <phrh@yahoo.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Russell King <rmk+lkml@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2007-03-17ide: don't allow DMA to be enabled if CONFIG_IDEDMA_{ICS,PCI}_AUTO=nBartlomiej Zolnierkiewicz1-1/+1
For CONFIG_IDEDMA_{ICS,PCI}_AUTO=n and/or "ide=nodma" option the host/device are not programmed for DMA and it is also explicitly disabled by ide_set_dma() (->ide_dma_check returns "-1"). However the code responsible for manually enabling DMA ("hdparm -d 1") has a bug which results in DMA being erroneously enabled - ide_set_dma() incorrectly passes "0" return value to set_using_dma(). This may work if BIOS/firmware configured the host/device for DMA and chipset allows independent configuration of DMA/PIO modes but won't work after suspend and is generally unsafe on many chipsets (possibly including data corruption if the same registers are used for DMA/PIO timings). This patch fixes kernel bugzilla bug #8169 (piix host driver fixes for setting PIO mode exposed the problem described above). The side-effect of the fix is that some rare configuration may be forced to PIO mode when DMA mode was previously used - this is addressed by the next patch which removes CONFIG_IDEDMA_{PCI,ICS}_AUTO config option completely. Thanks goes out to Patrick Horn for reporting the issue, narrowing it down to the specific commit and testing the fix. Also thanks to Sergei Shtylyov for help in debugging the problem. Cc: Patrick Horn <phrh@yahoo.com> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Russell King <rmk+lkml@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>