13 Jul, 2006

34 commits

  • Content-Disposition: inline; filename=i2c-algo-error-handling-fix.patch

    It is possible for i2c_add_adapter() to fail. Several I2C algorithm
    drivers ignore that fact. This (compile-tested only) patch fixes them.

    Signed-off-by: Mark M. Hoffman
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Mark M. Hoffman
     
  • We have a new mailing list dedicated to linux i2c:
    http://lists.lm-sensors.org/mailman/listinfo/i2c

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • Plan the i2c-ite and i2c-algo-ite drivers for removal.
    These drivers never compiled since they were added to the kernel
    tree 5 years ago. Also see:
    http://marc.theaimsgroup.com/?l=linux-mips&m=115040510817448

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • Fix the value returned by the i2c-powermac's master_xfer method.
    It should return the number of messages processed successfully, but
    instead returns the number of data bytes in the first (and only)
    processed message.

    Also explicitly mention the master_xfer convention so that future
    implementations get it right directly.

    Signed-off-by: Jean Delvare
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • The scx200_acb i2c bus driver pretends to support SMBus block
    transactions, but in fact it implements the more simple I2C block
    transactions. Additionally, it lacks sanity checks on the length
    of the block transactions, which could lead to a buffer overrun.

    This fixes an oops reported by Alexander Atanasov:
    http://marc.theaimsgroup.com/?l=linux-kernel&m=114970382125094

    Thanks to Ben Gardner for fixing my bugs :)

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Jean Delvare
     
  • Fix the scx200_acb state machine:

    * Nack was sent one byte too late on reads >= 2 bytes.
    * Stop bit was set one byte too late on reads.

    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Thomas Andrews
     
  • Avoid addressing self when sending a slave address. Follows instruction
    in Intel 80331/80321 manuals.
    Ignoring this worked previously on 80321, but causes a hang on i2cdetect
    on 80331.

    Signed-off-by: Peter Milne
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Peter Milne
     
  • This patch fixes a bug in the handling of 'ignore' module parameters of I2C
    client drivers.

    Signed-off-by: Mark M. Hoffman
    Signed-off-by: Jean Delvare
    Signed-off-by: Greg Kroah-Hartman

    Mark M. Hoffman
     
  • * HEAD:
    [ALSA] Fix undefined (missing) references in ISA MIRO sound driver
    [ALSA] make sound/isa/gus/gusextreme.c:devices static
    [ALSA] hda-codec - Fix missing array terminators in AD1988 codec support
    [ALSA] Fix a deadlock in snd-rtctimer
    [ALSA] Fix section mismatch errors in ALSA PCI drivers
    [ALSA] remove unused snd_minor.name field
    [ALSA] Fix no mpu401 interface can cause hard freeze
    [ALSA] wavefront: fix __init/__devinit confusion
    [ALSA] Fix workaround for AD1988A rev2 codec
    [ALSA] trivial: Code clean up of i2c/cs8427.c
    [ALSA] sound/i2c/cs8427.c: don't export a static function
    [ALSA] intel8x0 - Add ac97 quirk for Tyan Thunder K8WE board
    [ALSA] Reduce the string length of Terratec Aureon 7.1 Universe
    [ALSA] sound/pci/Kconfig - fix broken indenting for SND_FM801_TEA575X
    [ALSA] fix the SND_FM801_TEA575X dependencies
    [ALSA] Memory leak in sound/pcmcia/pdaudiocf/pdaudiocf.c

    Linus Torvalds
     
  • Prior to 2.6.18rc1 you could install with devices on a JMicron chipset
    using the "all-generic-ide" option. As of this kernel the AHCI driver
    grabs the controller and rams it into AHCI mode losing the PATA ports
    and making CD drives and the like vanish. The all-generic-ide option
    fails because the AHCI driver grabbed the PCI device and reconfigured
    it.

    To fix this three things are needed.

    #1 We must put the chip into dual function mode
    #2 The AHCI driver must grab only function 0 (already in your rc1 tree)
    #3 Something must grab the PATA ports

    The attached patch is the minimal risk edition of this. It puts the chip
    into dual function mode so that AHCI will grab the SATA ports without
    losing the PATA ports. To keep the risk as low as possible the third
    patch adds the PCI identifiers for the PATA port and the FN check to the
    ide-generic driver. There is a more featured jmicron driver on its way
    but that adds risk and the ide-generic support is sufficient to install
    and run a system.

    The actual chip setup done by the quirk is the precise setup recommended
    by the vendor.

    (The JMB368 appears only in the ide-generic entry as it has no AHCI so
    does not need the quirk)

    Signed-off-by: Alan Cox
    Acked-by: Jeff Garzik
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • During the recent discussion of taking 'volatile' off of the spinlock, I
    noticed that while most arches #define cpu_relax() such that it implies
    barrier(), some arches define cpu_relax() to be empty.

    This patch changes the definition of cpu_relax() for frv, h8300, m68knommu,
    sh, sh64, v850 and xtensa from an empty while(0) to the compiler barrier().

    Signed-off-by: Chase Venters
    Acked-by: Arjan van de Ven
    Signed-off-by: Linus Torvalds

    Chase Venters
     
  • Joseph Fannin reported that hpet_rtc_interrupt() enables hardirqs
    in irq context:

    [ 25.628000] [] trace_hardirqs_on+0xce/0x200
    [ 25.628000] [] _spin_unlock_irq+0x31/0x70
    [ 25.628000] [] rtc_get_rtc_time+0x44/0x1a0
    [ 25.628000] [] hpet_rtc_interrupt+0x21b/0x280
    [ 25.628000] [] handle_IRQ_event+0x31/0x70
    [ 25.628000] [] handle_edge_irq+0xe7/0x210
    [ 25.628000] [] do_IRQ+0x92/0x120
    [ 25.628000] [] common_interrupt+0x25/0x2c

    the call of rtc_get_rtc_time() is highly suspect. At a minimum we
    need the patch below to save/restore hardirq state.

    Signed-off-by: Ingo Molnar
    Cc: Joseph Fannin
    Cc: John Stultz
    Cc: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • We're supposed to go the next power of two if nfds==nr.

    Of `nr', not of `nfsd'.

    Spotted by Rene Scharfe

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • It looks like someone confused kmem_cache_create with a different allocator
    and was attempting to give it knowledge of how many cache entries there
    were.

    With the unfortunate result that each slab entry was big enough to hold
    every irq.

    Signed-off-by: Eric W. Biederman
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • Address a potential 'larger than buffer size' memory access by
    clear_user(). Without this patch, this call to clear_user() can attempt to
    clear too many (tsz) bytes resulting in a wrong (-EFAULT) return code by
    read_kcore().

    Signed-off-by: Adam B. Jerome
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adam B. Jerome
     
  • sysfs has a different i_mutex lock order behavior for i_mutex than the
    other filesystems; sysfs i_mutex is called in many places with subsystem
    locks held. At the same time, many of the VFS locking rules do not apply
    to sysfs at all (cross directory rename for example). To untangle this
    mess (which gives false positives in lockdep), we're giving sysfs inodes
    their own class for i_mutex.

    Signed-off-by: Arjan van de Ven
    Cc: Ingo Molnar
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     
  • When found, it is obvious. nfds calculated when allocating fdsets is
    rewritten by calculation of size of fdtable, and when we are unlucky, we
    try to free fdsets of wrong size.

    Found due to OpenVZ resource management (User Beancounters).

    Signed-off-by: Alexey Kuznetsov
    Signed-off-by: Kirill Korotaev
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Korotaev
     
  • Based on a patch from Ernie Petrides

    During security research, Red Hat discovered a behavioral flaw in core
    dump handling. A local user could create a program that would cause a
    core file to be dumped into a directory they would not normally have
    permissions to write to. This could lead to a denial of service (disk
    consumption), or allow the local user to gain root privileges.

    The prctl() system call should never allow to set "dumpable" to the
    value 2. Especially not for non-privileged users.

    This can be split into three cases:

    1) running as root -- then core dumps will already be done as root,
    and so prctl(PR_SET_DUMPABLE, 2) is not useful

    2) running as non-root w/setuid-to-root -- this is the debatable case

    3) running as non-root w/setuid-to-non-root -- then you definitely
    do NOT want "dumpable" to get set to 2 because you have the
    privilege escalation vulnerability

    With case #2, the only potential usefulness is for a program that has
    designed to run with higher privilege (than the user invoking it) that
    wants to be able to create root-owned root-validated core dumps. This
    might be useful as a debugging aid, but would only be safe if the program
    had done a chdir() to a safe directory.

    There is no benefit to a production setuid-to-root utility, because it
    shouldn't be dumping core in the first place. If this is true, then the
    same debugging aid could also be accomplished with the "suid_dumpable"
    sysctl.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Linus Torvalds

    Marcel Holtmann
     
  • WARNING: /lib/modules/2.6.18-rc1-mm1/kernel/sound/isa/opti9xx/snd-miro.ko
    needs unknown symbol snd_cs4231_create
    WARNING: /lib/modules/2.6.18-rc1-mm1/kernel/sound/isa/opti9xx/snd-miro.ko
    needs unknown symbol snd_cs4231_pcm
    WARNING: /lib/modules/2.6.18-rc1-mm1/kernel/sound/isa/opti9xx/snd-miro.ko
    needs unknown symbol snd_cs4231_timer
    WARNING: /lib/modules/2.6.18-rc1-mm1/kernel/sound/isa/opti9xx/snd-miro.ko
    needs unknown symbol snd_cs4231_mixer
    WARNING: /lib/modules/2.6.18-rc1-mm1/kernel/fs/reiser4/reiser4.ko needs
    unknown symbol generic_file_read

    Signed-off-by: Randy Dunlap
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Randy Dunlap
     
  • 'devices' is not a good name for a global variable.
    Thankfully, it can become static.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Adrian Bunk
     
  • Fixed the missing array terminators in AD1988 codec support code.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     
  • Fix a occasional deadlock occuring with snd-rtctimer driver,
    added irqsave to the lock in tasklet (ALSA bug#952).

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     
  • Fixed 'section mismatch' errors in ALSA PCI drivers:
    - removed invalid __devinitdata from pci id tables
    - fix/remove __devinit of functions called in suspend/resume

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     
  • Drop the snd_minor structure's name field that was just a helper for
    devfs device deregistration.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Jaroslav Kysela

    Clemens Ladisch
     
  • This patch fixes the remaining instances in our tree where a non-
    existent mpu401 interface can cause a hard freeze when i/o is issued.
    This commit closes Malone #34831.
    Bug: https://launchpad.net/distros/ubuntu/+source/linux-source-2.6.15/+bug/34831
    patch location:
    http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=b422309cdd980cfefe99379796c04e961d3c1544
    From: Randy Dunlap
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Randy Dunlap
     
  • The wavefront driver used __init in some places referenced by __devinit
    functions.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Jaroslav Kysela

    Clemens Ladisch
     
  • Fix the workaround for AD1988A rev2 codec not to apply to AD1988B codec
    chips.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     
  • - Fix spaces, wrap lines in 80 columns.
    - Move EXPORT_SYMBOL() adjacent to each function.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     
  • Static functions shouldn't be exported.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Adrian Bunk
     
  • Added the default ac97 quirk (hp_only) for Tyan Thunder K8WE board.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     
  • Fix the driver string name for Terratec Aureon 7.1 Universe
    to fit in 15 letters to avoid the overflow.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     
  • Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     
  • CONFIG_SND_FM801=y, CONFIG_SND_FM801_TEA575X=m resulted in the following
    compile error:

    ...
    LD vmlinux
    sound/built-in.o: In function 'snd_fm801_free':
    fm801.c:(.text+0x3c15b): undefined reference to 'snd_tea575x_exit'
    sound/built-in.o: In function 'snd_card_fm801_probe':
    fm801.c:(.text+0x3cfde): undefined reference to 'snd_tea575x_init'
    make: *** [vmlinux] Error 1

    This patch fixes kernel Bugzilla #6458.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Adrian Bunk
     
  • if one of the first three CS_CHECKS fails, we goto cs_failed:
    In this case parse we donr kfree() parse. Since the the last three
    CS_CHECKS might also fail, i moved the kfree() below all the CS_CHECKs
    and added one in the error path. This fixes coverity bug id #1099

    Signed-off-by: Eric Sesterhenn
    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Eric Sesterhenn
     

12 Jul, 2006

6 commits

  • * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
    [S390] Fix sparse warnings.
    [S390] path grouping and path verifications fixes.
    [S390] xpram module parameter parsing.
    [S390] cpu_relax() is supposed to have barrier() semantics.
    [S390] fix futex_atomic_cmpxchg_inatomic
    [S390] subchannel register/unregister mutex.
    [S390] raw_local_save_flags/raw_local_irq_restore type check
    [S390] __builtin_trap() and gcc version.

    Linus Torvalds
     
  • This is confirmed to fix a hang due to PCI resource conflicts with
    setting up the Cardbus bridge on old laptops with the 440MX chipsets.
    Original report by Alessio Sangalli, lspci debugging help by Pekka
    Enberg, and trial patch suggested by Daniel Ritz:

    "From the docs available i would _guess_ this thing is really similar
    to the 82443BX/82371AB combination. at least the SMBus base address
    register is hidden at the very same place (32bit at 0x90 in function
    3 of the "south" brigde)"

    The dang thing is largely undocumented, but the patch was corroborated
    by Asit Mallick:

    "I am trying to find the register information. 440MX is an integration of
    440BX north-bridge without AGP and PIIX4E (82371EB). PIIX4 quirk
    should cover the ACPI and SMBus related I/O registers."

    and verified to fix the problem by Alessio.

    Cc: Daniel Ritz
    Cc: Asit Mallick
    Cc: Pekka Enberg
    Cc: Ivan Kokshaysky
    Cc: Dmitry Torokhov
    Tested-by: Alessio Sangalli
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'splice' of git://brick.kernel.dk/data/git/linux-2.6-block:
    [PATCH] splice: fix problems with sys_tee()

    Linus Torvalds
     
  • Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • 1. Multipath devices for which SetPGID is not supported are not handled well.
    Use NOP ccws for path verification (sans path grouping) when SetPGID is not
    supported.
    2. Check for PGIDs already set with SensePGID on _all_ paths (not just the
    first one) and try to find a common one. Moan if no common PGID can be
    found (and use NOP verification). If no PGIDs have been set, use the css
    global PGID (as before). (Rationale: SetPGID will get a command reject if
    the PGID it tries to set does not match the already set PGID.)
    3. Immediately before reboot, issue RESET CHANNEL PATH (rcp) on all chpids. This
    will remove the old PGIDs. rcp will generate solicited CRWs which can be
    savely ignored by the machine check handler (all other actions create
    unsolicited CRWs).

    Signed-off-by: Cornelia Huck
    Signed-off-by: Martin Schwidefsky

    Cornelia Huck
     
  • The module parameters for xpram are not or in a wrong way parsed.
    The xpram module uses the module_param_array directive with an int
    parameter which causes the kernel to automatically parse the passed
    numbers. This will cause errors if arguments are omitted or cause
    wrong results if arguments have size qualifiers.
    Use module_param_array with charp and parse the arguments later.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens