summaryrefslogtreecommitdiff
path: root/drivers/pnp
AgeCommit message (Collapse)Author
2007-05-10[S390] Kconfig: menus with depends on HAS_IOMEM.Martin Schwidefsky
Add "depends on HAS_IOMEM" to a number of menus to make them disappear for s390 which does not have I/O memory. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2007-05-08PNP: workaround HP BIOS defect that leaves SMCF010 device partly enabledBjorn Helgaas
Some HP/Compaq firmware reports via ACPI that the SMCF010 IR device is enabled, but in fact, it leaves the device partly disabled. HP nw8240 BIOS 68DTV Ver. F.0F, released 9/15/2005 is one BIOS that has this problem. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Keith Owens <kaos@ocs.com.au> Cc: Len Brown <lenb@kernel.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Jean Tourrilhes <jt@hpl.hp.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Russell King <rmk+serial@arm.linux.org.uk> Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08PNP: notice whether we have PNP devices (PNPBIOS or PNPACPI)Bjorn Helgaas
This series converts i386 and x86_64 legacy serial ports to be platform devices and prevents probing for them if we have PNP. This prevents double discovery, where a device was found both by the legacy probe and by 8250_pnp. This also prevents the serial driver from claiming IRDA devices (unless they have a UART PNP ID). The serial legacy probe sometimes assumed the wrong IRQ, so the user had to use "setserial" to fix it. Removing the need for setserial to make IRDA devices work seems good, but it does break some things. In particular, you may need to keep setserial from poking legacy UART stuff back in by doing something like "dpkg-reconfigure setserial" with the "kernel" option. Otherwise, the setserial-discovered "UART" will claim resources and prevent the IRDA driver from loading. This patch: If we can discover devices using PNP, we can skip some legacy probes. This flag ("pnp_platform_devices") indicates that PNPBIOS or PNPACPI is enabled and should tell us about builtin devices. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Keith Owens <kaos@ocs.com.au> Cc: Len Brown <lenb@kernel.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Jean Tourrilhes <jt@hpl.hp.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Russell King <rmk+serial@arm.linux.org.uk> Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08pnpbios: convert to use the kthread APIEric W. Biederman
This patches modifies the pnpbios kernel thread to start with ktrhead_run not kernel_thread and deamonize. Doing this makes the code a little simpler and easier to maintain. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08PNPACPI sets pnpdev->dev.archdataDavid Brownell
Teach PNPACPI how to hook up its devices to their ACPI nodes, so that pnpdev->dev.archdata points to the parallel acpi device node. Previously this only worked for PCI, leaving a notable hole. Export "acpi_bus_type" so this can work. Remove some extraneous whitespace. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Len Brown <lenb@kernel.org> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08init dma masks in pnp_devDavid Brownell
PNP now initializes device dma masks, which prevents oopses when generic dma calls are made using pnp device nodes. This assumes PNP only uses ISA DMA, with 24 bit addresses; and that it's safe to init those masks for all devices (rather than finding out which devices have been assigned DMA channels, and handling only those). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <abelay@novell.com> Cc: Jaroslav Kysela <perex@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-27PNP: stop using the subsystem rwsemGreg Kroah-Hartman
The rwsem is not used to protect anything, so the use of it by the PNP subsystem isn't really useful, and it's doubtful if it really did anything or not. So I've removed it. Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-02[PATCH] Correctly report PnP 64bit resourcesPetr Vandrovec
Change PnP resource handling code to use proper type for resource start and length. Fixes bogus regions reported in /proc/iomem. I've also made some pointer constant, as they are constant... Signed-off-by: Petr Vandrovec <petr@vandrovec.name> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16[PATCH] reduce pnp syslog spamDavid Brownell
Make some normal code paths in PNP stop issuing syslog spam. Since PNP issues calls regardless of device capablities, it's no surprise when some of those devices don't support those calls! Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-08ACPI: fix parallel port IRQ after resume from S3Michael Karcher
The PNPACPI resource flags were broken. This would apply to re-enabling a device any-time after boot, not just after resume from S3. http://bugzilla.kernel.org/show_bug.cgi?id=6316 Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16Pull misc-for-upstream into release branchLen Brown
Conflicts: drivers/usb/misc/appledisplay.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15ACPI: always enable CONFIG_PNPACPI on CONFIG_ACPI kernelsLen Brown
We removed the ACPI motherboard driver which handled the ACPI=y, PNP=n case, so now we need to enforce that PNP & PNPACPI are always enabled for ACPI kernels. Most major distros ship this way this already. Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-12[PATCH] mark struct file_operations const 5Arjan van de Ven
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Remove unnecessary memset(0) calls after kzalloc() calls.Robert P. J. Day
Delete the few remaining unnecessary calls to memset(0) after a call to kzalloc(). Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Andi Kleen <ak@suse.de> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] PNP: export pnp_bus_typeDavid Brownell
The PNP framework doesn't export "pnp_bus_type", which is an unfortunate exception to the policy followed by pretty much every other bus. I noticed this when I had to find a device in order to provide its platform_data. Note that per advice from Arjan, the "export" scope has been been minimized to avoid the hundred-plus bytes needed to support access from modules. In this case, the symbol is only needed by statically linked kernel code that lives outside the drivers/pnp directory. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-26PNPACPI: remove EXPERIMENTAL dependencyBjorn Helgaas
PNPACPI is pretty widely used and seems fairly stable, so remove the dependency on EXPERIMENTAL. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-26PNP: system.c whitespace cleanupBjorn Helgaas
No functional change. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-26PNP: reserve system board iomem resources as well as ioport resourcesBjorn Helgaas
Most x86 boxes have no iomem system board resources, but some ia64 boxes do. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-13[PATCH] getting rid of all casts of k[cmz]alloc() callsRobert P. J. Day
Run this: #!/bin/sh for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do echo "De-casting $f..." perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f done And then go through and reinstate those cases where code is casting pointers to non-pointers. And then drop a few hunks which conflicted with outstanding work. Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Dike <jdike@addtoit.com> Cc: Greg KH <greg@kroah.com> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Paul Fulghum <paulkf@microgate.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Karsten Keil <kkeil@suse.de> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Ian Kent <raven@themaw.net> Cc: Steven French <sfrench@us.ibm.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Neil Brown <neilb@cse.unsw.edu.au> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13[PATCH] Fix numerous kcalloc() calls, convert to kzalloc()Robert P. J. Day
All kcalloc() calls of the form "kcalloc(1,...)" are converted to the equivalent kzalloc() calls, and a few kcalloc() calls with the incorrect ordering of the first two arguments are fixed. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: Greg KH <greg@kroah.com> Cc: Mark Fasheh <mark.fasheh@oracle.com> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08[PATCH] struct path: convert isapnpJosef Sipek
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6Linus Torvalds
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (156 commits) [PATCH] x86-64: Export smp_call_function_single [PATCH] i386: Clean up smp_tune_scheduling() [PATCH] unwinder: move .eh_frame to RODATA [PATCH] unwinder: fully support linker generated .eh_frame_hdr section [PATCH] x86-64: don't use set_irq_regs() [PATCH] x86-64: check vector in setup_ioapic_dest to verify if need setup_IO_APIC_irq [PATCH] x86-64: Make ix86 default to HIGHMEM4G instead of NOHIGHMEM [PATCH] i386: replace kmalloc+memset with kzalloc [PATCH] x86-64: remove remaining pc98 code [PATCH] x86-64: remove unused variable [PATCH] x86-64: Fix constraints in atomic_add_return() [PATCH] x86-64: fix asm constraints in i386 atomic_add_return [PATCH] x86-64: Correct documentation for bzImage protocol v2.05 [PATCH] x86-64: replace kmalloc+memset with kzalloc in MTRR code [PATCH] x86-64: Fix numaq build error [PATCH] x86-64: include/asm-x86_64/cpufeature.h isn't a userspace header [PATCH] unwinder: Add debugging output to the Dwarf2 unwinder [PATCH] x86-64: Clarify error message in GART code [PATCH] x86-64: Fix interrupt race in idle callback (3rd try) [PATCH] x86-64: Remove unwind stack pointer alignment forcing again ... Fixed conflict in include/linux/uaccess.h manually Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07[PATCH] PNP: handle sysfs errorsJeff Garzik
Signed-off-by: Jeff Garzik <jeff@garzik.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07[PATCH] Add include/linux/freezer.h and move definitions from sched.hNigel Cunningham
Move process freezing functions from include/linux/sched.h to freezer.h, so that modifications to the freezer or the kernel configuration don't require recompiling just about everything. [akpm@osdl.org: fix ueagle driver] Signed-off-by: Nigel Cunningham <nigel@suspend2.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07[PATCH] paravirt: Allow disable power management under hypervisorRusty Russell
Two legacy power management modes are much easier to just explicitly disable when running in paravirtualized mode - neither APM nor PnP is still relevant. The status of ACPI is still debatable, and noacpi is still a common enough boot parameter that it is not necessary to explicitly disable ACPI. Signed-off-by: Zachary Amsden <zach@vmware.com> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-10-18Fix DMA resource allocation in ACPIPnPVojtech Pavlik
The ACPIPnP implementation had the understanding of Linux resource flags very wrong, resulting in a nonfunctional implementation of DMA resource allocation. This was usually not a problem, since almost no on-board PnP devices use ISA DMA, with the exception of ECP parallel ports. Even with that, parallel port DMA is preconfigured by the BIOS, so this routine isn't normally called. Except in the case where somebody does 'rmmod parport_pc; modprobe parport_pc', where the rmmod case disables the ECP parallel port resources, and they need to be enabled again to initialize the module. This didn't work, resulting in a non-printing printer. The application doing exactly the above to force reprobing of printers is the YaST printer module. Thus without this fix YaST wedged the printer when configuring it, and was not able to print a test page. Reported-by: Ralf Flaxa <rf@suse.de> Reproduced-by: Jiri Dluhos <jdluhos@suse.cz> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (29 commits) [POWERPC] Fix rheap alignment problem [POWERPC] Use check_legacy_ioport() for ISAPnP [POWERPC] Avoid NULL pointer in gpio1_interrupt [POWERPC] Enable generic rtc hook for the MPC8349 mITX [POWERPC] Add powerpc get/set_rtc_time interface to new generic rtc class [POWERPC] Create a "wrapper" script and use it in arch/powerpc/boot [POWERPC] fix spin lock nesting in hvc_iseries [POWERPC] EEH failure to mark pci slot as frozen. [POWERPC] update powerpc defconfig files after libata kconfig breakage [POWERPC] enable sysrq in pmac32_defconfig [POWERPC] UPIO_TSI cleanup [POWERPC] rewrite mkprep and mkbugboot in sane C [POWERPC] maple/pci iomem annotations [POWERPC] powerpc oprofile __user annotations [POWERPC] cell spufs iomem annotations [POWERPC] NULL noise removal: spufs [POWERPC] ppc math-emu needs -fno-builtin-fabs for math.c and fabs.c [POWERPC] update mpc8349_itx_defconfig and remove some debug settings [POWERPC] Always call cede in pseries dedicated idle loop [POWERPC] Fix loop logic in irq_alloc_virt() ...
2006-10-02[POWERPC] Use check_legacy_ioport() for ISAPnPDavid Woodhouse
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-10-01[PATCH] update legacy io handling for pmacOlaf Hering
ppc can boot one single binary on prep, chrp and pmac boards. ppc64 can boot one single binary on pseries and G5 boards. pmac has no legacy io, probing for PC style legacy hardware (or accessing the legacy io area regulary) may lead to a hard crash: * add check for parport_pc, exit on pmac. 32bit chrp has no ->check_legacy_ioport, the probe is always called. 64bit chrp has check_legacy_ioport, check for a "parallel" node * add check for isapnp, only PReP boards may have real ISA slots. 32bit PReP will have no ->check_legacy_ioport, the probe is always called. * update code in i8042_platform_init. Run ->check_legacy_ioport first, always call request_region. No functional change. Remove whitespace before i8042_reset init. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-06[PATCH] pnpacpi: reject ACPI_PRODUCER resourcesmatthieu castet
A patch in -mm kernel correct the parsing of "address resources" of pnpacpi. Before we assumed it was memory only, but it could be also IO. But this change show an hidden bug : some resources could be producer type that are not handled by pnp layer. So we should ignore the producer resources. This patch fixes bug 6292 (http://bugzilla.kernel.org/show_bug.cgi?id=6292). Some devices like PNP0A03 have 0xd00-0xffff and 0x0-0xcf7 as IO producer resources. Before correcting "address resources" parsing, it was seen as memory and was harmless, because nobody tried to reserve this memory range as it should be IO. With the correction it become IO resources, and make failed all others device that want to register IO in this range and use pnp layer (like a ISA sound card). The solution is to ignore producer resources Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Uwe Bugla <uwe.bugla@gmx.de> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Cc: "Brown, Len" <len.brown@intel.com> Acked-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-03PNP: Add missing casts in printk() argumentsPierre Ossman
Some resource_size_t values are fed to printk() without handling the fact that they can have different size depending on your .config. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-31[PATCH] Fix swsusp with PNP BIOSOndrej Zary
swsusp is unable to suspend my machine (DTK FortisPro TOP-5A notebook) with kernel 2.6.17.5 because it's unable to suspend PNP device 00:16 (mouse). The problem is in PNP BIOS. pnp_bus_suspend() calls pnp_stop_dev() for the device if the device can be disabled according to pnp_can_disable(). The problem is that pnpbios_disable_resources() returns -EPERM if the device is not dynamic (!pnpbios_is_dynamic()) but insert_device() happily sets PNP_DISABLE capability/flag even if the device is not dynamic. So we try to disable non-dynamic devices which will fail. This patch prevents insert_device() from setting PNP_DISABLE if the device is not dynamic and fixes suspend on my system. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-03[PATCH] PNPACPI: support shareable interruptsBjorn Helgaas
ACPI supplies a "shareable" indication, but PNPACPI ignores it. If a PNP device uses a shared interrupt, request_irq() fails because the PNP driver can't tell whether to supply SA_SHIRQ. This patch allows PNP drivers to test (pnp_irq_flags(dev, 0) & IORESOURCE_IRQ_SHAREABLE) Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Matthieu Castet <castet.matthieu@free.fr> Cc: Li Shaohua <shaohua.li@intel.com> Cc: Len Brown <len.brown@intel.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02[PATCH] irq-flags: misc drivers: Use the new IRQF_ constantsThomas Gleixner
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-01[PATCH] pnp: suppress request_irq() warningAndrew Morton
Suppress the "setup_irq: irq handler mismatch" coming out of pnp_check_irq(): failures are expected here. Cc: <stable@kernel.org> Cc: Santiago Garcia Mantinan <manty@manty.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-27[PATCH] 64bit resource: change pnp core to use resource_size_tGreg Kroah-Hartman
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-25[PATCH] pnp: card_probe(): fix memory leakJesper Juhl
We can leak `clink' if drv->probe == 0. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-15Pull pnpacpi into release branchLen Brown
2006-04-19[PATCH] pnp: fix two messages in manager.cJan Engelhardt
The wording of two messages in drivers/pnp/manager.c is incorrect. Fix that. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Acked-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-01PNPACPI: whitespace cleanupBjorn Helgaas
Tidy up whitespace. No functional change. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01PNPACPI: remove some code duplicationBjorn Helgaas
Factor out the duplicated switch from pnpacpi_count_resources() and pnpacpi_type_resources(). Remove the unnecessary re-initialization of resource->type and length from all the encode functions (id and length are originally set in the pnpacpi_build_resource_template() -> pnpacpi_type_resources() path). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01PNPACPI: fix non-memory address space descriptor handling Bjorn Helgaas
Fix resource_type handling for QWORD, DWORD, and WORD Address Space Descriptors. Previously we ignored the resource_type, so I/O ports and bus number ranges were incorrectly parsed as memory ranges. Sample PCI root bridge resources from HP rx2600 before this patch: # cat /sys/bus/pnp/devices/00:02/resources state = active mem 0x0-0x1f mem 0x0-0x3af mem 0x3e0-0x1fff mem 0x80000000-0x8fffffff With this patch: # cat /sys/bus/pnp/devices/00:02/resources state = active io 0x0-0x3af io 0x3e0-0x1fff mem 0x80000000-0x8fffffff mem 0x80004000000-0x80103fffffe Changes: 0x0-0x1f PCI bus number range was incorrectly reported as memory, now not reported at all 0x0-0x3af I/O port range was incorrectly reported as memory 0x3e0-0x1fff I/O port range was incorrectly reported as memory 0x80004000000-0x80103fffffe memory range wasn't reported at all because we only support PNP_MAX_MEM (4) memory resources Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-27[PATCH] pnp: PNP: adjust pnp_register_driver signatureBjorn Helgaas
Remove the assumption that pnp_register_driver() returns the number of devices claimed. Returning the count is unreliable because devices may be hot-plugged in the future. This changes the convention to "zero for success, or a negative error value," which matches pci_register_driver(), acpi_bus_register_driver(), and platform_driver_register(). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-26[PATCH] sem2mutex: misc static one-file mutexesIngo Molnar
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Paul Mackerras <paulus@samba.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Jens Axboe <axboe@suse.de> Cc: Neil Brown <neilb@cse.unsw.edu.au> Acked-by: Alasdair G Kergon <agk@redhat.com> Cc: Greg KH <greg@kroah.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25[PATCH] Fix memory leak in isapnpJesper Juhl
Spotted by the Coverity checker as bug #666 akpm; there are several other `return 1;'s in there which aren't freeing `dev'. (A fix which converts this function to single-exit would be preferred..) Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-23[PATCH] PnPBIOS: Missing SMALL_TAG_ENDDEP tagRene Herman
Without the attached, the kernel complains about my BIOS' PNP tables. It was ACKed before, but never merged: http://marc.theaimsgroup.com/?l=linux-kernel&m=110237794007900&w=2 Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-28[PATCH] pnp bus type fixAdam Belay
This is Adam's pnp probing fix. It's been reported to fix hangs on several people's machines. I don't know if it's official or final, and Adam isn't contactable at present. But I'm not aware of the patch causing any regressions. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-01Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsaLinus Torvalds