07 Jul, 2007

1 commit

  • When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims
    the device is working, but it really isn't configured correctly. The BIOS
    *will* configure it, but only if we call _SRS after (1) reversing the order
    of the SIR and FIR I/O port regions and (2) changing the IRQ from
    active-high to active-low.

    This patch addresses the 2.6.22 regression:
    "no irda0 interface (2.6.21 was OK), smsc does not find chip"

    I tested this on a Portege 4000. The smsc-ircc2 driver correctly detects
    the device, and "irattach irda0 -s && irdadump" shows transmitted and
    received packets.

    Signed-off-by: Bjorn Helgaas
    Cc: Andrey Borzenkov
    Cc: Samuel Ortiz
    Cc: "Linus Walleij (LD/EAB)"
    Cc: Michal Piotrowski
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

29 Jun, 2007

1 commit

  • Some HP firmware leaves the SMCf010 IRDA device incompletely configured, or
    reports the wrong resources in _CRS. As a workaround, when we find such a
    device, try to auto-configure the device.

    This ignores the _CRS data, picks a config from _PRS, and runs _SRS to
    configure the device. This makes smsc-ircc2 work correctly with PNP
    resources (with no preconfiguration!) on all the machines I tested.

    I think Windows does something like this by default for all devices,
    so we should consider doing the same thing in Linux.

    This patch addresses part of the 2.6.22 regression:
    "no irda0 interface (2.6.21 was OK), smsc does not find chip"
    It fixes smsc-ircc2 PNP device detection on HP nc6000, nc6220, nw8000,
    nw8240, and possibly other machines.

    Signed-off-by: Bjorn Helgaas
    Cc: Samuel Ortiz
    Cc: "Linus Walleij (LD/EAB)"
    Cc: Andrey Borzenkov
    Cc: Michal Piotrowski
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

10 May, 2007

1 commit


09 May, 2007

5 commits

  • 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
    Cc: Keith Owens
    Cc: Len Brown
    Cc: Adam Belay
    Cc: Matthieu CASTET
    Cc: Jean Tourrilhes
    Cc: Matthew Garrett
    Cc: Ville Syrjala
    Cc: Russell King
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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
    Cc: Keith Owens
    Cc: Len Brown
    Cc: Adam Belay
    Cc: Matthieu CASTET
    Cc: Jean Tourrilhes
    Cc: Matthew Garrett
    Cc: Ville Syrjala
    Cc: Russell King
    Cc: Samuel Ortiz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     
  • 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
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • 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
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Cc: Len Brown
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David 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
    Cc: Adam Belay
    Cc: Jaroslav Kysela
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

28 Apr, 2007

1 commit


03 Apr, 2007

1 commit

  • 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
    Cc: Bjorn Helgaas
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Petr Vandrovec
     

17 Mar, 2007

1 commit

  • 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
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

09 Mar, 2007

1 commit


17 Feb, 2007

1 commit


16 Feb, 2007

1 commit


13 Feb, 2007

1 commit

  • 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
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

12 Feb, 2007

2 commits

  • Delete the few remaining unnecessary calls to memset(0) after a call to
    kzalloc().

    Signed-off-by: Robert P. J. Day
    Cc: Andi Kleen
    Cc: Dmitry Torokhov
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • 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
    Cc: Adam Belay
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     

26 Jan, 2007

3 commits


14 Dec, 2006

2 commits

  • 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 , Ian Molton
    Cc: Mikael Starvik
    Cc: Yoshinori Sato
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Greg KH
    Cc: Jens Axboe
    Cc: Paul Fulghum
    Cc: Alan Cox
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Ian Kent
    Cc: Steven French
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    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
    Cc: Jeff Garzik
    Cc: Alan Cox
    Cc: Dominik Brodowski
    Cc: Adam Belay
    Cc: James Bottomley
    Cc: Greg KH
    Cc: Mark Fasheh
    Cc: Trond Myklebust
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

09 Dec, 2006

1 commit


08 Dec, 2006

3 commits

  • * '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

    Linus Torvalds
     
  • Signed-off-by: Jeff Garzik
    Cc: Adam Belay
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     
  • 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
    Cc: "Rafael J. Wysocki"
    Cc: Pavel Machek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     

07 Dec, 2006

1 commit

  • 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
    Signed-off-by: Chris Wright
    Signed-off-by: Andi Kleen
    Cc: Rusty Russell
    Cc: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton

    Rusty Russell
     

19 Oct, 2006

1 commit

  • 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
    Reproduced-by: Jiri Dluhos
    Signed-off-by: Vojtech Pavlik
    Signed-off-by: Greg Kroah-Hartman

    Vojtech Pavlik
     

05 Oct, 2006

1 commit

  • 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
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

03 Oct, 2006

1 commit

  • * 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()
    ...

    Linus Torvalds
     

02 Oct, 2006

1 commit


01 Oct, 2006

1 commit

  • 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
    Acked-by: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Adam Belay
    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     

06 Aug, 2006

1 commit

  • 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
    Signed-off-by: Uwe Bugla
    Cc: Bjorn Helgaas
    Cc: Adam Belay
    Cc: "Brown, Len"
    Acked-by: Shaohua Li
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    matthieu castet
     

04 Aug, 2006

1 commit


01 Aug, 2006

1 commit

  • 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
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Cc: Bjorn Helgaas
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ondrej Zary
     

04 Jul, 2006

1 commit

  • 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
    Cc: Adam Belay
    Cc: Matthieu Castet
    Cc: Li Shaohua
    Cc: Len Brown
    Cc: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bjorn Helgaas
     

03 Jul, 2006

1 commit


02 Jul, 2006

1 commit


01 Jul, 2006

1 commit


28 Jun, 2006

1 commit