03 Feb, 2009

6 commits

  • This is a port of libata's pata_cs5536.c (written by Martin K. Petersen)
    to IDE subsystem.

    Changes done while at it:

    * Reprogram PIO/MWDMA timings if needed before and after DMA transfer
    (chipset uses shared PIO/MWDMA timings).

    * Fix cable detection to report 80-wires cable if BIOS set it for any
    device on a port (IDE core will do drive-side cable detection later).

    * Don't disable UDMA while programming PIO timings.

    * Simplify PCI/MSR support.

    Pros of having IDE host driver in addition to libata's one:

    * IDE is much lighter than SCSI+libata, the host driver itself is also
    a bit smaller:

    text data bss dec hex filename
    1261 496 4 1761 6e1 drivers/ata/pata_cs5536.o
    1242 128 4 1374 55e drivers/ide/cs5536.o

    * This allows use of IDE features which are unavailable under libata.

    v2:
    * Fixes per review from Sergei:
    - simplify dependency check in Kconfig
    - use IDE_DRV_MASK also for ->drive_data
    - disable UDMA when programming MWDMA
    - program new DTC timings only when necessary
    - fix printk() level in cs5536_init_one()

    * Fix patch description according to comments from Alan and Sergei.

    v3:
    * Smarter masking of UDMA bits per Sergei's suggestion.

    Cc: Martin K. Petersen
    Cc: Karl Auerbach
    Cc: Alan Cox
    Acked-by: Sergei Shtylyov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • The AmigaOne uses the onboard VIA IDE controller in legacy mode (like the
    Pegasos).

    Signed-off-by: Gerhard Pircher
    Cc: "Grant Likely"
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Gerhard Pircher
     
  • On reboot the loop in device_shutdown gets confused by these partially
    initialized devices and goes into an infinite loop. Therefore unregister
    and disable these devices.

    Signed-off-by: Ian Campbell
    [bart: remove leftover hwif->present clearing + update patch description]
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Ian Campbell
     
  • * Factor out port freeing from ide_host_free() to ide_free_port().

    * Add ide_disable_port() and use it on ide_register_port() failure.

    Cc: Ian Campbell
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Bartlomiej Zolnierkiewicz
     
  • Signed-off-by: Kay Sievers
    Cc: linux-ide@vger.kernel.org
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Kay Sievers
     
  • This one fixes http://bugzilla.kernel.org/show_bug.cgi?id=12320.

    Signed-off-by: Borislav Petkov
    Signed-off-by: Bartlomiej Zolnierkiewicz

    Borislav Petkov
     

02 Feb, 2009

1 commit

  • This essentially reverts commit 8edb08caf68184fb170f4f69c7445929e199eaea.

    It downgraded our mmap semaphore to a read-lock while mlocking pages, in
    order to allow other threads (and external accesses like "ps" et al) to
    walk the vma lists and take page faults etc. Which is a nice idea, but
    the implementation does not work.

    Because we cannot upgrade the lock back to a write lock without
    releasing the mmap semaphore, the code had to release the lock entirely
    and then re-take it as a writelock. However, that meant that the caller
    possibly lost the vma chain that it was following, since now another
    thread could come in and mmap/munmap the range.

    The code tried to work around that by just looking up the vma again and
    erroring out if that happened, but quite frankly, that was just a buggy
    hack that doesn't actually protect against anything (the other thread
    could just have replaced the vma with another one instead of totally
    unmapping it).

    The only way to downgrade to a read map _reliably_ is to do it at the
    end, which is likely the right thing to do: do all the 'vma' operations
    with the write-lock held, then downgrade to a read after completing them
    all, and then do the "populate the newly mlocked regions" while holding
    just the read lock. And then just drop the read-lock and return to user
    space.

    The (perhaps somewhat simpler) alternative is to just make all the
    callers of mlock_vma_pages_range() know that the mmap lock got dropped,
    and just re-grab the mmap semaphore if it needs to mlock more than one
    vma region.

    So we can do this "downgrade mmap sem while populating mlocked regions"
    thing right, but the way it was done here was absolutely not correct.
    Thus the revert, in the expectation that we will do it all correctly
    some day.

    Cc: Lee Schermerhorn
    Cc: Rik van Riel
    Cc: Andrew Morton
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

01 Feb, 2009

11 commits

  • …el/git/tip/linux-2.6-tip

    * 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (90 commits)
    headers_check fix: x86, swab.h
    headers_check fix: x86, sigcontext32.h
    headers_check fix: x86, sigcontext.h
    headers_check fix: x86, ptrace-abi.h
    headers_check fix: x86, mtrr.h
    headers_check fix: x86, mce.h
    headers_check fix: x86, kvm.h
    headers_check fix: x86, e820.h
    headers_check fix: linux/rtnetlink.h
    headers_check fix: linux/nubus.h
    headers_check fix: video/uvesafb.h
    headers_check fix: video/sisfb.h
    headers_check fix: sound/hdsp.h
    headers_check fix: mtd/inftl-user.h
    headers_check fix: linux/virtio_net.h
    headers_check fix: linux/virtio_console.h
    headers_check fix: linux/virtio_blk.h
    headers_check fix: linux/videodev.h
    headers_check fix: linux/video_encoder.h
    headers_check fix: linux/video_decoder.h
    ...

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    generic-ipi: use per cpu data for single cpu ipi calls
    cpumask: convert lib/smp_processor_id to new cpumask ops
    signals, debug: fix BUG: using smp_processor_id() in preemptible code in print_fatal_signal()

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    irq: export __set_irq_handler() and handle_level_irq()

    Linus Torvalds
     
  • …el/git/tip/linux-2.6-tip

    * 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    hrtimer: prevent negative expiry value after clock_was_set()
    hrtimers: allow the hot-unplugging of all cpus
    hrtimers: increase clock min delta threshold while interrupt hanging

    Linus Torvalds
     
  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, ds, bts: cleanup/fix DS configuration
    ring-buffer: reset timestamps when ring buffer is reset
    trace: set max latency variable to zero on default
    trace: stop all recording to ring buffer on ftrace_dump
    trace: print ftrace_dump at KERN_EMERG log level
    ring_buffer: reset write when reserve buffer fail
    tracing/function-graph-tracer: fix a regression while suspend to disk
    ring-buffer: fix alignment problem

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86 setup: fix asm constraints in vesa_store_edid
    xen: make sysfs files behave as their names suggest
    x86: tone down mtrr_trim_uncached_memory() warning
    x86: correct the CPUID pattern for MSR_IA32_MISC_ENABLE availability

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
    leds: Fix bounds checking of wm8350->pmic.led
    regulator: move bq24022 init back to module_init instead of subsys_initcall

    Linus Torvalds
     
  • * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (27 commits)
    MIPS: Alchemy: time.c build fix
    MIPS: RB532: Export rb532_gpio_set_func()
    MIPS: RB532: Update headers
    MIPS: RB532: Simplify dev3 init
    MIPS: RB532: Remove {get,set}_434_reg()
    MIPS: RB532: Move dev3 init code to devices.c
    MIPS: RB532: Fix set_latch_u5()
    MIPS: RB532: Fix init of rb532_dev3_ctl_res
    MIPS: RB532: Use driver_data instead of platform_data
    MIPS: RB532: Detect uart type, add platform device
    MIPS: RB532: remove useless CF GPIO initialisation
    MIPS: RB532: Auto disable GPIO alternate function
    MIPS: RB532: Add set_type() function to IRQ struct.
    MIPS: RC32434: Define io_map_base for PCI controller
    MIPS: RB532: Fix bit swapping in rb532_set_bit()
    MIPS: Use hardware watchpoints on all R1 and R2 CPUs.
    MIPS: Read watch registers with interrupts disabled.
    MIPS: Fix a typo in watchpoint register structure.
    MIPS: TXx9: Add support for TX4939 internal RTC
    MIPS: R2: Fix broken installation of cache error handler.
    ...

    Linus Torvalds
     
  • Fix an off-by-two memory error in console selection.

    The loop below goes from sel_start to sel_end (inclusive), so it writes
    one more character. This one more character was added to the allocated
    size (+1), but it was not multiplied by an UTF-8 multiplier.

    This patch fixes a memory corruption when UTF-8 console is used and the
    user selects a few characters, all of them 3-byte in UTF-8 (for example
    a frame line).

    When memory redzones are enabled, a redzone corruption is reported.
    When they are not enabled, trashing of random memory occurs.

    Signed-off-by: Mikulas Patocka
    Signed-off-by: Linus Torvalds

    Mikulas Patocka
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    igb: fix link reporting when using sgmii
    igb: prevent skb_over panic w/ mtu smaller than 1K
    igb: Fix DCA errors and do not use context index for 82576
    ipv6: compile fix for ip6mr.c
    packet: Avoid lock_sock in mmap handler
    sfc: Replace stats_enabled flag with a disable count
    sfc: SFX7101/SFT9001: Fix AN advertisements
    sfc: SFT9001: Always enable XNP exchange on SFT9001 rev B
    sfc: Update board info for hardware monitor on SFN4111T-R5 and later
    sfc: Test for PHYXS faults whenever we cannot test link state bits
    sfc: Reinitialise the PHY completely in case of a PHY or NIC reset
    sfc: Fix post-reset MAC selection
    sfc: SFN4111T: Fix GPIO sharing between I2C and FLASH_CFG_1
    sfc: SFT9001: Fix speed reporting in 1G PHY loopback
    sfc: SFX7101: Remove workaround for bad link training
    sfc: SFT9001: Enable robust link training
    sky2: fix hard hang with netconsoling and iface going up

    Linus Torvalds
     
  • The mmap_region() code would temporarily set the VM_ACCOUNT flag for
    anonymous shared mappings just to inform shmem_zero_setup() that it
    should enable accounting for the resulting shm object. It would then
    clear the flag after calling ->mmap (for the /dev/zero case) or doing
    shmem_zero_setup() (for the MAP_ANON case).

    This just resulted in vma merge issues, but also made for just
    unnecessary confusion. Use the already-existing VM_NORESERVE flag for
    this instead, and let shmem_{zero|file}_setup() just figure it out from
    that.

    This also happens to make it obvious that the new DRI2 GEM layer uses a
    non-reserving backing store for its object allocation - which is quite
    possibly not intentional. But since I didn't want to change semantics
    in this patch, I left it alone, and just updated the caller to use the
    new flag semantics.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

31 Jan, 2009

22 commits

  • When using sgmii the link was not being properly passed up to the driver
    from the underlying link management functions. This change corrects it so
    that get_link_status is cleared when a link has been found.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • A panic has been observed with frame sizes smaller than 1K. This has been
    root caused to the hardware spanning larger frames across multiple buffers
    and then reporting the original frame size in the first descriptor. To
    prevent this we can enable set the LPE bit which in turn will restrict
    packet sizes to those set in the RLPML register.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • 82576 was being incorrectly flagged as needing a context index. It does not as
    each ring has it's own table of 2 contexts.

    Driver was registering after registering the driver instead of the other way around.

    Signed-off-by: Alexander Duyck
    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Alexander Duyck
     
  • net/ipv6/ip6mr.c: In function 'pim6_rcv':
    net/ipv6/ip6mr.c:368: error: implicit declaration of function 'csum_ipv6_magic'

    Signed-off-by: Dave Jones
    Signed-off-by: David S. Miller

    Dave Jones
     
  • Impact: fix potential miscompile (currently believed non-manifest)

    As the comment explains, the VBE DDC call can clobber any register.
    Tell the compiler about that fact.

    Signed-off-by: Andreas Schwab
    Signed-off-by: H. Peter Anvin
    Signed-off-by: Ingo Molnar

    Andreas Schwab
     
  • As the mmap handler gets called under mmap_sem, and we may grab
    mmap_sem elsewhere under the socket lock to access user data, we
    should avoid grabbing the socket lock in the mmap handler.

    Since the only thing we care about in the mmap handler is for
    pg_vec* to be invariant, i.e., to exclude packet_set_ring, we
    can achieve this by simply using a new mutex.

    Signed-off-by: Herbert Xu
    Tested-by: Martin MOKREJŠ
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Currently we use a spin-lock to serialise statistics fetches and also
    to inhibit them for short periods of time, plus a flag to
    enable/disable statistics fetches for longer periods of time, during
    online reset. This was apparently insufficient to deal with the several
    reasons for stats being disabled.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • All 10Xpress PHYs require autonegotiation all the time; enforce this
    in the set_settings() method and do not treat it as a workaround.

    Remove claimed support for 100M HD mode since it is not supported by
    current firmware.

    Do not set speed override bits when AN is enabled, and do not use
    register 1.49192 for AN configuration as it can override what we set
    elsewhere.

    Always set the AN selector bits to 1 (802.3).

    Fix confusion between Next Page and Extended Next Page.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • This workaround is not specific to rev A.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Depending on the loopback mode, there may be no pertinent link state
    bits. In this case we test the PHYXS RX fault bit instead. Make
    sure to do this in all cases where there are no link state bits.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • In particular, set pause advertising bits properly.

    A PHY reset is not necessary to recover from the register self-test,
    so use a "invisible" reset there instead.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • Modify falcon_switch_mac() to always set NIC_STAT_REG, even if the the
    MAC is the same as it was before. This ensures that the value is
    correct after an online reset.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • Change sfn4111t_reset() to change only GPIO output enables so that it
    doesn't break subsequent I2C operations.

    Update comments to explain exactly what we're doing.

    Add a short sleep to make sure the FLASH_CFG_1 value is latched before
    any subsequent I2C operations.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Instead of disabling AN in loopback, just prevent restarting AN and
    override the speed in sft9001_get_settings().

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • Early versions of the SFX7101 firmware could complete link training in
    a state where it would not adequately cancel noise (Solarflare bug
    10750). We previously worked around this by resetting the PHY after
    seeing many Ethernet CRC errors. This workaround is unsafe since it
    takes no account of the interval between errors; it also appears to
    be unnecessary with production firmware. Therefore remove it.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • Enable a firmware option that appears to be necessary for reliable
    operation.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Steve Hodgson
     
  • Printing anything over netconsole before hw is up and running is,
    of course, not going to work.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     
  • Fix bounds checking of wm8350->pmic.led

    Signed-off-by: Roel Kluin
    Signed-off-by: Liam Girdwood

    Roel Kluin
     
  • This workaround was needed when regulator/ was not linked before both
    power/ and usb/otg/ in drivers/Makefile. Now that it is even linked
    before mfd/, this patch makes sure that bq24022 isn't probed before the
    GPIO expander is set up.

    Signed-off-by: Philipp Zabel
    Signed-off-by: Liam Girdwood

    Philipp Zabel
     
  • Impact: prevent false positive WARN_ON() in clockevents_program_event()

    clock_was_set() changes the base->offset of CLOCK_REALTIME and
    enforces the reprogramming of the clockevent device to expire timers
    which are based on CLOCK_REALTIME. If the clock change is large enough
    then the subtraction of the timer expiry value and base->offset can
    become negative which triggers the warning in
    clockevents_program_event().

    Check the subtraction result and set a negative value to 0.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Impact: fix CPU hotplug hang on Power6 testbox

    On architectures that support offlining all cpus (at least powerpc/pseries),
    hot-unpluging the tick_do_timer_cpu can result in a system hang.

    This comes from the fact that if the cpu going down happens to be the
    cpu doing the tick, then as the tick_do_timer_cpu handover happens after the
    cpu is dead (via the CPU_DEAD notification), we're left without ticks,
    jiffies are frozen and any task relying on timers (msleep, ...) is stuck.
    That's particularly the case for the cpu looping in __cpu_die() waiting
    for the dying cpu to be dead.

    This patch addresses this by having the tick_do_timer_cpu handover happen
    earlier during the CPU_DYING notification. For this, a new clockevent
    notification type is introduced (CLOCK_EVT_NOTIFY_CPU_DYING) which is triggered
    in hrtimer_cpu_notify().

    Signed-off-by: Sebastien Dugue
    Cc:
    Signed-off-by: Ingo Molnar

    Sebastien Dugue